sysvipc: Fix IPC_INFO and MSG_INFO handling [BZ #26639]
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 29 Sep 2020 17:39:56 +0000 (14:39 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 2 Oct 2020 19:11:55 +0000 (16:11 -0300)
commit20a00dbefca5695cccaa44846a482db8ccdd85ab
tree82b4c847c697828bd2ab783e63c91a2fa2b34bf0
parenta16d2abd496bd974a88207d5599265aae5ae4880
sysvipc: Fix IPC_INFO and MSG_INFO handling [BZ #26639]

Both commands are Linux extensions where the third argument is a
'struct msginfo' instead of 'struct msqid_ds' and its information
does not contain any time related fields (so there is no need to
extra conversion for __IPC_TIME64.

The regression testcase checks for Linux specifix SysV ipc message
control extension.  For IPC_INFO/MSG_INFO it tries to match the values
against the tunable /proc values and for MSG_STAT/MSG_STAT_ANY it
check if the create message queue is within the global list returned
by the kernel.

Checked on x86_64-linux-gnu and on i686-linux-gnu (Linux v5.4 and on
Linux v4.15).
sysdeps/unix/sysv/linux/Makefile
sysdeps/unix/sysv/linux/msgctl.c
sysdeps/unix/sysv/linux/tst-sysvmsg-linux.c [new file with mode: 0644]