lkml.org 
[lkml]   [2020]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] x86: wire up TIF_NOTIFY_SIGNAL
On 10/15, Thomas Gleixner wrote:
>
> On Thu, Oct 15 2020 at 07:17, Jens Axboe wrote:
> > --- a/arch/x86/kernel/signal.c
> > +++ b/arch/x86/kernel/signal.c
> > @@ -808,7 +808,10 @@ void arch_do_signal(struct pt_regs *regs, unsigned long ti_work)
> > {
> > struct ksignal ksig;
> >
> > - if (get_signal(&ksig)) {
> > + if (ti_work & _TIF_NOTIFY_SIGNAL)
> > + tracehook_notify_signal();
> > +
> > + if ((ti_work & _TIF_SIGPENDING) && get_signal(&ksig)) {
> > /* Whee! Actually deliver the signal. */
> > handle_signal(&ksig, regs);
> > return;
>
> Instead of adding this to every architectures signal magic, we can
> handle TIF_NOTIFY_SIGNAL in the core code:
>
> static void handle_singal_work(ti_work, regs)
> {
> if (ti_work & _TIF_NOTIFY_SIGNAL)
> tracehook_notify_signal();
>
> arch_do_signal(ti_work, regs);
> }
>
> loop {
> if (ti_work & (SIGPENDING | NOTIFY_SIGNAL))
> handle_signal_work(ti_work, regs);
> }

To me this looks like unnecessary complication. We need to change
every architecture anyway, how can this helper help?

Oleg.

\
 
 \ /
  Last update: 2020-10-15 16:34    [W:0.296 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site