All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] powerpc: KASAN for 64-bit Book3S on Radix
@ 2019-08-06 23:38 Daniel Axtens
  2019-08-06 23:38 ` [PATCH 1/4] kasan: allow arches to provide their own early shadow setup Daniel Axtens
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Daniel Axtens @ 2019-08-06 23:38 UTC (permalink / raw)
  To: aneesh.kumar, christophe.leroy, bsingharora
  Cc: linuxppc-dev, kasan-dev, Daniel Axtens

Building on the work of Christophe, Aneesh and Balbir, I've ported
KASAN to 64-bit Book3S kernels running on the Radix MMU.

It builds on top Christophe's work on 32bit. It also builds on my
generic KASAN_VMALLOC series, available at:
https://patchwork.kernel.org/project/linux-mm/list/?series=153209

This provides full inline instrumentation on radix, but does require
that you be able to specify the amount of memory on the system at
compile time. More details in patch 4.

Notable changes from the RFC:

 - I've dropped Book3E 64-bit for now.

 - Now instead of hacking into the KASAN core to disable module
   allocations, we use KASAN_VMALLOC.

 - More testing, including on real hardware. This revealed that
   discontiguous memory is a bit of a headache, at the moment we
   must disable memory not contiguous from 0. 
   
 - Update to deal with kasan bitops instrumentation that landed
   between RFC and now.

 - Documentation!

 - Various cleanups and tweaks.

I am getting occasional problems on boot of real hardware where it
seems vmalloc space mappings don't get installed in time. (We get a
BUG that memory is not accessible, but by the time we hit xmon the
memory then is accessible!) It happens once every few boots. I haven't
yet been able to figure out what is happening and why. I'm going to
look in to it, but I think the patches are in good enough shape to
review while I work on it.

Regards,
Daniel

Daniel Axtens (4):
  kasan: allow arches to provide their own early shadow setup
  kasan: support instrumented bitops with generic non-atomic bitops
  powerpc: support KASAN instrumentation of bitops
  powerpc: Book3S 64-bit "heavyweight" KASAN support

 Documentation/dev-tools/kasan.rst            |   7 +-
 Documentation/powerpc/kasan.txt              | 111 ++++++++++++++
 arch/powerpc/Kconfig                         |   4 +
 arch/powerpc/Kconfig.debug                   |  21 +++
 arch/powerpc/Makefile                        |   7 +
 arch/powerpc/include/asm/bitops.h            |  25 ++--
 arch/powerpc/include/asm/book3s/64/radix.h   |   5 +
 arch/powerpc/include/asm/kasan.h             |  35 ++++-
 arch/powerpc/kernel/process.c                |   8 ++
 arch/powerpc/kernel/prom.c                   |  57 +++++++-
 arch/powerpc/mm/kasan/Makefile               |   1 +
 arch/powerpc/mm/kasan/kasan_init_book3s_64.c |  76 ++++++++++
 include/asm-generic/bitops-instrumented.h    | 144 ++++++++++---------
 include/linux/kasan.h                        |   2 +
 lib/Kconfig.kasan                            |   3 +
 mm/kasan/init.c                              |  10 ++
 16 files changed, 431 insertions(+), 85 deletions(-)
 create mode 100644 Documentation/powerpc/kasan.txt
 create mode 100644 arch/powerpc/mm/kasan/kasan_init_book3s_64.c

-- 
2.20.1


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

end of thread, other threads:[~2019-12-13 21:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-06 23:38 [PATCH 0/4] powerpc: KASAN for 64-bit Book3S on Radix Daniel Axtens
2019-08-06 23:38 ` [PATCH 1/4] kasan: allow arches to provide their own early shadow setup Daniel Axtens
2019-08-07 15:14   ` Christophe Leroy
2019-08-07 20:19     ` Christophe Leroy
2019-12-10  4:50     ` Daniel Axtens
2019-08-06 23:38 ` [PATCH 2/4] kasan: support instrumented bitops with generic non-atomic bitops Daniel Axtens
2019-08-07 14:58   ` Christophe Leroy
2019-08-06 23:38 ` [PATCH 3/4] powerpc: support KASAN instrumentation of bitops Daniel Axtens
2019-08-07 15:01   ` Christophe Leroy
2019-08-06 23:38 ` [PATCH 4/4] powerpc: Book3S 64-bit "heavyweight" KASAN support Daniel Axtens
2019-08-07 16:34   ` Christophe Leroy
2019-08-09 15:35     ` Christophe Leroy
2019-12-10  5:10     ` Daniel Axtens
2019-12-13 11:44       ` Christophe Leroy
2019-12-13 13:40         ` Daniel Axtens
2019-08-07 15:45 ` [PATCH 0/4] powerpc: KASAN for 64-bit Book3S on Radix Christophe Leroy
2019-08-16  4:11   ` Daniel Axtens

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.