From: Yeoreum Yun <yeoreum.yun@arm.com>
To: catalin.marinas@arm.com, pcc@google.com, will@kernel.org,
broonie@kernel.org, anshuman.khandual@arm.com,
joey.gouly@arm.com, maz@kernel.org, oliver.upton@linux.dev,
frederic@kernel.org, james.morse@arm.com,
hardevsinh.palaniya@siliconsignals.io, huangxiaojia2@huawei.com,
mark.rutland@arm.com, samuel.holland@sifive.com,
palmer@rivosinc.com, charlie@rivosinc.com,
thiago.bauermann@linaro.org, bgray@linux.ibm.com,
tglx@linutronix.de, puranjay@kernel.org, david@redhat.com,
yang@os.amperecomputing.com, mbenes@suse.cz,
joel.granados@kernel.org
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 0/7] support FEAT_MTE_STORE_ONLY feature
Date: Mon, 19 May 2025 09:12:56 +0100 [thread overview]
Message-ID: <aCroCLuvhwnrnfjR@e129823.arm.com> (raw)
In-Reply-To: <20250507154654.1937588-1-yeoreum.yun@arm.com>
Gentle ping in case of forgoten...
> ARMv8.5 based processors introduce 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.
> For this, application can use PR_MTE_STORE_ONLY flag
> when it sets the MTE setting with prctl().
>
> This feature omits tag check for fetch/read operation.
> So it might be used not only debugging purpose but also be used
> by application requiring strong memory safty in normal env.
>
> Patch Sequences
> ================
>
> Patch #1 adds cpufeature FEAT_MTE_STORE_ONLY
>
> Patch #2 introduce new flag -- PR_MTE_STORE_ONLY
>
> Patch #3 support MTE_STORE_ONLY feature
>
> Patch #4 add HWCAP for MTE_STORE_ONLY
>
> Patch #5 adds mte store-only hwcap test
>
> Patch #6 preparation for adding mte store-only testcase
>
> Patch #7 adds mte store-only testcases
>
> Patch History
> ================
>
> v3 to v4:
> - separate cpufeature and hwcap commit.
> - add mte store-only testcases in check_mmap_options
> - https://lore.kernel.org/linux-arm-kernel/aApBk8eGA2Eo57fq@e129823.arm.com/
>
> v2 to v3:
> - rebase to 6.15-rc1
> - https://lore.kernel.org/linux-arm-kernel/20250403174701.74312-1-yeoreum.yun@arm.com/
>
> v1 to v2:
> - add doc to elf_hwcaps.rst
> - add MTE_STORE_ONLY hwcap test
> - https://lore.kernel.org/linux-arm-kernel/20250403142707.26397-1-yeoreum.yun@arm.com/
>
> Note:
> This patch based on
> https://lore.kernel.org/linux-arm-kernel/20250507095757.1663684-1-yeoreum.yun@arm.com/
>
> Yeoreum Yun (7):
> arm64/cpufeature: add MTE_STORE_ONLY feature
> prtcl: introduce PR_MTE_STORE_ONLY
> arm64/kernel: support store-only mte tag check
> arm64/hwcaps: add MTE_STORE_ONLY hwcaps
> tools/kselftest: add MTE_STORE_ONLY feature hwcap test
> kselftest/arm64/mte: preparation for mte store only test
> kselftest/arm64/mte: add MTE_STORE_ONLY testcases
>
> Documentation/arch/arm64/elf_hwcaps.rst | 3 +
> arch/arm64/include/asm/hwcap.h | 1 +
> arch/arm64/include/asm/processor.h | 2 +
> arch/arm64/include/uapi/asm/hwcap.h | 1 +
> arch/arm64/kernel/cpufeature.c | 9 ++
> arch/arm64/kernel/cpuinfo.c | 1 +
> arch/arm64/kernel/mte.c | 11 +-
> arch/arm64/kernel/process.c | 6 +-
> arch/arm64/tools/cpucaps | 1 +
> include/uapi/linux/prctl.h | 2 +
> tools/testing/selftests/arm64/abi/hwcap.c | 6 +
> .../selftests/arm64/mte/check_buffer_fill.c | 10 +-
> .../selftests/arm64/mte/check_child_memory.c | 4 +-
> .../arm64/mte/check_hugetlb_options.c | 6 +-
> .../selftests/arm64/mte/check_ksm_options.c | 2 +-
> .../selftests/arm64/mte/check_mmap_options.c | 116 ++++++++++++------
> .../testing/selftests/arm64/mte/check_prctl.c | 25 ++--
> .../arm64/mte/check_tags_inclusion.c | 8 +-
> .../selftests/arm64/mte/check_user_mem.c | 2 +-
> .../selftests/arm64/mte/mte_common_util.c | 14 ++-
> .../selftests/arm64/mte/mte_common_util.h | 3 +-
> 21 files changed, 167 insertions(+), 66 deletions(-)
>
> --
> LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
>
--
Sincerely,
Yeoreum Yun
prev parent reply other threads:[~2025-05-19 8:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 15:46 [PATCH v4 0/7] support FEAT_MTE_STORE_ONLY feature Yeoreum Yun
2025-05-07 15:46 ` [PATCH v4 1/7] arm64/cpufeature: add MTE_STORE_ONLY feature Yeoreum Yun
2025-05-07 15:46 ` [PATCH v4 2/7] prtcl: introduce PR_MTE_STORE_ONLY Yeoreum Yun
2025-05-07 15:46 ` [PATCH v4 3/7] arm64/kernel: support store-only mte tag check Yeoreum Yun
2025-05-07 15:46 ` [PATCH v4 4/7] arm64/hwcaps: add MTE_STORE_ONLY hwcaps Yeoreum Yun
2025-05-07 15:46 ` [PATCH v4 5/7] tools/kselftest: add MTE_STORE_ONLY feature hwcap test Yeoreum Yun
2025-05-07 15:46 ` [PATCH v4 6/7] kselftest/arm64/mte: preparation for mte store only test Yeoreum Yun
2025-05-07 15:46 ` [PATCH v4 7/7] kselftest/arm64/mte: add MTE_STORE_ONLY testcases Yeoreum Yun
2025-05-19 8:12 ` Yeoreum Yun [this message]
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=aCroCLuvhwnrnfjR@e129823.arm.com \
--to=yeoreum.yun@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=bgray@linux.ibm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=charlie@rivosinc.com \
--cc=david@redhat.com \
--cc=frederic@kernel.org \
--cc=hardevsinh.palaniya@siliconsignals.io \
--cc=huangxiaojia2@huawei.com \
--cc=james.morse@arm.com \
--cc=joel.granados@kernel.org \
--cc=joey.gouly@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=mbenes@suse.cz \
--cc=oliver.upton@linux.dev \
--cc=palmer@rivosinc.com \
--cc=pcc@google.com \
--cc=puranjay@kernel.org \
--cc=samuel.holland@sifive.com \
--cc=tglx@linutronix.de \
--cc=thiago.bauermann@linaro.org \
--cc=will@kernel.org \
--cc=yang@os.amperecomputing.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.