On Fri, Jan 22, 2021 at 02:37:47PM +0000, Vincenzo Frascino wrote: > Currently, the __is_lm_address() check just masks out the top 12 bits > of the address, but if they are 0, it still yields a true result. > This has as a side effect that virt_addr_valid() returns true even for > invalid virtual addresses (e.g. 0x0). > > Improve the detection checking that it's actually a kernel address > starting at PAGE_OFFSET. > > Cc: Catalin Marinas <[email protected]> > Cc: Will Deacon <[email protected]> > Suggested-by: Catalin Marinas <[email protected]> > Signed-off-by: Vincenzo Frascino <[email protected]>
Reviewed-by: Catalin Marinas <[email protected]> The question is whether we leave this for 5.12 or we merge it earlier. -- Catalin

