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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BAC07CDB482 for ; Mon, 16 Oct 2023 08:05:04 +0000 (UTC) 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:In-Reply-To: Date:From:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=c87+pyZzYQ0zmgpg+q4XnJMIdDPko1uvN11ywoGNl/c=; b=CWcpQ8I6O5Wneg Pj1y+4b1HO8fTJQzDVJ3XrasydIl11oqe3/cgRV9Cz0U0vdBLS0zWGw/hkFc0lU8Hxa+CboY5jRP9 rBR7EhQJREQ/26yFZDG7O9flefSkmWkYlUGci/KEdwWQwaZBUQZ4lk+Ikt+4eYKMBe+udH5vUy20P 9Z1BkWsXhgwZUqQGAB9994Md6HLOzmfeldqcrEk5K0/dcMZvpd3j9jsLN/wl9OyQLliIdWk0I5wkY Ylsy3BPg0n945sEEqB4TzvDMwzJ8/W5xlTR83aR43IOyc67IBecDSRkLguyL2n0EvaOrL8pA099vq 6/5ydwBznq6Bl0I5vN/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qsIaX-008lNP-2T; Mon, 16 Oct 2023 08:04:33 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qsIaN-008lFg-2T for linux-arm-kernel@lists.infradead.org; Mon, 16 Oct 2023 08:04:26 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 24022CE129E; Mon, 16 Oct 2023 08:04:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6B4DC433C7; Mon, 16 Oct 2023 08:04:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697443461; bh=+6BDDsuzr7433AfHR1UMFgaJ7nePfTtgsIIlmNtuepA=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=uPFr8wPTrr5FiwoX28+w5pyDdK7rqJN2iBA9SU2UILyDuC3rVxGkf91AfuY9r/gPv PSGpI3uvp2Cb7hNu1AE4T2ub6+qlVjWRHTVDJvmdoxRXVXD07KrOUk+5yBM3nYXA1Q ux8fxn2OeCXtOaze0iaSm1bcsfKVSNKw7oo9+si0= Subject: Patch "arm64: die(): pass 'err' as long" has been added to the 5.15-stable tree To: alexandru.elisei@arm.com,amit.kachhap@arm.com,anshuman.khandual@arm.com,broonie@kernel.org,catalin.marinas@arm.com,ebiederm@xmission.com,gregkh@linuxfoundation.org,haibinzhang@tencent.com,hewenliang4@huawei.com,james.morse@arm.com,linux-arm-kernel@lists.infradead.org,mark.rutland@arm.com,maz@kernel.org,pcc@google.com,ruanjinjie@huawei.com,sashal@kernel.org,scott@os.amperecomputing.com,stable@kernel.org,will@kernel.org Cc: From: Date: Mon, 16 Oct 2023 10:03:56 +0200 In-Reply-To: <20231011100655.979626-3-ruanjinjie@huawei.com> Message-ID: <2023101656-exonerate-spirits-d557@gregkh> MIME-Version: 1.0 X-stable: commit X-Patchwork-Hint: ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231016_010424_154525_5EDF362B X-CRM114-Status: GOOD ( 16.82 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a note to let you know that I've just added the patch titled arm64: die(): pass 'err' as long to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: arm64-die-pass-err-as-long.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From ruanjinjie@huawei.com Wed Oct 11 12:07:39 2023 From: Jinjie Ruan Date: Wed, 11 Oct 2023 10:06:42 +0000 Subject: arm64: die(): pass 'err' as long To: , , , , , , , , , , , , , , , , , Cc: Message-ID: <20231011100655.979626-3-ruanjinjie@huawei.com> From: Mark Rutland commit 18906ff9af6517c20763ed63dab602a4150794f7 upstream. Recently, we reworked a lot of code to consistentlt pass ESR_ELx as a 64-bit quantity. However, we missed that this can be passed into die() and __die() as the 'err' parameter where it is truncated to a 32-bit int. As notify_die() already takes 'err' as a long, this patch changes die() and __die() to also take 'err' as a long, ensuring that the full value of ESR_ELx is retained. At the same time, die() is updated to consistently log 'err' as a zero-padded 64-bit quantity. Subsequent patches will pass the ESR_ELx value to die() for a number of exceptions. Signed-off-by: Mark Rutland Reviewed-by: Mark Brown Reviewed-by: Anshuman Khandual Cc: Alexandru Elisei Cc: Amit Daniel Kachhap Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20220913101732.3925290-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas Signed-off-by: Jinjie Ruan Signed-off-by: Greg Kroah-Hartman --- arch/arm64/include/asm/system_misc.h | 2 +- arch/arm64/kernel/traps.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/arch/arm64/include/asm/system_misc.h +++ b/arch/arm64/include/asm/system_misc.h @@ -18,7 +18,7 @@ struct pt_regs; -void die(const char *msg, struct pt_regs *regs, int err); +void die(const char *msg, struct pt_regs *regs, long err); struct siginfo; void arm64_notify_die(const char *str, struct pt_regs *regs, --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -181,12 +181,12 @@ static void dump_kernel_instr(const char #define S_SMP " SMP" -static int __die(const char *str, int err, struct pt_regs *regs) +static int __die(const char *str, long err, struct pt_regs *regs) { static int die_counter; int ret; - pr_emerg("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n", + pr_emerg("Internal error: %s: %016lx [#%d]" S_PREEMPT S_SMP "\n", str, err, ++die_counter); /* trap and error numbers are mostly meaningless on ARM */ @@ -207,7 +207,7 @@ static DEFINE_RAW_SPINLOCK(die_lock); /* * This function is protected against re-entrancy. */ -void die(const char *str, struct pt_regs *regs, int err) +void die(const char *str, struct pt_regs *regs, long err) { int ret; unsigned long flags; Patches currently in stable-queue which might be from ruanjinjie@huawei.com are queue-5.15/arm64-factor-insn-read-out-of-call_undef_hook.patch queue-5.15/arm64-rework-el0-mrs-emulation.patch queue-5.15/arm64-die-pass-err-as-long.patch queue-5.15/arm64-armv8_deprecated-rework-deprected-instruction-handling.patch queue-5.15/arm64-armv8_deprecated-fix-unused-function-error.patch queue-5.15/arm64-armv8_deprecated-move-aarch32-helper-earlier.patch queue-5.15/arm64-consistently-pass-esr_elx-to-die.patch queue-5.15/arm64-factor-out-el1-ssbs-emulation-hook.patch queue-5.15/arm64-report-el1-undefs-better.patch queue-5.15/arm64-armv8_deprecated-fold-ops-into-insn_emulation.patch queue-5.15/arm64-rework-bti-exception-handling.patch queue-5.15/arm64-rework-fpac-exception-handling.patch queue-5.15/arm64-split-el0-el1-undef-handlers.patch queue-5.15/arm64-allow-kprobes-on-el0-handlers.patch queue-5.15/arm64-armv8_deprecated-move-emulation-functions.patch _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel