From patchwork Tue Apr 17 18:37:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 133577 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp5036116ljb; Tue, 17 Apr 2018 11:38:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+RBCP6b4dA3fDhTIfDmp0aHQfv92ppdC6rIKHR0MX9HKeUZMFqlzgzDMyvm3lz0DQd1Da0 X-Received: by 2002:a17:902:9a49:: with SMTP id x9-v6mr3014597plv.94.1523990305327; Tue, 17 Apr 2018 11:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523990305; cv=none; d=google.com; s=arc-20160816; b=XL+Eq/sebTsBvtQkn8QZHVi/KWTi2hEpU4qqJ15CA9FIropPz6U2bQjg2dTkgqCorx FHkVVyTaSYl0t5mwqKqUR1MNSwX4AHrvMx5aLRBB/lGx7WLeDPMSdv+ml9uPgtf2YbBE AHncTKK+iN+xbHR0JeR9zLraycFQn6kyC1UXF8JkQTwajtgJMfAUV5Epix8VG2ZCVA// pKebm7TZ/razaPW+PU4s2NkC+9AMU/p32z+W2LYKKb+4DxkjtFaT9yTUA9aBDeUX9MtX L1OsUNVHqtyVlp6eNeilrzRyIKlptUjYEptpftNerIrO42XDyyeTcQSntFCfbSYSfL4m NhEA== 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=AmbrorxdCmdxNHbMStb8d/2LuUJ2rsuIUnsDRGzYFXWUsbhn35PsvejNbX+ccFk4t+ uP7cBD9TAAw1MPDHH1p8DYayAgWPtBg+Iwd2u2g8kCZACOpTu1kw+ezSjtXf7x8NV91x mnvNm7Zs9IzFT4iP2ytvMw1uaAs7Vaii8Vdf5e/B6tALbjGDzRnnv54ztkBFa3cj8bbx cs1HeAR24BkaSUYdSquH/cTj3pp6dIgz981Du20XhhQyeDgS4Z/7xjHp/2YIw5uKia2z YBSUuZCYj0/ZmgpjjNYkt+blOc5J2Z8NrGYqsViSmce2MtUO4UsJRvIO7+ZOMYhgTIgd VUeA== 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 u21si7743865pfg.225.2018.04.17.11.38.25; Tue, 17 Apr 2018 11:38:25 -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 S1753032AbeDQSiW (ORCPT + 29 others); Tue, 17 Apr 2018 14:38:22 -0400 Received: from foss.arm.com ([217.140.101.70]:47092 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752974AbeDQSiS (ORCPT ); Tue, 17 Apr 2018 14:38:18 -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 77A7615AD; Tue, 17 Apr 2018 11:38:18 -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 F1A453F587; Tue, 17 Apr 2018 11:38:15 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: arnd@arndb.de, catalin.marinas@arm.com, cdall@kernel.org, drjones@redhat.com, kvmarm@lists.cs.columbia.edu, linux-arch@vger.kernel.org, marc.zyngier@arm.com, mark.rutland@arm.com, ramana.radhakrishnan@arm.com, suzuki.poulose@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, awallis@codeaurora.org, kernel-hardening@lists.openwall.com Subject: [PATCHv3 10/11] arm64: enable pointer authentication Date: Tue, 17 Apr 2018 19:37:34 +0100 Message-Id: <20180417183735.56985-11-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180417183735.56985-1-mark.rutland@arm.com> References: <20180417183735.56985-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