From: Mathura_Kumar <academic1mathura@gmail.com>
To: brauner@kernel.org
Cc: academic1mathura@gmail.com, linux-arch@vger.kernel.org,
linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk
Subject: [PATCH 3/3] [PATCH]-This patch series completes the implementation of do_mq_timedreceive2 new system calls that provide non-destructive peek functionality on POSIX message queues
Date: Wed, 4 Mar 2026 19:21:23 +0530 [thread overview]
Message-ID: <20260304135126.77270-3-academic1mathura@gmail.com> (raw)
In-Reply-To: <20260304135126.77270-1-academic1mathura@gmail.com>
v1 of this series was incomplete — syscall table entries for several
architectures were missing, and false postive warning. This addresses all of that
and has been tested on x86-64 with all tests passing.
Patch 1/3 — core implementation
Patch 2/3 — RFC about false postive build error
Patch 3/3 — remaining per-arch syscall table entries
All older patch was still seem unseen/unmerged so for convenience i am including
all required commit of previous patch with this.
Architecture support: ALL Ready
Signed-off-by: Mathura_Kumar <academic1mathura@gmail.com>
---
arch/alpha/kernel/syscalls/syscall.tbl | 1 +
arch/arm/tools/syscall.tbl | 2 ++
arch/arm64/tools/syscall_32.tbl | 2 ++
arch/m68k/kernel/syscalls/syscall.tbl | 3 +++
arch/microblaze/kernel/syscalls/syscall.tbl | 3 +++
arch/mips/kernel/syscalls/syscall_n32.tbl | 2 ++
arch/mips/kernel/syscalls/syscall_n64.tbl | 1 +
arch/mips/kernel/syscalls/syscall_o32.tbl | 2 ++
arch/powerpc/kernel/syscalls/syscall.tbl | 3 +++
arch/s390/kernel/syscalls/syscall.tbl | 1 +
arch/sh/kernel/syscalls/syscall.tbl | 2 ++
arch/sparc/kernel/syscalls/syscall.tbl | 3 +++
arch/xtensa/kernel/syscalls/syscall.tbl | 2 ++
include/uapi/asm-generic/unistd.h | 9 +++++----
scripts/checksyscalls.sh | 1 +
scripts/syscall.tbl | 3 +++
16 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl
index f31b7afffc34..0ff42d241419 100644
--- a/arch/alpha/kernel/syscalls/syscall.tbl
+++ b/arch/alpha/kernel/syscalls/syscall.tbl
@@ -511,3 +511,4 @@
579 common file_setattr sys_file_setattr
580 common listns sys_listns
581 common rseq_slice_yield sys_rseq_slice_yield
+582 common mq_timedreceive2 sys_mq_timedreceive2
diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl
index 94351e22bfcf..bcec28be852c 100644
--- a/arch/arm/tools/syscall.tbl
+++ b/arch/arm/tools/syscall.tbl
@@ -486,3 +486,5 @@
469 common file_setattr sys_file_setattr
470 common listns sys_listns
471 common rseq_slice_yield sys_rseq_slice_yield
+472 common mq_timedreceive2 sys_mq_timedreceive2_time32
+473 common mq_timedreceive2_time64 sys_mq_timedreceive2
diff --git a/arch/arm64/tools/syscall_32.tbl b/arch/arm64/tools/syscall_32.tbl
index 62d93d88e0fe..02603704231e 100644
--- a/arch/arm64/tools/syscall_32.tbl
+++ b/arch/arm64/tools/syscall_32.tbl
@@ -483,3 +483,5 @@
469 common file_setattr sys_file_setattr
470 common listns sys_listns
471 common rseq_slice_yield sys_rseq_slice_yield
+472 common mq_timedreceive2_time64 sys_mq_timedreceive2
+473 common mq_timedreceive2 sys_mq_timedreceive2_time32
diff --git a/arch/m68k/kernel/syscalls/syscall.tbl b/arch/m68k/kernel/syscalls/syscall.tbl
index 248934257101..b67f23edda11 100644
--- a/arch/m68k/kernel/syscalls/syscall.tbl
+++ b/arch/m68k/kernel/syscalls/syscall.tbl
@@ -471,3 +471,6 @@
469 common file_setattr sys_file_setattr
470 common listns sys_listns
471 common rseq_slice_yield sys_rseq_slice_yield
+472 common mq_timedreceive2 sys_mq_timedreceive2_time32
+473 common mq_timedreceive2_time64 sys_mq_timedreceive2
+
diff --git a/arch/microblaze/kernel/syscalls/syscall.tbl b/arch/microblaze/kernel/syscalls/syscall.tbl
index 223d26303627..89fb60006a99 100644
--- a/arch/microblaze/kernel/syscalls/syscall.tbl
+++ b/arch/microblaze/kernel/syscalls/syscall.tbl
@@ -477,3 +477,6 @@
469 common file_setattr sys_file_setattr
470 common listns sys_listns
471 common rseq_slice_yield sys_rseq_slice_yield
+472 common mq_timedreceive2 sys_mq_timedreceive2_time32
+473 common mq_timedreceive2_time64 sys_mq_timedreceive2
+
diff --git a/arch/mips/kernel/syscalls/syscall_n32.tbl b/arch/mips/kernel/syscalls/syscall_n32.tbl
index 7430714e2b8f..fee830be67a6 100644
--- a/arch/mips/kernel/syscalls/syscall_n32.tbl
+++ b/arch/mips/kernel/syscalls/syscall_n32.tbl
@@ -410,3 +410,5 @@
469 n32 file_setattr sys_file_setattr
470 n32 listns sys_listns
471 n32 rseq_slice_yield sys_rseq_slice_yield
+472 n32 mq_timedreceive2 sys_mq_timedreceive2_time32
+473 n32 mq_timedreceive2_time64 sys_mq_timedreceive2
diff --git a/arch/mips/kernel/syscalls/syscall_n64.tbl b/arch/mips/kernel/syscalls/syscall_n64.tbl
index 630aab9e5425..75de6ee2df94 100644
--- a/arch/mips/kernel/syscalls/syscall_n64.tbl
+++ b/arch/mips/kernel/syscalls/syscall_n64.tbl
@@ -386,3 +386,4 @@
469 n64 file_setattr sys_file_setattr
470 n64 listns sys_listns
471 n64 rseq_slice_yield sys_rseq_slice_yield
+472 n64 mq_timedreceive2 sys_mq_timedreceive2
diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl
index 128653112284..8694a2d2f084 100644
--- a/arch/mips/kernel/syscalls/syscall_o32.tbl
+++ b/arch/mips/kernel/syscalls/syscall_o32.tbl
@@ -459,3 +459,5 @@
469 o32 file_setattr sys_file_setattr
470 o32 listns sys_listns
471 o32 rseq_slice_yield sys_rseq_slice_yield
+472 o32 mq_timedreceive2 sys_mq_timedreceive2_time32
+473 o32 mq_timedreceive2_time64 sys_mq_timedreceive2
diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl
index 4fcc7c58a105..fd90a2f500b6 100644
--- a/arch/powerpc/kernel/syscalls/syscall.tbl
+++ b/arch/powerpc/kernel/syscalls/syscall.tbl
@@ -562,3 +562,6 @@
469 common file_setattr sys_file_setattr
470 common listns sys_listns
471 nospu rseq_slice_yield sys_rseq_slice_yield
+472 32 mq_timedreceive2 sys_mq_timedreceive2_time32
+473 64 mq_timedreceive2 sys_mq_timedreceive2
+474 32 mq_timedreceive2_time64 sys_mq_timedreceive2 sys_mq_timedreceive2
diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
index 09a7ef04d979..34df682061d9 100644
--- a/arch/s390/kernel/syscalls/syscall.tbl
+++ b/arch/s390/kernel/syscalls/syscall.tbl
@@ -398,3 +398,4 @@
469 common file_setattr sys_file_setattr
470 common listns sys_listns
471 common rseq_slice_yield sys_rseq_slice_yield
+472 common mq_timedreceive2 sys_mq_timedreceive2
diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl
index 70b315cbe710..1796ccd23d10 100644
--- a/arch/sh/kernel/syscalls/syscall.tbl
+++ b/arch/sh/kernel/syscalls/syscall.tbl
@@ -475,3 +475,5 @@
469 common file_setattr sys_file_setattr
470 common listns sys_listns
471 common rseq_slice_yield sys_rseq_slice_yield
+472 common mq_timedreceive2 sys_mq_timedreceive2_time32
+473 common mq_timedreceive2_time64 sys_mq_timedreceive2
diff --git a/arch/sparc/kernel/syscalls/syscall.tbl b/arch/sparc/kernel/syscalls/syscall.tbl
index 7e71bf7fcd14..5cfde6e0e6ba 100644
--- a/arch/sparc/kernel/syscalls/syscall.tbl
+++ b/arch/sparc/kernel/syscalls/syscall.tbl
@@ -517,3 +517,6 @@
469 common file_setattr sys_file_setattr
470 common listns sys_listns
471 common rseq_slice_yield sys_rseq_slice_yield
+472 32 mq_timedreceive2 sys_mq_timedreceive2_time32
+473 64 mq_timedreceive2 sys_mq_timedreceive2
+474 32 mq_timedreceive2_time64 sys_mq_timedreceive2 sys_mq_timedreceive2
diff --git a/arch/xtensa/kernel/syscalls/syscall.tbl b/arch/xtensa/kernel/syscalls/syscall.tbl
index a9bca4e484de..9f69ef99e617 100644
--- a/arch/xtensa/kernel/syscalls/syscall.tbl
+++ b/arch/xtensa/kernel/syscalls/syscall.tbl
@@ -442,3 +442,5 @@
469 common file_setattr sys_file_setattr
470 common listns sys_listns
471 common rseq_slice_yield sys_rseq_slice_yield
+472 common mq_timedreceive2 sys_mq_timedreceive2_time32
+473 common mq_timedreceive2_time64 sys_mq_timedreceive2
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
index 1d27fd3e118e..ecfad24055b3 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -863,12 +863,13 @@ __SYSCALL(__NR_listns, sys_listns)
#define __NR_rseq_slice_yield 471
__SYSCALL(__NR_rseq_slice_yield, sys_rseq_slice_yield)
-#undef __NR_syscalls
-#define __NR_syscalls 472
-#define __NR_mq_timedreceive2 473
+
+#define __NR_mq_timedreceive2 472
__SC_3264(__NR_mq_timedreceive2, sys_mq_timedreceive2_time32, sys_mq_timedreceive2)
-#define __NR_mq_timedreceive2_time64 474
+#define __NR_mq_timedreceive2_time64 473
__SYSCALL(__NR_mq_timedreceive2_time64, sys_mq_timedreceive2)
+#undef __NR_syscalls
+#define __NR_syscalls 474
/*
* 32 bit systems traditionally used different
* syscalls for off_t and loff_t arguments, while
diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
index 1e5d2eeb726d..605a65cfa144 100755
--- a/scripts/checksyscalls.sh
+++ b/scripts/checksyscalls.sh
@@ -104,6 +104,7 @@ cat << EOF
#define __IGNORE_recvmmsg_time64
#define __IGNORE_mq_timedsend_time64
#define __IGNORE_mq_timedreceive_time64
+#define __IGNORE_mq_timedreceive2_time64
#define __IGNORE_semtimedop_time64
#define __IGNORE_rt_sigtimedwait_time64
#define __IGNORE_futex_time64
diff --git a/scripts/syscall.tbl b/scripts/syscall.tbl
index 7a42b32b6577..7a09cd65cd8d 100644
--- a/scripts/syscall.tbl
+++ b/scripts/syscall.tbl
@@ -412,3 +412,6 @@
469 common file_setattr sys_file_setattr
470 common listns sys_listns
471 common rseq_slice_yield sys_rseq_slice_yield
+472 time32 mq_timedreceive2 sys_mq_timedreceive2_time32
+473 64 mq_timedreceive2 sys_mq_timedreceive2
+474 32 mq_timedreceive_time64 sys_mq_timedreceive2
--
2.43.0
next prev parent reply other threads:[~2026-03-04 13:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 13:51 [PATCH 1/3] mqueue: introduce new do_mq_timedreceive2() [ mq_peek syscall] for non-destructive receive and inspection Mathura_Kumar
2026-03-04 13:51 ` [PATCH 2/3] [PATCH-V2] " Mathura_Kumar
2026-03-04 13:51 ` Mathura_Kumar [this message]
2026-03-05 5:49 ` [PATCH 3/3] [PATCH]-This patch series completes the implementation of do_mq_timedreceive2 new system calls that provide non-destructive peek functionality on POSIX message queues kernel test robot
2026-03-05 5:51 ` kernel test robot
2026-03-05 8:10 ` kernel test robot
2026-03-04 18:24 ` [PATCH 1/3] mqueue: introduce new do_mq_timedreceive2() [ mq_peek syscall] for non-destructive receive and inspection Randy Dunlap
2026-03-05 5:09 ` kernel test robot
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=20260304135126.77270-3-academic1mathura@gmail.com \
--to=academic1mathura@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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