From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mga11.intel.com ([192.55.52.93]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fDawb-0004oR-9V for speck@linutronix.de; Tue, 01 May 2018 21:28:09 +0200 Subject: [MODERATED] Re: [patch V9 00/16] SSB References: <20180501152420.785133537@linutronix.de> <20180501181244.GA14888@char.us.oracle.com> From: Tim Chen Message-ID: Date: Tue, 1 May 2018 12:28:05 -0700 MIME-Version: 1.0 In-Reply-To: <20180501181244.GA14888@char.us.oracle.com> Content-Type: multipart/mixed; boundary="jLbQCSFTuIfTl7P9LAZMXtGvolpbI8YGz"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --jLbQCSFTuIfTl7P9LAZMXtGvolpbI8YGz Content-Type: multipart/mixed; boundary="syqDVRc8sKZJL7je7lGaFNL5iYhOQPT6G" --syqDVRc8sKZJL7je7lGaFNL5iYhOQPT6G Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05/01/2018 11:12 AM, speck for Konrad Rzeszutek Wilk wrote: > On Tue, May 01, 2018 at 05:24:20PM +0200, speck for Thomas Gleixner wro= te: >> Changes vs. V8: >> >> Addressed review feed back and added Linus variant of >> alternative_write_msr(). >> >> - Use EINVAL in the prctl >> >> - Fix the sbb typos >> >> - Make AMD default to prctl as well (Borislav) >> >> - Add the not affected CPU types (Tim) >> >> I've updated the git repository as well >> >> ssh://git@cvs.ou.linutronix.de/linux/speck/linux master (forced upda= te) >> >> There are also two stable backport branches now: >> >> ssh://git@cvs.ou.linutronix.de/linux/speck/linux linux-4.16.y >> >> ssh://git@cvs.ou.linutronix.de/linux/speck/linux linux-4.14.y >> >> >> Delta patch against V8 below. Git bundle against 4.17-rc3 follows in >> separate mail. >=20 > On my Skylake box this does what is expected: >=20 > 4 > RHEL-64 dmesg | grep -i spec > [ 0.000000] Command line: BOOT_IMAGE=3D/boot/vmlinuz-4.17.0-rc3-v9+ = root=3DUUID=3D533fa2dd-5b2f-4964-aa99-5ab349614dcd ro crashkernel=3Dauto = LANG=3Den_US.UTF-8 transparent_hugepage=3Dnever console=3Dtty0 console=3D= ttyS0,9600 rd.luks=3D0 rd.lvm=3D0 rd.md=3D0 rd.dm=3D0 netroot=3Discsi:169= =2E254.0.2:::1:iqn.2015-02.oracle.boot:uefi iscsi_param=3Dnode.session.ti= meo.replacement_timeout=3D6000 net.ifnames=3D1 nvme_core.shutdown_timeout= =3D10 ipmi_si.tryacpi=3D0 ipmi_si.trydmi=3D0 ipmi_si.trydefaults=3D0 netw= ork-config=3De2NvbmZpZzogZGlzYWJsZWR9Cg=3D=3D spec_store_bypass_disable=3D= on > [ 0.000000] please specify mtrr_gran_size/mtrr_chunk_size > [ 0.000000] Kernel command line: BOOT_IMAGE=3D/boot/vmlinuz-4.17.0-r= c3-v9+ root=3DUUID=3D533fa2dd-5b2f-4964-aa99-5ab349614dcd ro crashkernel=3D= auto LANG=3Den_US.UTF-8 transparent_hugepage=3Dnever console=3Dtty0 conso= le=3DttyS0,9600 rd.luks=3D0 rd.lvm=3D0 rd.md=3D0 rd.dm=3D0 netroot=3Discs= i:169.254.0.2:::1:iqn.2015-02.oracle.boot:uefi iscsi_param=3Dnode.session= =2Etimeo.replacement_timeout=3D6000 net.ifnames=3D1 nvme_core.shutdown_ti= meout=3D10 ipmi_si.tryacpi=3D0 ipmi_si.trydmi=3D0 ipmi_si.trydefaults=3D0= network-config=3De2NvbmZpZzogZGlzYWJsZWR9Cg=3D=3D spec_store_bypass_disa= ble=3Don > [ 0.145004] Spectre V2 : Mitigation: Full generic retpoline > [ 0.146001] Spectre V2 : Spectre v2 mitigation: Filling RSB on conte= xt switch > [ 0.147000] Spectre V2 : Spectre v2 mitigation: Enabling Indirect Br= anch Prediction Barrier > [ 0.148000] Spectre V2 : Enabling Restricted Speculation for firmwar= e calls > [ 0.149004] Speculative Store Bypass: Mitigation: Speculative Store = Bypass disabled > RHEL-64 rdmsr 0x48 --all | uniq= > 4 >=20 > And I don't see the weird issue that Tim reported? >=20 >=20 Did a trace_printk and IBRS feature was not set when my system check it i= n=20 void x86_setup_ap_spec_ctrl(void) { if (boot_cpu_has(X86_FEATURE_IBRS)) x86_set_spec_ctrl(x86_spec_ctrl_base & ~x86_spec_ctrl_mas= k); I checked cpuid and the IBRS feature bit was there. I will do some more digging to find out why X86_FEATURE_IBRS is not set by kernel on my system. Konrad, you said someone else already reported the IBRS issue and was that root caused? Tim --syqDVRc8sKZJL7je7lGaFNL5iYhOQPT6G-- --jLbQCSFTuIfTl7P9LAZMXtGvolpbI8YGz--