From patchwork Tue Jun 5 15:23:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 137763 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1099063lji; Tue, 5 Jun 2018 08:26:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIT/RGJeEY5NrlvDN6m2SvwgvIyq+9Q9x1ZR1Y1THPn7j9jX9e0qqojcZud7hFK2uIP4ga/ X-Received: by 2002:a24:6c8c:: with SMTP id w134-v6mr9447667itb.75.1528212371463; Tue, 05 Jun 2018 08:26:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528212371; cv=none; d=google.com; s=arc-20160816; b=i9aTiWG77mpqp/D6o0dB8NlcwwjtCkvZF+sbVSBGm9ch5fHrQzk5voL0Jb/UYGzMwO IISF1ugoE6c5iKVMre4g/8DBPIRD6yaV76Np3YlqwrKt18jvEOweLnQF/bpCojJZHOyw r8IgUG1wTKwekm9sBRYF5Hv2Ms/oGBWRe9N8cOIRfOhatml8++CiGAF1K3PIwJAjgq5G dcTeGViskifXX0E62V3ukINLFmaLrC/fofbZN1Dh+MUS93QxgXybJcOWgTddZV6dhG3C kGOtyefckwlxBkJvpzJVfsSmnwUwIRz6nxsrw+ncE9o+GAX9Oxnr/VuoYdN1gbOnCLQd 5O6g== 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=h1c/aukSVBERc6O5GYaschEeLYgCNOlGpChzcm9x5LD4BRey57ZLsWxDCDswUEYN0T v8q0XEusy8ZkDyzOFBZFtb6H172JF+Daf2KZjY6VFFbbAh19Zgsg8PYewAdFy3W1USVq L9YA/vt02kUYkZANVj207zLCMwLTZ5kdcCJpVjsjfNzG/W/AEa6mCcZXG64aJ8Hf91TS hU5ZAUWcC6eK/VUH6K/o2zSG3Hy3IeF0oueN/zVcVkyAxxBGzIDoB6uEZvSPpytOZxve +/MD2XZy6QK0VUOFJUhiJvhjGyp8t2sP+tgHl2Ns/7THJWU6U92kCXgw5y9IlfDI1n50 AJmw== 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 b129-v6si1887325ith.68.2018.06.05.08.26.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jun 2018 08:26:11 -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 1fQDo7-0005Hb-QC; Tue, 05 Jun 2018 15:23:35 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1fQDo5-0005Eo-Bl for xen-devel@lists.xenproject.org; Tue, 05 Jun 2018 15:23:33 +0000 X-Inumbo-ID: 176f320e-68d4-11e8-9728-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 176f320e-68d4-11e8-9728-bc764e045a96; Tue, 05 Jun 2018 17:21:17 +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 5874D1596; Tue, 5 Jun 2018 08:23:31 -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 6DFFA3F557; Tue, 5 Jun 2018 08:23:30 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 5 Jun 2018 16:23:01 +0100 Message-Id: <20180605152303.14450-12-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180605152303.14450-1-julien.grall@arm.com> References: <20180605152303.14450-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v1 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