Skip to content

Commit 8dd4daa

Browse files
Shyam Thombrewilldeacon
authored andcommitted
arm64: mm: reset address tag set by kasan sw tagging
KASAN sw tagging sets a random tag of 8 bits in the top byte of the pointer returned by the memory allocating functions. So for the functions unaware of this change, the top 8 bits of the address must be reset which is done by the function arch_kasan_reset_tag(). Signed-off-by: Shyam Thombre <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 413d3ea commit 8dd4daa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/arm64/mm/mmu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@ int kern_addr_valid(unsigned long addr)
723723
pmd_t *pmdp, pmd;
724724
pte_t *ptep, pte;
725725

726+
addr = arch_kasan_reset_tag(addr);
726727
if ((((long)addr) >> VA_BITS) != -1UL)
727728
return 0;
728729

0 commit comments

Comments
 (0)