From patchwork Fri Dec 7 18:39:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristina Martsenko X-Patchwork-Id: 153194 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp832071ljp; Fri, 7 Dec 2018 10:41:02 -0800 (PST) X-Google-Smtp-Source: AFSGD/VC126xJPKm+xdDEpL4snmCTPxM6STQcmdQ8WPDGK3sD8Ej4sZKdEGyLqAHerbZ9id/vKm1 X-Received: by 2002:a65:4381:: with SMTP id m1mr2869523pgp.358.1544208062301; Fri, 07 Dec 2018 10:41:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544208062; cv=none; d=google.com; s=arc-20160816; b=fkjotTfhdU5hTiy5SupaCPYMAiJVvkZ4ez79NkTXuDAILEnMB9BnNICBYyNNLsDlV+ 05cxQnukZXdXGs9ObmcWvryBjC1cCPZoljqh8uJcLND5dXKfF79fHfXJyk3sKSXJmvlT IXFq0KYgFsFsTwWfvcO3gj+qbSoKiY7ECp9a+brMqbZeLQmkvzBJnwTyCxuoZ/gupGXM M2SZ4OGstb9XPLGrNUyLcEVjZM5Vv9IKs7alcZqC5ttDMRx9t02njW6EfQGTmxIrgY7V 8CGytHN6iftvJQIcInChpXYVfrwp/Guzc5/ayDAcf9g0iZi3tkmOBNwJCZ6bqxbROBY6 JHsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=Do4zxYn4nFjoZMaBwZMIHnDgcVlYecw66q2BMdfTWRs=; b=xqvjL0BFs/CTvOuSJ32a+CZ+Cf+eWHwGWc3GkJ27kQ1vpMGtnPI+LVMLnt39rA0R3A bhtRjmT/ijGl6a+4BdufyxXfvdFwIVuAIgWcrGkpgaz6Pa3UOCIQmrS1jRCAI0L5Sm7K 5RT9NuugKjfi11izocGoA/wwPKoh2kof5MannfBJEb8yyPjmajrO4H8DdqShSBEaMLAy 4vQwqqVVz8zAt/wlJVNsrYfm8RC2S8YtFFvaA4bDvxOAPC61XBhxsHPCWj8n+oToUO/N Pg1ewSEBr/AK3KrosbicHooMO1LFbD+EwUZ2GzxySxnqqUawabsei32hL+ER94zIGdOJ RbwA== 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 q8si3351104plr.382.2018.12.07.10.41.02; Fri, 07 Dec 2018 10:41:02 -0800 (PST) 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 S1726437AbeLGSkt (ORCPT + 31 others); Fri, 7 Dec 2018 13:40:49 -0500 Received: from foss.arm.com ([217.140.101.70]:52196 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726326AbeLGSks (ORCPT ); Fri, 7 Dec 2018 13:40:48 -0500 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 E082C15BE; Fri, 7 Dec 2018 10:40:47 -0800 (PST) Received: from moonbear.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C6D1B3F5AF; Fri, 7 Dec 2018 10:40:44 -0800 (PST) From: Kristina Martsenko To: linux-arm-kernel@lists.infradead.org Cc: Adam Wallis , Amit Kachhap , Andrew Jones , Ard Biesheuvel , Catalin Marinas , Christoffer Dall , Cyrill Gorcunov , Dave P Martin , Jacob Bramley , Kees Cook , Marc Zyngier , Mark Rutland , Ramana Radhakrishnan , Richard Henderson , Suzuki K Poulose , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: [PATCH v6 12/13] arm64: enable pointer authentication Date: Fri, 7 Dec 2018 18:39:30 +0000 Message-Id: <20181207183931.4285-13-kristina.martsenko@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181207183931.4285-1-kristina.martsenko@arm.com> References: <20181207183931.4285-1-kristina.martsenko@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Rutland Now that all the necessary bits are in place for userspace, add the necessary Kconfig logic to allow this to be enabled. Signed-off-by: Mark Rutland Signed-off-by: Kristina Martsenko Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/Kconfig | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) -- 2.11.0 diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index ea2ab0330e3a..5279a8646fc6 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1188,6 +1188,29 @@ config ARM64_CNP endmenu +menu "ARMv8.3 architectural features" + +config ARM64_PTR_AUTH + bool "Enable support for pointer authentication" + default y + help + Pointer authentication (part of the ARMv8.3 Extensions) provides + instructions for signing and authenticating pointers against secret + keys, which can be used to mitigate Return Oriented Programming (ROP) + and other attacks. + + This option enables these instructions at EL0 (i.e. for userspace). + + Choosing this option will cause the kernel to initialise secret keys + for each process at exec() time, with these keys being + context-switched along with the process. + + The feature is detected at runtime. If the feature is not present in + hardware it will not be advertised to userspace nor will it be + enabled. + +endmenu + config ARM64_SVE bool "ARM Scalable Vector Extension support" default y