]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Do not pass tagged addresses to __is_lm_address()
authorCatalin Marinas <catalin.marinas@arm.com>
Mon, 1 Feb 2021 19:06:33 +0000 (19:06 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 2 Feb 2021 17:44:47 +0000 (17:44 +0000)
commit4ee28c20df1936c0f24b5a1199b7250a5d9e8cde
tree4d546dc0bd7591ba1688ec72d9974a029608d1c9
parent676ab4fc36e7df5afae645524019d66d293eaf9f
arm64: Do not pass tagged addresses to __is_lm_address()

Commit 1a43d5bc6efc ("arm64: Fix kernel address detection of
__is_lm_address()") fixed the incorrect validation of addresses below
PAGE_OFFSET. However, it no longer allowed tagged addresses to be passed
to virt_addr_valid().

Fix this by explicitly resetting the pointer tag prior to invoking
__is_lm_address(). This is consistent with the __lm_to_phys() macro.

Fixes: 1a43d5bc6efc ("arm64: Fix kernel address detection of __is_lm_address()")
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Cc: <stable@vger.kernel.org> # 5.4.x
Cc: Will Deacon <will@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20210201190634.22942-2-catalin.marinas@arm.com
arch/arm64/include/asm/memory.h
arch/arm64/mm/physaddr.c