Re: sigaltstack fun

2012-12-03 Thread David Miller
From: Al Viro Date: Mon, 26 Nov 2012 05:15:44 + > On Mon, Nov 26, 2012 at 05:10:02AM +, Al Viro wrote: >> On Sun, Nov 18, 2012 at 10:27:24PM -0500, David Miller wrote: >> > > Cc: sta...@vger.kernel.org >> > > Signed-off-by: Al Viro >> > >> > Applied, thanks. >> >> Hmm... There's

Re: sigaltstack fun

2012-12-03 Thread David Miller
From: Al Viro Date: Mon, 26 Nov 2012 05:10:02 + > On Sun, Nov 18, 2012 at 10:27:24PM -0500, David Miller wrote: >> > Cc: sta...@vger.kernel.org >> > Signed-off-by: Al Viro >> >> Applied, thanks. > > Hmm... There's something odd going on with {rt_,}sigaction on sparc - > we *do* have

Re: sigaltstack fun

2012-12-03 Thread David Miller
From: Al Viro v...@zeniv.linux.org.uk Date: Mon, 26 Nov 2012 05:10:02 + On Sun, Nov 18, 2012 at 10:27:24PM -0500, David Miller wrote: Cc: sta...@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk Applied, thanks. Hmm... There's something odd going on with

Re: sigaltstack fun

2012-12-03 Thread David Miller
From: Al Viro v...@zeniv.linux.org.uk Date: Mon, 26 Nov 2012 05:15:44 + On Mon, Nov 26, 2012 at 05:10:02AM +, Al Viro wrote: On Sun, Nov 18, 2012 at 10:27:24PM -0500, David Miller wrote: Cc: sta...@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk Applied,

Re: sigaltstack fun

2012-11-25 Thread Al Viro
On Mon, Nov 26, 2012 at 05:10:02AM +, Al Viro wrote: > On Sun, Nov 18, 2012 at 10:27:24PM -0500, David Miller wrote: > > > Cc: sta...@vger.kernel.org > > > Signed-off-by: Al Viro > > > > Applied, thanks. > > Hmm... There's something odd going on with {rt_,}sigaction on sparc - > we *do*

Re: sigaltstack fun

2012-11-25 Thread Al Viro
On Sun, Nov 18, 2012 at 10:27:24PM -0500, David Miller wrote: > > Cc: sta...@vger.kernel.org > > Signed-off-by: Al Viro > > Applied, thanks. Hmm... There's something odd going on with {rt_,}sigaction on sparc - we *do* have sa_restorer in struct sigaction and struct old_sigaction, but it's not

Re: sigaltstack fun

2012-11-25 Thread Al Viro
On Sun, Nov 18, 2012 at 10:27:24PM -0500, David Miller wrote: Cc: sta...@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk Applied, thanks. Hmm... There's something odd going on with {rt_,}sigaction on sparc - we *do* have sa_restorer in struct sigaction and struct

Re: sigaltstack fun

2012-11-25 Thread Al Viro
On Mon, Nov 26, 2012 at 05:10:02AM +, Al Viro wrote: On Sun, Nov 18, 2012 at 10:27:24PM -0500, David Miller wrote: Cc: sta...@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk Applied, thanks. Hmm... There's something odd going on with {rt_,}sigaction on sparc -

Re: sigaltstack fun (was Re: new execve/kernel_thread design)

2012-11-20 Thread Al Viro
On Sun, Nov 18, 2012 at 08:45:43AM -1000, Linus Torvalds wrote: > On Sat, Nov 17, 2012 at 7:45 PM, Al Viro wrote: > > > > Linus, do you have any objections to the above? FWIW, I've a tentative > > patchset in that direction (most of it from the last cycle); right now > > it + stuff currently in

Re: sigaltstack fun (was Re: new execve/kernel_thread design)

2012-11-20 Thread Al Viro
On Sun, Nov 18, 2012 at 08:45:43AM -1000, Linus Torvalds wrote: On Sat, Nov 17, 2012 at 7:45 PM, Al Viro v...@zeniv.linux.org.uk wrote: Linus, do you have any objections to the above? FWIW, I've a tentative patchset in that direction (most of it from the last cycle); right now it + stuff

Re: sigaltstack fun

