sysvipc: Fix SEM_STAT_ANY kernel argument pass [BZ #26637]
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 29 Sep 2020 17:10:20 +0000 (14:10 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 2 Oct 2020 19:11:49 +0000 (16:11 -0300)
commit574500a108be1d2a6a0dc97a075c9e0a98371aba
tree018a857652d9591b21ac02289d14d3c6e28a0620
parent238032ead6f34c41542890b968d973eb5c839673
sysvipc: Fix SEM_STAT_ANY kernel argument pass [BZ #26637]

Handle SEM_STAT_ANY the same way as SEM_STAT so that the buffer argument
of SEM_STAT_ANY is properly passed to the kernel and back.

The regression testcase checks for Linux specifix SysV ipc message
control extension.  For IPC_INFO/SEM_INFO it tries to match the values
against the tunable /proc values and for SEM_STAT/SEM_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).

Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/unix/sysv/linux/Makefile
sysdeps/unix/sysv/linux/semctl.c
sysdeps/unix/sysv/linux/tst-sysvsem-linux.c [new file with mode: 0644]
sysvipc/test-sysvsem.c