Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Expand MTE tagging API to multi-page and !0 tags
@ 2026-12-01 14:49 Pierre-Clément Tosi
  2026-12-01 14:49 ` [PATCH 1/4] arm64: Introduce mte_tag_of()/mte_tagged() helpers Pierre-Clément Tosi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pierre-Clément Tosi @ 2026-12-01 14:49 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Lorenzo Stoakes (ARM),
	Vincenzo Frascino
  Cc: Marc Zyngier, Fuad Tabba, Mark Rutland, Ryan Roberts,
	linux-arm-kernel, linux-kernel, Pierre-Clément Tosi

(Based on kvmarm/fixes, to avoid conflicts with Fuad's patches [1])

This series aims to provide an MTE page-tagging API which

1. supports non-zero tags, such that KASAN can reuse it (future series)
2. has built-in support for multi-page passes, for folios, (m)THP, ...

It achieves this as follows:

- patch 1 adds helpers for logical tags, used by later commits
- patch 2 decouples the page tagging API from mte.h, to address on-going
  pains of circular dependencies that header is very prone to
- patch 3 adds support for multi-page tagging with any tag value
- patch 4 adds separate functions for clearing the data along tagging

The new functions are named to fit in with existing kernel APIs and for
conciseness and clarity. A later series will make use of them and
introduce helpers for callers not dealing directly with void*, which is
most of them. That's moved out into a separate series so that the
bikeshedding doesn't delay other series (optimizations & integration
with KASAN).

Tested on v7.4-rc1 with [1]:
	git cherry-pick cbf47fe57a56 62b9e1f75a3c da9f24dc4336

[1]: https://lore.kernel.org/all/20261021110700.493315-1-fuad.tabba@linux.dev

Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
---
Pierre-Clément Tosi (4):
      arm64: Introduce mte_tag_of()/mte_tagged() helpers
      arm64: Introduce <asm/mte-tagging.h>
      arm64: Introduce mte_tag_page[s]()
      arm64: Introduce mte_[tag_]clear_page[s]()

 arch/arm64/include/asm/mte-def.h     | 20 +++++++++++
 arch/arm64/include/asm/mte-kasan.h   |  4 +--
 arch/arm64/include/asm/mte-tagging.h | 67 ++++++++++++++++++++++++++++++++++++
 arch/arm64/include/asm/mte.h         |  5 ---
 arch/arm64/kernel/cpufeature.c       |  1 +
 arch/arm64/kernel/mte.c              |  1 +
 arch/arm64/kvm/guest.c               |  1 +
 arch/arm64/kvm/mmu.c                 |  1 +
 arch/arm64/lib/mte.S                 | 26 +++++++-------
 arch/arm64/mm/fault.c                |  3 +-
 arch/arm64/mm/proc.S                 |  8 ++---
 11 files changed, 111 insertions(+), 26 deletions(-)
---
base-commit: 012e4bc01e339a65dc7c59181b5efb33b171d12c
change-id: 20261129-mte-page-api-f285a514f1ad

Best regards,
-- 
Pierre-Clément Tosi <ptosi@google.com>



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

end of thread, other threads:[~2026-12-01 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 14:49 [PATCH 0/4] Expand MTE tagging API to multi-page and !0 tags Pierre-Clément Tosi
2026-12-01 14:49 ` [PATCH 1/4] arm64: Introduce mte_tag_of()/mte_tagged() helpers Pierre-Clément Tosi
2026-12-01 14:49 ` [PATCH 2/4] arm64: Introduce <asm/mte-tagging.h> Pierre-Clément Tosi
2026-12-01 14:49 ` [PATCH 3/4] arm64: Introduce mte_tag_page[s]() Pierre-Clément Tosi

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