From mboxrd@z Thu Jan 1 00:00:00 1970 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 1fBOAR-0005V9-Lf for speck@linutronix.de; Wed, 25 Apr 2018 19:25:20 +0200 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2749AAD1E for ; Wed, 25 Apr 2018 17:25:13 +0000 (UTC) Date: Wed, 25 Apr 2018 19:25:02 +0200 From: Borislav Petkov Subject: [MODERATED] Re: [PATCH v4 06/10] [PATCH v4 6/9] Linux Patch #6 Message-ID: <20180425172502.GF32574@pd.tnic> References: <20180424031751.311879235@dhcp-10-159-147-220.vpn.oracle.com> <20180424132156.GF15235@pd.tnic> <20180424154652.GC24865@dhcp-10-159-147-220.vpn.oracle.com> <20180424163656.GI15235@pd.tnic> <20180424180750.GB25904@localhost.localdomain> <20180424184646.GL15235@pd.tnic> <20180425153206.GA27641@localhost.localdomain> MIME-Version: 1.0 In-Reply-To: <20180425153206.GA27641@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 11:32:23AM -0400, speck for Konrad Rzeszutek Wilk wro= te: > We need two CPU bit flags. First to say: >=20 > 1). I am able to mitigate. This will be via X86_FEATURE_RDS for both > AMD and Intel. >=20 > 2). I _want_ to mitigate. This will be via X86_FEATURE_SPEC_STORE_BYPASS_D= ISABLE > to tell the init_amd_bd,init_amd_zn,init_amd_jg, and init_intel > to do its magic. Lemme paste from my earlier mail: " X86_BUG_SPEC_STORE_BYPASS - CPU is affected by bug X86_FEATURE_SPEC_STORE_BYPASS_DISABLE - CPU can disable store bypassing X86_FEATURE_SPEC_STORE_BYPASS_IN_USE - CPU has disabled store bypassing " So I meant to use X86_FEATURE_SPEC_STORE_BYPASS_DISABLE for "I am able to mitigate". You want to use it to denote "IN_USE". I think "IN_USE" is more telling: if (... X86_FEATURE_SPEC_STORE_BYPASS_IN_USE) disable MD So we can do X86_BUG_SPEC_STORE_BYPASS X86_FEATURE_RDS X86_FEATURE_SPEC_STORE_BYPASS_IN_USE or X86_BUG_SPEC_STORE_BYPASS X86_FEATURE_RDS X86_FEATURE_SPEC_STORE_BYPASS_DISABLE as you want it. Whatever - I'm all out of energy for bikeshedding so pick one and document what it means. --=20 Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norton, HR= B 21284 (AG N=C3=BCrnberg) --=20