[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1811221008140.1571@nanos.tec.linutronix.de>
Date: Thu, 22 Nov 2018 10:08:30 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
Andy Lutomirski <luto@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jiri Kosina <jkosina@...e.cz>,
Tom Lendacky <thomas.lendacky@....com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
David Woodhouse <dwmw@...zon.co.uk>,
Andi Kleen <ak@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>,
Casey Schaufler <casey.schaufler@...el.com>,
Asit Mallick <asit.k.mallick@...el.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
Jon Masters <jcm@...hat.com>,
Waiman Long <longman9394@...il.com>,
Greg KH <gregkh@...uxfoundation.org>,
Dave Stewart <david.c.stewart@...el.com>,
Kees Cook <keescook@...omium.org>,
Tim Chen <tim.c.chen@...ux.intel.com>
Subject: Re: [patch 22/24] x86/speculation: Create PRCTL interface to restrict
indirect branch speculation
On Thu, 22 Nov 2018, Peter Zijlstra wrote:
> On Wed, Nov 21, 2018 at 09:14:52PM +0100, Thomas Gleixner wrote:
> > @@ -1453,6 +1453,8 @@ static inline bool is_percpu_thread(void
> > #define PFA_SPREAD_SLAB 2 /* Spread some slab caches over cpuset */
> > #define PFA_SPEC_SSB_DISABLE 3 /* Speculative Store Bypass disabled */
> > #define PFA_SPEC_SSB_FORCE_DISABLE 4 /* Speculative Store Bypass force disabled*/
> > +#define PFA_SPEC_INDIR_BRANCH_DISABLE 5 /* Indirect branch speculation restricted */
> > +#define PFA_SPEC_INDIR_BRANCH_FORCE_DISABLE 6 /* Indirect branch speculation permanentely restricted */
> >
> > #define TASK_PFA_TEST(name, func) \
> > static inline bool task_##func(struct task_struct *p) \
> > @@ -1484,6 +1486,13 @@ TASK_PFA_CLEAR(SPEC_SSB_DISABLE, spec_ss
> > TASK_PFA_TEST(SPEC_SSB_FORCE_DISABLE, spec_ssb_force_disable)
> > TASK_PFA_SET(SPEC_SSB_FORCE_DISABLE, spec_ssb_force_disable)
> >
> > +TASK_PFA_TEST(SPEC_INDIR_BRANCH_DISABLE, spec_indir_branch_disable)
> > +TASK_PFA_SET(SPEC_INDIR_BRANCH_DISABLE, spec_indir_branch_disable)
> > +TASK_PFA_CLEAR(SPEC_INDIR_BRANCH_DISABLE, spec_indir_branch_disable)
> > +
> > +TASK_PFA_TEST(SPEC_INDIR_BRANCH_FORCE_DISABLE, spec_indir_branch_force_disable)
> > +TASK_PFA_SET(SPEC_INDIR_BRANCH_FORCE_DISABLE, spec_indir_branch_force_disable)
> > +
> > static inline void
> > current_restore_flags(unsigned long orig_flags, unsigned long flags)
> > {
>
> s/INDIR_BRANCH/IB/ would be consistent here with the SSB case.
Good point.
Thanks,
tglx
Powered by blists - more mailing lists