[PATCH v5 4/6] kselftest/arm64/mte: preparation for mtefar test
Mark Brown
broonie at kernel.org
Tue Jun 10 08:21:39 PDT 2025
On Tue, Jun 10, 2025 at 04:01:42PM +0100, Yeoreum Yun wrote:
> If FEAT_MTE_TAGGED_FAR (Armv8.9) is supported, bits 63:60 of the fault address
> are preserved in response to synchronous tag check faults (SEGV_MTESERR).
>
> This patch is preparation for testing FEAT_MTE_TAGGED_FAR.
> It shouldn't change the test result.
I'm not clear from the above what the change is intended to do (ie, how
does it prepare for testing FEAT_MTE_TAGGED_FAR). I think this could
usefully be split out into multiple commits (eg, adding logging of the
additional si_ fields separately, or splitting the renaming MT_CLEAR_TAG
to MT_CLEAR_TAGS), it's kind of hard to review as is.
> @@ -45,13 +64,18 @@ void mte_default_handler(int signum, siginfo_t *si, void *uc)
> }
> /* Compare the context for precise error */
> else if (si->si_code == SEGV_MTESERR) {
> + if ((!mtefar_support && si_atag) || (si_atag != MT_FETCH_ATAG(cur_mte_cxt.trig_addr))) {
> + ksft_print_msg("Invalid MTE synchronous exception caught for address tag! si_tag=%x, si_atag: %x\n", si_tag, si_atag);
> + exit(1);
> + }
We should really exit with a kselftest error rather than just a number,
though I see this is just copying the existing style for the file so
*shrug*.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250610/747fca2c/attachment.sig>
More information about the linux-arm-kernel
mailing list