lkml.org 
[lkml]   [2012]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [braindump][RFC] signals and syscall restarts (Re: [PATCH v2 19/44] metag: Signal handling)
From
On 8 December 2012 08:44, Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Thu, Dec 06, 2012 at 10:09:55PM +0000, 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() many
>> times.
>
> FWIW, here's the current situation:
>

> openrisc: broken. regs->orig_gpr11 can be easily used to fix - it fits the
> usual model, but isn't set by sigreturn/restarts. BTW, the comment around
> the call of do_notify_resume() in the asm glue is deeply confused - we *do*
> want the userspace pt_regs; fortunately, there can't be any on top of those
> at that point.
>

Right, I've known about this for a while and have even had a patch for
this lying about in a side-branch. I got side-tracked while fixing
this into trying to make the restart logic more generic, and the
openrisc fix never got merged upstream. I'll need to revisit this.

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 to
Linux master anymore due to other changes along the way, can be found
at:

git://openrisc.net/~jonas/linux ('signal-arch' branch)

Commit 4aa1797d978fe2d45ececceee535257e19374df8 is the interesting one there.

Al, what do you think?

/Jonas


\
 
 \ /
  Last update: 2012-12-15 17:41    [W:0.112 / U:1.160 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site