diff options
author | Mark Brown <broonie@kernel.org> | 2022-04-19 11:32:41 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2022-04-28 17:57:10 +0100 |
commit | 191e678bdc9be2447dae227f5b6ea1e995c5ee9c (patch) | |
tree | 0d286342d595c9d1ca7786ca4a866a99a1d96f93 /tools | |
parent | 3f374d7972c48bc0824bdabb8f94fe82e54fd07d (diff) | |
download | linux-191e678bdc9be2447dae227f5b6ea1e995c5ee9c.tar.gz linux-191e678bdc9be2447dae227f5b6ea1e995c5ee9c.tar.bz2 linux-191e678bdc9be2447dae227f5b6ea1e995c5ee9c.zip |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/arm64/mte/mte_common_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/mte/mte_common_util.c b/tools/testing/selftests/arm64/mte/mte_common_util.c index 0328a1e08f65..5327aa958171 100644 --- a/tools/testing/selftests/arm64/mte/mte_common_util.c +++ b/tools/testing/selftests/arm64/mte/mte_common_util.c @@ -37,6 +37,10 @@ void mte_default_handler(int signum, siginfo_t *si, void *uc) if (si->si_code == SEGV_MTEAERR) { if (cur_mte_cxt.trig_si_code == si->si_code) cur_mte_cxt.fault_valid = true; + else + ksft_print_msg("Got unexpected SEGV_MTEAERR at pc=$lx, fault addr=%lx\n", + ((ucontext_t *)uc)->uc_mcontext.pc, + addr); return; } /* Compare the context for precise error */ |