[PATCH v2 1/2] sysvipc: Fix IPC_INFO and SHM_INFO handling [BZ #26636]
H.J. Lu
hjl.tools@gmail.com
Thu Oct 15 14:43:58 GMT 2020
On Mon, Oct 5, 2020 at 10:12 AM Adhemerval Zanella via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> Changes from previous version:
>
> - Read the shm /proc tunables as 64-bit values to handle 32-bit
> binaries running on 64-bit kernels.
> - Handle shmmax value larger than INT_MAX.
> - Move SHM_STAT_ANY prior SHM_STAT to avoid the test finish early.
>
> --
>
> Both commands are Linux extensions where the third argument is either
> a 'struct shminfo' (IPC_INFO) or a 'struct shm_info' (SHM_INFO) instead
> of 'struct shmid_ds'. And their 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 SHM_INFO it tries to match the values against the
> tunable /proc values and for MSG_STAT/MSG_STAT_ANY it check if the create\
> shared memory 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).
This triggered:
https://sourceware.org/bugzilla/show_bug.cgi?id=26736
--
H.J.
More information about the Libc-alpha
mailing list