Re: [git pull] signals pile 3

2012-10-16 Thread Russell King - ARM Linux
On Tue, Oct 16, 2012 at 04:04:14PM +0200, Uwe Kleine-König wrote: > I used: > movne r0, r4 > - movne lr, pc > - movne pc, r5 > + blxne r5 > get_thread_info tsk > > but I assume Russell's patch is better. (Probably because blx doesn't > exist everywhere?!) Correct.

Re: [git pull] signals pile 3

2012-10-16 Thread Uwe Kleine-König
Hello, On Mon, Oct 15, 2012 at 12:16:49AM +0100, Russell King - ARM Linux wrote: > On Mon, Oct 15, 2012 at 12:39:40AM +0200, Daniel Mack wrote: > > Tested-by: Daniel Mack > > > > Many thanks for the very prompt response! > > Thanks Daniel. > > I've also tested this on my OMAP4430 board

Re: [git pull] signals pile 3

2012-10-16 Thread Uwe Kleine-König
Hello, On Mon, Oct 15, 2012 at 12:16:49AM +0100, Russell King - ARM Linux wrote: On Mon, Oct 15, 2012 at 12:39:40AM +0200, Daniel Mack wrote: Tested-by: Daniel Mack zon...@gmail.com Many thanks for the very prompt response! Thanks Daniel. I've also tested this on my OMAP4430 board

Re: [git pull] signals pile 3

2012-10-16 Thread Russell King - ARM Linux
On Tue, Oct 16, 2012 at 04:04:14PM +0200, Uwe Kleine-König wrote: I used: movne r0, r4 - movne lr, pc - movne pc, r5 + blxne r5 get_thread_info tsk but I assume Russell's patch is better. (Probably because blx doesn't exist everywhere?!) Correct. So if

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-15 Thread Catalin Marinas
On Mon, Oct 15, 2012 at 05:27:32PM +0100, Al Viro wrote: > On Mon, Oct 15, 2012 at 05:07:10PM +0100, Catalin Marinas wrote: > > On Sun, Oct 14, 2012 at 08:56:11PM +0100, Al Viro wrote: > > > On Sun, Oct 14, 2012 at 08:24:03PM +0100, Al Viro wrote: > > > > > > > Russell, could you recall what

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-15 Thread Al Viro
On Mon, Oct 15, 2012 at 05:07:10PM +0100, Catalin Marinas wrote: > On Sun, Oct 14, 2012 at 08:56:11PM +0100, Al Viro wrote: > > On Sun, Oct 14, 2012 at 08:24:03PM +0100, Al Viro wrote: > > > > > Russell, could you recall what those had been about? I'm not sure if that > > > had been oopsable

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-15 Thread Catalin Marinas
On Sun, Oct 14, 2012 at 08:56:11PM +0100, Al Viro wrote: > On Sun, Oct 14, 2012 at 08:24:03PM +0100, Al Viro wrote: > > > Russell, could you recall what those had been about? I'm not sure if that > > had been oopsable that far back (again, oops scenario is userland stack > > page getting swapped

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-15 Thread Catalin Marinas
On Sun, Oct 14, 2012 at 08:56:11PM +0100, Al Viro wrote: On Sun, Oct 14, 2012 at 08:24:03PM +0100, Al Viro wrote: Russell, could you recall what those had been about? I'm not sure if that had been oopsable that far back (again, oops scenario is userland stack page getting swapped out

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-15 Thread Al Viro
On Mon, Oct 15, 2012 at 05:07:10PM +0100, Catalin Marinas wrote: On Sun, Oct 14, 2012 at 08:56:11PM +0100, Al Viro wrote: On Sun, Oct 14, 2012 at 08:24:03PM +0100, Al Viro wrote: Russell, could you recall what those had been about? I'm not sure if that had been oopsable that far back

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-15 Thread Catalin Marinas
On Mon, Oct 15, 2012 at 05:27:32PM +0100, Al Viro wrote: On Mon, Oct 15, 2012 at 05:07:10PM +0100, Catalin Marinas wrote: On Sun, Oct 14, 2012 at 08:56:11PM +0100, Al Viro wrote: On Sun, Oct 14, 2012 at 08:24:03PM +0100, Al Viro wrote: Russell, could you recall what those had been

Re: [git pull] signals pile 3

2012-10-14 Thread Russell King - ARM Linux
On Mon, Oct 15, 2012 at 12:39:40AM +0200, Daniel Mack wrote: > Tested-by: Daniel Mack > > Many thanks for the very prompt response! Thanks Daniel. I've also tested this on my OMAP4430 board running in ARM mode, so that still works - we've covered the possibilities between us here between ARM

