Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64590C433DF for ; Tue, 16 Jun 2020 23:16:39 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 398AE207D3 for ; Tue, 16 Jun 2020 23:16:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 398AE207D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jlKoJ-0002FD-CK; Tue, 16 Jun 2020 23:16:07 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jlKoI-0002F8-DG for xen-devel@lists.xenproject.org; Tue, 16 Jun 2020 23:16:06 +0000 X-Inumbo-ID: 59ebe462-b027-11ea-8496-bc764e2007e4 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 59ebe462-b027-11ea-8496-bc764e2007e4; Tue, 16 Jun 2020 23:16:05 +0000 (UTC) Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: gym42pItmyO0ZUFu8Ue22OFWIrI4UIHPpFbx58NlFP8USp74m+FVEfb3BT/lu1akLibRAzWJek nZPQLkTgpxh7n79oFZeL7Kq4ngTImjVjUXvMBddQD4arTUtzvyaIvWjngy6/ZOcsm7SYfdLygC VLZkIttEcRw6rXHtAXcx1zIn1Bh+3aGaC0JD7lD4sFIHCRT+1pLjSi9IfuXVyVYitURsu0dQ/g l1LsKhELV+zt0EemQJ835uiCL0IpHfL+DiE10xbQbpRx697cL0VaSpJuGEn7Plj8hyN/bXBhMl Bk8= X-SBRS: 2.7 X-MesageID: 20450917 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,520,1583211600"; d="scan'208";a="20450917" Subject: Re: [PATCH 2/2] xen/arm: Mitigate straight-line speculation for SMC call To: Julien Grall , Stefano Stabellini References: <20200616175913.7368-1-julien@xen.org> <20200616175913.7368-3-julien@xen.org> From: Andrew Cooper Message-ID: <7b21fb8d-915c-7d87-1777-b0ed0febddd2@citrix.com> Date: Wed, 17 Jun 2020 00:16:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Language: en-GB X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Paul Durrant , Andre Przywara , Julien Grall , Bertrand Marquis , "Xen.org security team" , xen-devel , Volodymyr Babchuk Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 16/06/2020 22:57, Julien Grall wrote: > On Tue, 16 Jun 2020 at 22:34, Stefano Stabellini wrote: >> On Tue, 16 Jun 2020, Julien Grall wrote: >>> From: Julien Grall >>> >>> SMC call will update some of registers (typically only x0) depending on >> ^a SMC call An SMC call. >> >>> the arguments provided. >>> >>> Some CPUs can speculate past a SMC instruction and potentially perform >>> speculative access to emrmoy using the pre-call values before executing >> ^ memory >> >>> the SMC. >>> >>> There is no known gadget available after the SMC call today. However >>> some of the registers may contain values from the guest and are expected >>> to be updated by the SMC call. >>> >>> In order to harden the code, it would be better to prevent straight-line >>> speculation from an SMC. Architecturally executing the speculation >> ^ a? any? > "any" might be better. "an SMC" is correct, but "any" is also fine. 'a' vs 'an' is based on the sound of the following.  S in "S-M-C" as an abbreviation starts with an 'e' vowel sound, unlike 's' in secure, so the correct grammar is "an SMC" and "a secure monitor call". ~Andrew