[PATCH v3 2/2] kasan, arm64: fix pointer tags in KASAN reports

Catalin Marinas catalin.marinas at arm.com
Fri Jan 15 12:59:23 EST 2021


On Fri, Jan 15, 2021 at 06:41:53PM +0100, Andrey Konovalov wrote:
> As of the "arm64: expose FAR_EL1 tag bits in siginfo" patch, the address
> that is passed to report_tag_fault has pointer tags in the format of 0x0X,
> while KASAN uses 0xFX format (note the difference in the top 4 bits).
> 
> Fix up the pointer tag for kernel pointers in do_tag_check_fault by
> setting them to the same value as bit 55. Explicitly use __untagged_addr()
> instead of untagged_addr(), as the latter doesn't affect TTBR1 addresses.
> 
> Link: https://linux-review.googlesource.com/id/I9ced973866036d8679e8f4ae325de547eb969649

Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>

Unless there are other comments, I'll queue this for -rc5 through the
arm64 tree (I already finalised the arm64 for-next/fixes branch for this
week).

-- 
Catalin



More information about the linux-arm-kernel mailing list