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.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_MUTT 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 B2F16C04AB5 for ; Thu, 6 Jun 2019 16:44:43 +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 85781206BB for ; Thu, 6 Jun 2019 16:44:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Pcq7T2X/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 85781206BB 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: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=ri0Jz1dJ52aDUPcbJyCi0LV87TinhHwBxetP7pLxw7o=; b=Pcq7T2X/IAko9I noc2znSIHzo1kCfhTapxwLOBI5u0JRPM+6nKzHsN0bNOjvcscXxkgRajteoawEpWlfnwTGG0J9lZB Q+H1IzOcoz5M04BWlJ0+dlHZrLbkDUkpGIt1iRLaUsepeSl8KX01kQOzvrn3aSe8PrqxhGZtshc84 xwyf/NXODNA70JR+Da4lLJCOoPZUP3Zfcbxhksx/6//3pN9YodtiMG3t8cfX6MNbeGlltqESYVGyi SfinnosPAG69f1mnkl4eaHhlhEWeZ/pLyDLlz9BnqkOk0w748QBNwuA8BWdM+LyeNjXQOWTLpve3R Bq4VApYVSArGa9hwf3ow==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYvVG-0006P2-4t; Thu, 06 Jun 2019 16:44:38 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYvVD-0006Oh-FF for linux-arm-kernel@lists.infradead.org; Thu, 06 Jun 2019 16:44:36 +0000 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 8F3BE374; Thu, 6 Jun 2019 09:44:34 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C1DE23F690; Thu, 6 Jun 2019 09:44:32 -0700 (PDT) Date: Thu, 6 Jun 2019 17:44:30 +0100 From: Catalin Marinas To: Kristina Martsenko Subject: Re: [RFC v2 5/7] arm64: initialize and switch ptrauth kernel keys Message-ID: <20190606164430.GH56860@arrakis.emea.arm.com> References: <20190529190332.29753-1-kristina.martsenko@arm.com> <20190529190332.29753-6-kristina.martsenko@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190529190332.29753-6-kristina.martsenko@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-20190606_094435_510036_DCCF81ED X-CRM114-Status: GOOD ( 13.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kees Cook , Ard Biesheuvel , Suzuki K Poulose , Will Deacon , Ramana Radhakrishnan , Amit Kachhap , Dave Martin , 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 Wed, May 29, 2019 at 08:03:30PM +0100, Kristina Martsenko wrote: > - Added ISB after key install in kernel_exit, in case in the future C function > calls are added after the macro [...] > diff --git a/arch/arm64/include/asm/asm_pointer_auth.h b/arch/arm64/include/asm/asm_pointer_auth.h > index e3bfddfe80b6..f595da9661a4 100644 > --- a/arch/arm64/include/asm/asm_pointer_auth.h > +++ b/arch/arm64/include/asm/asm_pointer_auth.h > @@ -25,11 +25,24 @@ alternative_if ARM64_HAS_ADDRESS_AUTH > ldp \tmp2, \tmp3, [\tmp1, #PTRAUTH_KEY_APDB] > msr_s SYS_APDBKEYLO_EL1, \tmp2 > msr_s SYS_APDBKEYHI_EL1, \tmp3 > + isb > alternative_else_nop_endif > alternative_if ARM64_HAS_GENERIC_AUTH > ldp \tmp2, \tmp3, [\tmp1, #PTRAUTH_KEY_APGA] > msr_s SYS_APGAKEYLO_EL1, \tmp2 > msr_s SYS_APGAKEYHI_EL1, \tmp3 > + isb > +alternative_else_nop_endif I couldn't find the previous discussions, so why are the ISBs needed here? Is this macro not invoked only on the kernel_exit path? -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel