From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4426C433DB for ; Tue, 26 Jan 2021 13:29:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7DAFE20780 for ; Tue, 26 Jan 2021 13:29:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DAFE20780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7UKcmwkTdzoEpHanVtxtjNYgPzx596iiPuab2M2OG9I=; b=HR0Qb77+E/lJketcLheKY+xBa oLjHzT3YuiFZ/wpIL1FImwKwcAooKRu4PF2wijR9OyZS/DoIdr435gJK5FmNJfFdbY/9b9sfeKIwo LeV+u1SGNhlN+V93ruvO3yZTbBZBWSDCXrmSwdRuG95KF8Hk1kZz2js1uGWvmdADS6ryADty9YltD H4fMvn+He1arcL7wby7Myck1mqJk+wZ47XByj89iOkWqjwOLee+d5cf4e7VePlOcOn54ifHAqEf8K vvglL0msyRmKvQZfBkZFmN8SwgKy49hyfJiXrRni9UrhuGu3JKbFqYjINqC9ijNHfRirjOaGhwzUU 9hd7priaQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4ONs-0008Kd-Bn; Tue, 26 Jan 2021 13:27:52 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4ONp-0008J0-2h for linux-arm-kernel@lists.infradead.org; Tue, 26 Jan 2021 13:27:49 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id A7C5C206F9; Tue, 26 Jan 2021 13:27:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611667667; bh=19c8xSqKIP4TNrH4rhs/UwZ2KAD906uWsUMUXn+wnkw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RWXqasrIXhzJGCbu2NvZ+IcwF6JJ3WBZekSN/Sop1SzznJeJCFx5Z7YWnYGyqKhnH NrgTIiV8iIC6alOs0qefW9KutdNoX3L8siinw2w3UviYRuJLa8mNvnqub8YjBRnTUv GEASEjOJHIeM4ZD/9axTHbs7E1Y7kR44T+xQK616SzyHFsiJ5xxNM1tQ3N1UdvSoA+ U4726IRO7oHFf2lxYP4Q8tBbF7cF/8Cd5Ydkt+IuQJilQJ3b8OKZMsGs6t9aGeIOE2 Q3S738mbY3jBpu8ER34PJgUzfj9WoRbfdbFXDkmG242j2a198/XvHdmYRQGpnpXbLZ sKPU8C0hLszjw== Date: Tue, 26 Jan 2021 13:27:43 +0000 From: Will Deacon To: Daniel Kiss Subject: Re: [PATCH v2 1/2] arm64: Add ARM64_PTR_AUTH_KERNEL config option Message-ID: <20210126132743.GF29702@willie-the-truck> References: <26513330-006C-4B28-9123-656CAEB70E1A@arm.com> <20201218115632.59067-1-daniel.kiss@arm.com> <20201218115632.59067-2-daniel.kiss@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201218115632.59067-2-daniel.kiss@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210126_082749_241415_CCFC0536 X-CRM114-Status: GOOD ( 28.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin.Marinas@arm.com, pcc@google.com, Ard.Biesheuvel@arm.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Dec 18, 2020 at 12:56:31PM +0100, Daniel Kiss wrote: > This new option makes possible to build the kernel with pointer > authentication support for the user space while the kernel is not built > with the pointer authentication. There is a similar config structure for BTI. > > The default configuration will be the same after this patch. Please read the "Describe your changes" section of Documentation/process/submitting-patches.rst for some guidance on writing commit messages. > Signed-off-by: Daniel Kiss > --- > arch/arm64/Kconfig | 26 +++++++++++++++++--------- > arch/arm64/Makefile | 2 +- > drivers/misc/lkdtm/bugs.c | 6 +++--- > 3 files changed, 21 insertions(+), 13 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 75aefc9990ea..b8af3297425a 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1501,7 +1501,6 @@ config ARM64_PTR_AUTH > # which is only understood by binutils starting with version 2.33.1. > depends on LD_IS_LLD || LD_VERSION >= 233010000 || (CC_IS_GCC && GCC_VERSION < 90100) > depends on !CC_IS_CLANG || AS_HAS_CFI_NEGATE_RA_STATE Why do we need to keep all the toolchain checks here if this option doesn't enable PAC in the kernel? > - depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_REGS) > help > Pointer authentication (part of the ARMv8.3 Extensions) provides > instructions for signing and authenticating pointers against secret > @@ -1513,13 +1512,6 @@ config ARM64_PTR_AUTH > for each process at exec() time, with these keys being > context-switched along with the process. > > - If the compiler supports the -mbranch-protection or > - -msign-return-address flag (e.g. GCC 7 or later), then this option > - will also cause the kernel itself to be compiled with return address > - protection. In this case, and if the target hardware is known to > - support pointer authentication, then CONFIG_STACKPROTECTOR can be > - disabled with minimal loss of protection. > - > The feature is detected at runtime. If the feature is not present in > hardware it will not be advertised to userspace/KVM guest nor will it > be enabled. > @@ -1530,6 +1522,22 @@ config ARM64_PTR_AUTH > but with the feature disabled. On such a system, this option should > not be selected. > > +config ARM64_PTR_AUTH_KERNEL > + bool "Enable support for pointer authentication for kernel" Maybe "Use pointer authentication for kernel" for parity with the BTI description. > + default y > + depends on ARM64_PTR_AUTH > + depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_REGS) > + help > + Build the kernel with return address protection by > + pointer authentication. I don't think these two lines add anything ^^ Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel