Skip to content

Commit 191e678

Browse files
brooniectmarinas
authored andcommitted
kselftest/arm64: Log unexpected asynchronous MTE faults
Help people figure out problems by printing a diagnostic when we get an unexpected asynchronous fault. Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/r/20220419103243.24774-3-broonie@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 3f374d7 commit 191e678

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/testing/selftests/arm64/mte/mte_common_util.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ void mte_default_handler(int signum, siginfo_t *si, void *uc)
3737
if (si->si_code == SEGV_MTEAERR) {
3838
if (cur_mte_cxt.trig_si_code == si->si_code)
3939
cur_mte_cxt.fault_valid = true;
40+
else
41+
ksft_print_msg("Got unexpected SEGV_MTEAERR at pc=$lx, fault addr=%lx\n",
42+
((ucontext_t *)uc)->uc_mcontext.pc,
43+
addr);
4044
return;
4145
}
4246
/* Compare the context for precise error */

0 commit comments

Comments
 (0)