From patchwork Sun Jun 13 09:26:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kiss X-Patchwork-Id: 12317381 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=-11.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 C4F3FC48BCF for ; Sun, 13 Jun 2021 09:30:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 822806120E for ; Sun, 13 Jun 2021 09:30:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 822806120E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=1ipzl1ZCBJUeAzo9wVQd3u1bajc+sCKzWHy/heRQ1eM=; b=M5PXGBvshOGDoa ZR6rL/vhq4bEPBKhsldqTaDz9pKFvyDhFg+bCR0fH4ssvcd4avtNgIiBGJrpvS/H6Xw9+ydwcpRLS CnJpkJJS2Exel3/bzQEJiUBTHHCPEEkiswRBawM4qgqffUROctKF2eFOIVxnsC7ItMaOTEjuFRpNd D3kFtAGh/gZoM65QFfl6WUr0kpkbn9zbOAC6cY33Mz/Xm/QyO69ITCF2NXNIzaKdKhx2go598ULUo M7rFM6REVoA9N0+Wh7LW6MOYQ3SpBpTGq08WAbysbjs9A2PiNz8+Kd2J3d8NPuSaRkm1GRe6SWzOq 3OuaXRtQCZWjXXPlZQcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsMOR-00A4AO-IH; Sun, 13 Jun 2021 09:26:59 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsMON-00A48o-16 for linux-arm-kernel@lists.infradead.org; Sun, 13 Jun 2021 09:26:56 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8559F31B; Sun, 13 Jun 2021 02:26:49 -0700 (PDT) Received: from localhost.localdomain (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 53FDA3F694; Sun, 13 Jun 2021 02:26:48 -0700 (PDT) From: Daniel Kiss To: will@kernel.org, Catalin.Marinas@arm.com Cc: Ard.Biesheuvel@arm.com, daniel.kiss@arm.com, linux-arm-kernel@lists.infradead.org, pcc@google.com Subject: [PATCH v6 0/2] arm64: split ARM64_PTR_AUTH option to userspace and kernel Date: Sun, 13 Jun 2021 11:26:30 +0200 Message-Id: <20210613092632.93591-1-daniel.kiss@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-ARM-No-Footer: FoSSMail X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210613_022655_140091_2E85B40F X-CRM114-Status: UNSURE ( 7.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Changes from v5: * Move config description to the second patch. * Fix typos in commit message. * Fix LD version check caused by the rebase. Changes from v4: * Rebased to 5.13-rc4. Changes from v3: * Removed the duplicated #ifdef block in asm/pointer_auth.h. Changes from v2: * Moved the toolchain version check under ARM64_PTR_AUTH_KERNEL. Changes from v1: * Keep the A key in register while running in the kernel. Daniel Kiss (2): arm64: Add ARM64_PTR_AUTH_KERNEL config option arm64: Conditionally configure PTR_AUTH key of the kernel. arch/arm64/Kconfig | 33 +++++++------ arch/arm64/Makefile | 2 +- arch/arm64/include/asm/asm_pointer_auth.h | 49 +++++++++++-------- arch/arm64/include/asm/pointer_auth.h | 59 +++++++++++++---------- arch/arm64/include/asm/processor.h | 2 + arch/arm64/kernel/asm-offsets.c | 4 ++ drivers/misc/lkdtm/bugs.c | 6 +-- 7 files changed, 91 insertions(+), 64 deletions(-)