Re: [PATCH] uprobes: Fix handle_swbp() vs. unregister() + register() race once more

2018-11-22 Thread Ingo Molnar
* Oleg Nesterov wrote: > On 11/22, Oleg Nesterov wrote: > > On 11/22, Andrea Parri wrote: > > > > > > Commit 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + > > > register() race") added the UPROBE_COPY_INSN flag, and corresponding > > > smp_wmb() and smp_rmb() memory barriers, to

Re: [PATCH] uprobes: Fix handle_swbp() vs. unregister() + register() race once more

2018-11-22 Thread Ingo Molnar
* Oleg Nesterov wrote: > On 11/22, Oleg Nesterov wrote: > > On 11/22, Andrea Parri wrote: > > > > > > Commit 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + > > > register() race") added the UPROBE_COPY_INSN flag, and corresponding > > > smp_wmb() and smp_rmb() memory barriers, to

Re: [PATCH] uprobes: Fix handle_swbp() vs. unregister() + register() race once more

2018-11-22 Thread Andrea Parri
On Thu, Nov 22, 2018 at 05:27:09PM +0100, Oleg Nesterov wrote: > On 11/22, Oleg Nesterov wrote: > > On 11/22, Andrea Parri wrote: > > > > > > Commit 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + > > > register() race") added the UPROBE_COPY_INSN flag, and corresponding > > >

Re: [PATCH] uprobes: Fix handle_swbp() vs. unregister() + register() race once more

2018-11-22 Thread Andrea Parri
On Thu, Nov 22, 2018 at 05:27:09PM +0100, Oleg Nesterov wrote: > On 11/22, Oleg Nesterov wrote: > > On 11/22, Andrea Parri wrote: > > > > > > Commit 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + > > > register() race") added the UPROBE_COPY_INSN flag, and corresponding > > >

Re: [PATCH] uprobes: Fix handle_swbp() vs. unregister() + register() race once more

2018-11-22 Thread Oleg Nesterov
On 11/22, Oleg Nesterov wrote: > On 11/22, Andrea Parri wrote: > > > > Commit 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + > > register() race") added the UPROBE_COPY_INSN flag, and corresponding > > smp_wmb() and smp_rmb() memory barriers, to ensure that handle_swbp() > > uses

Re: [PATCH] uprobes: Fix handle_swbp() vs. unregister() + register() race once more

2018-11-22 Thread Oleg Nesterov
On 11/22, Oleg Nesterov wrote: > On 11/22, Andrea Parri wrote: > > > > Commit 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + > > register() race") added the UPROBE_COPY_INSN flag, and corresponding > > smp_wmb() and smp_rmb() memory barriers, to ensure that handle_swbp() > > uses

Re: [PATCH] uprobes: Fix handle_swbp() vs. unregister() + register() race once more

2018-11-22 Thread Oleg Nesterov
On 11/22, Andrea Parri wrote: > > Commit 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + > register() race") added the UPROBE_COPY_INSN flag, and corresponding > smp_wmb() and smp_rmb() memory barriers, to ensure that handle_swbp() > uses fully-initialized uprobes only. > > However,

Re: [PATCH] uprobes: Fix handle_swbp() vs. unregister() + register() race once more

2018-11-22 Thread Oleg Nesterov
On 11/22, Andrea Parri wrote: > > Commit 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + > register() race") added the UPROBE_COPY_INSN flag, and corresponding > smp_wmb() and smp_rmb() memory barriers, to ensure that handle_swbp() > uses fully-initialized uprobes only. > > However,

[PATCH] uprobes: Fix handle_swbp() vs. unregister() + register() race once more

2018-11-22 Thread Andrea Parri
Commit 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + register() race") added the UPROBE_COPY_INSN flag, and corresponding smp_wmb() and smp_rmb() memory barriers, to ensure that handle_swbp() uses fully-initialized uprobes only. However, the smp_rmb() is mis-placed: this barrier

[PATCH] uprobes: Fix handle_swbp() vs. unregister() + register() race once more

2018-11-22 Thread Andrea Parri
Commit 142b18ddc8143 ("uprobes: Fix handle_swbp() vs unregister() + register() race") added the UPROBE_COPY_INSN flag, and corresponding smp_wmb() and smp_rmb() memory barriers, to ensure that handle_swbp() uses fully-initialized uprobes only. However, the smp_rmb() is mis-placed: this barrier