workflows.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] introduce kasan stonly-mode in hw-tags
@ 2025-08-11 17:36 Yeoreum Yun
  2025-08-11 17:36 ` [PATCH 1/2] kasan/hw-tags: introduce store only mode Yeoreum Yun
  2025-08-11 17:36 ` [PATCH 2/2] kasan: apply store-only mode in kasan kunit testcases Yeoreum Yun
  0 siblings, 2 replies; 11+ messages in thread
From: Yeoreum Yun @ 2025-08-11 17:36 UTC (permalink / raw)
  To: ryabinin.a.a, glider, andreyknvl, dvyukov, vincenzo.frascino,
	corbet, catalin.marinas, will, akpm, scott, jhubbard,
	pankaj.gupta, leitao, kaleshsingh, maz, broonie, oliver.upton,
	james.morse, ardb, hardevsinh.palaniya, david, yang
  Cc: kasan-dev, workflows, linux-doc, linux-kernel, linux-arm-kernel,
	linux-mm, Yeoreum Yun

Hardware tag based KASAN is implemented using the Memory Tagging Extension
(MTE) feature.

MTE is built on top of the ARMv8.0 virtual address tagging TBI
(Top Byte Ignore) feature and allows software to access a 4-bit
allocation tag for each 16-byte granule in the physical address space.
A logical tag is derived from bits 59-56 of the virtual
address used for the memory access. A CPU with MTE enabled will compare
the logical tag against the allocation tag and potentially raise an
tag check fault on mismatch, subject to system registers configuration.

Since ARMv8.9, FEAT_MTE_STORE_ONLY can be used to restrict raise of tag
check fault on store operation only.

Using this feature (FEAT_MTE_STORE_ONLY), introduce KASAN store-only mode
which restricts KASAN check store operation only.
This mode omits KASAN check for fetch/load operation.
Therefore, it might be used not only debugging purpose but also in
normal environment.

Yeoreum Yun (2):
  kasan/hw-tags: introduce store only mode
  kasan: apply store-only mode in kasan kunit testcases

 Documentation/dev-tools/kasan.rst  |   3 +
 arch/arm64/include/asm/memory.h    |   1 +
 arch/arm64/include/asm/mte-kasan.h |   6 +
 arch/arm64/kernel/cpufeature.c     |   6 +
 arch/arm64/kernel/mte.c            |  14 +
 include/linux/kasan.h              |   2 +
 mm/kasan/hw_tags.c                 |  76 +++++-
 mm/kasan/kasan.h                   |  10 +
 mm/kasan/kasan_test_c.c            | 423 +++++++++++++++++++++++------
 9 files changed, 457 insertions(+), 84 deletions(-)


base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
--
LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}


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

end of thread, other threads:[~2025-08-13  6:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11 17:36 [PATCH 0/2] introduce kasan stonly-mode in hw-tags Yeoreum Yun
2025-08-11 17:36 ` [PATCH 1/2] kasan/hw-tags: introduce store only mode Yeoreum Yun
2025-08-12 16:25   ` Andrey Konovalov
2025-08-13  6:26     ` Yeoreum Yun
2025-08-11 17:36 ` [PATCH 2/2] kasan: apply store-only mode in kasan kunit testcases Yeoreum Yun
2025-08-12 16:28   ` Andrey Konovalov
2025-08-12 16:56     ` Yeoreum Yun
2025-08-12 17:58       ` Andrey Konovalov
2025-08-12 21:27         ` Yeoreum Yun
2025-08-13  2:45           ` Andrey Konovalov
2025-08-13  6:20             ` Yeoreum Yun

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).