From patchwork Tue May 22 17:42:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 136597 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1929621lji; Tue, 22 May 2018 10:45:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpnmaIP/+f1hooOjsY46u98zgfWnCqlkNzQAO8yq4bhZSUt/cDL8TMfpFm9Mp+Zt/lopCRU X-Received: by 2002:a24:4e8e:: with SMTP id r136-v6mr2154012ita.83.1527011153429; Tue, 22 May 2018 10:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527011153; cv=none; d=google.com; s=arc-20160816; b=e+g/uVMXh6adNZ+b6ThNhvsFU0eqHK0YRa6wyRLZzji20eqoYvNxVV7eF6E2IC7bBX x/72Bpyze1tvPjvnAlaATBPYX3GodNqMEfPR+4fHp1kHUPlLErXpgBZlwWFIJbZ4ORS2 wGhwY9l896BCYUt5vXP5UlKH/zBul7WD8EYFA6mbF4SQP/WyAvBX51O6zMqxmKc4gopJ +l3r3rwcvPmi7McZ9f7adQQzx9aoMJiF1PbxvzjnlmNx69AzYMTOUw2Wf2MpjXsqxjo6 JvD0uhrvcOluZlegOGUndt6B56rl8G9pTcFDS6KpuJ5/oboLWUpDPyTtn//02+VRpk4c p+ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from :arc-authentication-results; bh=LDMezScCHLoje14VA80EWCMANAUnArGqYfKhTi3qKdg=; b=aIbtrQdhqhgFBmfGPmiEcPZWs0E+4kjnoINVOrbAqxo/ALRd8bKCXL51LXobNgf2mh PU1FraoANxCPk3TRMZBV83/yoDiPEHRBoXWBhBjlTcSj6Ez4HjdckOUCX/R3MnNjYTql hR+PJsB6gcqtuhweiUH8k7n/yD5rYtnbvRQnEPSDg9SNMGKApMLKsQEuw7LmC+bUZP2k VwbivPpuAUPMYqljkvK03K6xQ7cW3I9e3HVC5zzvI1C2yONtWnnmknKt0wB2NMIQqgZK qn6TsOKklTktSwuCYl4SCO+LFBGr1SXNStnz2uSWv7ltDEmB90FO4zQ60mplucRQ1x+L C4yA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id o71-v6si338145ite.106.2018.05.22.10.45.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 May 2018 10:45:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) 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.89) (envelope-from ) id 1fLBJf-0002FQ-PE; Tue, 22 May 2018 17:43:19 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1fLBJd-0002CJ-Pw for xen-devel@lists.xenproject.org; Tue, 22 May 2018 17:43:17 +0000 X-Inumbo-ID: 58a1a88a-5de7-11e8-9728-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 58a1a88a-5de7-11e8-9728-bc764e045a96; Tue, 22 May 2018 19:41:24 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C69B11435; Tue, 22 May 2018 10:43:16 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DC4953F589; Tue, 22 May 2018 10:43:15 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 22 May 2018 18:42:52 +0100 Message-Id: <20180522174254.27551-12-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180522174254.27551-1-julien.grall@arm.com> References: <20180522174254.27551-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH 11/13] xen/arm: Kconfig: Move HARDEN_BRANCH_PREDICTOR under "Architecture features" X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: andre.przywara@arm.com, Julien Grall , sstabellini@kernel.org MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" At the moment, HARDEN_BRANCH_PREDICTOR is not in any section making impossible for the user to unselect it. Also, it looks like we require to use 'expert = "y"' for showing the option in expert mode. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/arch/arm/Kconfig | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index 0e2d027060..4212c58171 100644 --- a/xen/arch/arm/Kconfig +++ b/xen/arch/arm/Kconfig @@ -83,6 +83,23 @@ config ARM_SSBD If unsure, say Y. +config HARDEN_BRANCH_PREDICTOR + bool "Harden the branch predictor against aliasing attacks" if EXPERT = "y" + default y + help + Speculation attacks against some high-performance processors rely on + being able to manipulate the branch predictor for a victim context by + executing aliasing branches in the attacker context. Such attacks + can be partially mitigated against by clearing internal branch + predictor state and limiting the prediction logic in some situations. + + This config option will take CPU-specific actions to harden the + branch predictor against aliasing attacks and may rely on specific + instruction sequences or control bits being set by the system + firmware. + + If unsure, say Y. + endmenu menu "ARM errata workaround via the alternative framework" @@ -197,23 +214,6 @@ config ARM64_ERRATUM_834220 endmenu -config HARDEN_BRANCH_PREDICTOR - bool "Harden the branch predictor against aliasing attacks" if EXPERT - default y - help - Speculation attacks against some high-performance processors rely on - being able to manipulate the branch predictor for a victim context by - executing aliasing branches in the attacker context. Such attacks - can be partially mitigated against by clearing internal branch - predictor state and limiting the prediction logic in some situations. - - This config option will take CPU-specific actions to harden the - branch predictor against aliasing attacks and may rely on specific - instruction sequences or control bits being set by the system - firmware. - - If unsure, say Y. - config ARM64_HARDEN_BRANCH_PREDICTOR def_bool y if ARM_64 && HARDEN_BRANCH_PREDICTOR