[PATCH v5 4/6] kselftest/arm64/mte: preparation for mtefar test

Yeoreum Yun yeoreum.yun at arm.com
Tue Jun 10 08:38:56 PDT 2025


Hi Mark,

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

My bad. I'll split this one. Thanks

>
> > @@ -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*.

Okay. I'll change this

--
Sincerely,
Yeoreum Yun



More information about the linux-arm-kernel mailing list