Re: [PATCH] x86: ioremap_nocache fix

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Friday, January 25, 2008 - 3:27 am

* Huang, Ying <ying.huang@intel.com> wrote:


very interesting! Is this in response to a bug you've triggered?

i believe the scenario you outlne could trigger on 64-bit boxen, if they 
try to ioremap an area not covered by the direct ptes:


and we'd incorrectly fail the ioremap() with -EINVAL, and return a hard 
error to the driver - and causing broken boxes, right?

Thomas has unified most of ioremap*.c as well, and we'll make sure this 
fix survives the unification. The 64-bit code limped along before by 
accident, because the (pre-cleanup) 64-bit __change_page_attr() code 
incorrectly returned 0 for invalid ranges:

        kpte = lookup_address(address);
        if (!kpte) return 0;

which masked the bug you fixed now. 32-bit always returned -EINVAL on 
invalid ranges.

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

Messages in current thread:
[PATCH] x86: ioremap_nocache fix, Huang, Ying, (Thu Jan 24, 10:22 pm)
Re: [PATCH] x86: ioremap_nocache fix, Ingo Molnar, (Fri Jan 25, 3:27 am)
Re: [PATCH] x86: ioremap_nocache fix, huang ying, (Fri Jan 25, 6:50 am)