From: Aqib Faruqui <aqibaf@amazon.com>
To: Christian Brauner <brauner@kernel.org>,
Shuah Khan <shuah@kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-kselftest@vger.kernel.org>
Cc: <nh-open-source@amazon.com>, <aqibaf@amazon.com>
Subject: [PATCH v2 1/7] selftests/pidfd: Add architecture-specific fallback definitions for pidfd_open
Date: Tue, 2 Sep 2025 17:01:38 +0000 [thread overview]
Message-ID: <20250902170147.55583-2-aqibaf@amazon.com> (raw)
In-Reply-To: <20250902170147.55583-1-aqibaf@amazon.com>
The pidfd_open syscall number varies by architecture. Add fallback
definitions for Alpha (544) and other architectures (434) to ensure
compatibility with non-glibc C libraries that may not define these
syscall numbers.
Signed-off-by: Aqib Faruqui <aqibaf@amazon.com>
---
tools/testing/selftests/pidfd/pidfd.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/pidfd/pidfd.h b/tools/testing/selftests/pidfd/pidfd.h
index f87993def..c373ff18e 100644
--- a/tools/testing/selftests/pidfd/pidfd.h
+++ b/tools/testing/selftests/pidfd/pidfd.h
@@ -45,8 +45,12 @@
#endif
#ifndef __NR_pidfd_open
+#ifdef __alpha__
+#define __NR_pidfd_open 544
+#else
#define __NR_pidfd_open 434
#endif
+#endif
#ifndef __NR_pidfd_send_signal
#define __NR_pidfd_send_signal 424
--
2.47.3
next prev parent reply other threads:[~2025-09-02 17:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 17:01 [PATCH v2 0/7] Add compatibility fixes for KVM selftests with non-glibc C libraries Aqib Faruqui
2025-09-02 17:01 ` Aqib Faruqui [this message]
2025-09-02 17:01 ` [PATCH v2 2/7] selftests: harness: Include pidfd.h to get syscall definitions from tools/ Aqib Faruqui
2025-09-02 17:01 ` [PATCH v2 3/7] selftests: kselftest: Add memfd_create syscall compatibility Aqib Faruqui
2025-09-02 17:01 ` [PATCH v2 4/7] KVM: selftests: Add backtrace fallback Aqib Faruqui
2025-09-02 17:01 ` [PATCH v2 5/7] rseq: selftests: Add non-glibc compatibility fixes Aqib Faruqui
2025-09-02 17:01 ` [PATCH v2 6/7] selftests: Fix stdbuf compatibility in mixed libc environments Aqib Faruqui
2025-09-02 17:01 ` [PATCH v2 7/7] selftests: kselftest: Add ulong typedef for non-glibc compatibility Aqib Faruqui
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=20250902170147.55583-2-aqibaf@amazon.com \
--to=aqibaf@amazon.com \
--cc=brauner@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nh-open-source@amazon.com \
--cc=shuah@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
all inboxes | Powered by JetHome®