[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201009144328.GB14523@redhat.com>
Date: Fri, 9 Oct 2020 16:43:29 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Jens Axboe <axboe@...nel.dk>
Cc: linux-kernel@...r.kernel.org, io-uring@...r.kernel.org,
peterz@...radead.org, tglx@...utronix.de
Subject: Re: [PATCH 3/4] kernel: add support for TIF_NOTIFY_SIGNAL
Once again, I am fine with this patch, just a minor comment...
On 10/08, 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)
> {
> struct ksignal ksig;
>
> - if (get_signal(&ksig)) {
> + if (test_thread_flag(TIF_NOTIFY_SIGNAL))
> + tracehook_notify_signal();
> +
> + if (task_sigpending(current) && get_signal(&ksig)) {
I suggested to change arch_do_signal() because somehow I like it this way ;)
And because we can easily pass the "ti_work" mask to arch_do_signal() and
avoid test_thread_flag/task_sigpending.
Hmm. I just noticed that only x86 uses arch_do_signal(), so perhaps you can
add this change to this patch right now? Up to you.
On the other hand, we could add
if (test_thread_flag(TIF_NOTIFY_SIGNAL))
tracehook_notify_signal();
if (!task_sigpending(current))
return 0;
at the start of get_signal() instead. Somehow I don't really like this, but
this way we do need less changes in arch-dependant code. Again, up to you.
Oleg.
Powered by blists - more mailing lists