[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180905094012.GT24082@hirez.programming.kicks-ass.net>
Date: Wed, 5 Sep 2018 11:40:12 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Jiri Kosina <jikos@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
"Woodhouse, David" <dwmw@...zon.co.uk>,
Oleg Nesterov <oleg@...hat.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH v3 2/3] x86/speculation: apply IBPB more strictly to
avoid cross-process data leak
On Wed, Sep 05, 2018 at 10:02:41AM +0200, Jiri Kosina wrote:
> Yeah, I did more or less that earlier today; my series currently has
Excellent, maybe add a wee comment like so?
> +static bool ibpb_needed(struct task_struct *tsk, u64 last_ctx_id)
> +{
/*
* Check if the current (previous) task has access to the memory
* of the @tsk (next) task. If access is denied, make sure to
* issue a IBPB to stop user->user Spectre-v2 attacks.
*
* Note: __ptrace_may_access() returns 0 or -ERRNO.
*/
> + return (tsk && tsk->mm && tsk->mm->context.ctx_id != last_ctx_id &&
> + __ptrace_may_access(tsk, PTRACE_MODE_IBPB));
> +}
Powered by blists - more mailing lists