Thread (6 messages) flat view 6 messages, 3 authors, 2021-01-22

Re: [PATCH v3 1/2] arm64: Improve kernel address detection of __is_lm_address()

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2021-01-22 14:52:11
Also in: lkml

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 <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Suggested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

The question is whether we leave this for 5.12 or we merge it earlier.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help