Re: pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-30 Thread Arnd Bergmann
On Thu, May 30, 2019 at 4:41 PM Oleg Nesterov wrote: > On 05/30, Arnd Bergmann wrote: > Plus every file touched by this patch asks for more cleanups. Say, do_poll() > should return -ERESTARTNOHAND, not -EINTR, after that we can remove the ugly > EINTR->ERESTARTNOHAND in its callers. And more. > >

Re: pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-30 Thread Oleg Nesterov
On 05/30, Arnd Bergmann wrote: > > I think this is a nice simplification, but it would help not to mix up the > minimal regression fix with the rewrite of those functions. Yes, yes, agreed. Plus every file touched by this patch asks for more cleanups. Say, do_poll() should return -ERESTARTNOHAND,

RE: pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-30 Thread David Laight
From: Eric Wong > Sent: 29 May 2019 19:50 ... > > Personally I think that is wrong. > > Given code like the above that has: > > while (!interrupted) { > > pselect(..., &sigint); > > // process available data > > } > > > > You want the

Re: pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-29 Thread Arnd Bergmann
On Wed, May 29, 2019 at 6:12 PM Oleg Nesterov wrote: > > Al, Linus, Eric, please help. > > The previous discussion was very confusing, we simply can not understand each > other. > > To me everything looks very simple and clear, but perhaps I missed something > obvious? Please correct me. Thanks f

Re: pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-29 Thread Eric Wong
David Laight wrote: > From: Oleg Nesterov > > Sent: 29 May 2019 17:12 > > Al, Linus, Eric, please help. > > > > The previous discussion was very confusing, we simply can not understand > > each > > other. > > > > To me everything looks very simple and clear, but perhaps I missed something > > o

Re: pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-29 Thread Deepa Dinamani
On Wed, May 29, 2019 at 9:12 AM Oleg Nesterov wrote: > > Al, Linus, Eric, please help. > > The previous discussion was very confusing, we simply can not understand each > other. > > To me everything looks very simple and clear, but perhaps I missed something > obvious? Please correct me. > > I thi

Re: pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-29 Thread Deepa Dinamani
Resending due to inadvertent conversion of prior message to html. On Wed, May 29, 2019 at 9:12 AM Oleg Nesterov wrote: > Al, Linus, Eric, please help. > > The previous discussion was very confusing, we simply can not understand each > other. > > To me everything looks very simple and clear, but p

RE: pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-29 Thread David Laight
From: Oleg Nesterov > Sent: 29 May 2019 17:12 > Al, Linus, Eric, please help. > > The previous discussion was very confusing, we simply can not understand each > other. > > To me everything looks very simple and clear, but perhaps I missed something > obvious? Please correct me. > > I think that

pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-29 Thread Oleg Nesterov
Al, Linus, Eric, please help. The previous discussion was very confusing, we simply can not understand each other. To me everything looks very simple and clear, but perhaps I missed something obvious? Please correct me. I think that the following code is correct int interrupted = 0;