linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alejandro Colomar (mailing lists; readonly)"  <alx.mailinglists@gmail.com>
To: Manfred Spraul <manfred@colorfullife.com>,
	Yang Xu <xuyang2018.jy@cn.fujitsu.com>,
	mtk.manpages@gmail.com
Cc: linux-man@vger.kernel.org, Joe Lawrence <joe.lawrence@redhat.com>,
	Robert Kettler <robert.kettler@outlook.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Kees Cook <keescook@chromium.org>,
	Michal Hocko <mhocko@kernel.org>,
	Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH] semctl.2: Correct SEM_STAT_ANY description
Date: Tue, 29 Dec 2020 12:12:21 +0100	[thread overview]
Message-ID: <c971b894-6619-f43b-a7c2-e244d4d92081@gmail.com> (raw)
In-Reply-To: <e7b0eb9e-b1d2-ed46-f7ac-66f22ef3faf1@colorfullife.com>

On 12/29/20 11:38 AM, Manfred Spraul wrote:
> 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.
> 
> The pages for msgctl and shmctl are correct, i.e. no further obvious
> inconsistencies.
> 
> Thus: The man page for semctl is incorrect, the page needs to be updated.
> 
> Acked-by: manfred@colorfullife.com
> 
>> Thanks,
>>
>> Alex
>>
>> On 12/22/20 6:55 AM, Yang Xu wrote:
>>> Since kernel commit a280d6dc77eb ("ipc/sem: introduce
>>> semctl(SEM_STAT_ANY)"),
>>> it only skips read access check when using SEM_STAT_ANY command. And
>>> it should
>>> use the semid_ds struct instead of seminfo struct. Fix this.
>>>
>>> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>

Hi Yang Xu and Manfred,

Thanks for the ping and for the acked-by!

Patch applied.

Thanks,

Alex

>>> ---
>>>   man2/semctl.2 | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/man2/semctl.2 b/man2/semctl.2
>>> index dd3fb077b..a7462c5cc 100644
>>> --- a/man2/semctl.2
>>> +++ b/man2/semctl.2
>>> @@ -297,8 +297,8 @@ all semaphore sets on the system.
>>>   .TP
>>>   .BR SEM_STAT_ANY " (Linux-specific, since Linux 4.17)"
>>>   Return a
>>> -.I seminfo
>>> -structure containing the same information as for
>>> +.I semid_ds
>>> +structure as for
>>>   .BR SEM_STAT .
>>>   However,
>>>   .I sem_perm.mode
>>>
> 

  reply	other threads:[~2020-12-29 11:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22  5:55 [PATCH] semctl.2: Correct SEM_STAT_ANY description Yang Xu
2020-12-22 11:55 ` Alejandro Colomar (mailing lists; readonly)
2020-12-29  5:09   ` Yang Xu
2020-12-29 10:38   ` Manfred Spraul
2020-12-29 11:12     ` Alejandro Colomar (mailing lists; readonly) [this message]
2020-12-30  2:03     ` Yang Xu
2020-12-30 11:20       ` Manfred Spraul
2020-12-30 13:35         ` Michael Kerrisk (man-pages)
2020-12-30 14:33           ` Manfred Spraul
2020-12-30 15:51             ` Michael Kerrisk (man-pages)
2021-01-07  6:54               ` Yang Xu
2020-12-29 11:03 Alejandro Colomar
2021-01-07 13:05 ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c971b894-6619-f43b-a7c2-e244d4d92081@gmail.com \
    --to=alx.mailinglists@gmail.com \
    --cc=dbueso@suse.de \
    --cc=ebiederm@xmission.com \
    --cc=joe.lawrence@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-man@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=mhocko@kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=robert.kettler@outlook.com \
    --cc=xuyang2018.jy@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).