Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBBC7C636CC for ; Mon, 20 Feb 2023 10:05:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231229AbjBTKFH (ORCPT ); Mon, 20 Feb 2023 05:05:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230057AbjBTKFF (ORCPT ); Mon, 20 Feb 2023 05:05:05 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A94A876B1 for ; Mon, 20 Feb 2023 02:04:38 -0800 (PST) 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 0335715BF; Mon, 20 Feb 2023 02:04:43 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.15.112]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 028983F703; Mon, 20 Feb 2023 02:03:58 -0800 (PST) Date: Mon, 20 Feb 2023 10:02:57 +0000 From: Mark Rutland To: Sangmoon Kim Cc: Catalin Marinas , Will Deacon , Mark Brown , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: pass ESR_ELx to die() of cfi_handler Message-ID: References: <20230220073441.2753-1-sangmoon.kim@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230220073441.2753-1-sangmoon.kim@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 20, 2023 at 04:34:41PM +0900, Sangmoon Kim wrote: > Commit 0f2cb928a154 ("arm64: consistently pass ESR_ELx to die()") caused > all callers to pass the ESR_ELx value to die(). > > For consistency, this patch also adds esr to die() call of cfi_handler. > Also, when CFI error occurs, die handlers can use ESR_ELx value. > > Signed-off-by: Sangmoon Kim Consistently reporting the ESR value makes sense to me, so: Acked-by: Mark Rutland Mark. > --- > arch/arm64/kernel/traps.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c > index 0ccc063daccb..4a623e2e982b 100644 > --- a/arch/arm64/kernel/traps.c > +++ b/arch/arm64/kernel/traps.c > @@ -990,7 +990,7 @@ static int cfi_handler(struct pt_regs *regs, unsigned long esr) > > switch (report_cfi_failure(regs, regs->pc, &target, type)) { > case BUG_TRAP_TYPE_BUG: > - die("Oops - CFI", regs, 0); > + die("Oops - CFI", regs, esr); > break; > > case BUG_TRAP_TYPE_WARN: > -- > 2.17.1 >