Skip to content

KASAN support for 64-bit Book 3S powerpc

Paul Mackerras linuxppc-dev 2 versions – In review

Get series with b4
b4 am YoTEb2BaH3MDkH+2@cleo

Versions newest first · linked by author and title

  1. v2 Latest6 patches 4 repliesIn review
  2. v13 patches 4 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6kasan: Document support on 32-bit powerpcDocumentation/powerpc/kasan.txt+12 -00 replies
2/6powerpc/mm/kasan: rename kasan_init_32.c to init_32.carch/powerpc/mm/kasan/Makefile arch/powerpc/mm/kasan/init_32.c+1 -10 replies
3/6powerpc: Book3S 64-bit outline-only KASAN supportDocumentation/powerpc/kasan.txt arch/powerpc/Kconfig arch/powerpc/Kconfig.debug +13 more+234 -71 reply
4/6powerpc/kasan: Don't instrument non-maskable or raw interruptsarch/powerpc/include/asm/interrupt.h arch/powerpc/kernel/smp.c arch/powerpc/kernel/traps.c +2 more+59 -260 replies
5/6powerpc/kasan: Disable address sanitization in kexec pathsarch/powerpc/kexec/Makefile arch/powerpc/platforms/pseries/Makefile arch/powerpc/sysdev/xics/xics-common.c +1 more+9 -40 replies
6/6Documentation/kasan: Update details of KASAN on powerpcDocumentation/dev-tools/kasan.rst+6 -11 reply

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchChristophe LeroyBalbir Singh
1/6R-b
2/6
3/6Originally-by
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] KASAN support for 64-bit Book 3S powerpc

This patch series implements KASAN on 64-bit POWER with radix MMU, such as POWER9 or POWER10. Daniel Axtens posted previous versions of these patches, but is no longer working on KASAN, and I have been asked to get them ready for inclusion.

Because of various technical difficulties, mostly around the need to allow for code that runs in real mode, we only support "outline" mode (as opposed to "inline" mode), where the compiler adds a call to a checking procedure before every store to memory.

This series has known deficiencies, specifically that the kernel will crash on boot on a HPT system, and that out-of-bounds accesses to module global data are not caught (which leads to one of the KASAN tests failing).

v2: Split the large patch 3/3 of the previous series into three patches and addressed review comments; put the generic documentation changes in a separate patch at the end of the series; removed the RFC tag.

Comments welcome.

Paul.

 Documentation/dev-tools/kasan.rst                  |   7 +-
 Documentation/powerpc/kasan.txt                    |  58 ++++++++++++
 arch/powerpc/Kconfig                               |   5 +-
 arch/powerpc/Kconfig.debug                         |   3 +-
 arch/powerpc/include/asm/book3s/64/hash.h          |   4 +
 arch/powerpc/include/asm/book3s/64/pgtable.h       |   3 +
 arch/powerpc/include/asm/book3s/64/radix.h         |  12 ++-
 arch/powerpc/include/asm/interrupt.h               |  52 ++++++++---
 arch/powerpc/include/asm/kasan.h                   |  22 +++++
 arch/powerpc/kernel/Makefile                       |  11 +++
 arch/powerpc/kernel/smp.c                          |  22 ++---
 arch/powerpc/kernel/traps.c                        |   6 +-
 arch/powerpc/kexec/Makefile                        |   2 +
 arch/powerpc/kvm/Makefile                          |   5 +
 arch/powerpc/lib/Makefile                          |   3 +
 arch/powerpc/mm/book3s64/Makefile                  |   9 ++
 arch/powerpc/mm/kasan/Makefile                     |   3 +-
 .../mm/kasan/{kasan_init_32.c => init_32.c}        |   0
 arch/powerpc/mm/kasan/init_book3s_64.c             | 103 +++++++++++++++++++++
 arch/powerpc/mm/ptdump/ptdump.c                    |   3 +-
 arch/powerpc/platforms/Kconfig.cputype             |   1 +
 arch/powerpc/platforms/powernv/Makefile            |   8 ++
 arch/powerpc/platforms/powernv/smp.c               |   2 +-
 arch/powerpc/platforms/pseries/Makefile            |   6 ++
 arch/powerpc/sysdev/xics/xics-common.c             |   4 +-
 arch/powerpc/sysdev/xive/common.c                  |   4 +-
 26 files changed, 320 insertions(+), 38 deletions(-)