linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [git pull] signals, the first series
@ 2012-05-22  4:35 Al Viro
  2012-05-22  8:06 ` Stephen Rothwell
  0 siblings, 1 reply; 5+ messages in thread
From: Al Viro @ 2012-05-22  4:35 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-arch

	This is just the first part of the queue (about a half of it);
assorted fixes all over the place in signals' handling.  This one ends
with all sigsuspend() implementations switched to generic one
(->saved_sigmask-based), a bunch of assorted old buglets fixed and most
of the missing bits of NOTIFY_RESUME hookup in place (two more sit in
arm and um trees resp. and there's a couple of broken ones that need
obvious fixes - parisc and avr32 check TIF_NOTIFY_RESUME only on one of
two codepaths; that'll go in the next series).  Please, pull from
git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal.git for-linus

Shortlog:
Al Viro (35):
      new helper: sigsuspend()
      parisc: resetting ->restart_block.fn needs to be done on rt_sigreturn()
      c6x: ->restart_block.fn needs to be reset on rt_sigreturn
      hexagon: ->restart_block.fn needs to be reset on rt_sigreturn
      microblaze: ->restart_block.fn needs to be reset on rt_sigreturn
      score: ->restart_block.fn needs to be reset on rt_sigreturn
      xtensa: ->restart_block.fn needs to be reset on rt_sigreturn
      avr32: ->restart_block.fn needs to be reset on rt_sigreturn
      xtensa: switch to generic rt_sigsuspend(2)
      sh: switch to saved_sigmask-based sigsuspend()/rt_sigsuspend()
      h8300: don't change blocked signals' mask if setting frame up fails
      h8300: switch to saved_sigmask-based sigsuspend/rt_sigsuspend
      cris: SA_ONESHOT handling is done by get_signal_to_deliver()
      microblaze: bury sys_rt_sigsuspend_wrapper in nommu case too
      avr32: need to clear RESTORE_SIGMASK on successful signal delivery
      blackfin: don't open-code force_sigsegv()
      cris: don't open-code force_sigsegv()
      score: don't open-code force_sigsegv()
      alpha: tidy signal delivery up
      xtensa: xtensa_sigaction doesn't exist
      m32r: struct old_sigaction is never used
      avr32: struct old_sigaction is never used
      sparc: missing checks of __get_user()/__put_user() return values
      sh: missing checks of __get_user()/__put_user() return values
      powerpc: missing checks of __get_user()/__put_user() return values
      cris: missing checks of __get_user()/__put_user() return values
      frv: missing checks of __get_user()/__put_user() return values
      h8300: missing checks of __get_user()/__put_user() return values
      sparc: kill ancient comment in sparc_sigaction()
      m68k: add TIF_NOTIFY_RESUME and handle it.
      score: add handling of NOTIFY_RESUME to do_notify_resume()
      microblaze: handle TIF_NOTIFY_RESUME
      microblaze: drop 'oldset' argument of do_notify_resume()
      xtensa: add handling of TIF_NOTIFY_RESUME
      unicore32: if there's no handler we need to restore sigmask, syscall or no syscall

Matt Fleming (18):
      parisc: use set_current_blocked() and block_sigmask()
      frv: use set_current_blocked() and block_sigmask()
      blackfin: use set_current_blocked() and block_sigmask()
      unicore32: use block_sigmask()
      h8300: use set_current_blocked() and block_sigmask()
      score: don't mask signals if we fail to setup signal stack
      score: use set_current_blocked() and block_sigmask()
      microblaze: don't reimplement force_sigsegv()
      microblaze: no need to reset handler if SA_ONESHOT
      microblaze: fix signal masking
      microblaze: use set_current_blocked() and block_sigmask()
      ia64: use set_current_blocked() and block_sigmask()
      cris: use set_current_blocked() and block_sigmask()
      mn10300: use set_current_blocked() and block_sigmask()
      m32r: use set_current_blocked() and block_sigmask()
      avr32: don't mask signals in the error path
      avr32: use block_sigmask()
      m68k: use set_current_blocked() and block_sigmask()

Oleg Nesterov (2):
      avr32: use set_current_blocked() in handle_signal/sys_rt_sigreturn
      hexagon: do_notify_resume() needs tracehook_notify_resume()

Diffstat:
 arch/alpha/kernel/signal.c            |   80 +++++++--------------
 arch/arm/kernel/signal.c              |   11 +---
 arch/avr32/include/asm/signal.h       |    7 --
 arch/avr32/kernel/signal.c            |   30 +++-----
 arch/blackfin/kernel/signal.c         |   21 ++----
 arch/c6x/kernel/signal.c              |    3 +
 arch/cris/arch-v10/kernel/signal.c    |   50 ++++---------
 arch/cris/arch-v32/kernel/signal.c    |   66 ++++-------------
 arch/frv/kernel/signal.c              |   47 ++++---------
 arch/h8300/include/asm/unistd.h       |    1 +
 arch/h8300/kernel/signal.c            |  122 +++++++++++----------------------
 arch/h8300/kernel/syscalls.S          |    6 --
 arch/hexagon/kernel/signal.c          |    4 +
 arch/ia64/kernel/signal.c             |   15 +----
 arch/m32r/include/asm/signal.h        |    7 --
 arch/m32r/kernel/signal.c             |   12 +---
 arch/m68k/include/asm/thread_info.h   |    1 +
 arch/m68k/kernel/entry_mm.S           |    6 +-
 arch/m68k/kernel/signal.c             |   41 ++++++------
 arch/m68k/platform/68328/entry.S      |    2 +-
 arch/m68k/platform/68360/entry.S      |    2 +-
 arch/m68k/platform/coldfire/entry.S   |    2 +-
 arch/microblaze/kernel/entry-nommu.S  |   20 ++----
 arch/microblaze/kernel/entry.S        |   30 ++++-----
 arch/microblaze/kernel/signal.c       |   85 ++++++++++++-----------
 arch/mips/kernel/signal.c             |   20 +-----
 arch/mips/kernel/signal32.c           |   20 +-----
 arch/mips/kernel/signal_n32.c         |   10 +---
 arch/mn10300/kernel/signal.c          |   35 ++--------
 arch/parisc/kernel/signal.c           |   15 +---
 arch/powerpc/kernel/signal_32.c       |   17 +----
 arch/s390/kernel/signal.c             |    9 +--
 arch/score/kernel/signal.c            |   29 ++++----
 arch/sh/include/asm/syscalls_32.h     |    4 +-
 arch/sh/include/asm/unistd.h          |    4 +-
 arch/sh/kernel/signal_32.c            |   53 ++++++--------
 arch/sh/kernel/signal_64.c            |   84 ++++------------------
 arch/sparc/kernel/signal32.c          |   10 ++-
 arch/sparc/kernel/signal_32.c         |   12 +---
 arch/sparc/kernel/signal_64.c         |   13 +---
 arch/sparc/kernel/sys_sparc_32.c      |   17 ++---
 arch/um/kernel/signal.c               |    9 +--
 arch/unicore32/kernel/signal.c        |   18 ++---
 arch/x86/ia32/ia32_signal.c           |   12 +---
 arch/x86/kernel/signal.c              |   12 +---
 arch/xtensa/include/asm/signal.h      |    7 --
 arch/xtensa/include/asm/syscall.h     |    4 -
 arch/xtensa/include/asm/thread_info.h |    1 +
 arch/xtensa/include/asm/unistd.h      |    2 +-
 arch/xtensa/kernel/entry.S            |    6 +-
 arch/xtensa/kernel/signal.c           |   73 +++++++++-----------
 include/linux/signal.h                |    1 +
 kernel/compat.c                       |   10 +---
 kernel/signal.c                       |   25 ++++---
 54 files changed, 386 insertions(+), 817 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [git pull] signals, the first series
  2012-05-22  4:35 [git pull] signals, the first series Al Viro
@ 2012-05-22  8:06 ` Stephen Rothwell
  2012-05-22  8:06   ` Stephen Rothwell
  2012-05-23  5:14   ` Stephen Rothwell
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Rothwell @ 2012-05-22  8:06 UTC (permalink / raw)
  To: Al Viro; +Cc: Linus Torvalds, linux-kernel, linux-arch, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]

Hi Al,, Linus,

On Tue, 22 May 2012 05:35:25 +0100 Al Viro <viro@ZenIV.linux.org.uk> wrote:
>
> 	This is just the first part of the queue (about a half of it);
> assorted fixes all over the place in signals' handling.  This one ends
> with all sigsuspend() implementations switched to generic one
> (->saved_sigmask-based), a bunch of assorted old buglets fixed and most
> of the missing bits of NOTIFY_RESUME hookup in place (two more sit in
> arm and um trees resp. and there's a couple of broken ones that need
> obvious fixes - parisc and avr32 check TIF_NOTIFY_RESUME only on one of
> two codepaths; that'll go in the next series).  Please, pull from
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal.git for-linus

I am pretty sure that none of this has been in linux-next ... I have no
idea what sort of conflicts it will produce with the rest of the code in
there or what issues that giving it some time in linux-next may discover.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [git pull] signals, the first series
  2012-05-22  8:06 ` Stephen Rothwell
@ 2012-05-22  8:06   ` Stephen Rothwell
  2012-05-23  5:14   ` Stephen Rothwell
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2012-05-22  8:06 UTC (permalink / raw)
  To: Al Viro; +Cc: Linus Torvalds, linux-kernel, linux-arch, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]

Hi Al,, Linus,

On Tue, 22 May 2012 05:35:25 +0100 Al Viro <viro@ZenIV.linux.org.uk> wrote:
>
> 	This is just the first part of the queue (about a half of it);
> assorted fixes all over the place in signals' handling.  This one ends
> with all sigsuspend() implementations switched to generic one
> (->saved_sigmask-based), a bunch of assorted old buglets fixed and most
> of the missing bits of NOTIFY_RESUME hookup in place (two more sit in
> arm and um trees resp. and there's a couple of broken ones that need
> obvious fixes - parisc and avr32 check TIF_NOTIFY_RESUME only on one of
> two codepaths; that'll go in the next series).  Please, pull from
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal.git for-linus

I am pretty sure that none of this has been in linux-next ... I have no
idea what sort of conflicts it will produce with the rest of the code in
there or what issues that giving it some time in linux-next may discover.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [git pull] signals, the first series
  2012-05-22  8:06 ` Stephen Rothwell
  2012-05-22  8:06   ` Stephen Rothwell
@ 2012-05-23  5:14   ` Stephen Rothwell
  2012-05-25 21:48     ` Al Viro
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2012-05-23  5:14 UTC (permalink / raw)
  To: Al Viro; +Cc: Linus Torvalds, linux-kernel, linux-arch, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

Hi Al,

On Tue, 22 May 2012 18:06:35 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Tue, 22 May 2012 05:35:25 +0100 Al Viro <viro@ZenIV.linux.org.uk> wrote:
> >
> > 	This is just the first part of the queue (about a half of it);
> > assorted fixes all over the place in signals' handling.  This one ends
> > with all sigsuspend() implementations switched to generic one
> > (->saved_sigmask-based), a bunch of assorted old buglets fixed and most
> > of the missing bits of NOTIFY_RESUME hookup in place (two more sit in
> > arm and um trees resp. and there's a couple of broken ones that need
> > obvious fixes - parisc and avr32 check TIF_NOTIFY_RESUME only on one of
> > two codepaths; that'll go in the next series).  Please, pull from
> > git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal.git for-linus
> 
> I am pretty sure that none of this has been in linux-next ... I have no
> idea what sort of conflicts it will produce with the rest of the code in
> there or what issues that giving it some time in linux-next may discover.

OK, it seem that most of this has been in Andrew's tree for a while,
sorry about that.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [git pull] signals, the first series
  2012-05-23  5:14   ` Stephen Rothwell
@ 2012-05-25 21:48     ` Al Viro
  0 siblings, 0 replies; 5+ messages in thread
From: Al Viro @ 2012-05-25 21:48 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus Torvalds, linux-kernel, linux-arch, Andrew Morton,
	linuxppc-dev

On Wed, May 23, 2012 at 03:14:05PM +1000, Stephen Rothwell wrote:
> OK, it seem that most of this has been in Andrew's tree for a while,
> sorry about that.

Grr...  *Another* missing prereq for task_work_add() series, this time on
ppc64.  Could somebody familiar with that beast take a look at this and
tell if the change is sane?  What we want is
	r0 = r3 & MSR_PR ?
		_TIF_NEED_RESCHED | _TIF_NOTIFY_RESUME | _TIF_SIGPENDING :
		_TIF_NEED_RESCHED;
and when Roland re-added NOTIFY_RESUME he'd missed that hack (non-PREEMPT
variant and 32bit code all just check _TIF_USER_WORK_MASK, so updating
it had been enough in those cases).  I don't have the hardware in
question; the same instructions in userland on ppc32 box produce the
right value.  Unless NAKed I'm going to throw that one into the second
pull request from signal.git, so if anyone has objections, please yell.

I'll gladly replace that with better solution if one shows up (or, better
yet, goes via ppc tree).  AFAICS the diff below should work, but whether
it's the best variant or not... No idea.

Back to massaging VFS queue for pull...

diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index ed1718f..e4fd9bb 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -563,9 +563,10 @@ _GLOBAL(ret_from_except_lite)
 	li	r0,_TIF_NEED_RESCHED	/* bits to check */
 	ld	r3,_MSR(r1)
 	ld	r4,TI_FLAGS(r9)
-	/* Move MSR_PR bit in r3 to _TIF_SIGPENDING position in r0 */
+	/* Add MSR_PR bit in r3 in _TIF_SIGPENDING and _TIF_NOTIFY_RESUME positions in r0 */
 	rlwimi	r0,r3,32+TIF_SIGPENDING-MSR_PR_LG,_TIF_SIGPENDING
-	and.	r0,r4,r0	/* check NEED_RESCHED and maybe SIGPENDING */
+	rlwimi	r0,r3,32+TIF_NOTIFY_RESUME-MSR_PR_LG,_TIF_NOTIFY_RESUME
+	and.	r0,r4,r0	/* check NEED_RESCHED and maybe SIGPENDING/NOTIFY_RESUME */
 	bne	do_work
 
 #else /* !CONFIG_PREEMPT */

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-25 21:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-22  4:35 [git pull] signals, the first series Al Viro
2012-05-22  8:06 ` Stephen Rothwell
2012-05-22  8:06   ` Stephen Rothwell
2012-05-23  5:14   ` Stephen Rothwell
2012-05-25 21:48     ` Al Viro

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).