Thread (26 messages) 26 messages, 2 authors, 2025-06-11

Re: [PATCH v6 7/9] kselftest/arm64/mte: add verification for address tag in signal handler

From: Yeoreum Yun <hidden>
Date: 2025-06-11 13:27:18
Also in: linux-doc, lkml

Hi Mark,
On Wed, Jun 11, 2025 at 10:41:05AM +0100, Yeoreum Yun wrote:
quoted
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@kernel.org>
Thanks :D
though if you're doing a new version there's minor stylistic stuff:
quoted
 		/* 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.
I'll fix the indentation next round. Thanks to let me know.

--
Sincerely,
Yeoreum Yun
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help