On 12/30/20 3:33 PM, Manfred Spraul wrote: > Hi Michael, > > On 12/30/20 2:35 PM, Michael Kerrisk (man-pages) wrote: >> Hi Manfred, >> >> On 12/30/20 12:20 PM, Manfred Spraul wrote: >>> On 12/30/20 3:03 AM, Yang Xu wrote: >>>> Hi Manfred >>>>> Hi, >>>>> >>>>> >>>>> On 12/22/20 12:55 PM, Alejandro Colomar (mailing lists; readonly) wrote: >>>>>> Hi Yang, >>>>>> >>>>>> It looks good to me. >>>>>> I'll add a few people that might want to comment. >>>>> The code returns a semid_ds structure, and if I take strace as reference >>>>> implementation, then user space expects a semid_ds as well. >>>>> https://github.com/strace/strace/commit/8f0870a780bfd8cd9a91c3b7ad05baccda10bc84 >>>>> >>>>> >>>>> >>>>> In addition, the current page is self-inconsistent: seminfo doesn't >>>>> contain sem_perm. >>>> semctl manpage doesn't say seminfo contain sem_perm. Or, I miss something? >>> The current man page says that SEM_STAT_ANY returns a seminfo structure, >>> without checking sem_perm. >>> >>> This is self-inconsistent: struct seminfo contains global >>> (per-namespace) information, sem_perm.mode is a per-array information. >>> >>> I.e.: It is clear that the man page needs to be updated, and not the code. >> After reading this thread, I'm not quite clear. Do you mean some >> additional change is required after Xang Yu's patch? > > Sorry for the confusion: > > No further changes are required. > > (I have crosschecked shmctl, msgctl, actual code, and strace as user > space example: After Xang Yu's patch is applied, everything is consistent) Thanks, Manfred! It's clear to me now. Cheers, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/