All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: kasan: log potential KASAN shadow aliases
@ 2021-12-02 11:27 ` Mark Rutland
  0 siblings, 0 replies; 12+ messages in thread
From: Mark Rutland @ 2021-12-02 11:27 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: andreyknvl, catalin.marinas, dvyukov, glider, linux-kernel,
	mark.rutland, ryabinin.a.a, will

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-12-02 16:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02 11:27 [PATCH 0/3] arm64: kasan: log potential KASAN shadow aliases Mark Rutland
2021-12-02 11:27 ` Mark Rutland
2021-12-02 11:27 ` [PATCH 1/3] kasan: move kasan_shadow_to_mem() to shared header Mark Rutland
2021-12-02 11:27   ` Mark Rutland
2021-12-02 11:27 ` [PATCH 2/3] arm64: mm: use die_kernel_fault() in do_mem_abort() Mark Rutland
2021-12-02 11:27   ` Mark Rutland
2021-12-02 11:27 ` [PATCH 3/3] arm64: mm: log potential KASAN shadow alias Mark Rutland
2021-12-02 11:27   ` Mark Rutland
2021-12-02 16:20   ` Andrey Konovalov
2021-12-02 16:20     ` Andrey Konovalov
2021-12-02 16:30     ` Mark Rutland
2021-12-02 16:30       ` Mark Rutland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.