From: Gregory Price <gourry@gourry.net>
To: Christian Loehle <christian.loehle@arm.com>
Cc: Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org,
Rama Krishna Katta <ramakrishna.katta@arm.com>,
Thomas Gleixner <tglx@kernel.org>,
Gregory Price <gourry.memverge@gmail.com>,
Kees Cook <kees@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Andy Lutomirski <luto@kernel.org>,
Gabriel Krisman Bertazi <krisman@collabora.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] selftests/ptrace: Skip get_set_sud if SUD is unsupported
Date: Wed, 26 Aug 2026 17:58:28 -0400 [thread overview]
Message-ID: <ao9hHvfw1bGVYDAS@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <1f16bf30aebbbf44ffc598359e0d474887162e7e.1786965107.git.christian.loehle@arm.com>
On Mon, Aug 17, 2026 at 12:16:09PM +0100, Christian Loehle wrote:
> Syscall User Dispatch is unavailable on architectures without generic
> syscall entry. Such architectures return -EINVAL for otherwise valid SUD
> ptrace requests.
>
> The test currently treats this as a failure even though the feature is
> not supported. Probe SUD with a valid disabled configuration before
> creating the tracee and skip the test when the kernel returns EINVAL.
> Other errors remain test failures, and kernels that support SUD continue
> to exercise the ptrace GET/SET requests.
>
> Fixes: 8c8fa605f7b8 ("selftest, ptrace: Add selftest for syscall user dispatch config api")
> Reported-by: Rama Krishna Katta <ramakrishna.katta@arm.com>
> Signed-off-by: Christian Loehle <christian.loehle@arm.com>
Reviewed-by: Gregory Price (Meta) <gourry@gourry.net>
> ---
> tools/testing/selftests/ptrace/get_set_sud.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/tools/testing/selftests/ptrace/get_set_sud.c b/tools/testing/selftests/ptrace/get_set_sud.c
> index 2e619c7599bb..395674f85964 100644
> --- a/tools/testing/selftests/ptrace/get_set_sud.c
> +++ b/tools/testing/selftests/ptrace/get_set_sud.c
> @@ -22,6 +22,14 @@ TEST(get_set_sud)
> int ret = 0;
> int status;
>
> + ret = prctl(PR_SET_SYSCALL_USER_DISPATCH, PR_SYS_DISPATCH_OFF,
> + 0UL, 0UL, 0UL);
> + if (ret == -1 && errno == EINVAL)
> + SKIP(return, "Syscall User Dispatch is not supported");
> + ASSERT_EQ(0, ret) {
> + TH_LOG("PR_SET_SYSCALL_USER_DISPATCH: %m");
> + }
> +
> child = fork();
> ASSERT_GE(child, 0);
> if (child == 0) {
> --
> 2.34.1
>
next prev parent reply other threads:[~2026-08-26 21:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 11:16 [PATCH 0/3] selftests: Skip SUD tests when unsupported Christian Loehle
2026-08-17 11:16 ` [PATCH 1/3] selftests/ptrace: Skip get_set_sud if SUD is unsupported Christian Loehle
2026-08-26 21:58 ` Gregory Price [this message]
2026-08-17 11:16 ` [PATCH 2/3] selftests/syscall_user_dispatch: Skip tests " Christian Loehle
2026-08-26 22:00 ` Gregory Price
2026-08-17 11:16 ` [PATCH 3/3] selftests/syscall_user_dispatch: Skip benchmark " Christian Loehle
2026-08-26 22:01 ` Gregory Price
2026-08-26 14:56 ` [PATCH 0/3] selftests: Skip SUD tests when unsupported Christian Loehle
2026-09-04 16:45 ` Gabriel Krisman Bertazi
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=ao9hHvfw1bGVYDAS@gourry-fedora-PF4VCD3F \
--to=gourry@gourry.net \
--cc=christian.loehle@arm.com \
--cc=gourry.memverge@gmail.com \
--cc=kees@kernel.org \
--cc=krisman@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=ramakrishna.katta@arm.com \
--cc=shuah@kernel.org \
--cc=tglx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).