From patchwork Mon Nov 27 16:38:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 119756 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp513417qgn; Mon, 27 Nov 2017 08:39:55 -0800 (PST) X-Google-Smtp-Source: AGs4zMbf0HxEXHRbMQbI+Am39MXwsJp5yXyaov/xEhigHM2bpm5C6UGlQj7Epm6hWoQBw2XF1krd X-Received: by 10.98.194.71 with SMTP id l68mr20093501pfg.221.1511800795124; Mon, 27 Nov 2017 08:39:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511800795; cv=none; d=google.com; s=arc-20160816; b=pP2lfHwv14QV4UnKuoOW1nN1uEmq23g40mgcxXPwKzLacn8nhxF7WG5FkFABg6CywV TcGzVA7WF9VTG+YVorRjLq0OWr7ioti0TCbOlJjH3uq76NBdMVNuXCld0bidBa+HZ0bt ZQYBJWHdJCUW6CvmWE75xXtNQDdoFy+5T4U6uabTUl0um0YkoZQITxw1dM8EzOSZ1wgw 3S+TKE0R3AeIsm1FpsStPpSDb2gRg90vn5bIRg5nGmWuG388M+CmrLKXa3gf0H4bKYpJ sm0R4y5Fl0vuXzz4J2LVOh7WYLB17VM+HqRmWLKPXL6jx/OnEV4/HEvb+oT1RZAUFxjv B06A== 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=Lx2xWOUeQTEWwusv4B5CnGmYDzEloMh4oynebLllv/U=; b=eLdemVLFio0DQgRNfTnFx6jN856Glv2extP+3iX6Wu+nm+gJk9gGpu52qm4QfgdLjM AQpafuJVo6adfo8c8fFNjM1DULmEvXvv167XDfeaPvgl+qtvYE+22XBk28Oux7iIworT lsr1u5wDOhkZFMNDR5Q6NSlS1n1sUQxkWTw4CmIep6H1tY+UGeaYiZaUTfsszxx7akwX qmGSXVtWc8nMnEKu3xdvwtyyKecCM8KlEzrzgMUp2bOWn2bAef4RxhYLapZSqowqTdb5 Y5RuxLO6kMoWJcvyjW3Laoap0BJRRkovGmHA4J/P5N8r5IxsIH7hW3nvPCFszK/j9YZo 311w== 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 1si24438102plq.36.2017.11.27.08.39.54; Mon, 27 Nov 2017 08:39:55 -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 S932164AbdK0Qjx (ORCPT + 28 others); Mon, 27 Nov 2017 11:39:53 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40262 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932136AbdK0Qj3 (ORCPT ); Mon, 27 Nov 2017 11:39:29 -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 90554164F; Mon, 27 Nov 2017 08:39:29 -0800 (PST) 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 075F03F246; Mon, 27 Nov 2017 08:39:26 -0800 (PST) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: arnd@arndb.de, catalin.marinas@arm.com, cdall@linaro.org, kvmarm@lists.cs.columbia.edu, linux-arch@vger.kernel.org, marc.zyngier@arm.com, mark.rutland@arm.com, suzuki.poulose@arm.com, will.deacon@arm.com, yao.qi@arm.com, kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org, awallis@codeaurora.org Subject: [PATCHv2 11/12] arm64: enable pointer authentication Date: Mon, 27 Nov 2017 16:38:05 +0000 Message-Id: <20171127163806.31435-12-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171127163806.31435-1-mark.rutland@arm.com> References: <20171127163806.31435-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 / KVM guest pointer authentication, add the necessary Kconfig logic to allow this to be enabled. 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 a93339f5178f..f7cb4ca8a6fc 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1013,6 +1013,29 @@ config ARM64_PMEM endmenu +menu "ARMv8.3 architectural features" + +config ARM64_POINTER_AUTHENTICATION + 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