2012-11-18 Thread Greg KH
On Sun, Nov 18, 2012 at 03:48:59PM -0500, David Miller wrote: > From: Al Viro > Date: Sun, 18 Nov 2012 19:59:21 + > > > Might be a good idea to start adding tests/* in the kernel tree, > > perhaps? > > I've always been a strong advocate of this idea. I would also love to see this happen.

Re: sigaltstack fun

2012-11-18 Thread David Miller
From: Al Viro Date: Mon, 19 Nov 2012 02:35:07 + > sparc64: not any error from do_sigaltstack() should fail rt_sigreturn() > > If a signal handler is executed on altstack and another signal comes, > we will end up with rt_sigreturn() on return from the second handler > getting -EPERM from

Re: sigaltstack fun

2012-11-18 Thread Al Viro
On Sun, Nov 18, 2012 at 08:30:05PM -0500, David Miller wrote: > > Er... So which tree should that go through? sparc or signal? There's > > a similar microblaze patch and a few more of the "do_sigaltstack() takes > > userland pointer" variety, so I can put together a pile in > >

Re: sigaltstack fun

2012-11-18 Thread David Miller
From: Al Viro Date: Mon, 19 Nov 2012 01:10:13 + > On Sun, Nov 18, 2012 at 04:18:33PM -0500, David Miller wrote: >> From: Al Viro >> Date: Sun, 18 Nov 2012 21:02:53 + >> >> > Are you OK with the patch below? Should be the minimal fix, getting >> > rid of those segfaults and converting

Re: sigaltstack fun

2012-11-18 Thread Al Viro
On Sun, Nov 18, 2012 at 04:18:33PM -0500, David Miller wrote: > From: Al Viro > Date: Sun, 18 Nov 2012 21:02:53 + > > > Are you OK with the patch below? Should be the minimal fix, getting > > rid of those segfaults and converting to usual semantics here... > > > > Signed-off-by: Al Viro >

Re: sigaltstack fun

2012-11-18 Thread David Miller
From: Al Viro Date: Sun, 18 Nov 2012 21:02:53 + > Are you OK with the patch below? Should be the minimal fix, getting > rid of those segfaults and converting to usual semantics here... > > Signed-off-by: Al Viro Yep, looks fine: Acked-by: David S. Miller -- To unsubscribe from this

Re: sigaltstack fun

2012-11-18 Thread Al Viro
On Sun, Nov 18, 2012 at 07:59:21PM +, Al Viro wrote: > On Sun, Nov 18, 2012 at 02:03:32PM -0500, David Miller wrote: > > > I have absolutely no objections. sigaltstack has always been kind of > > > messy, and made worse by the fact that it gets effectively no testing > > > (because it's

Re: sigaltstack fun

2012-11-18 Thread David Miller
From: Al Viro Date: Sun, 18 Nov 2012 19:59:21 + > Might be a good idea to start adding tests/* in the kernel tree, > perhaps? I've always been a strong advocate of this idea. I think if someone just did the work to get things going, it would just pick up it's own momentum and get merged

Re: sigaltstack fun

2012-11-18 Thread Al Viro
On Sun, Nov 18, 2012 at 02:03:32PM -0500, David Miller wrote: > > I have absolutely no objections. sigaltstack has always been kind of > > messy, and made worse by the fact that it gets effectively no testing > > (because it's generally not used by normal code and even code that > > uses it tends

Re: sigaltstack fun

2012-11-18 Thread David Miller
From: Linus Torvalds Date: Sun, 18 Nov 2012 08:45:43 -1000 > On Sat, Nov 17, 2012 at 7:45 PM, Al Viro wrote: >> >> Linus, do you have any objections to the above? FWIW, I've a tentative >> patchset in that direction (most of it from the last cycle); right now >> it + stuff currently in

Re: sigaltstack fun (was Re: new execve/kernel_thread design)

2012-11-18 Thread Linus Torvalds
On Sat, Nov 17, 2012 at 7:45 PM, Al Viro wrote: > > Linus, do you have any objections to the above? FWIW, I've a tentative > patchset in that direction (most of it from the last cycle); right now > it + stuff currently in signal.git#for-next is at -3.4KLoC and I hadn't > dealt with the biarch

Re: sigaltstack fun (was Re: new execve/kernel_thread design)

2012-11-18 Thread Linus Torvalds
On Sat, Nov 17, 2012 at 7:45 PM, Al Viro v...@zeniv.linux.org.uk wrote: Linus, do you have any objections to the above? FWIW, I've a tentative patchset in that direction (most of it from the last cycle); right now it + stuff currently in signal.git#for-next is at -3.4KLoC and I hadn't dealt

Re: sigaltstack fun

2012-11-18 Thread David Miller
From: Linus Torvalds torva...@linux-foundation.org Date: Sun, 18 Nov 2012 08:45:43 -1000 On Sat, Nov 17, 2012 at 7:45 PM, Al Viro v...@zeniv.linux.org.uk wrote: Linus, do you have any objections to the above? FWIW, I've a tentative patchset in that direction (most of it from the last cycle);

Re: sigaltstack fun

2012-11-18 Thread Al Viro
On Sun, Nov 18, 2012 at 02:03:32PM -0500, David Miller wrote: I have absolutely no objections. sigaltstack has always been kind of messy, and made worse by the fact that it gets effectively no testing (because it's generally not used by normal code and even code that uses it tends to use

Re: sigaltstack fun

2012-11-18 Thread David Miller
From: Al Viro v...@zeniv.linux.org.uk Date: Sun, 18 Nov 2012 19:59:21 + Might be a good idea to start adding tests/* in the kernel tree, perhaps? I've always been a strong advocate of this idea. I think if someone just did the work to get things going, it would just pick up it's own

Re: sigaltstack fun

2012-11-18 Thread Al Viro
On Sun, Nov 18, 2012 at 07:59:21PM +, Al Viro wrote: On Sun, Nov 18, 2012 at 02:03:32PM -0500, David Miller wrote: I have absolutely no objections. sigaltstack has always been kind of messy, and made worse by the fact that it gets effectively no testing (because it's generally not

Re: sigaltstack fun

2012-11-18 Thread David Miller
From: Al Viro v...@zeniv.linux.org.uk Date: Sun, 18 Nov 2012 21:02:53 + Are you OK with the patch below? Should be the minimal fix, getting rid of those segfaults and converting to usual semantics here... Signed-off-by: Al Viro v...@zeniv.linux.org.uk Yep, looks fine: Acked-by: David

Re: sigaltstack fun

2012-11-18 Thread Al Viro
On Sun, Nov 18, 2012 at 04:18:33PM -0500, David Miller wrote: From: Al Viro v...@zeniv.linux.org.uk Date: Sun, 18 Nov 2012 21:02:53 + Are you OK with the patch below? Should be the minimal fix, getting rid of those segfaults and converting to usual semantics here...

Re: sigaltstack fun

2012-11-18 Thread David Miller
From: Al Viro v...@zeniv.linux.org.uk Date: Mon, 19 Nov 2012 01:10:13 + On Sun, Nov 18, 2012 at 04:18:33PM -0500, David Miller wrote: From: Al Viro v...@zeniv.linux.org.uk Date: Sun, 18 Nov 2012 21:02:53 + Are you OK with the patch below? Should be the minimal fix, getting rid

Re: sigaltstack fun

2012-11-18 Thread Al Viro
On Sun, Nov 18, 2012 at 08:30:05PM -0500, David Miller wrote: Er... So which tree should that go through? sparc or signal? There's a similar microblaze patch and a few more of the do_sigaltstack() takes userland pointer variety, so I can put together a pile in signal.git#for-linus, but

Re: sigaltstack fun

2012-11-18 Thread David Miller
From: Al Viro v...@zeniv.linux.org.uk Date: Mon, 19 Nov 2012 02:35:07 + sparc64: not any error from do_sigaltstack() should fail rt_sigreturn() If a signal handler is executed on altstack and another signal comes, we will end up with rt_sigreturn() on return from the second handler

Re: sigaltstack fun

2012-11-18 Thread Greg KH
On Sun, Nov 18, 2012 at 03:48:59PM -0500, David Miller wrote: From: Al Viro v...@zeniv.linux.org.uk Date: Sun, 18 Nov 2012 19:59:21 + Might be a good idea to start adding tests/* in the kernel tree, perhaps? I've always been a strong advocate of this idea. I would also love to see

sigaltstack fun (was Re: new execve/kernel_thread design)

2012-11-17 Thread Al Viro
On Fri, Nov 16, 2012 at 08:59:25AM +0100, Michal Simek wrote: > Do you have set of tests which should run it? > > > > 2) your definition of current_pt_regs() is an exact copy of on in > > include/linux/ptrace.h; why is "microblaze: Define current_pt_regs" > > needed at all? IOW, I'd rather

sigaltstack fun (was Re: new execve/kernel_thread design)

2012-11-17 Thread Al Viro
On Fri, Nov 16, 2012 at 08:59:25AM +0100, Michal Simek wrote: Do you have set of tests which should run it? 2) your definition of current_pt_regs() is an exact copy of on in include/linux/ptrace.h; why is microblaze: Define current_pt_regs needed at all? IOW, I'd rather added #include