Add two new system call mq_recvmmsg() and mq_sendmmsg() to posix ipc mqueue
Subsystems (20)
v3 cover Add two new system call mq_recvmmsg() and mq_sendmmsg() to posix ipc mqueue
Patch series overview:
1. Add New system call mq_recvmmsg(), mq_sendmmsg() and handler implementation.
2. Add system call number in all most common architectures.
3. Add entries in performance tools.
4. Prepared Documentation and test.
Hi Everyone,
It has been couple of month since last work but yeah I had quite hectic schedule and has been recieved lot of feedback to improve many thing. I am also new in kernel development so its hard in early month to digest lot of subtle things in code, flow etc.
Therefore i have taken time to deep dive..
so now,I will be gratefull if you spend little bit of time in reviewing current work.
Thanks,
change since v2:
- my official mail changed to <[email protected]> from <[email protected]>
- iovec is introduced for arguments.
- since v2 does not contain batch operation and I introduced batch support now in recv or peek, due to that I added one more system call to support batch during send as well otherwise i don't see any benefites of having batching in consumer side only.
- tree is augmented with two new field for improving traversal complexity.
- lot of edges cases got handled like compat layer, Flag check for unkown operation to make it robust and resilient.
- self test is updated
- documentation is updated appropriately.
- v2 Link: https://lore.kernel.org/linux-arch/[email protected]/T/#t
mathura kumar (4):
IPC: Added two new system call mq_recvmmsg() and mq_sendmmsg()
IPC: Added system call entry in all of most common architectures
IPC: Added system call entry in performance tool
Test: Added self-testing and documentation
Documentation/userspace-api/index.rst | 2 + Documentation/userspace-api/mq_recvmmsg.rst | 205 +++++++ Documentation/userspace-api/mq_sendmmsg.rst | 168 ++++++ arch/alpha/kernel/syscalls/syscall.tbl | 2 + arch/arm/tools/syscall.tbl | 2 + arch/arm64/tools/syscall_32.tbl | 3 + arch/m68k/kernel/syscalls/syscall.tbl | 2 + arch/microblaze/kernel/syscalls/syscall.tbl | 2 + arch/mips/kernel/syscalls/syscall_n32.tbl | 2 + arch/mips/kernel/syscalls/syscall_n64.tbl | 3 + arch/mips/kernel/syscalls/syscall_o32.tbl | 2 + arch/parisc/kernel/syscalls/syscall.tbl | 2 + arch/powerpc/kernel/syscalls/syscall.tbl | 2 + arch/s390/kernel/syscalls/syscall.tbl | 3 + arch/sh/kernel/syscalls/syscall.tbl | 2 + arch/sparc/kernel/syscalls/syscall.tbl | 3 + arch/x86/entry/syscalls/syscall_32.tbl | 2 + arch/x86/entry/syscalls/syscall_64.tbl | 3 +- arch/xtensa/kernel/syscalls/syscall.tbl | 2 + include/linux/compat.h | 12 +- include/linux/syscalls.h | 9 + include/uapi/asm-generic/unistd.h | 9 +- include/uapi/linux/mqueue.h | 27 +- ipc/mqueue.c | 568 +++++++++++++++++- ipc/msg.c | 2 +- ipc/msgutil.c | 45 +- ipc/util.h | 3 +- kernel/sys_ni.c | 6 + scripts/syscall.tbl | 2 + tools/include/uapi/asm-generic/unistd.h | 8 +- .../arch/alpha/entry/syscalls/syscall.tbl | 4 + .../perf/arch/arm/entry/syscalls/syscall.tbl | 3 + .../arch/arm64/entry/syscalls/syscall_32.tbl | 3 + .../arch/mips/entry/syscalls/syscall_n64.tbl | 2 + .../arch/parisc/entry/syscalls/syscall.tbl | 3 + .../arch/powerpc/entry/syscalls/syscall.tbl | 3 + .../perf/arch/s390/entry/syscalls/syscall.tbl | 2 + tools/perf/arch/sh/entry/syscalls/syscall.tbl | 2 + .../arch/sparc/entry/syscalls/syscall.tbl | 2 + .../arch/x86/entry/syscalls/syscall_32.tbl | 2 + .../arch/x86/entry/syscalls/syscall_64.tbl | 2 + .../arch/xtensa/entry/syscalls/syscall.tbl | 2 + tools/scripts/syscall.tbl | 2 + tools/testing/selftests/ipc/Makefile | 2 +- tools/testing/selftests/ipc/mq_recvmmsg.c | 392 ++++++++++++ tools/testing/selftests/ipc/mq_sendmmsg.c | 360 +++++++++++ 46 files changed, 1823 insertions(+), 66 deletions(-) create mode 100644 Documentation/userspace-api/mq_recvmmsg.rst create mode 100644 Documentation/userspace-api/mq_sendmmsg.rst create mode 100644 tools/testing/selftests/ipc/mq_recvmmsg.c create mode 100644 tools/testing/selftests/ipc/mq_sendmmsg.c
Signature · 1 line
2.43.0
PATCH v3 1/4 IPC: Added two new system call mq_recvmmsg() and mq_sendmmsg()
Implement two new POSIX message queue system calls, mq_sendmmsg() and mq_recvmmsg(), analogous to the existing sendmmsg()/recvmmsg() socket system calls. These allow sending and receiving or peek multiple messages in a single syscall,reducing the overhead of repeated context switches per discrete message.
It contains the core implementation of both system calls as part of a larger patchset.
long mq_sendmmsg(mqd_t mqdes, struct mq_mmsg_attrs *attrs,
unsigned int attrs_len, unsigned long start_idx, const struct __kernel_timespec *u_abs_timeout);
long mq_recvmmsg(mqd_t mqdes, struct mq_mmsg_attrs *attrs,
unsigned int attrs_len, unsigned int flags, unsigned long start_idx,
const struct __kernel_timespec *u_abs_timeout);
Implementation complete details available undermq_recvmmsg.rst and mq_sendmmsg.rst
--- include/linux/compat.h | 12 +- include/linux/syscalls.h | 9 + include/uapi/asm-generic/unistd.h | 9 +- include/uapi/linux/mqueue.h | 27 +- ipc/mqueue.c | 568 ++++++++++++++++++++++++++++-- ipc/msg.c | 2 +- ipc/msgutil.c | 45 ++- ipc/util.h | 3 +- kernel/sys_ni.c | 6 + 9 files changed, 618 insertions(+), 63 deletions(-)
include/linux/compat.h +9 -3
@@ -18,7 +18,6 @@#include <linux/aio_abi.h> /* for aio_context_t */ #include <linux/uaccess.h> #include <linux/unistd.h> -#include <asm/compat.h> #include <asm/siginfo.h> #include <asm/signal.h>
@@ -428,6 +427,8 @@ struct compat_sysctl_args;struct compat_kexec_segment ;struct compat_mq_attr ;struct compat_msgbuf ; +struct compat_msg_attrs ; +struct compat_mq_mmsg_attrs ;void copy_siginfo_to_external32 (struct compat_siginfo *to,const struct kernel_siginfo *from);
@@ -805,8 +806,13 @@ asmlinkage long compat_sys_pwritev64v2(unsigned long fd,const struct iovec __user *vec, unsigned long vlen, loff_t pos, rwf_t flags);#endif - - +asmlinkage long compat_sys_mq_sendmmsg (mqd_t mqdes,struct compat_mq_mmsg_attrs __user *attrs, +unsigned int attrs_len,unsigned long start_index, +const struct __kernel_timespec __user *abs_timeout); +asmlinkage long compat_sys_mq_recvmmsg (mqd_t mqdes,struct compat_mq_mmsg_attrs __user *attrs, +unsigned int attrs_len,unsigned int flags, +unsigned long start_index, +const struct __kernel_timespec __user *abs_timeout);/* * Deprecated system calls which are still defined in * include/uapi/asm-generic/unistd.h and wanted by >= 1 arch
include/linux/syscalls.h +9 -0
@@ -79,6 +79,8 @@ struct mnt_id_req;struct ns_id_req ;struct xattr_args ;struct file_attr ; +struct mq_msg_attrs ; +struct mq_mmsg_attrs ;#include <linux/types.h> #include <linux/aio_abi.h>
@@ -739,7 +741,14 @@ asmlinkage long sys_sysinfo(struct sysinfo __user *info);asmlinkage long sys_mq_open (const char __user *name,int oflag,umode_t mode,struct mq_attr __user *attr);asmlinkage long sys_mq_unlink (const char __user *name);asmlinkage long sys_mq_timedsend (mqd_t mqdes,const char __user *msg_ptr,size_t msg_len,unsigned int msg_prio,const struct __kernel_timespec __user *abs_timeout); +asmlinkage long sys_mq_sendmmsg (mqd_t mqdes,struct mq_mmsg_attrs __user *attrs, +unsigned int attrs_len,unsigned long start_index, +const struct __kernel_timespec __user *abs_timeout);asmlinkage long sys_mq_timedreceive (mqd_t mqdes,char __user *msg_ptr,size_t msg_len,unsigned int __user *msg_prio,const struct __kernel_timespec __user *abs_timeout); +asmlinkage long sys_mq_recvmmsg (mqd_t mqdes,struct mq_mmsg_attrs __user *attrs, +unsigned int attrs_len,unsigned int flags, +unsigned long start_index, +const struct __kernel_timespec __user *abs_timeout);asmlinkage long sys_mq_notify (mqd_t mqdes,const struct sigevent __user *notification);asmlinkage long sys_mq_getsetattr (mqd_t mqdes,const struct mq_attr __user *mqstat,struct mq_attr __user *omqstat); asmlinkage long sys_mq_timedreceive_time32(mqd_t mqdes,
include/uapi/asm-generic/unistd.h +7 -2
@@ -863,9 +863,14 @@ __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_recvmmsg 472 +__SC_COMP(__NR_mq_recvmmsg, sys_mq_recvmmsg, compat_sys_mq_recvmmsg) + +#define __NR_mq_sendmmsg 473 +__SC_COMP(__NR_mq_sendmmsg, sys_mq_sendmmsg, compat_sys_mq_sendmmsg) +#undef __NR_syscalls +#define __NR_syscalls 474/* * 32 bit systems traditionally used different * syscalls for off_t and loff_t arguments, while
include/uapi/linux/mqueue.h +26 -1
@@ -18,8 +18,9 @@#ifndef _LINUX_MQUEUE_H#define _LINUX_MQUEUE_H - +#include <linux/uio.h> #include <linux/types.h> +#include <linux/compat.h> #define MQ_PRIO_MAX 32768/* per-uid limit of kernel memory used by mqueue, in bytes */
@@ -33,6 +34,30 @@ struct mq_attr {__kernel_long_t __reserved[4 ];/* ignored for input, zeroed for output */ }; +struct mq_msg_attrs { +__kernel_size_t msg_len; +unsigned int __user *msg_prio; +void __user *msg_ptr; +}; + +struct mq_mmsg_attrs { +struct iovec __user *msg_attrs_vec; +__kernel_size_t vlen; +int __user *ret; +}; + +struct compat_msg_attrs { +compat_size_t msg_len; +compat_uptr_t __user msg_prio; +compat_uptr_t __user msg_ptr; +}; + +struct compat_mq_mmsg_attrs { +compat_uptr_t __user msg_attrs_vec; +compat_size_t vlen; +compat_uptr_t __user ret; +}; +/* * SIGEV_THREAD implementation: * SIGEV_THREAD must be implemented in user space. If SIGEV_THREAD is passed
ipc/mqueue.c +537 -31
719 lines not on this page · raw message
ipc/msg.c +1 -1
@@ -1156,7 +1156,7 @@ static long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, in* not update queue parameters. */ if (msgflg &MSG_COPY ) { - msg =copy_msg (msg, copy); + msg =copy_msg (msg, copy,min_t (size_t, bufsz, ns->msg_ctlmax)); goto out_unlock0; }
ipc/msgutil.c +21 -24
67 lines not on this page · raw message
ipc/util.h +2 -1
@@ -197,8 +197,9 @@ int ipc_parse_version(int *cmd);extern void free_msg (struct msg_msg *msg);extern struct msg_msg *load_msg (const void __user *src,size_t len); -extern struct msg_msg *copy_msg (struct msg_msg *src,struct msg_msg *dst); +extern struct msg_msg *copy_msg (struct msg_msg *src,struct msg_msg *dst,size_t len);extern int store_msg (void __user *dest,struct msg_msg *msg,size_t len); +extern struct msg_msg *alloc_msg (size_t len);static inline int ipc_checkid (struct kern_ipc_perm *ipcp,int id) {
kernel/sys_ni.c +6 -0
@@ -392,5 +392,11 @@ COND_SYSCALL(setuid16);COND_SYSCALL (rseq);COND_SYSCALL (rseq_slice_yield); +/* ipc */ +COND_SYSCALL (mq_recvmmsg); +COND_SYSCALL_COMPAT (mq_recvmmsg); +COND_SYSCALL (mq_sendmmsg); +COND_SYSCALL_COMPAT (mq_sendmmsg); +COND_SYSCALL (uretprobe);COND_SYSCALL (uprobe);
Signature · 1 line
2.43.0
PATCH v3 2/4 IPC: Added system call entry in all of most common architectures
In reply to mathura kumarWire up the new syscall numbers for all common architectures in their respective syscall tables.
--- arch/alpha/kernel/syscalls/syscall.tbl | 2 ++ arch/arm/tools/syscall.tbl | 2 ++ arch/arm64/tools/syscall_32.tbl | 3 +++ arch/m68k/kernel/syscalls/syscall.tbl | 2 ++ arch/microblaze/kernel/syscalls/syscall.tbl | 2 ++ arch/mips/kernel/syscalls/syscall_n32.tbl | 2 ++ arch/mips/kernel/syscalls/syscall_n64.tbl | 3 +++ arch/mips/kernel/syscalls/syscall_o32.tbl | 2 ++ arch/parisc/kernel/syscalls/syscall.tbl | 2 ++ arch/powerpc/kernel/syscalls/syscall.tbl | 2 ++ arch/s390/kernel/syscalls/syscall.tbl | 3 +++ arch/sh/kernel/syscalls/syscall.tbl | 2 ++ arch/sparc/kernel/syscalls/syscall.tbl | 3 +++ arch/x86/entry/syscalls/syscall_32.tbl | 2 ++ arch/x86/entry/syscalls/syscall_64.tbl | 3 ++- arch/xtensa/kernel/syscalls/syscall.tbl | 2 ++ scripts/syscall.tbl | 2 ++ 17 files changed, 38 insertions(+), 1 deletion(-)
arch/alpha/kernel/syscalls/syscall.tbl +2 -0
@@ -511,3 +511,5 @@ 579 common file_setattr sys_file_setattr 580 common listns sys_listns 581 common rseq_slice_yield sys_rseq_slice_yield +582 common mq_recvmmsg sys_mq_recvmmsg +583 common mq_sendmmsg sys_mq_sendmmsg
arch/arm/tools/syscall.tbl +2 -0
@@ -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_recvmmsg sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg
arch/arm64/tools/syscall_32.tbl +3 -0
@@ -483,3 +483,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_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg +
arch/m68k/kernel/syscalls/syscall.tbl +2 -0
@@ -471,3 +471,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_recvmmsg sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg
arch/microblaze/kernel/syscalls/syscall.tbl +2 -0
@@ -477,3 +477,5 @@ 469 common file_setattr sys_file_setattr 470 common listns sys_listns 471 common rseq_slice_yield sys_rseq_slice_yield +473 common mq_sendmmsg sys_mq_sendmmsg +472 common mq_recvmmsg sys_mq_recvmmsg
arch/mips/kernel/syscalls/syscall_n32.tbl +2 -0
@@ -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_recvmmsg compat_sys_mq_recvmmsg +473 n32 mq_sendmmsg compat_sys_mq_sendmmsg
arch/mips/kernel/syscalls/syscall_n64.tbl +3 -0
@@ -386,3 +386,6 @@ 469 n64 file_setattr sys_file_setattr 470 n64 listns sys_listns 471 n64 rseq_slice_yield sys_rseq_slice_yield +472 n64 mq_recvmmsg sys_mq_recvmmsg +473 n64 mq_sendmmsg sys_mq_sendmmsg +
arch/mips/kernel/syscalls/syscall_o32.tbl +2 -0
@@ -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_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 o32 mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg
arch/parisc/kernel/syscalls/syscall.tbl +2 -0
@@ -470,3 +470,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_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg
arch/powerpc/kernel/syscalls/syscall.tbl +2 -0
@@ -562,3 +562,5 @@ 469 common file_setattr sys_file_setattr 470 common listns sys_listns 471 nospu rseq_slice_yield sys_rseq_slice_yield +472 common mq_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg
arch/s390/kernel/syscalls/syscall.tbl +3 -0
@@ -398,3 +398,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_recvmmsg sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg +
arch/sh/kernel/syscalls/syscall.tbl +2 -0
@@ -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_recvmmsg sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg
arch/sparc/kernel/syscalls/syscall.tbl +3 -0
@@ -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 common mq_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg +
arch/x86/entry/syscalls/syscall_32.tbl +2 -0
@@ -477,3 +477,5 @@ 469 i386 file_setattr sys_file_setattr 470 i386 listns sys_listns 471 i386 rseq_slice_yield sys_rseq_slice_yield +472 i386 mq_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 i386 mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg
arch/x86/entry/syscalls/syscall_64.tbl +2 -1
@@ -396,7 +396,8 @@ 469 common file_setattr sys_file_setattr 470 common listns sys_listns 471 common rseq_slice_yield sys_rseq_slice_yield - +472 common mq_recvmmsg sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg # # Due to a historical design error, certain syscalls are numbered differently # in x32 as compared to native x86_64. These syscalls have numbers 512-547.
arch/xtensa/kernel/syscalls/syscall.tbl +2 -0
@@ -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_recvmmsg sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg
scripts/syscall.tbl +2 -0
@@ -412,3 +412,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_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg
Signature · 1 line
2.43.0
PATCH v3 3/4 IPC: Added system call entry in performance tool
In reply to mathura kumarIt include all the entries made up in performance tools for both new system call.
--- tools/include/uapi/asm-generic/unistd.h | 8 +++++++- tools/perf/arch/alpha/entry/syscalls/syscall.tbl | 4 ++++ tools/perf/arch/arm/entry/syscalls/syscall.tbl | 3 +++ tools/perf/arch/arm64/entry/syscalls/syscall_32.tbl | 3 +++ tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl | 2 ++ tools/perf/arch/parisc/entry/syscalls/syscall.tbl | 3 +++ tools/perf/arch/powerpc/entry/syscalls/syscall.tbl | 3 +++ tools/perf/arch/s390/entry/syscalls/syscall.tbl | 2 ++ tools/perf/arch/sh/entry/syscalls/syscall.tbl | 2 ++ tools/perf/arch/sparc/entry/syscalls/syscall.tbl | 2 ++ tools/perf/arch/x86/entry/syscalls/syscall_32.tbl | 2 ++ tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 2 ++ tools/perf/arch/xtensa/entry/syscalls/syscall.tbl | 2 ++ tools/scripts/syscall.tbl | 2 ++ 14 files changed, 39 insertions(+), 1 deletion(-)
tools/include/uapi/asm-generic/unistd.h +7 -1
@@ -863,8 +863,14 @@ __SYSCALL(__NR_listns, sys_listns)#define __NR_rseq_slice_yield 471 __SYSCALL(__NR_rseq_slice_yield, sys_rseq_slice_yield) +#define __NR_mq_recvmmsg 472 +__SC_COMP(__NR_mq_recvmmsg, sys_mq_recvmmsg, compat_sys_mq_recvmmsg) + +#define __NR_mq_sendmmsg 473 +__SC_COMP(__NR_mq_sendmmsg, sys_mq_sendmmsg, compat_sys_mq_sendmmsg) +#undef __NR_syscalls -#define __NR_syscalls 472 +#define __NR_syscalls 474/* * 32 bit systems traditionally used different
tools/perf/arch/alpha/entry/syscalls/syscall.tbl +4 -0
@@ -502,3 +502,7 @@ 570 common lsm_set_self_attr sys_lsm_set_self_attr 571 common lsm_list_modules sys_lsm_list_modules 572 common mseal sys_mseal +# 573-581 are kept reserved for existing system call +582 common mq_recvmmsg sys_mq_recvmmsg +583 common mq_sendmmsg sys_mq_sendmmsg +
tools/perf/arch/arm/entry/syscalls/syscall.tbl +3 -0
@@ -486,3 +486,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_recvmmsg sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg +
tools/perf/arch/arm64/entry/syscalls/syscall_32.tbl +3 -0
@@ -474,3 +474,6 @@ 460 common lsm_set_self_attr sys_lsm_set_self_attr 461 common lsm_list_modules sys_lsm_list_modules 462 common mseal sys_mseal +# 463-471 are kept reserved for existing system call +472 common mq_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg
tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl +2 -0
@@ -386,3 +386,5 @@ 469 n64 file_setattr sys_file_setattr 470 n64 listns sys_listns 471 n64 rseq_slice_yield sys_rseq_slice_yield +472 n64 mq_recvmmsg sys_mq_recvmmsg +473 n64 mq_sendmmsg sys_mq_sendmmsg
tools/perf/arch/parisc/entry/syscalls/syscall.tbl +3 -0
@@ -461,3 +461,6 @@ 460 common lsm_set_self_attr sys_lsm_set_self_attr 461 common lsm_list_modules sys_lsm_list_modules 462 common mseal sys_mseal +472 common mq_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg +
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl +3 -0
@@ -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 common mq_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg +
tools/perf/arch/s390/entry/syscalls/syscall.tbl +2 -0
@@ -398,3 +398,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_recvmmsg sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg
tools/perf/arch/sh/entry/syscalls/syscall.tbl +2 -0
@@ -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_recvmmsg sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg
tools/perf/arch/sparc/entry/syscalls/syscall.tbl +2 -0
@@ -517,3 +517,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_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg
tools/perf/arch/x86/entry/syscalls/syscall_32.tbl +2 -0
@@ -477,3 +477,5 @@ 469 i386 file_setattr sys_file_setattr 470 i386 listns sys_listns 471 i386 rseq_slice_yield sys_rseq_slice_yield +472 i386 mq_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 i386 mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +2 -0
@@ -396,6 +396,8 @@ 469 common file_setattr sys_file_setattr 470 common listns sys_listns 471 common rseq_slice_yield sys_rseq_slice_yield +472 common mq_recvmmsg sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg # # Due to a historical design error, certain syscalls are numbered differently
tools/perf/arch/xtensa/entry/syscalls/syscall.tbl +2 -0
@@ -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_recvmmsg sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg
tools/scripts/syscall.tbl +2 -0
@@ -412,3 +412,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_recvmmsg sys_mq_recvmmsg compat_sys_mq_recvmmsg +473 common mq_sendmmsg sys_mq_sendmmsg compat_sys_mq_sendmmsg
Signature · 1 line
2.43.0
PATCH v3 4/4 Test: Added self-testing and documentation
In reply to mathura kumarAdd test coverage to verify system call behavior under different-different cases.
Update index documentation to include two new doc.
1) mq_recvmmsg.rst
2) mq_sendmmsg.rst
The tests validate:
1) Offset boundries.
2) Partial success behaviors.
3) Timeout behavior.
Documentation changes include:
1) Updated implementation details.
2) Error handlings mechanism.
3) Tests details.
--- Documentation/userspace-api/index.rst | 2 + Documentation/userspace-api/mq_recvmmsg.rst | 205 ++++++++++ Documentation/userspace-api/mq_sendmmsg.rst | 168 +++++++++ tools/testing/selftests/ipc/Makefile | 2 +- tools/testing/selftests/ipc/mq_recvmmsg.c | 392 ++++++++++++++++++++ tools/testing/selftests/ipc/mq_sendmmsg.c | 360 ++++++++++++++++++ 6 files changed, 1128 insertions(+), 1 deletion(-) create mode 100644 Documentation/userspace-api/mq_recvmmsg.rst create mode 100644 Documentation/userspace-api/mq_sendmmsg.rst create mode 100644 tools/testing/selftests/ipc/mq_recvmmsg.c create mode 100644 tools/testing/selftests/ipc/mq_sendmmsg.c
Documentation/userspace-api/index.rst +2 -0
@@ -22,6 +22,8 @@ System calls ioctl/index mseal rseq + mq_recvmmsg + mq_sendmmsg Security-related interfaces ===========================
Documentation/userspace-api/mq_recvmmsg.rst new file +205 -0
205 lines not on this page · raw message
Documentation/userspace-api/mq_sendmmsg.rst new file +168 -0
168 lines not on this page · raw message
tools/testing/selftests/ipc/Makefile +1 -1
@@ -12,7 +12,7 @@ endif CFLAGS += $(KHDR_INCLUDES) -TEST_GEN_PROGS := msgque +TEST_GEN_PROGS := msgque mq_recvmmsg mq_sendmmsg include ../lib.mk
tools/testing/selftests/ipc/mq_recvmmsg.c new file +392 -0
392 lines not on this page · raw message
tools/testing/selftests/ipc/mq_sendmmsg.c new file +360 -0
360 lines not on this page · raw message
Signature · 1 line
2.43.0
Randy Dunlap
reviewerRe: [PATCH v3 4/4] Test: Added self-testing and documentation
Hi--
Quoted 18 lines · mathura kumar
Add test coverage to verify system call behavior under different-different cases.
Update index documentation to include two new doc.
1)mq_recvmmsg.rst
2)mq_sendmmsg.rstThe tests validate:
1) Offset boundries.
2) Partial success behaviors.
3) Timeout behavior.Documentation changes include:
1) Updated implementation details.
2) Error handlings mechanism.
3) Tests details.Signed-off-by mathura kumar <[email protected]>
Quoted 12 lines
--- Documentation/userspace-api/index.rst | 2 + Documentation/userspace-api/mq_recvmmsg.rst | 205 ++++++++++ Documentation/userspace-api/mq_sendmmsg.rst | 168 +++++++++ tools/testing/selftests/ipc/Makefile | 2 +- tools/testing/selftests/ipc/mq_recvmmsg.c | 392 ++++++++++++++++++++ tools/testing/selftests/ipc/mq_sendmmsg.c | 360 ++++++++++++++++++ 6 files changed, 1128 insertions(+), 1 deletion(-) create mode 100644 Documentation/userspace-api/mq_recvmmsg.rst create mode 100644 Documentation/userspace-api/mq_sendmmsg.rst create mode 100644 tools/testing/selftests/ipc/mq_recvmmsg.c create mode 100644 tools/testing/selftests/ipc/mq_sendmmsg.c
Documentation build warnings (from 'make htmldocs'):
Documentation/userspace-api/mq_recvmmsg.rst:96: WARNING: Bullet list ends without a blank line; unexpected unindent. [docutils] /work/lnx/repo/linux-next/Documentation/userspace-api/mq_recvmmsg.rst:179: WARNING: Title underline too short.
3.4 start_idx argument
~~~~~~~~~~~~~~~~~~~ [docutils]Documentation/userspace-api/mq_sendmmsg.rst:77: WARNING: Bullet list ends without a blank line; unexpected unindent. [docutils] /work/lnx/repo/linux-next/Documentation/userspace-api/mq_sendmmsg.rst:146: WARNING: Title underline too short.
3.3 start_idx argument
~~~~~~~~~~~~~~~~~~~ [docutils]
Signature · 1 line
~Randy
Re: [PATCH v3 4/4] Test: Added self-testing and documentation
yeah, I have fixed the minor formatting and one unsequenced new sys number for microblaze in syscall.tbl
Should I wait for a complete review for this or send an updated version, and one more thing sashiko show potential regression in core augmentation logic but i think it is false positive and i am pretty sure, as per my intuition i don't think it have any regression regrading propagating msg count after insertion and deletion of node.
Thanks,
Mathura
Quoted 52 lines · Randy Dunlap
Hi--
Quoted 18 lines · mathura kumar
Add test coverage to verify system call behavior under different-different cases.
Update index documentation to include two new doc.
1)mq_recvmmsg.rst
2)mq_sendmmsg.rstThe tests validate:
1) Offset boundries.
2) Partial success behaviors.
3) Timeout behavior.Documentation changes include:
1) Updated implementation details.
2) Error handlings mechanism.
3) Tests details.Signed-off-by mathura kumar <[email protected]>Quoted 12 lines
--- Documentation/userspace-api/index.rst | 2 + Documentation/userspace-api/mq_recvmmsg.rst | 205 ++++++++++ Documentation/userspace-api/mq_sendmmsg.rst | 168 +++++++++ tools/testing/selftests/ipc/Makefile | 2 +- tools/testing/selftests/ipc/mq_recvmmsg.c | 392 ++++++++++++++++++++ tools/testing/selftests/ipc/mq_sendmmsg.c | 360 ++++++++++++++++++ 6 files changed, 1128 insertions(+), 1 deletion(-) create mode 100644 Documentation/userspace-api/mq_recvmmsg.rst create mode 100644 Documentation/userspace-api/mq_sendmmsg.rst create mode 100644 tools/testing/selftests/ipc/mq_recvmmsg.c create mode 100644 tools/testing/selftests/ipc/mq_sendmmsg.cDocumentation build warnings (from 'make htmldocs'):
Documentation/userspace-api/mq_recvmmsg.rst:96: WARNING: Bullet list ends without a blank line; unexpected unindent. [docutils] /work/lnx/repo/linux-next/Documentation/userspace-api/mq_recvmmsg.rst:179: WARNING: Title underline too short.3.4
start_idxargument
~~~~~~~~~~~~~~~~~~~ [docutils]Documentation/userspace-api/mq_sendmmsg.rst:77: WARNING: Bullet list ends without a blank line; unexpected unindent. [docutils] /work/lnx/repo/linux-next/Documentation/userspace-api/mq_sendmmsg.rst:146: WARNING: Title underline too short.3.3
start_idxargument
~~~~~~~~~~~~~~~~~~~ [docutils]--
~Randy
Randy Dunlap
reviewerRe: [PATCH v3 4/4] Test: Added self-testing and documentation
Quoted 8 lines · Mathura kumar
yeah, I have fixed the minor formatting and one unsequenced new sys number for microblaze in syscall.tbl
Should I wait for a complete review for this or send an updated version, and one more thing sashiko show potential regression in core augmentation logic but i think it is false positive and i am pretty sure, as per my intuition i don't think it have any regression regrading propagating msg count after insertion and deletion of node.
I'd say wait for more comments/review.
Quoted 57 lines
Thanks,
MathuraQuoted 52 lines · Randy Dunlap
Hi--
Quoted 18 lines · mathura kumar
Add test coverage to verify system call behavior under different-different cases.
Update index documentation to include two new doc.
1)mq_recvmmsg.rst
2)mq_sendmmsg.rstThe tests validate:
1) Offset boundries.
2) Partial success behaviors.
3) Timeout behavior.Documentation changes include:
1) Updated implementation details.
2) Error handlings mechanism.
3) Tests details.Signed-off-by mathura kumar <[email protected]>Quoted 12 lines
--- Documentation/userspace-api/index.rst | 2 + Documentation/userspace-api/mq_recvmmsg.rst | 205 ++++++++++ Documentation/userspace-api/mq_sendmmsg.rst | 168 +++++++++ tools/testing/selftests/ipc/Makefile | 2 +- tools/testing/selftests/ipc/mq_recvmmsg.c | 392 ++++++++++++++++++++ tools/testing/selftests/ipc/mq_sendmmsg.c | 360 ++++++++++++++++++ 6 files changed, 1128 insertions(+), 1 deletion(-) create mode 100644 Documentation/userspace-api/mq_recvmmsg.rst create mode 100644 Documentation/userspace-api/mq_sendmmsg.rst create mode 100644 tools/testing/selftests/ipc/mq_recvmmsg.c create mode 100644 tools/testing/selftests/ipc/mq_sendmmsg.cDocumentation build warnings (from 'make htmldocs'):
Documentation/userspace-api/mq_recvmmsg.rst:96: WARNING: Bullet list ends without a blank line; unexpected unindent. [docutils] /work/lnx/repo/linux-next/Documentation/userspace-api/mq_recvmmsg.rst:179: WARNING: Title underline too short.3.4
start_idxargument
~~~~~~~~~~~~~~~~~~~ [docutils]Documentation/userspace-api/mq_sendmmsg.rst:77: WARNING: Bullet list ends without a blank line; unexpected unindent. [docutils] /work/lnx/repo/linux-next/Documentation/userspace-api/mq_sendmmsg.rst:146: WARNING: Title underline too short.3.3
start_idxargument
~~~~~~~~~~~~~~~~~~~ [docutils]--
~Randy
Signature · 1 line
~Randy