Re: [PATCH v5 02/25] mm: userfault: return VM_FAULT_RETRY on signals

2019-06-26 Thread Peter Xu
On Wed, Jun 26, 2019 at 09:59:58AM +0800, Linus Torvalds wrote: > On Tue, Jun 25, 2019 at 1:31 PM Peter Xu wrote: > > > > Yes that sounds reasonable to me, and that matches perfectly with > > TASK_INTERRUPTIBLE and TASK_KILLABLE. The only thing that I am a bit > > uncertain is whether we should

Re: [PATCH v5 02/25] mm: userfault: return VM_FAULT_RETRY on signals

2019-06-25 Thread Linus Torvalds
On Tue, Jun 25, 2019 at 1:31 PM Peter Xu wrote: > > Yes that sounds reasonable to me, and that matches perfectly with > TASK_INTERRUPTIBLE and TASK_KILLABLE. The only thing that I am a bit > uncertain is whether we should define FAULT_FLAG_INTERRUPTIBLE as a > new bit or make it simply a

Re: [PATCH v5 02/25] mm: userfault: return VM_FAULT_RETRY on signals

2019-06-24 Thread Peter Xu
On Mon, Jun 24, 2019 at 09:31:42PM +0800, Linus Torvalds wrote: > On Mon, Jun 24, 2019 at 3:43 PM Peter Xu wrote: > > > > Should we still be able to react on signal_pending() as part of fault > > handling (because that's what this patch wants to do, at least for an > > user-mode page fault)?

Re: [PATCH v5 02/25] mm: userfault: return VM_FAULT_RETRY on signals

2019-06-24 Thread Linus Torvalds
On Mon, Jun 24, 2019 at 3:43 PM Peter Xu wrote: > > Should we still be able to react on signal_pending() as part of fault > handling (because that's what this patch wants to do, at least for an > user-mode page fault)? Please kindly correct me if I misunderstood... I think that with this patch

Re: [PATCH v5 02/25] mm: userfault: return VM_FAULT_RETRY on signals

2019-06-24 Thread Peter Xu
On Sat, Jun 22, 2019 at 11:02:48AM -0700, Linus Torvalds wrote: > So I still think this all *may* ok, but at a minimum some of the > comments are misleading, and we need more docs on what happens with > normal signals. > > I'm picking on just the first one I noticed, but I think there were >

Re: [PATCH v5 02/25] mm: userfault: return VM_FAULT_RETRY on signals

2019-06-22 Thread Linus Torvalds
So I still think this all *may* ok, but at a minimum some of the comments are misleading, and we need more docs on what happens with normal signals. I'm picking on just the first one I noticed, but I think there were other architectures with this too: On Wed, Jun 19, 2019 at 7:20 PM Peter Xu

[PATCH v5 02/25] mm: userfault: return VM_FAULT_RETRY on signals

2019-06-19 Thread Peter Xu
The idea comes from the upstream discussion between Linus and Andrea: https://lkml.org/lkml/2017/10/30/560 A summary to the issue: there was a special path in handle_userfault() in the past that we'll return a VM_FAULT_NOPAGE when we detected non-fatal signals when waiting for userfault