From: Daniel Axtens <dja@axtens.net>
To: aneesh.kumar@linux.ibm.com, christophe.leroy@c-s.fr,
bsingharora@gmail.com
Cc: linuxppc-dev@lists.ozlabs.org, kasan-dev@googlegroups.com,
Daniel Axtens <dja@axtens.net>
Subject: [PATCH 0/4] powerpc: KASAN for 64-bit Book3S on Radix
Date: Wed, 7 Aug 2019 09:38:23 +1000 [thread overview]
Message-ID: <20190806233827.16454-1-dja@axtens.net> (raw)
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
next reply other threads:[~2019-08-06 23:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-06 23:38 Daniel Axtens [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190806233827.16454-1-dja@axtens.net \
--to=dja@axtens.net \
--cc=aneesh.kumar@linux.ibm.com \
--cc=bsingharora@gmail.com \
--cc=christophe.leroy@c-s.fr \
--cc=kasan-dev@googlegroups.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).