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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 9FCF5C433E0 for ; Wed, 24 Jun 2020 07:09:50 +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 6E357207DD for ; Wed, 24 Jun 2020 07:09:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Og6AjpgI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E357207DD 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+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-Type: Content-Transfer-Encoding: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=e35S4PbvSIMyynXpruxNLtbwg/Fd3SRWD0FeVc0ZPQ4=; b=Og6AjpgIWEsY2Ejqcs8n45Zmy 6xRb+kuGkRsTe5Jmuh3ojEzUUw+p0aGFsuiDd3KPpqzW83dozCfN+2kG2JtKSJnBNrgLYzezlPGJW bRiC8FBfuLKmJkdMdkmIby2aEVaBBbjztrGL6vA1S6Pq1G7jg5IYuwt424v485hKPj9UaaMkFe4CV IGNtZ+wIxabdvJl0mjsnlhz5/MboQzWt+sH60awSJ2qKIvlZSA031+fwSOF6CfbNgqo2NFWswrtVm IcUaQdFbeWrzzMmA7UyML0m9f+xs46WV8ZGNJktqX967vNtGtmzg0SXZbQC2MrutdLEJ+ND6jPkRQ /8N9U5J0w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnzVq-0006S1-G1; Wed, 24 Jun 2020 07:08:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnzVn-0006R6-P0 for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 07:08:00 +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 565F71F1; Wed, 24 Jun 2020 00:07:59 -0700 (PDT) Received: from [10.57.20.252] (unknown [10.57.20.252]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 58E963F73C; Wed, 24 Jun 2020 00:07:56 -0700 (PDT) Subject: Re: [PATCH v3 1/3] arm64: ptrauth: add pointer authentication Armv8.6 enhanced feature To: Dave Martin References: <1592457029-18547-1-git-send-email-amit.kachhap@arm.com> <1592457029-18547-2-git-send-email-amit.kachhap@arm.com> <20200622142255.GS25945@arm.com> <20200623144554.GY25945@arm.com> From: Amit Daniel Kachhap Message-ID: <0b1bca49-2322-fd03-c713-9f63c3be578e@arm.com> Date: Wed, 24 Jun 2020 12:37:53 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200623144554.GY25945@arm.com> Content-Language: en-US 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 , Mark Brown , James Morse , Vincenzo Frascino , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 6/23/20 8:15 PM, Dave Martin wrote: > On Tue, Jun 23, 2020 at 06:46:28PM +0530, Amit Daniel Kachhap wrote: >> Hi, >> >> On 6/22/20 7:52 PM, Dave Martin wrote: >>> On Thu, Jun 18, 2020 at 10:40:27AM +0530, Amit Daniel Kachhap wrote: >>>> This patch add changes for Pointer Authentication enhanced features >>>> mandatory for Armv8.6. These features are, >>>> >>>> + >>>> asmlinkage void notrace el0_sync_handler(struct pt_regs *regs) >>>> { >>>> unsigned long esr = read_sysreg(esr_el1); >>>> @@ -272,6 +290,9 @@ asmlinkage void notrace el0_sync_handler(struct pt_regs *regs) >>>> case ESR_ELx_EC_BRK64: >>>> el0_dbg(regs, esr); >>>> break; >>>> + case ESR_ELx_EC_FPAC: >>>> + el0_fpac(regs, esr); >>>> + break; >>>> default: >>>> el0_inv(regs, esr); >>>> } >>>> @@ -335,6 +356,9 @@ asmlinkage void notrace el0_sync_compat_handler(struct pt_regs *regs) >>>> case ESR_ELx_EC_BKPT32: >>>> el0_dbg(regs, esr); >>>> break; >>>> + case ESR_ELx_EC_FPAC: >>>> + el0_fpac(regs, esr); >>>> + break; >>> >>> Can this exception ever happen? I thought ptrauth doesn't exist for >>> AArch32. >> >> This path will be taken during FPAC fault from userspace(EL0). Am I missing >> something here? > > I thought AArch32 doesn't have pointer auth at all, due to a lack of > spare address bits. > > el0_sync_compat_handler() is presumably only for exceptions coming from > AArch32? ok got it. I will remove el0_fpac from here. Thanks for pointing this issue. >> >>> >>>> default: >>>> el0_inv(regs, esr); >>>> } > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel