RE: [PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask

2019-06-06 Thread David Laight
From: Oleg Nesterov > Sent: 06 June 2019 13:41 > On 06/06, David Laight wrote: > > > > Some of this code is hard to grep through :-) > > I'd suggest to simply read the kernel code once and memorise it, after > that you will not need to use grep. Unfortunately all the available buffer space is ful

Re: [PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask

2019-06-06 Thread Oleg Nesterov
On 06/06, David Laight wrote: > > Some of this code is hard to grep through :-) I'd suggest to simply read the kernel code once and memorise it, after that you will not need to use grep. > > When signal handler returns it does sys_rt_sigreturn() which restores > > the original mask saved in uc_si

RE: [PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask

2019-06-06 Thread David Laight
From: Oleg Nesterov > Sent: 06 June 2019 12:05 > On 06/06, David Laight wrote: > > > > If a signal handler is called, I presume that the trampoline > > calls back into the kernel to get further handlers called > > and to finally restore the original signal mask? > > See sigmask_to_save(), this is

Re: [PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask

2019-06-06 Thread Oleg Nesterov
On 06/06, David Laight wrote: > > If a signal handler is called, I presume that the trampoline > calls back into the kernel to get further handlers called > and to finally restore the original signal mask? See sigmask_to_save(), this is what the kernel records in uc.uc_sigmask before the signal ha

Re: [PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask

2019-06-06 Thread Oleg Nesterov
On 06/05, Linus Torvalds wrote: > > On Wed, Jun 5, 2019 at 8:58 AM Oleg Nesterov wrote: > > > > To simplify the review, please see the code with this patch applied. > > I am using epoll_pwait() as an example because it looks very simple. > > I like it. > > However. > > I think I'd like it even mor

RE: [PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask

2019-06-06 Thread David Laight
From: Linus Torvalds > Sent: 05 June 2019 18:25 > On Wed, Jun 5, 2019 at 8:58 AM Oleg Nesterov wrote: > > > > To simplify the review, please see the code with this patch applied. > > I am using epoll_pwait() as an example because it looks very simple. > > I like it. > > However. > > I think I'd

Re: [PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask

2019-06-05 Thread Linus Torvalds
On Wed, Jun 5, 2019 at 8:58 AM Oleg Nesterov wrote: > > To simplify the review, please see the code with this patch applied. > I am using epoll_pwait() as an example because it looks very simple. I like it. However. I think I'd like it even more if we just said "we don't need restore_saved_sigm

[PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask

2019-06-05 Thread Oleg Nesterov
On top of signal-remove-the-wrong-signal_pending-check-in-restore_user_sigmask.patch Let me repeat, every file touched by this patch needs more cleanups, fs/aio.c looks wrong with or without the recent changes. Lets discuss this later. To simplify the review, please see the code with th