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

Adhemerval Zanella adhemerval.zanella@linaro.org
Fri Sep 25 17:12:29 GMT 2020


As a side note I am also working on this patch as well with BZ#26636
and BZ#26639
to add a regression test.

On Fri, Sep 25, 2020 at 8:51 AM Florian Weimer via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> * 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