linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] kasan: integrate with init_on_alloc/free
@ 2021-03-08 15:55 Andrey Konovalov
  2021-03-08 15:55 ` [PATCH v2 1/5] arm64: kasan: allow to init memory when setting tags Andrey Konovalov
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Andrey Konovalov @ 2021-03-08 15:55 UTC (permalink / raw)
  To: Catalin Marinas, Vincenzo Frascino, Alexander Potapenko, Marco Elver
  Cc: Andrew Morton, Will Deacon, Dmitry Vyukov, Andrey Ryabinin,
	Peter Collingbourne, Evgenii Stepanov, Branislav Rankov,
	Kevin Brodsky, kasan-dev, linux-arm-kernel, linux-mm,
	linux-kernel, Andrey Konovalov

This patch series integrates HW_TAGS KASAN with init_on_alloc/free
by initializing memory via the same arm64 instruction that sets memory
tags.

This is expected to improve HW_TAGS KASAN performance when
init_on_alloc/free is enabled. The exact perfomance numbers are unknown
as MTE-enabled hardware doesn't exist yet.

Changes v1->v2:
- Add and use kasan_has_integrated_init() helper.
- Update comments to not explicitly mention relation between
  HW_TAGS KASAN and memory init.
- Fix non initting memory with kasan=off by checking kasan_enabled()
  instead of IS_ENABLED(CONFIG_KASAN_HW_TAGS).

Andrey Konovalov (5):
  arm64: kasan: allow to init memory when setting tags
  kasan: init memory in kasan_(un)poison for HW_TAGS
  kasan, mm: integrate page_alloc init with HW_TAGS
  kasan, mm: integrate slab init_on_alloc with HW_TAGS
  kasan, mm: integrate slab init_on_free with HW_TAGS

 arch/arm64/include/asm/memory.h    |  4 +-
 arch/arm64/include/asm/mte-kasan.h | 20 ++++++---
 include/linux/kasan.h              | 48 +++++++++++++-------
 lib/test_kasan.c                   |  4 +-
 mm/kasan/common.c                  | 45 +++++++++----------
 mm/kasan/generic.c                 | 12 ++---
 mm/kasan/kasan.h                   | 19 ++++----
 mm/kasan/shadow.c                  | 10 ++---
 mm/kasan/sw_tags.c                 |  2 +-
 mm/mempool.c                       |  4 +-
 mm/page_alloc.c                    | 37 +++++++++++-----
 mm/slab.c                          | 43 ++++++++++--------
 mm/slab.h                          | 17 ++++++--
 mm/slub.c                          | 70 +++++++++++++++---------------
 14 files changed, 196 insertions(+), 139 deletions(-)

-- 
2.30.1.766.gb4fecdf3b7-goog



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

end of thread, other threads:[~2021-03-09 13:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 15:55 [PATCH v2 0/5] kasan: integrate with init_on_alloc/free Andrey Konovalov
2021-03-08 15:55 ` [PATCH v2 1/5] arm64: kasan: allow to init memory when setting tags Andrey Konovalov
2021-03-08 16:58   ` Catalin Marinas
2021-03-09 13:09     ` Andrey Konovalov
2021-03-08 15:55 ` [PATCH v2 2/5] kasan: init memory in kasan_(un)poison for HW_TAGS Andrey Konovalov
2021-03-08 15:55 ` [PATCH v2 3/5] kasan, mm: integrate page_alloc init with HW_TAGS Andrey Konovalov
2021-03-08 16:07   ` Marco Elver
2021-03-08 15:55 ` [PATCH v2 4/5] kasan, mm: integrate slab init_on_alloc " Andrey Konovalov
2021-03-08 16:24   ` Marco Elver
2021-03-08 15:55 ` [PATCH v2 5/5] kasan, mm: integrate slab init_on_free " Andrey Konovalov
2021-03-08 16:27   ` Marco Elver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox