From patchwork Thu May 3 13:20:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 134899 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1920811lji; Thu, 3 May 2018 06:21:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoUHBzrWSzRGHcDYE11NrF2M1OJG/naPJPcpQr9pFJhnEgQaU/k/USWIRHRqYsOwwEEsZ60 X-Received: by 2002:a17:902:b497:: with SMTP id y23-v6mr16452580plr.309.1525353693824; Thu, 03 May 2018 06:21:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525353693; cv=none; d=google.com; s=arc-20160816; b=PH7WxUc4FjDLxvz7rMair838SdeUw7gFWtyob2WGDk8Y7xdv5NUGyfRK11rsELp28X z6HNeRNLpscqEIqHD7fp8wrQAsShXxW+LTTUjPOXgn9DfxVvEbvpF+kyV0HK5PmwZ0Zz BlLCzQKqQjedWiBozM9WwAeg9/m5c8++wvjW6g0u3AzxUbs7rCygcdcctdPLLI37jDUZ Bn59KQ0pZckkLTuIkeJOC30WeAzCn3LG+kLcdDVCw1Qzp4S5mrRwp3JPILnuVkf0keI6 ny7Dixvp5DVs1LQzJPuo45nNzVqnfZwl06twb2gTQ/Clix15YY5OHIj5CDfnZj63tPbJ h5ig== 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:arc-authentication-results; bh=4LVUTzyQ2OJXCHpF83tP6m/H15e7vVAfSJud/Ls2QQI=; b=J3APCgpZvTwxFdLkkbaL8z9+QoDEYtwVbuyMwP30Ql7OavZJC9g7wHQKgVIZBak9eH +6tlReDDmR7XU29Ri61pQKKr99lys2zSDFRlomH7ZKkV7U1YbVjhgcHmU68N+yuvt14/ W1CJ+TKlNggCyQEHSPCsZO7OZ74OqXw9gW4m5G2uWb3m6KTZXpsT4HTag98G+mfWLttT eEEjNri3ms7NoICMvFBqdes2ElFbPcimH9ZV0u0r/H/yvxf7rs0i248HHvjI50zmzDqI g8IlyqJkVUnj4XGX0kbs6UM6tApwjji0UYD2CUFgBz7nrrL3PuD5BqFB2GNY/V/FhtoV JYOg== 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 e7-v6si13639393plk.397.2018.05.03.06.21.33; Thu, 03 May 2018 06:21:33 -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 S1751616AbeECNVb (ORCPT + 29 others); Thu, 3 May 2018 09:21:31 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:41686 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751121AbeECNVE (ORCPT ); Thu, 3 May 2018 09:21:04 -0400 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 E2D2115B2; Thu, 3 May 2018 06:21:03 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D241B3F487; Thu, 3 May 2018 06:21:01 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, catalin.marinas@arm.com, christoffer.dall@arm.com, drjones@redhat.com, marc.zyngier@arm.com, mark.rutland@arm.com, ramana.radhakrishnan@arm.com, suzuki.poulose@arm.com, will.deacon@arm.com, awallis@codeaurora.org Subject: [PATCHv4 09/10] arm64: enable pointer authentication Date: Thu, 3 May 2018 14:20:30 +0100 Message-Id: <20180503132031.25705-10-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180503132031.25705-1-mark.rutland@arm.com> References: <20180503132031.25705-1-mark.rutland@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 eb2cf4938f6d..d6ce16b1ee47 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1127,6 +1127,29 @@ config ARM64_RAS_EXTN 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