mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Alejandro Colomar <alx.manpages@gmail.com>,
	linux-man@vger.kernel.org, Alejandro Colomar <alx@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Boqun Feng <boqun.feng@gmail.com>, paulmck <paulmck@kernel.org>
Subject: Re: rseq(2) man page
Date: Tue, 10 Jan 2023 14:57:55 -0500	[thread overview]
Message-ID: <57e095f5-2cf8-3f9a-0765-86990b4c1873@efficios.com> (raw)
In-Reply-To: <71ea2fa3-e593-e1ae-7abd-377bdf302d24@gmail.com>

On 2023-01-10 14:28, Alejandro Colomar wrote:
> 
> 
> On 1/10/23 17:54, Mathieu Desnoyers wrote:
> 

> 
> [...]
> 
>>>> .BI "int syscall(SYS_rseq, struct rseq *_Nullable " rseq ", uint32_t 
>>>> " rseq_len \
>>>
>>> What's the meaning for NULL?  Does it have a valid sentinel meaning, 
>>> or is it an invalid address?  If it's just interpreted as an invalid 
>>> address (for which from a user-space perspective a crash would be 
>>> legitimate), then I'd remove _Nullable.
>>
>> With the flags that are currently implemented (0 or 
>> RSEQ_FLAG_UNREGISTER),
>> the rseq argument is not expected to be legitimately NULL (it would 
>> return
>> -1, errno=EFAULT on registration, or -1, errno=EINVAL on unregister 
>> attempt).
>>
>> We may add new flags in the future which would not care about the rseq 
>> address
>> (it could very well be null then). Do you recommend that we only add the
>> _Nullable tag when this occurs ?
> 
> Yes; since it's what the user can pass, it makes sense to be as 
> constrained as possible.  If it were some return that the user would 
> have to inspect, it would make sense to be cautious on the NULL side of 
> things an use _Nullable preventively, but for an input, non-null is 
> preferred for now.

OK, updated.

> 
> 
> [...]
> 
>>
>> Updated version based on your comments pushed into my repo, thanks!
> 
> Cool! I'll have a look.

Thanks! Once you find it to your liking, I plan to sent it as a patch 
against the man-pages project.

Mathieu

> 
> Cheers,
> 
> Alex
> 
>>
>> Mathieu
>>
>>
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com


  reply	other threads:[~2023-01-10 19:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-06 17:16 Mathieu Desnoyers
2023-01-06 17:22 ` Alejandro Colomar
2023-01-06 17:50   ` Alejandro Colomar
2023-01-06 20:57     ` Mathieu Desnoyers
2023-01-06 22:57       ` Alejandro Colomar
2023-01-10 16:54         ` Mathieu Desnoyers
2023-01-10 19:28           ` Alejandro Colomar
2023-01-10 19:57             ` Mathieu Desnoyers [this message]
2023-01-06 18:49   ` Mathieu Desnoyers

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=57e095f5-2cf8-3f9a-0765-86990b4c1873@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=alx.manpages@gmail.com \
    --cc=alx@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    /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

all inboxes | Powered by JetHome®