[PATCH] linux/semctl: fix SEM_STAT_ANY support [BZ #26637]

Florian Weimer fweimer@redhat.com
Fri Sep 25 11:51:45 GMT 2020


* Dmitry V. Levin:

> 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.
>
> * sysdeps/unix/sysv/linux/semctl.c (semun64_to_ksemun64,
> semun_to_semun64, __semctl, __semctl_mode16, __old_semctl): Handle
> SEM_STAT_ANY.

As a stop-gap measure, this is okay, but we really need to reconsider
what we are doing here.  We really need to return EINVAL if we do not
recognize the cmd value.  It means patching glibc each time the system
call is enhanced, but I don't see a way around that.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill



More information about the Libc-alpha mailing list