From: "Yu, Yu-cheng" <yu-cheng.yu@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-man@vger.kernel.org,
Alejandro Colomar <alx.manpages@gmail.com>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Andy Lutomirski <luto@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Florian Weimer <fweimer@redhat.com>,
"H.J. Lu" <hjl.tools@gmail.com>,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [PATCH 2/2] sigaction.2: wfix - Clarify si_addr description.
Date: Mon, 8 Mar 2021 13:46:07 -0800 [thread overview]
Message-ID: <40c3c4cc-e135-1355-51ee-4d0f16e47e71@intel.com> (raw)
In-Reply-To: <20210308212936.GD12548@zn.tnic>
On 3/8/2021 1:30 PM, Borislav Petkov wrote:
> On Fri, Feb 26, 2021 at 09:26:34AM -0800, Yu-cheng Yu wrote:
>> SIGSEGV fills si_addr only for memory access faults. Add a note to clarify.
>>
>> Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
>> Cc: Alejandro Colomar <alx.manpages@gmail.com>
>> Cc: Michael Kerrisk <mtk.manpages@gmail.com>
>> Cc: Andy Lutomirski <luto@kernel.org>
>> Cc: Borislav Petkov <bp@alien8.de>
>> Cc: Dave Hansen <dave.hansen@linux.intel.com>
>> Cc: Florian Weimer <fweimer@redhat.com>
>> Cc: "H.J. Lu" <hjl.tools@gmail.com>
>> Cc: linux-kernel@vger.kernel.org
>> Cc: linux-api@vger.kenel.org
>> Link: https://lore.kernel.org/linux-api/20210217222730.15819-7-yu-cheng.yu@intel.com/
>> ---
>> man2/sigaction.2 | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/man2/sigaction.2 b/man2/sigaction.2
>> index 49a30f11e..bea884a23 100644
>> --- a/man2/sigaction.2
>> +++ b/man2/sigaction.2
>> @@ -467,7 +467,7 @@ and
>> .BR SIGTRAP
>> fill in
>> .I si_addr
>> -with the address of the fault.
>> +with the address of the fault (see notes).
>> On some architectures,
>> these signals also fill in the
>> .I si_trapno
>> @@ -955,6 +955,11 @@ It is not possible to block
>> .IR sa_mask ).
>> Attempts to do so are silently ignored.
>> .PP
>> +In a
>> +.B SIGSEGV,
>> +if the fault is a memory access fault, si_addr is filled with the address
>> +causing the fault, otherwise it is not filled.
>
> "... otherwise it is uninitialized." or "zeroed" or whatever...
>
> And I'm having trouble figuring out why do you need to clarify this?
>
> Because of this sentence:
>
> * SIGILL, SIGFPE, SIGSEGV, SIGBUS, and SIGTRAP fill in si_addr with the address
> of the fault. On some architectures, these signals also fill in the si_trapno
> field.
>
> ?
I think the sentence above is vague, but probably for the reason that
each arch is different. Maybe this patch is unnecessary and can be dropped?
>
> If so, did you audit all architectures whether si_addr is populated only
> on memory access faults or is this something POSIX dictates or what's
> up? Because the sigaction(2) manpage is arch-agnostic and this is a
> rather strong assertion.
>
> What am I missing?
>
> Thx.
>
next prev parent reply other threads:[~2021-03-08 21:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210226172634.26905-1-yu-cheng.yu@intel.com>
2021-02-26 17:26 ` [PATCH 1/2] sigaction.2: Add SEGV_CPERR Yu-cheng Yu
2021-02-26 17:26 ` [PATCH 2/2] sigaction.2: wfix - Clarify si_addr description Yu-cheng Yu
2021-03-08 21:30 ` Borislav Petkov
2021-03-08 21:46 ` Yu, Yu-cheng [this message]
2021-03-09 14:31 ` Borislav Petkov
[not found] ` <CACKs7VBLnQTc_RgnXk8X-XgVRvR5_uXY0wL0snW7P5iDjpb8fA@mail.gmail.com>
2021-03-11 17:33 ` Yu, Yu-cheng
2021-03-12 12:55 ` Stefan Puiu
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=40c3c4cc-e135-1355-51ee-4d0f16e47e71@intel.com \
--to=yu-cheng.yu@intel.com \
--cc=alx.manpages@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fweimer@redhat.com \
--cc=hjl.tools@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mtk.manpages@gmail.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).