All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: Joey Gouly <joey.gouly@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: [PATCH v2 2/4] kselftest/arm64: Log unexpected asynchronous MTE faults
Date: Tue, 19 Apr 2022 11:32:41 +0100	[thread overview]
Message-ID: <20220419103243.24774-3-broonie@kernel.org> (raw)
In-Reply-To: <20220419103243.24774-1-broonie@kernel.org>

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>
---
 tools/testing/selftests/arm64/mte/mte_common_util.c | 4 ++++
 1 file changed, 4 insertions(+)

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 */
-- 
2.30.2


WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: Joey Gouly <joey.gouly@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: [PATCH v2 2/4] kselftest/arm64: Log unexpected asynchronous MTE faults
Date: Tue, 19 Apr 2022 11:32:41 +0100	[thread overview]
Message-ID: <20220419103243.24774-3-broonie@kernel.org> (raw)
In-Reply-To: <20220419103243.24774-1-broonie@kernel.org>

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>
---
 tools/testing/selftests/arm64/mte/mte_common_util.c | 4 ++++
 1 file changed, 4 insertions(+)

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 */
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-04-19 10:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 10:32 [PATCH v2 0/4] kselftest/arm64: Miscelaneous MTE test updates Mark Brown
2022-04-19 10:32 ` Mark Brown
2022-04-19 10:32 ` [PATCH v2 1/4] kselftest/arm64: Handle more kselftest result codes in MTE helpers Mark Brown
2022-04-19 10:32   ` Mark Brown
2022-04-19 10:32 ` Mark Brown [this message]
2022-04-19 10:32   ` [PATCH v2 2/4] kselftest/arm64: Log unexpected asynchronous MTE faults Mark Brown
2022-04-19 10:32 ` [PATCH v2 3/4] kselftest/arm64: Refactor parameter checking in mte_switch_mode() Mark Brown
2022-04-19 10:32   ` Mark Brown
2022-04-19 10:32 ` [PATCH v2 4/4] kselftest/arm64: Add simple test for MTE prctl Mark Brown
2022-04-19 10:32   ` Mark Brown
2022-04-22 18:27 ` [PATCH v2 0/4] kselftest/arm64: Miscelaneous MTE test updates Catalin Marinas
2022-04-22 18:27   ` Catalin Marinas
  -- strict thread matches above, loose matches on Subject: below --
2022-04-19 10:28 Mark Brown
2022-04-19 10:28 ` [PATCH v2 2/4] kselftest/arm64: Log unexpected asynchronous MTE faults Mark Brown
2022-03-11 13:51 [PATCH v2 0/4] kselftest/arm64: Miscelaneous MTE test updates Mark Brown
2022-03-11 13:51 ` [PATCH v2 2/4] kselftest/arm64: Log unexpected asynchronous MTE faults Mark Brown
2022-03-11 13:51   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220419103243.24774-3-broonie@kernel.org \
    --to=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.