Messages in this thread | | | Subject | Re: [PATCH v3 1/2] x86/ioremap: fix the pfn calculation mistake in __ioremap_check_ram() | From | Dave Hansen <> | Date | Thu, 1 Jul 2021 07:41:40 -0700 |
| |
On 6/21/21 5:34 AM, Yaohui Wang wrote: > For example, suppose memory range [phys_addr ~ phys_addr + PAGE_SIZE - 1] > is a normal RAM page. ioremap(phys_addr, PAGE_SIZE - 1) will succeed > (but it should not) because the pfn wrapping prevents this page to be > checked whether it touches non-ioremappable resources.
I would have expected such a scenario to get caught by this check:
if ((res->flags & IORESOURCE_SYSTEM_RAM) != IORESOURCE_SYSTEM_RAM) return false;
Was this issue found by inspection, or is it causing an actual problem in practice?
Also, it would be really nice to include the original authors when you send Fixes: for patches. BTW, scripts/get_maintainer.pl would have done this for you. I've added Tom and Brijesh. Please cc them in the future.
| |