Re: [git pull] signals pile 3

2012-10-14 Thread Daniel Mack
On 15.10.2012 00:24, Russell King - ARM Linux wrote: > Okay, here's the post-mortem diagnosis. > > What's happening is as follows (I'm very certain of this.) > > We come through the usual init, and issue (see init/main.c): > > kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); >

Re: [git pull] signals pile 3

2012-10-14 Thread Russell King - ARM Linux
Okay, here's the post-mortem diagnosis. What's happening is as follows (I'm very certain of this.) We come through the usual init, and issue (see init/main.c): kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); This creates a new thread, which falls through to the

Re: [git pull] signals pile 3

2012-10-14 Thread Russell King - ARM Linux
On Sun, Oct 14, 2012 at 05:35:23PM +0200, Daniel Mack wrote: > I rebased my ARM development branch and figured that your patch 9fff2fa > ("arm: switch to saner kernel_execve() semantics") breaks the boot on my > board right after init is invoked via NFS: Ok, I'm not going to assign blame to Al's

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 08:24:03PM +0100, Al Viro wrote: > Russell, could you recall what those had been about? I'm not sure if that > had been oopsable that far back (again, oops scenario is userland stack > page getting swapped out before we get to start_thread(), leading to > direct read from

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 06:26:40PM +0100, Al Viro wrote: > and the last 3 make no sense whatsoever. Note that on normal execve() we'll > be going through the syscall return, so the userland will see 0 in there, > no matter what do we do here. Theoretically, it might've been done for > ptrace

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 08:21:53PM +0200, Daniel Mack wrote: > On 14.10.2012 19:55, Al Viro wrote: > > On Sun, Oct 14, 2012 at 06:26:40PM +0100, Al Viro wrote: > >> On Sun, Oct 14, 2012 at 06:44:12PM +0200, Daniel Mack wrote: > >>> On Oct 14, 2012 6:40 PM, "Al Viro" wrote: > > On Sun,

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Daniel Mack
On 14.10.2012 19:55, Al Viro wrote: > On Sun, Oct 14, 2012 at 06:26:40PM +0100, Al Viro wrote: >> On Sun, Oct 14, 2012 at 06:44:12PM +0200, Daniel Mack wrote: >>> On Oct 14, 2012 6:40 PM, "Al Viro" wrote: On Sun, Oct 14, 2012 at 05:35:23PM +0200, Daniel Mack wrote: > I rebased

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 06:26:40PM +0100, Al Viro wrote: > On Sun, Oct 14, 2012 at 06:44:12PM +0200, Daniel Mack wrote: > > On Oct 14, 2012 6:40 PM, "Al Viro" wrote: > > > > > > On Sun, Oct 14, 2012 at 05:35:23PM +0200, Daniel Mack wrote: > > > > > > > I rebased my ARM development branch and

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 06:44:12PM +0200, Daniel Mack wrote: > On Oct 14, 2012 6:40 PM, "Al Viro" wrote: > > > > On Sun, Oct 14, 2012 at 05:35:23PM +0200, Daniel Mack wrote: > > > > > I rebased my ARM development branch and figured that your patch 9fff2fa > > > ("arm: switch to saner

[revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 05:35:23PM +0200, Daniel Mack wrote: > I rebased my ARM development branch and figured that your patch 9fff2fa > ("arm: switch to saner kernel_execve() semantics") breaks the boot on my > board right after init is invoked via NFS: OK, revert it is, then. Nothing in the

Re: [git pull] signals pile 3

2012-10-14 Thread Daniel Mack
Hi Al, On 13.10.2012 02:53, Al Viro wrote: > The last bits of infrastructure for kernel_thread() et.al., with alpha/arm/x86 > use of those. Plus sanitizing the asm glue and do_notify_resume() on alpha, > fixing the "disabled irq while running task_work stuff" breakage there. > > At that point

Re: [git pull] signals pile 3

2012-10-14 Thread Daniel Mack
Hi Al, On 13.10.2012 02:53, Al Viro wrote: The last bits of infrastructure for kernel_thread() et.al., with alpha/arm/x86 use of those. Plus sanitizing the asm glue and do_notify_resume() on alpha, fixing the disabled irq while running task_work stuff breakage there. At that point the rest

[revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 05:35:23PM +0200, Daniel Mack wrote: I rebased my ARM development branch and figured that your patch 9fff2fa (arm: switch to saner kernel_execve() semantics) breaks the boot on my board right after init is invoked via NFS: OK, revert it is, then. Nothing in the tree

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 06:44:12PM +0200, Daniel Mack wrote: On Oct 14, 2012 6:40 PM, Al Viro v...@zeniv.linux.org.uk wrote: On Sun, Oct 14, 2012 at 05:35:23PM +0200, Daniel Mack wrote: I rebased my ARM development branch and figured that your patch 9fff2fa (arm: switch to saner

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 06:26:40PM +0100, Al Viro wrote: On Sun, Oct 14, 2012 at 06:44:12PM +0200, Daniel Mack wrote: On Oct 14, 2012 6:40 PM, Al Viro v...@zeniv.linux.org.uk wrote: On Sun, Oct 14, 2012 at 05:35:23PM +0200, Daniel Mack wrote: I rebased my ARM development branch and

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Daniel Mack
On 14.10.2012 19:55, Al Viro wrote: On Sun, Oct 14, 2012 at 06:26:40PM +0100, Al Viro wrote: On Sun, Oct 14, 2012 at 06:44:12PM +0200, Daniel Mack wrote: On Oct 14, 2012 6:40 PM, Al Viro v...@zeniv.linux.org.uk wrote: On Sun, Oct 14, 2012 at 05:35:23PM +0200, Daniel Mack wrote: I rebased my

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 08:21:53PM +0200, Daniel Mack wrote: On 14.10.2012 19:55, Al Viro wrote: On Sun, Oct 14, 2012 at 06:26:40PM +0100, Al Viro wrote: On Sun, Oct 14, 2012 at 06:44:12PM +0200, Daniel Mack wrote: On Oct 14, 2012 6:40 PM, Al Viro v...@zeniv.linux.org.uk wrote: On Sun,

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 06:26:40PM +0100, Al Viro wrote: and the last 3 make no sense whatsoever. Note that on normal execve() we'll be going through the syscall return, so the userland will see 0 in there, no matter what do we do here. Theoretically, it might've been done for ptrace sake

Re: [revert request for commit 9fff2fa] Re: [git pull] signals pile 3

2012-10-14 Thread Al Viro
On Sun, Oct 14, 2012 at 08:24:03PM +0100, Al Viro wrote: Russell, could you recall what those had been about? I'm not sure if that had been oopsable that far back (again, oops scenario is userland stack page getting swapped out before we get to start_thread(), leading to direct read from an

Re: [git pull] signals pile 3

2012-10-14 Thread Russell King - ARM Linux
On Sun, Oct 14, 2012 at 05:35:23PM +0200, Daniel Mack wrote: I rebased my ARM development branch and figured that your patch 9fff2fa (arm: switch to saner kernel_execve() semantics) breaks the boot on my board right after init is invoked via NFS: Ok, I'm not going to assign blame to Al's

Re: [git pull] signals pile 3

2012-10-14 Thread Russell King - ARM Linux
Okay, here's the post-mortem diagnosis. What's happening is as follows (I'm very certain of this.) We come through the usual init, and issue (see init/main.c): kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); This creates a new thread, which falls through to the

Re: [git pull] signals pile 3

2012-10-14 Thread Daniel Mack
On 15.10.2012 00:24, Russell King - ARM Linux wrote: Okay, here's the post-mortem diagnosis. What's happening is as follows (I'm very certain of this.) We come through the usual init, and issue (see init/main.c): kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); This

Re: [git pull] signals pile 3

2012-10-14 Thread Russell King - ARM Linux
On Mon, Oct 15, 2012 at 12:39:40AM +0200, Daniel Mack wrote: Tested-by: Daniel Mack zon...@gmail.com Many thanks for the very prompt response! Thanks Daniel. I've also tested this on my OMAP4430 board running in ARM mode, so that still works - we've covered the possibilities between us here

[git pull] signals pile 3

2012-10-12 Thread Al Viro
The last bits of infrastructure for kernel_thread() et.al., with alpha/arm/x86 use of those. Plus sanitizing the asm glue and do_notify_resume() on alpha, fixing the "disabled irq while running task_work stuff" breakage there. At that point the rest of kernel_thread/kernel_execve/sys_execve work

[git pull] signals pile 3

2012-10-12 Thread Al Viro
The last bits of infrastructure for kernel_thread() et.al., with alpha/arm/x86 use of those. Plus sanitizing the asm glue and do_notify_resume() on alpha, fixing the disabled irq while running task_work stuff breakage there. At that point the rest of kernel_thread/kernel_execve/sys_execve work