LKML Archive on
help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <>
To: Ingo Molnar <>
Cc: Hugh Dickins <>, "H. Peter Anvin" <>,
	Andi Kleen <>,
	Linux Kernel Mailing List <>
Subject: Re: preempt bug in set_pmd_pfn?
Date: Thu, 06 Mar 2008 10:19:27 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Ingo Molnar wrote:
> actually, i think the correct approach is to remove the TLB flushing and 
> perhaps to check that the old pte is not present. Do we ever _change_ 
> mappings via __set_fixmap()? I think we only ever install them.

Yes, I think that's the case.  clear_fixmap() exists for clearing out an 
existing mapping, but its only used to clear out the WP test mapping and 
in early_iounmap (if called late).  I couldn't see any instances of 
replacing a mapping.

> but if we ever change them somewhere then the correct approach is to do 
> a flush_tlb_all(). It's not just about preemption but about the fact 
> that we modified the kernel address space and we must propagate that to 
> all CPUs.

Yes, I was wondering about that.  If __set_fixmap is only used at boot 
time, then a global flush isn't necessary, but if its deemed a 
general-purpose API in a normal running kernel, it needs to deal with 
cross-cpu flushes.

64-bit set_fixmap is __init only, and I'd be OK with that.  The only 
non-__init use in the 32-bit kernel is the compat vdso mapping, and that 
could easily be done by other means (though it would effectively become 
an opencoded set_fixmap, so perhaps that's not a good idea...).

> the vmalloc() backtrace you sent - how did set_pte_pfn() get into that 
> codepath - vmalloc shouldnt be using __set_fixmap().

No, that's set_pte_at(), which is the real issue in both cases.  
__set_fixmap calls both set_pte_at and flush_tlb_one, which is why it 
gets two backtrackes.


  reply	other threads:[~2008-03-06 18:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 21:13 Jeremy Fitzhardinge
2008-03-04 21:28 ` Ingo Molnar
2008-03-04 21:27   ` Jeremy Fitzhardinge
2008-03-05  6:48     ` Ingo Molnar
2008-03-05 14:29       ` Hugh Dickins
2008-03-05 16:48         ` Jeremy Fitzhardinge
2008-03-05 17:38           ` Hugh Dickins
2008-03-05 19:18             ` Jeremy Fitzhardinge
2008-03-05 20:40               ` Hugh Dickins
2008-03-06 12:52               ` Ingo Molnar
2008-03-06 18:19                 ` Jeremy Fitzhardinge [this message]
2008-03-05 16:45       ` Jeremy Fitzhardinge
2008-03-05  0:06 ` Andi Kleen
2008-03-05  0:07   ` Jeremy Fitzhardinge
2008-03-05  0:16     ` Andi Kleen
2008-03-05  0:19       ` Jeremy Fitzhardinge
2008-03-05  1:28         ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: preempt bug in set_pmd_pfn?' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).