Re: [PATCH] [4/8] CPA: Fix set_memory_x for ioremap

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Monday, February 11, 2008 - 5:45 am

> Wrong. We do call __pa() on vmalloc ranges (which is a known 

AFAIK nobody does actually currently. Although I expect sooner
or later someone will try since __ioremap() lost its pgprot argument
that made it so powerful. Best would be probably to stick
in some bugs just to catch that.


Note that 64bit EFI passes in a fixmap address (they just call
it efi_ioremap). Fixmaps are in the kernel mapping which __pa() handles
and then this gives a low number likely somewhere in memory
and might well trigger.


Are you sure about this for all possible __PAGE_OFFSET values? e.g. consider
1:3 split. Also there is always relocated kernels where kernels might be loaded 
quite high.


That doesn't check phys_addr at all?
 




I never claimed it was a cleanup. It's a fix and a optimization 
(don't do unnecessary coherency between direct mapping and other 
mappings for clearing X -- this means some innocent pages in the
direct mapping won't get split) 

Anyways even if you don't want to fix this clear bug I would ask
to still consider the optimization independently.

-Andi


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] [0/8] Various kernel mapping bug fixes, Andi Kleen, (Mon Feb 11, 2:34 am)
[PATCH] [4/8] CPA: Fix set_memory_x for ioremap, Andi Kleen, (Mon Feb 11, 2:34 am)
[PATCH] [5/8] Fix logic error in 64bit memory hotadd, Andi Kleen, (Mon Feb 11, 2:34 am)
[PATCH] [8/8] RFC: Fix some EFI problems, Andi Kleen, (Mon Feb 11, 2:34 am)
Re: [PATCH] [4/8] CPA: Fix set_memory_x for ioremap, Ingo Molnar, (Mon Feb 11, 5:27 am)
Re: [PATCH] [4/8] CPA: Fix set_memory_x for ioremap, Andi Kleen, (Mon Feb 11, 5:45 am)
Re: [PATCH] [6/8] Account overlapped mappings in end_pfn_map, Arjan van de Ven, (Mon Feb 11, 8:12 am)
Re: [PATCH] [5/8] Fix logic error in 64bit memory hotadd, Yasunori Goto, (Tue Feb 12, 3:35 am)
Re: [PATCH] [7/8] Implement true end_pfn_mapped for 32bit, Thomas Gleixner, (Tue Feb 12, 12:39 pm)
Re: [PATCH] [8/8] RFC: Fix some EFI problems, Thomas Gleixner, (Tue Feb 12, 1:04 pm)
Re: [PATCH] [8/8] RFC: Fix some EFI problems, Andi Kleen, (Tue Feb 12, 1:23 pm)
Re: [PATCH] [7/8] Implement true end_pfn_mapped for 32bit, Thomas Gleixner, (Tue Feb 12, 1:25 pm)
Re: [PATCH] [8/8] RFC: Fix some EFI problems, Thomas Gleixner, (Tue Feb 12, 1:48 pm)
Re: [PATCH] [8/8] RFC: Fix some EFI problems, Andi Kleen, (Wed Feb 13, 4:05 am)