From patchwork Fri Oct 5 08:47:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristina Martsenko X-Patchwork-Id: 148166 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp180387lji; Fri, 5 Oct 2018 01:50:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV62iM+d62JpuGvT2Ea+ihwilfhMdEcfzngD3ubjSt12NcwTgo7m95+/yiUC+BTqKzVTZ3CSE X-Received: by 2002:a62:509a:: with SMTP id g26-v6mr10672894pfj.62.1538729427537; Fri, 05 Oct 2018 01:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538729427; cv=none; d=google.com; s=arc-20160816; b=tmyzqmoi8+61oKPp2z1mNVoXsE9ddVUOVtKtMhm/9QfLkhLPfoWJh0dYYtOSaeYdE6 xIxrtjLwImUrpNuS34BGTXcx/X+pZeCgDF4TMMYYnMd1Hh5hAb0DDc6X2TzpoAN6rdxR RC6KtrFhpMFh9aNCOyJs7mmG+MSOJlr2RYe3I5MpsccIhv2Xx4AvNif/8hyJUi0+zqxE 1YRvk1C4PqEq8WOtKQCobDOvatsz8S5lWCC7A7kirExKWpexQLcrLoB1D7rQr5JxCU6H IkCLdth1cfdKb/KO0UgfRQpWty71noftaqWEsDMgWEoAqB34TDUkoyeToSR1o8SmX+6A 9Zwg== 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=D/EWroOlXWnyjHMgJfJ0Vl9eiUr6vt/X7RRF6AXTveM=; b=V8OhdA7Q1HhBw2vySGy8aB+kQ4rvi4XegvXiWTtnCQYOHH/y9+pMT97b7+0J4Xf62p PrDQXHQAZ0a7B4FsHrzoFHfXjd36vgwkxOgN1BxERqk7pXQK0U8+6DnsFM+2exX+6nzc 3XfXVkaKOkidILkuGTIY0Tuv3K48+eOeB5XH664LmhLx7AoCFNsls9pRpa1xi785yhrl ygEefB2/UkuzAsU1EtZ73MxTdxqvEvAuGKzmrg/A42jifqCq6Yuu3EL6SiMqpLIUXRfN Iee2Bp+YZQziDTszOGVsAWDyCR/pstLF93jd5xL9iOXQ6qyaLYrVg06huUNOFA8KolGl eP/w== 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 o24-v6si5965380pgv.242.2018.10.05.01.50.27; Fri, 05 Oct 2018 01:50:27 -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 S1728888AbeJEPsJ (ORCPT + 32 others); Fri, 5 Oct 2018 11:48:09 -0400 Received: from foss.arm.com ([217.140.101.70]:47942 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727809AbeJEPsJ (ORCPT ); Fri, 5 Oct 2018 11:48:09 -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 C6D131688; Fri, 5 Oct 2018 01:50:24 -0700 (PDT) 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 9154D3F5B3; Fri, 5 Oct 2018 01:50:21 -0700 (PDT) From: Kristina Martsenko To: linux-arm-kernel@lists.infradead.org Cc: Adam Wallis , Amit Kachhap , Andrew Jones , Ard Biesheuvel , Arnd Bergmann , Catalin Marinas , Christoffer Dall , Dave P Martin , Jacob Bramley , Kees Cook , Marc Zyngier , Mark Rutland , Ramana Radhakrishnan , "Suzuki K . Poulose" , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 10/17] arm64: enable pointer authentication Date: Fri, 5 Oct 2018 09:47:47 +0100 Message-Id: <20181005084754.20950-11-kristina.martsenko@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181005084754.20950-1-kristina.martsenko@arm.com> References: <20181005084754.20950-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 1b1a0e95c751..8a6d44160fa8 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1134,6 +1134,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