All of lore.kernel.org
 help / color / mirror / Atom feed
* Signal handling possibly wrong
@ 2005-08-09 17:44 Bodo Stroesser
  2005-08-09 18:26 ` Robert Wilkens
  2005-08-09 18:50 ` smbus driver for ati xpress 200m yhlu
  0 siblings, 2 replies; 37+ messages in thread
From: Bodo Stroesser @ 2005-08-09 17:44 UTC (permalink / raw)
  To: linux-kernel

Hi,

reading man pages for sigaction and comparing it to what kernel does
when starting a signal handler (i386, s390, ppc and others), I think
one of both might be wrong.

 From man pages:

  sa_mask gives a mask of signals which should be blocked during
  execu­tion of the signal handler. In addition, the signal which
  triggered the handler will be blocked, unless the SA_NODEFER or
  SA_NOMASK flags are used.

 From arch/i386/kernel/signal.c:

         if (ret && !(ka->sa.sa_flags & SA_NODEFER)) {
                 spin_lock_irq(&current->sighand->siglock);
                 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
                 sigaddset(&current->blocked,sig);
                 recalc_sigpending();
                 spin_unlock_irq(&current->sighand->siglock);
         }


If I understand man pages correctly, the handled signal should be blocked
depending on SA_NODEFER, while sa_mask should be used unconditionally to
block additional signals.
Kernel code blocks both "handled signal" _and_ sa_mask only if SA_NODEFER
isn't set.

Which is the right behavior?

Regards
		Bodo

P.S.:
Please CC me, I'm not on the list.

^ permalink raw reply	[flat|nested] 37+ messages in thread
[parent not found: <11855.1123690475@www37.gmx.net>]

end of thread, other threads:[~2005-08-14 22:04 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-09 17:44 Signal handling possibly wrong Bodo Stroesser
2005-08-09 18:26 ` Robert Wilkens
2005-08-09 18:32   ` Bodo Stroesser
2005-08-09 18:39     ` Robert Wilkens
2005-08-09 18:44       ` Bodo Stroesser
2005-08-09 19:04         ` Robert Wilkens
2005-08-09 19:33           ` Steven Rostedt
2005-08-09 19:41             ` Bodo Stroesser
2005-08-09 20:03               ` Steven Rostedt
2005-08-09 20:19                 ` Steven Rostedt
2005-08-09 20:49                   ` Chris Wright
2005-08-09 21:00                     ` [PATCH] Fix i386 signal handling of NODEFER, should not affect sa_mask (was: Re: Signal handling possibly wrong) Steven Rostedt
2005-08-09 21:06                       ` Chris Wright
2005-08-09 21:07                       ` [PATCH] Fix PPC signal handling of NODEFER, should not affect sa_mask Steven Rostedt
2005-08-09 21:27                         ` Linus Torvalds
2005-08-10  3:10                           ` Steven Rostedt
2005-08-10  3:33                             ` Steven Rostedt
2005-08-12 18:37                             ` Jan Engelhardt
2005-08-12 18:45                               ` Chris Wright
2005-08-12 18:59                                 ` Steven Rostedt
2005-08-12 19:27                                   ` Steven Rostedt
2005-08-12 19:31                                   ` Jesper Juhl
2005-08-12 21:08                                     ` Steven Rostedt
2005-08-14 11:24                                       ` Jesper Juhl
2005-08-12 21:53                                     ` Steven Rostedt
2005-08-14 22:04                                       ` Kyle Moffett
2005-08-13 18:47                                   ` Marc Ballarin
2005-08-10  9:44                           ` Bodo Stroesser
2005-08-09 21:04                     ` Signal handling possibly wrong Chris Wright
2005-08-10  9:11                     ` Bodo Stroesser
2005-08-10 16:20                       ` Chris Wright
2005-08-09 19:33           ` Jeremy Maitin-Shepard
2005-08-09 18:50 ` smbus driver for ati xpress 200m yhlu
2005-08-09 22:57   ` Andi Kleen
2005-08-10  2:51     ` yhlu
2005-08-10  7:27       ` Andi Kleen
     [not found] <11855.1123690475@www37.gmx.net>
2005-08-10 16:22 ` Signal handling possibly wrong Michael Kerrisk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.