Return-path: Received: from mx2.suse.de ([195.135.220.15]) by Galois.linutronix.de with esmtps (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1fBeOT-0002tu-4P for speck@linutronix.de; Thu, 26 Apr 2018 12:44:53 +0200 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D7C34AC21 for ; Thu, 26 Apr 2018 10:44:47 +0000 (UTC) Date: Thu, 26 Apr 2018 12:44:35 +0200 From: Borislav Petkov Subject: [MODERATED] Re: [PATCH v5 08/11] [PATCH v5 08/10] Linux Patch #8 Message-ID: <20180426104435.GF15043@pd.tnic> References: <20180426020546.273176033@localhost.localdomain> MIME-Version: 1.0 In-Reply-To: <20180426020546.273176033@localhost.localdomain> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: speck@linutronix.de List-ID: On Wed, Apr 25, 2018 at 10:04:23PM -0400, speck for konrad.wilk_at_oracle.com= wrote: > x86/bugs: Whitelist allowed SPEC_CTRL MSR values >=20 > Intel and AMD SPEC_CTRL (0x48) MSR semantics may differ in the > future (or in fact use different MSRs for the same functionality). >=20 > As such we need a run-time way to whitelist the appropiate WARNING: 'appropiate' may be misspelled - perhaps 'appropriate'? > MSR values. >=20 > Signed-off-by: Konrad Rzeszutek Wilk > --- > v5: New patch > --- > arch/x86/kernel/cpu/bugs.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) >=20 > diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c > index 99cdd44c20bc..7c704bc36968 100644 > --- a/arch/x86/kernel/cpu/bugs.c > +++ b/arch/x86/kernel/cpu/bugs.c > @@ -35,6 +35,12 @@ static void __init ssb_select_mitigation(void); > */ > u64 __read_mostly x86_spec_ctrl_base; > =20 > +/* > + * Sane bits that can written in x86_spec_ctrl_base. They may differ "Allowed per-vendor SPEC_CTRL MSR bits." > + * on different platforms. > + */ > +u64 __read_mostly x86_spec_ctrl_mask =3D ~(SPEC_CTRL_IBRS); static! --=20 Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norton, HR= B 21284 (AG N=C3=BCrnberg) --=20