* [PATCH v2 0/2] signal(7) fixes
@ 2024-06-11 9:08 Dev Jain
2024-06-11 9:08 ` [PATCH v2 1/2] signal.7: Clearly describe ucontext kernel dump to userspace Dev Jain
2024-06-11 9:08 ` [PATCH v2 2/2] signal.7: Fix wrong mention of sigprocmask Dev Jain
0 siblings, 2 replies; 7+ messages in thread
From: Dev Jain @ 2024-06-11 9:08 UTC (permalink / raw
To: alx, linux-man
Cc: mingo, tglx, mark.rutland, ryan.roberts, broonie, suzuki.poulose,
Anshuman.Khandual, DeepakKumar.Mishra, aneesh.kumar, linux-kernel,
Dev Jain
This is a follow-up to the following, or any subsequent versions of it:
https://lore.kernel.org/all/20240611075650.814397-1-dev.jain@arm.com/
This patchset brings distinction between the set of blocked signals stored
in uc_sigmask, and the actual set of blocked signals. Also, fix a wrong
mention of sigprocmask(), and replace it with sigaction().
Changes in v2:
- Make the description clear and concise
- Use semantic newlines
Dev Jain (2):
signal.7: Clearly describe ucontext kernel dump to userspace
signal.7: Fix wrong mention of sigprocmask
man/man7/signal.7 | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] signal.7: Clearly describe ucontext kernel dump to userspace
2024-06-11 9:08 [PATCH v2 0/2] signal(7) fixes Dev Jain
@ 2024-06-11 9:08 ` Dev Jain
2024-06-17 10:54 ` Alejandro Colomar
2024-06-11 9:08 ` [PATCH v2 2/2] signal.7: Fix wrong mention of sigprocmask Dev Jain
1 sibling, 1 reply; 7+ messages in thread
From: Dev Jain @ 2024-06-11 9:08 UTC (permalink / raw
To: alx, linux-man
Cc: mingo, tglx, mark.rutland, ryan.roberts, broonie, suzuki.poulose,
Anshuman.Khandual, DeepakKumar.Mishra, aneesh.kumar, linux-kernel,
Dev Jain
The set of blocked signals is updated from struct sigaction after the
kernel dumps ucontext. Mention this to avoid misunderstanding.
Signed-off-by: Dev Jain <dev.jain@arm.com>
---
man/man7/signal.7 | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/man/man7/signal.7 b/man/man7/signal.7
index 4ba5306c8..7d22a7cfe 100644
--- a/man/man7/signal.7
+++ b/man/man7/signal.7
@@ -282,7 +282,13 @@ the thread's alternate signal stack settings.
.B SA_SIGINFO
flag, then the above information is accessible via the
.I ucontext_t
-object that is pointed to by the third argument of the signal handler.)
+object that is pointed to by the third argument of the signal handler.
+This object reflects the state at which the signal is delivered, rather
+than in the handler;
+for example, the mask of blocked signals stored in this object will not
+contain the mask of new signals blocked through
+.BR sigaction(2)).
+
.IP (1.4)
Any signals specified in
.I act\->sa_mask
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] signal.7: Fix wrong mention of sigprocmask
2024-06-11 9:08 [PATCH v2 0/2] signal(7) fixes Dev Jain
2024-06-11 9:08 ` [PATCH v2 1/2] signal.7: Clearly describe ucontext kernel dump to userspace Dev Jain
@ 2024-06-11 9:08 ` Dev Jain
2024-06-11 13:06 ` Mark Brown
1 sibling, 1 reply; 7+ messages in thread
From: Dev Jain @ 2024-06-11 9:08 UTC (permalink / raw
To: alx, linux-man
Cc: mingo, tglx, mark.rutland, ryan.roberts, broonie, suzuki.poulose,
Anshuman.Khandual, DeepakKumar.Mishra, aneesh.kumar, linux-kernel,
Dev Jain
The handler is registered with sigaction(), not sigprocmask(). Even if the
purpose of writing sigprocmask() here was to mention blocked signals, the
statement currently concerns the "addition" of blocked signals; signals
blocked through sigprocmask() would already be present in the thread
context of blocked signals.
Fixes: e7a5700 (getcontext.3, signal.7: tfix)
Signed-off-by: Dev Jain <dev.jain@arm.com>
---
man/man7/signal.7 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/man7/signal.7 b/man/man7/signal.7
index 7d22a7cfe..57eab7847 100644
--- a/man/man7/signal.7
+++ b/man/man7/signal.7
@@ -293,7 +293,7 @@ contain the mask of new signals blocked through
Any signals specified in
.I act\->sa_mask
when registering the handler with
-.BR sigprocmask (2)
+.BR sigaction (2)
are added to the thread's signal mask.
The signal being delivered is also
added to the signal mask, unless
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] signal.7: Fix wrong mention of sigprocmask
2024-06-11 9:08 ` [PATCH v2 2/2] signal.7: Fix wrong mention of sigprocmask Dev Jain
@ 2024-06-11 13:06 ` Mark Brown
2024-06-17 10:59 ` Alejandro Colomar
0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2024-06-11 13:06 UTC (permalink / raw
To: Dev Jain
Cc: alx, linux-man, mingo, tglx, mark.rutland, ryan.roberts,
suzuki.poulose, Anshuman.Khandual, DeepakKumar.Mishra,
aneesh.kumar, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 432 bytes --]
On Tue, Jun 11, 2024 at 02:38:23PM +0530, Dev Jain wrote:
> The handler is registered with sigaction(), not sigprocmask(). Even if the
> purpose of writing sigprocmask() here was to mention blocked signals, the
> statement currently concerns the "addition" of blocked signals; signals
> blocked through sigprocmask() would already be present in the thread
> context of blocked signals.
Reviewed-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] signal.7: Clearly describe ucontext kernel dump to userspace
2024-06-11 9:08 ` [PATCH v2 1/2] signal.7: Clearly describe ucontext kernel dump to userspace Dev Jain
@ 2024-06-17 10:54 ` Alejandro Colomar
2024-06-17 10:56 ` Alejandro Colomar
0 siblings, 1 reply; 7+ messages in thread
From: Alejandro Colomar @ 2024-06-17 10:54 UTC (permalink / raw
To: Dev Jain
Cc: linux-man, mingo, tglx, mark.rutland, ryan.roberts, broonie,
suzuki.poulose, Anshuman.Khandual, DeepakKumar.Mishra,
aneesh.kumar, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]
On Tue, Jun 11, 2024 at 02:38:22PM GMT, Dev Jain wrote:
> The set of blocked signals is updated from struct sigaction after the
> kernel dumps ucontext. Mention this to avoid misunderstanding.
>
> Signed-off-by: Dev Jain <dev.jain@arm.com>
Hi Dev,
I've applied this patch, with some minor tweaks:
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=9e1f221b2099ee2c936ce4d6562a61e1e253af47>
Have a lovely day!
Alex
> ---
> man/man7/signal.7 | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/man/man7/signal.7 b/man/man7/signal.7
> index 4ba5306c8..7d22a7cfe 100644
> --- a/man/man7/signal.7
> +++ b/man/man7/signal.7
> @@ -282,7 +282,13 @@ the thread's alternate signal stack settings.
> .B SA_SIGINFO
> flag, then the above information is accessible via the
> .I ucontext_t
> -object that is pointed to by the third argument of the signal handler.)
> +object that is pointed to by the third argument of the signal handler.
> +This object reflects the state at which the signal is delivered, rather
> +than in the handler;
> +for example, the mask of blocked signals stored in this object will not
> +contain the mask of new signals blocked through
> +.BR sigaction(2)).
> +
> .IP (1.4)
> Any signals specified in
> .I act\->sa_mask
> --
> 2.34.1
>
>
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] signal.7: Clearly describe ucontext kernel dump to userspace
2024-06-17 10:54 ` Alejandro Colomar
@ 2024-06-17 10:56 ` Alejandro Colomar
0 siblings, 0 replies; 7+ messages in thread
From: Alejandro Colomar @ 2024-06-17 10:56 UTC (permalink / raw
To: Dev Jain
Cc: linux-man, mingo, tglx, mark.rutland, ryan.roberts, broonie,
suzuki.poulose, Anshuman.Khandual, DeepakKumar.Mishra,
aneesh.kumar, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1812 bytes --]
On Mon, Jun 17, 2024 at 12:54:10PM GMT, Alejandro Colomar wrote:
> On Tue, Jun 11, 2024 at 02:38:22PM GMT, Dev Jain wrote:
> > The set of blocked signals is updated from struct sigaction after the
> > kernel dumps ucontext. Mention this to avoid misunderstanding.
> >
> > Signed-off-by: Dev Jain <dev.jain@arm.com>
>
> Hi Dev,
>
> I've applied this patch, with some minor tweaks:
> <https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=9e1f221b2099ee2c936ce4d6562a61e1e253af47>
Whoops; I found another issue, and amended:
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=b8136d84eb3b9b1db0dd6f54f47c1c104682f44f>
>
> Have a lovely day!
> Alex
>
> > ---
> > man/man7/signal.7 | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/man/man7/signal.7 b/man/man7/signal.7
> > index 4ba5306c8..7d22a7cfe 100644
> > --- a/man/man7/signal.7
> > +++ b/man/man7/signal.7
> > @@ -282,7 +282,13 @@ the thread's alternate signal stack settings.
> > .B SA_SIGINFO
> > flag, then the above information is accessible via the
> > .I ucontext_t
> > -object that is pointed to by the third argument of the signal handler.)
> > +object that is pointed to by the third argument of the signal handler.
> > +This object reflects the state at which the signal is delivered, rather
> > +than in the handler;
> > +for example, the mask of blocked signals stored in this object will not
> > +contain the mask of new signals blocked through
> > +.BR sigaction(2)).
> > +
> > .IP (1.4)
> > Any signals specified in
> > .I act\->sa_mask
> > --
> > 2.34.1
> >
> >
>
> --
> <https://www.alejandro-colomar.es/>
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] signal.7: Fix wrong mention of sigprocmask
2024-06-11 13:06 ` Mark Brown
@ 2024-06-17 10:59 ` Alejandro Colomar
0 siblings, 0 replies; 7+ messages in thread
From: Alejandro Colomar @ 2024-06-17 10:59 UTC (permalink / raw
To: Mark Brown
Cc: Dev Jain, linux-man, mingo, tglx, mark.rutland, ryan.roberts,
suzuki.poulose, Anshuman.Khandual, DeepakKumar.Mishra,
aneesh.kumar, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 735 bytes --]
Hi Dev, Mark,
On Tue, Jun 11, 2024 at 02:06:31PM GMT, Mark Brown wrote:
> On Tue, Jun 11, 2024 at 02:38:23PM +0530, Dev Jain wrote:
> > The handler is registered with sigaction(), not sigprocmask(). Even if the
> > purpose of writing sigprocmask() here was to mention blocked signals, the
> > statement currently concerns the "addition" of blocked signals; signals
> > blocked through sigprocmask() would already be present in the thread
> > context of blocked signals.
>
> Reviewed-by: Mark Brown <broonie@kernel.org>
Thanks for the patch and the review! I've applied the patch. It will
be included in the man-pages-6.9.1 release later today.
Have a lovely day!
Alex
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-06-17 10:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 9:08 [PATCH v2 0/2] signal(7) fixes Dev Jain
2024-06-11 9:08 ` [PATCH v2 1/2] signal.7: Clearly describe ucontext kernel dump to userspace Dev Jain
2024-06-17 10:54 ` Alejandro Colomar
2024-06-17 10:56 ` Alejandro Colomar
2024-06-11 9:08 ` [PATCH v2 2/2] signal.7: Fix wrong mention of sigprocmask Dev Jain
2024-06-11 13:06 ` Mark Brown
2024-06-17 10:59 ` Alejandro Colomar
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 read-only IMAP folder(s) and NNTP newsgroup(s).