[PATCH v6 7/9] kselftest/arm64/mte: add verification for address tag in signal handler
Mark Brown
broonie at kernel.org
Wed Jun 11 05:12:24 PDT 2025
On Wed, Jun 11, 2025 at 10:41:05AM +0100, Yeoreum Yun wrote:
> Add the address tag [63:60] verification when synchronous mte fault is happen.
> when signal handler is registered with SA_EXPOSE_TAGBITS,
> address includes not only memory tag [59:56] but also address tag.
> Therefore, when verify fault address location, remove both tags
Reviewed-by: Mark Brown <broonie at kernel.org>
though if you're doing a new version there's minor stylistic stuff:
> /* 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(KSFT_FAIL);
> + }
Indentation seems off, also there's ksft_exit_fail_msg() but either way
works.
-------------- 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/20250611/f60830be/attachment.sig>
More information about the linux-arm-kernel
mailing list