Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-15 Thread Al Viro
On Sat, Dec 15, 2012 at 05:26:30PM +0100, Jonas Bonn wrote: > That said, let me point again to the series I posted for review a year > ago that attempts to make the restart logic more generic: > > https://lkml.org/lkml/2011/10/23/80 > > The entires patch series, which doesn't necessarily even

Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-15 Thread Jonas Bonn
On 8 December 2012 08:44, Al Viro wrote: > On Thu, Dec 06, 2012 at 10:09:55PM +, Al Viro wrote: >> What we need to guarantee is >> * restarts do not happen on signals caught in interrupts or exceptions >> * restarts do not happen on signals caught in sigreturn() >> * restart should

Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-15 Thread Jonas Bonn
On 8 December 2012 08:44, Al Viro v...@zeniv.linux.org.uk wrote: On Thu, Dec 06, 2012 at 10:09:55PM +, Al Viro wrote: What we need to guarantee is * restarts do not happen on signals caught in interrupts or exceptions * restarts do not happen on signals caught in sigreturn() *

Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-15 Thread Al Viro
On Sat, Dec 15, 2012 at 05:26:30PM +0100, Jonas Bonn wrote: That said, let me point again to the series I posted for review a year ago that attempts to make the restart logic more generic: https://lkml.org/lkml/2011/10/23/80 The entires patch series, which doesn't necessarily even apply

Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-12 Thread James Hogan
On 08/12/12 18:14, Al Viro wrote: > On Thu, Dec 06, 2012 at 10:09:55PM +, Al Viro wrote: > >> What we need to guarantee is >> * restarts do not happen on signals caught in interrupts or exceptions >> * restarts do not happen on signals caught in sigreturn() Since we don't currently have

Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-12 Thread James Hogan
On 08/12/12 18:14, Al Viro wrote: On Thu, Dec 06, 2012 at 10:09:55PM +, Al Viro wrote: What we need to guarantee is * restarts do not happen on signals caught in interrupts or exceptions * restarts do not happen on signals caught in sigreturn() Since we don't currently have an orig

Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-10 Thread James Hogan
On 06/12/12 22:09, Al Viro wrote: > On Thu, Dec 06, 2012 at 11:17:34AM +, James Hogan wrote: > >> Agreed, it looks wrong. Looking at the sh version, is there a particular >> reason to only check for -EFAULT and not the other errors that >> do_sigaltstack can return (-EPERM, -EINVAL, and

Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-10 Thread James Hogan
On 06/12/12 22:09, Al Viro wrote: On Thu, Dec 06, 2012 at 11:17:34AM +, James Hogan wrote: Agreed, it looks wrong. Looking at the sh version, is there a particular reason to only check for -EFAULT and not the other errors that do_sigaltstack can return (-EPERM, -EINVAL, and -ENOMEM)?

Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-08 Thread Al Viro
On Thu, Dec 06, 2012 at 10:09:55PM +, Al Viro wrote: > What we need to guarantee is > * restarts do not happen on signals caught in interrupts or exceptions > * restarts do not happen on signals caught in sigreturn() > * restart should happen only once, even if we get through

Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-08 Thread Al Viro
On Thu, Dec 06, 2012 at 10:09:55PM +, Al Viro wrote: What we need to guarantee is * restarts do not happen on signals caught in interrupts or exceptions * restarts do not happen on signals caught in sigreturn() * restart should happen only once, even if we get through do_signal()

Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-07 Thread Al Viro
On Thu, Dec 06, 2012 at 10:09:55PM +, Al Viro wrote: > "Subtle and undocumented" is an extremely polite way to describe that. > By now we had at least a dozen architectures step on that trap, simply because > they had different calling conventions and the same logics did *not* "just >

Re: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-07 Thread Al Viro
On Thu, Dec 06, 2012 at 10:09:55PM +, Al Viro wrote: Subtle and undocumented is an extremely polite way to describe that. By now we had at least a dozen architectures step on that trap, simply because they had different calling conventions and the same logics did *not* just work

[braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-06 Thread Al Viro
On Thu, Dec 06, 2012 at 11:17:34AM +, James Hogan wrote: > Agreed, it looks wrong. Looking at the sh version, is there a particular > reason to only check for -EFAULT and not the other errors that > do_sigaltstack can return (-EPERM, -EINVAL, and -ENOMEM)? See commit

[braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)

2012-12-06 Thread Al Viro
On Thu, Dec 06, 2012 at 11:17:34AM +, James Hogan wrote: Agreed, it looks wrong. Looking at the sh version, is there a particular reason to only check for -EFAULT and not the other errors that do_sigaltstack can return (-EPERM, -EINVAL, and -ENOMEM)? See commit