Re: [PATCH v3 2/3] x86/speculation: apply IBPB more strictly to avoid cross-process data leak

Peter Zijlstra
2018-09-05T07:52:51Z

On Tue, Sep 04, 2018 at 04:42:02PM +0200, Jiri Kosina wrote:
> if (tsk && tsk->mm &&
> tsk->mm->context.ctx_id != last_ctx_id &&
> - get_dumpable(tsk->mm) != SUID_DUMP_USER)
> + ___ptrace_may_access(current, tsk, PTRACE_MODE_IBPB))
> indirect_branch_prediction_barrier();

See how the new (first) argument is 'current' and you could've just used
the old __ptrace_may_access().