From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 8DD53C10DCE for ; Fri, 13 Mar 2020 00:01:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 68A872071C for ; Fri, 13 Mar 2020 00:01:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Pl+Pce2C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727142AbgCMABw (ORCPT ); Thu, 12 Mar 2020 20:01:52 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34517 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726882AbgCMABv (ORCPT ); Thu, 12 Mar 2020 20:01:51 -0400 Received: by mail-pl1-f196.google.com with SMTP id a23so3344399plm.1 for ; Thu, 12 Mar 2020 17:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rmEnGedJS8sxU6HnCpV+Q7c12k0Ug1fpGwxF+f1yIUU=; b=Pl+Pce2CQX2Wi8HakEByaZJ4V1r/N63/wl+7RIrmZoKQhGGn2F42JBBI4IUgM/BOmb A9VQ3xP3ckXlPZZmhQYQ04iCw4Mh77vtilJ5/a+JLuWfCRqQVbjbTH+r8p+VoSHRvpiK uTYRf5M6Fl03wmZyFwKy/znFMKao215IA4kmM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rmEnGedJS8sxU6HnCpV+Q7c12k0Ug1fpGwxF+f1yIUU=; b=sMF9jqo8jXR/uztmTK5ol6uvlzkDMsZ6Jd885CCsrLCi75c98MjW33nly0Dhupxk7Y qpcJHfONG5QC/t4NuIi/4ZTJ7DIoeOLcGBQbAvjzs8kh7LbGwL4wMAunmVdt6L80eoiU GKnK5YiECKuuf5s+eJWWZLaVAodL1/RcwMZ8ZrW98L2cVGGvm2iJS5MTsnZ1tVIbMgQB uwsHJAJBNd+9MPJ6Lu4ixUv5RCXv0C/vbpSC5OCaiU6jmzQ91yxbiuIJujRLEP2CwaZ6 BwBrm/lgT6KlWN1RGl4KgFOPETXd3EQHBiku3sLSenjQEu/m0hXIEOghWduZpz7FIB6z VqHw== X-Gm-Message-State: ANhLgQ22WrkpKXvizxB5C8D3dwijclnbvrgULmHlly46Ln1cZhyhvuNS M+qPBhpDn7N191x8l4zAWI7tLw== X-Google-Smtp-Source: ADFU+vsQ94Kp0d98Pbb4MXZarpMHv6ibuFITYGGF7X16YL0Ee3aFcR+8dzYWKYGKsg7cimIUlM5axg== X-Received: by 2002:a17:902:d684:: with SMTP id v4mr10568065ply.112.1584057709967; Thu, 12 Mar 2020 17:01:49 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id d3sm55113197pfn.113.2020.03.12.17.01.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 17:01:49 -0700 (PDT) Date: Thu, 12 Mar 2020 17:01:47 -0700 From: Kees Cook To: Mark Brown Cc: Catalin Marinas , 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 , 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 v9 13/13] arm64: BTI: Add Kconfig entry for userspace BTI Message-ID: <202003121700.9260E027@keescook> References: <20200311192608.40095-1-broonie@kernel.org> <20200311192608.40095-14-broonie@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200311192608.40095-14-broonie@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2020 at 07:26:08PM +0000, Mark Brown wrote: > From: Dave Martin > > Now that the code for userspace BTI support is in the kernel add the > Kconfig entry so that it can be built and used. > > [Split out of "arm64: Basic Branch Target Identification support" -- > broonie] > > Signed-off-by: Dave Martin Reviewed-by: Kees Cook -Kees > Signed-off-by: Mark Brown > --- > arch/arm64/Kconfig | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 8a15bc68dadd..d65d226a77ec 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1522,6 +1522,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. > + > config ARM64_E0PD > bool "Enable support for E0PD" > default y > -- > 2.20.1 > -- Kees Cook From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: Re: [PATCH v9 13/13] arm64: BTI: Add Kconfig entry for userspace BTI Date: Thu, 12 Mar 2020 17:01:47 -0700 Message-ID: <202003121700.9260E027@keescook> References: <20200311192608.40095-1-broonie@kernel.org> <20200311192608.40095-14-broonie@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20200311192608.40095-14-broonie@kernel.org> Sender: linux-fsdevel-owner@vger.kernel.org To: Mark Brown Cc: Catalin Marinas , 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 , Arnd Bergmann , Jann Horn , Richard Henderson , Kristina =?utf-8?Q?Mart=C5=A1enko?= , Thomas Gleixner , Florian Weimer , Sudak List-Id: linux-arch.vger.kernel.org On Wed, Mar 11, 2020 at 07:26:08PM +0000, Mark Brown wrote: > From: Dave Martin > > Now that the code for userspace BTI support is in the kernel add the > Kconfig entry so that it can be built and used. > > [Split out of "arm64: Basic Branch Target Identification support" -- > broonie] > > Signed-off-by: Dave Martin Reviewed-by: Kees Cook -Kees > Signed-off-by: Mark Brown > --- > arch/arm64/Kconfig | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 8a15bc68dadd..d65d226a77ec 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1522,6 +1522,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. > + > config ARM64_E0PD > bool "Enable support for E0PD" > default y > -- > 2.20.1 > -- Kees Cook From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 41C97C1975A for ; Fri, 13 Mar 2020 00:01:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0D70A206F1 for ; Fri, 13 Mar 2020 00:01:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZNb4S3iK"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Pl+Pce2C" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D70A206F1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gm4+KmdiLjorF+SOFz+/SNFQlGyILaHSIXfHPM7k7fA=; b=ZNb4S3iKKuMcYM W9zMBKl9EYuTWx+SBeCKd8tGHMHYxrxgvWdewntcDbmE7bCA44/nHpZt3V7LKAjkHuFY+Ewu7F071 g9B6ox6pMzxBYKEzn106pU6x0wDvqvCGWX4EdvgIVtdzaqgzCEAZySPDUq8j4c4f0qs9pvcHeOdCX PINUn6f3abiQ1PEORZUwQgeEBmzmVh+iRHOEyQ3uFXUafh/PqBt22rI1KtzRtE5GixrDFF5rZ/rDU WReVEd0XZ/j3NhnSP+uH8UPu8i495G1udCyr9qdI0Gp87S/fS454oVPYnjblol7suP2vesh7FLToY rXSYsuckzt53+p3i3SRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jCXm0-0001Ux-HH; Fri, 13 Mar 2020 00:01:56 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jCXlv-0001QZ-L0 for linux-arm-kernel@lists.infradead.org; Fri, 13 Mar 2020 00:01:53 +0000 Received: by mail-pj1-x1043.google.com with SMTP id y7so3223803pjn.1 for ; Thu, 12 Mar 2020 17:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rmEnGedJS8sxU6HnCpV+Q7c12k0Ug1fpGwxF+f1yIUU=; b=Pl+Pce2CQX2Wi8HakEByaZJ4V1r/N63/wl+7RIrmZoKQhGGn2F42JBBI4IUgM/BOmb A9VQ3xP3ckXlPZZmhQYQ04iCw4Mh77vtilJ5/a+JLuWfCRqQVbjbTH+r8p+VoSHRvpiK uTYRf5M6Fl03wmZyFwKy/znFMKao215IA4kmM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rmEnGedJS8sxU6HnCpV+Q7c12k0Ug1fpGwxF+f1yIUU=; b=IcLp6pJATxfQ6xzUAlFfci/7Gw/45eqPO+5E9BlmWbAWgns2+yVa9OQCVTatQ7iZRs 1GPHfd8wsbRTfDOU3s47FQ+D4Z7TpcoISKOCL+RoPbemLiODACUF+ccAoG08C4ACU1rO ceTq5G2uT7W1+s7Xvs58H06mqra2P56EMVQ58R/JQXOMgwLQdhzrFRxF685Lsaj8FCJe 2umoAb3+0JSk0qVVyn3ugi7pr89KzdRLxnAFDYXI0Rqp0LWfBKq0/czlAdyOZD3iC2HB h5tcHZm7LldaxD9ikkoDEJdrVpZBziqZmwl8BlU99GgGfUJB2vH8hERPmeSRv+TNNs7a K77g== X-Gm-Message-State: ANhLgQ3BOjkjjpdqqSgonW9ZzZNjzwlQb9BzYkSOs2LhsF3Om2GO1qfK BxCAe4pd9icyysiMJRmlzpuB+w== X-Google-Smtp-Source: ADFU+vsQ94Kp0d98Pbb4MXZarpMHv6ibuFITYGGF7X16YL0Ee3aFcR+8dzYWKYGKsg7cimIUlM5axg== X-Received: by 2002:a17:902:d684:: with SMTP id v4mr10568065ply.112.1584057709967; Thu, 12 Mar 2020 17:01:49 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id d3sm55113197pfn.113.2020.03.12.17.01.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 17:01:49 -0700 (PDT) Date: Thu, 12 Mar 2020 17:01:47 -0700 From: Kees Cook To: Mark Brown Subject: Re: [PATCH v9 13/13] arm64: BTI: Add Kconfig entry for userspace BTI Message-ID: <202003121700.9260E027@keescook> References: <20200311192608.40095-1-broonie@kernel.org> <20200311192608.40095-14-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200311192608.40095-14-broonie@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200312_170151_695607_6679E45E X-CRM114-Status: GOOD ( 20.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Elliott , Peter Zijlstra , Catalin Marinas , Andrew Jones , Amit Kachhap , Vincenzo Frascino , Will Deacon , linux-arch@vger.kernel.org, Marc Zyngier , Eugene Syromiatnikov , Szabolcs Nagy , Dave Martin , "H . J . Lu " , Yu-cheng Yu , Arnd Bergmann , Jann Horn , Richard Henderson , Kristina =?utf-8?Q?Mart=C5=A1enko?= , Alexander Viro , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Florian Weimer , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Sudakshina Das Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 11, 2020 at 07:26:08PM +0000, Mark Brown wrote: > From: Dave Martin > > Now that the code for userspace BTI support is in the kernel add the > Kconfig entry so that it can be built and used. > > [Split out of "arm64: Basic Branch Target Identification support" -- > broonie] > > Signed-off-by: Dave Martin Reviewed-by: Kees Cook -Kees > Signed-off-by: Mark Brown > --- > arch/arm64/Kconfig | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 8a15bc68dadd..d65d226a77ec 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1522,6 +1522,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. > + > config ARM64_E0PD > bool "Enable support for E0PD" > default y > -- > 2.20.1 > -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel