Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp724400ybh; Wed, 11 Mar 2020 09:32:17 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsciCJN/9taAbm1S6VKGo8D2jB/DBbRy3nUKdHyqZmsSGJd2UL7IlSCjrvrT2/N/HQn9Bsw X-Received: by 2002:aca:5887:: with SMTP id m129mr2450595oib.175.1583944337575; Wed, 11 Mar 2020 09:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583944337; cv=none; d=google.com; s=arc-20160816; b=bTVjONHRke+rYZ7Bl/PMeUokb6KyWwjEesGw+vlutNL1NR0hg/h33B4MMzfsfgb+kY fO6fwUerKJ9/XbwOh4XjWD8o/kpEoiSUpTamAS5YfiLFfy6vL5tdNsroTPOJl7SMqq6b Uxg0iQuwiomP45WR99lO07q3kN2JSXG8SNJw9Mcz8CpZwmKJ+MHUkwOn76bUiWfIFcCE xdBqiA5m/cBpwXlxDjUCAmfI5eBR8D6b9cU87+I8sWXGp4ROE8/RVrzARgjrS9g5zs1+ v7M9vv6UKy9ZAaSkl0i30a5REWAP/MAsYa2St20UJNdEiBtsquqGJqLnUOlOYsnZ+DC1 OQrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=QIVaOcgef3mTBPvvImFQ5SPmP0KxnclQCkBzw9wc/xg=; b=b/7xQkV97h8h5DWgo0KbFSbsodSDr0s5d6p0CHGrTRy2C4ork5fcbd7T5dMYP7EZAX EQKwuhY1gpR6+Qg4e8r3ZM2FJJwdhAjgfClOECuQ3ymNC2CisDstrK8RL2FIa2ApGs3m sVLOdNSvsN9j3Cfx0LXd2a9BEWo91FM9XSP0Q1eH6MVP/Me9BK5XXVZyxw8ghYS9qGHx iY1WoqjgweI4rvPoGO/ggh27nvLFcvUaCFe9GMgZmboRTxxgLE0yJWSHMtdJasE3wlQ/ +/BS53hR2PgMN1vGphm+f+JslfJ7qSK560C3HChvAFBDcw4vbAjRBwlfMWPPtqTARb7+ 9DZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si1456255ota.239.2020.03.11.09.31.58; Wed, 11 Mar 2020 09:32:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730176AbgCKQbK (ORCPT + 99 others); Wed, 11 Mar 2020 12:31:10 -0400 Received: from foss.arm.com ([217.140.110.172]:51686 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730052AbgCKQbJ (ORCPT ); Wed, 11 Mar 2020 12:31:09 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E968E31B; Wed, 11 Mar 2020 09:31:08 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D8A643F6CF; Wed, 11 Mar 2020 09:31:05 -0700 (PDT) Date: Wed, 11 Mar 2020 16:31:03 +0000 From: Catalin Marinas To: Mark Brown Cc: Will Deacon , Alexander Viro , Paul Elliott , Peter Zijlstra , Yu-cheng Yu , Amit Kachhap , Vincenzo Frascino , Marc Zyngier , Eugene Syromiatnikov , Szabolcs Nagy , "H . J . Lu " , Andrew Jones , Kees Cook , Arnd Bergmann , Jann Horn , Richard Henderson , Kristina =?utf-8?Q?Mart=C5=A1enko?= , Thomas Gleixner , Florian Weimer , Sudakshina Das , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, Dave Martin Subject: Re: [PATCH v8 03/11] arm64: Basic Branch Target Identification support Message-ID: <20200311163103.GL3216816@arrakis.emea.arm.com> References: <20200227174417.23722-1-broonie@kernel.org> <20200227174417.23722-4-broonie@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200227174417.23722-4-broonie@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 27, 2020 at 05:44:09PM +0000, Mark Brown wrote: > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 0b30e884e088..e37f4f07b990 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1519,6 +1519,28 @@ endmenu > > menu "ARMv8.5 architectural features" > > +config ARM64_BTI > + bool "Branch Target Identification support" > + default y > + help > + Branch Target Identification (part of the ARMv8.5 Extensions) > + provides a mechanism to limit the set of locations to which computed > + branch instructions such as BR or BLR can jump. > + > + To make use of BTI on CPUs that support it, say Y. > + > + BTI is intended to provide complementary protection to other control > + flow integrity protection mechanisms, such as the Pointer > + authentication mechanism provided as part of the ARMv8.3 Extensions. > + For this reason, it does not make sense to enable this option without > + also enabling support for pointer authentication. Thus, when > + enabling this option you should also select ARM64_PTR_AUTH=y. > + > + Userspace binaries must also be specifically compiled to make use of > + this mechanism. If you say N here or the hardware does not support > + BTI, such binaries can still run, but you get no additional > + enforcement of branch destinations. To keep the series bisectable, I'd move the Kconfig into a separate patch towards the end. It looks like the feature is only partially supported after patch 3, so let's not advertise it here. -- Catalin