Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73] helo=mx1.redhat.com) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1f9ObG-0006OY-DA for speck@linutronix.de; Fri, 20 Apr 2018 07:28:47 +0200 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 580847D83F for ; Fri, 20 Apr 2018 05:28:39 +0000 (UTC) Received: from washington.bos.jonmasters.org (ovpn-124-165.rdu2.redhat.com [10.10.124.165]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 30330AB3F2 for ; Fri, 20 Apr 2018 05:28:39 +0000 (UTC) Subject: [MODERATED] Re: [patch 06/11] [PATCH v2 06/10] Linux Patch #6 References: <20180420022613.203909041@localhost.localdomain> From: Jon Masters Message-ID: <98387441-e345-c049-06d1-369a59387d42@redhat.com> Date: Fri, 20 Apr 2018 01:28:38 -0400 MIME-Version: 1.0 In-Reply-To: <20180420022613.203909041@localhost.localdomain> Content-Type: multipart/mixed; boundary="mp0BBKY0RDx0xlqg1MALVXeniSG8nX6tF"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --mp0BBKY0RDx0xlqg1MALVXeniSG8nX6tF Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 04/19/2018 10:25 PM, speck for konrad.wilk_at_oracle.com wrote: > + nossbd [HW] Disable all mitigations for the Speculative Store Bypass= vulnerability > + > + ssbd [HW] Control Speculative Store Bypass (SSB) Disable mitigation > + (Speculative Store Bypass vulnerability) > + > + Certain CPUs are vulnerable to an exploit against a > + a common industry wide performance optimization known > + as "Speculative Store Bypass" in which recent stores > + to the same memory location may not be observed by > + later loads. This can be used in cache side channel > + attacks to read memory to which the attacker does > + not directly have access (e.g. sandboxed code). > + > + This parameter controls whether the Speculative Store > + Bypass optimization is used. > + > + on - unconditionally disable Speculative Store Bypass > + off - unconditionally enable Speculative Store Bypass > + auto - kernel detects whether your CPU model contains a > + vulnerable implementation of Speculative Store > + Bypass and picks the most appropriate mitigation > + > + Not specifying this option is equivalent to ssbd=3Dauto > + I've pinged the Arm, and IBM p and z teams working on mitigations with a copy of the proposed text above and a description of expected behavior. They're going to let us know if there are any problems with this plan. In the case of Arm, they'll do a new SMC (Secure Monitor Call) into ATF (Arm Trusted Firmware) that will handle the chicken bits. The cpu errata mechanics on Arm will then allow for uarch specific optimizations. There are a few of these likely, and I've spoken with various vendors on that. In the case of IBM p, it's the new "stf-flush" behavior (which they can then alternative out based on this param similar to how they handle "pti" and "nopti" even though on POWER they actually previously mitigated meltdown using a new nop encoding instruction[0]). In the case of IBM z, it'll probably be similar to p but done using a new facility. There's already alternatives patching for that too and they used similar for the branch predictor control knobs prior to implementing expolines for Spectre-v2 already. Jon. [0] That does an L1D$ flush on every kernel/hypervisor exit. Yea, this isn't the first time we've seen the need for such an instruction in the industry. We (at Red Hat) actually also asked Intel to implement an L1D$ flush instruction last year when pondering original meltdown mitigation. --=20 Computer Architect | Sent from my Fedora powered laptop --mp0BBKY0RDx0xlqg1MALVXeniSG8nX6tF--