[PATCH 0/3] arm64: kasan: log potential KASAN shadow aliases

Mark Rutland mark.rutland at arm.com
Thu Dec 2 03:27:28 PST 2021


When using KASAN_GENERIC or KASAN_SW_TAGS, many representable pointer
values (e.g. NULL) don't have a legitimate shadow address. If KASAN
instrumentation attempts to access the shadow for such pointers, it will
fault on an unusual-looking address, e.g.

| Unable to handle kernel paging request at virtual address dfff800000000001

To make this easier to debug, this series makes the arm64 fault handling
code log the corresponding memory range for potential shadow acceses,
e.g.

| Unable to handle kernel paging request at virtual address dfff800000000001
| Possible KASAN shadow access for range [0000000000000008..000000000000000f]

Thanks,
Mark.

Mark Rutland (3):
  kasan: move kasan_shadow_to_mem() to shared header
  arm64: mm: use die_kernel_fault() in do_mem_abort()
  arm64: mm: log potential KASAN shadow alias

 arch/arm64/mm/fault.c | 13 ++++++++-----
 include/linux/kasan.h |  6 ++++++
 mm/kasan/kasan.h      |  6 ------
 3 files changed, 14 insertions(+), 11 deletions(-)

-- 
2.30.2




More information about the linux-arm-kernel mailing list