[LTP] [PATCH 1/1] shmctl03: Fix shmall clamped to UINT32_MAX in 32bit compat mode
Petr Vorel
pvorel@suse.cz
Tue Nov 10 12:13:06 CET 2026
Hi Cyril,
> Hi!
> > Unlike shmmax, the kernel's compat shmctl(IPC_INFO) path does not clamp
> > shmall but truncates the 64-bit value into the 32-bit compat shminfo
> > (see copy_compat_shminfo_to_user() in ipc/shm.c, originally changed by
> > af7c693f14606 ("Cap shmmax at INT_MAX in compat shminfo") in kernel
> > v2.6.22.
> Sigh, this does look very random, one value is truncated and one is
> saturated. I wonder if we should send a patch to kernel so that both
> values are saturated, that would make much more sense to me.
IMHO it makes sense, but I will not have time for it before December.
Will you have time to do it?
Kind regards,
Petr
More information about the ltp
mailing list