[PATCH 2/2] [PATCH-V2] mqueue: introduce new do_mq_timedreceive2() [ mq_peek syscall] for non-destructive receive and inspection

From: Mathura_Kumar

Date: Fri Feb 27 2026 - 02:09:40 EST


Following Two warning issue by build and test on V1:

1) include/linux/syscalls.h:750:42: warning: declaration of 'struct mq_timedreceive2_args'
will not be visible outside of this function [-Wvisibility]
fix-included the missing header for global visibility

2) warning: syscall mq_timedreceive2_time64 not implemented [-W#warnings]

fix- This seem false postive warning, script not able to correctly map syscall table
with handler
in file - ~/linux/arch/x86/entry/syscalls/syscall_32.tbl
473 causing warning due to now explicit handler for name "mq_timedrecive2_time64",because
it also handle by same normal SYS_DEFINE for 64 bit arch because logically both are
same if 32bit machine call 64 bit, if we add named defined then it create unnessary
redudancy and duplicacy, so even at this time i am not changing this, if required kindlly
once test in runtime and guide me.

472 i386 mq_timedreceive2 sys_mq_timedreceive2_time32
473 i386 mq_timedreceive2_time64 sys_mq_timedreceive2

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202602270443.k6N6t2u4-lkp@xxxxxxxxx

Signed-off-by: Mathura_Kumar <academic1mathura@xxxxxxxxx>
---
include/linux/syscalls.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 4db405159a8b..307cfd6f154c 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -93,6 +93,7 @@ struct file_attr;
#include <linux/key.h>
#include <linux/personality.h>
#include <trace/syscall.h>
+#include <linux/mqueue.h>

#ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
/*
--
2.43.0