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=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 D6DE9C10F27 for ; Tue, 10 Mar 2020 11:48:20 +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 A1E3024655 for ; Tue, 10 Mar 2020 11:48:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="s0zGS6O1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1E3024655 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.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:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/yZ8gedUN//7B+2vZvnHFcYOqRmlf8ZsPa/d4UB5y6U=; b=s0zGS6O19zu0cC As+5YwImQIngcNKoYlOhgiJRx4xZ99jjoI87y4GVsVZgVNByGpnERljrbr6fFPkXZWxkFuw8ZZyN0 4MUu2JqbPYy7ZEA1S6xiDdUW7PKWD8psFSVz7F3oVlcfTYXeSVvnWHZSZZTn4eo+fgTppMBmb/gFP wj7YeFxx/FlrgLLXYOA/UB4o4VCQhrBo+AwT31aCQBkner06w4OIaABE5P4QauAtRjtBn3uZ8lIxf qgvVzEG8wommyoF7r5/faeZTuatC+6HlAhy0CRALYnz0KAkpPrGUdOGYx1IMMHolpZbn9jUvI4P94 EAXTxgLyNTLQRk94A0zw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jBdMx-0001Ul-9F; Tue, 10 Mar 2020 11:48:19 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jBdMv-0001US-6q for linux-arm-kernel@lists.infradead.org; Tue, 10 Mar 2020 11:48:18 +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 7797D30E; Tue, 10 Mar 2020 04:48:15 -0700 (PDT) Received: from [10.37.12.115] (unknown [10.37.12.115]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3EED43F67D; Tue, 10 Mar 2020 04:48:13 -0700 (PDT) Subject: Re: [PATCH v6 04/18] arm64: install user ptrauth keys at kernel exit time To: James Morse , Amit Daniel Kachhap References: <1583476525-13505-1-git-send-email-amit.kachhap@arm.com> <1583476525-13505-5-git-send-email-amit.kachhap@arm.com> <247d3d60-b109-ab1d-5591-086cc0db6e07@arm.com> From: Vincenzo Frascino Message-ID: Date: Tue, 10 Mar 2020 11:48:34 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <247d3d60-b109-ab1d-5591-086cc0db6e07@arm.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200310_044817_295352_127496F3 X-CRM114-Status: GOOD ( 14.72 ) 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: Mark Rutland , Kees Cook , Suzuki K Poulose , Catalin Marinas , Kristina Martsenko , Dave Martin , Mark Brown , Ramana Radhakrishnan , Will Deacon , Ard Biesheuvel , 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+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/6/20 7:07 PM, James Morse wrote: > Hi Amit, > > On 06/03/2020 06:35, Amit Daniel Kachhap wrote: >> From: Kristina Martsenko >> >> As we're going to enable pointer auth within the kernel and use a >> different APIAKey for the kernel itself, so move the user APIAKey >> switch to EL0 exception return. >> >> The other 4 keys could remain switched during task switch, but are also >> moved to keep things consistent. > >> diff --git a/arch/arm64/include/asm/asm_pointer_auth.h b/arch/arm64/include/asm/asm_pointer_auth.h >> new file mode 100644 >> index 0000000..f820a13 >> --- /dev/null >> +++ b/arch/arm64/include/asm/asm_pointer_auth.h >> @@ -0,0 +1,49 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ >> +#ifndef __ASM_ASM_POINTER_AUTH_H >> +#define __ASM_ASM_POINTER_AUTH_H >> + >> +#include >> +#include >> +#include >> +#include >> + >> +#ifdef CONFIG_ARM64_PTR_AUTH >> +/* >> + * thread.keys_user.ap* as offset exceeds the #imm offset range >> + * so use the base value of ldp as thread.keys_user and offset as > >> + * keys_user.ap*. > > (Nit: thread.keys_user.ap*) > >> + */ >> + .macro ptrauth_keys_install_user tsk, tmp1, tmp2, tmp3 > > Reviewed-by: James Morse > A part what James already mentioned: Reviewed-by: Vincenzo Frascino > > Thanks, > > James > -- Regards, Vincenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel