From patchwork Tue Jun 12 11:36:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 138330 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5235002lji; Tue, 12 Jun 2018 04:39:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKICX8qfcUmHu4MC3vzyPkmmbNc1ocVhXViLecFD8y43Br+LEGiWTHWJSS7SCIb8i22QAUzU X-Received: by 2002:a6b:1410:: with SMTP id 16-v6mr7188iou.218.1528803572583; Tue, 12 Jun 2018 04:39:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528803572; cv=none; d=google.com; s=arc-20160816; b=pwcExXiILQxFQBLW8u9G3VsOuhLO6nv1o21JJboH+qfLkt55M7FImvdOiiaTzQd9cU jsFqGtQXo7x4YN+MR6JBKDE6YsnM1jG/Ec86lEPW0CmdQjp4qQF7EUW6gR3WZOCxUEWG Qe5sBljzl9mptzpZyLRwtkdV6Mo4dWPuOvu5KVQUG4atlhXwbSyXvRqC+TxlHOGb225S H4lcY0cM6iopH1PJHcDoCqH7KKwGgfjGduT1FvQMfDSz2T9AxstA9DIo8bAzfcyQwdUv 5i7lvJFJUrPBHdMuQcTV8pUUpGA8EWtUf/vW7hNhwAsfiL8dKUGZGT/N2iwPfeo6mgR0 P2Cw== 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=KVA7WYpFbGgKB4E75PMYwdw9dNxJbsWv8jzhfYqCg2M=; b=a7pGrd/U7TkD0LiV76YAOt1C+6HVhtFgfxtD7ZuPItP8pjFWNKtgL5Gv8qB11myrMy LdfIHJ+Hxw9YU7qj4pAsuy3RjOi4qK9PYOb74HaIruUaIQzn67RN0cHSmcj22sFNwEY7 zcdnldoK77fq11p/pQPtrp9Nwymqsv69vxaafBMUgO88+e3gCbljda84lGQglOKEZPa+ +ZsrCq74JZJIkcscHaSzjRe8vVSRfRs5tlZhp7Kmu3O4MXSigcw8dHU5w6+obJyxXhhn Pjo6UqZUXYH6H2BmZW9FQBGlvpWtE9cRKq9LH9gb9n6LnXNmvAzceaGGimYzvKGvzVZt Hb5A== 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 l16-v6si684225iol.88.2018.06.12.04.39.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Jun 2018 04:39:32 -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 1fShbm-0000v5-Fp; Tue, 12 Jun 2018 11:37:06 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1fShbk-0000tg-Ap for xen-devel@lists.xenproject.org; Tue, 12 Jun 2018 11:37:04 +0000 X-Inumbo-ID: 96a011c4-6e34-11e8-9728-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 96a011c4-6e34-11e8-9728-bc764e045a96; Tue, 12 Jun 2018 13:34:38 +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 1F8BA1596; Tue, 12 Jun 2018 04:37:03 -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 356C43F318; Tue, 12 Jun 2018 04:37:02 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 12 Jun 2018 12:36:41 +0100 Message-Id: <20180612113643.32020-12-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180612113643.32020-1-julien.grall@arm.com> References: <20180612113643.32020-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v3 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 --- Changes in v2: - Add Stefano's reviewed-by --- 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