[LTP] [PATCH 1/1] shmctl03: Fix shmall clamped to UINT32_MAX in 32bit compat mode

Cyril Hrubis chrubis@suse.cz
Tue Nov 10 10:58:18 CET 2026


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.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list