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 B9CB6CDB465 for ; Mon, 16 Oct 2023 08:04:20 +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=chkP/Ax8PxAnYJ4GQB3nBYTegdIxEB/0VobmKLIKpoI=; b=1Loz6MU5+DXI+n LBQia0i0RkmN7W6IAikMJpxw1t29ZXkDpMJuaoYMySyscmCb1zETbkVfvdXpUUC5Hw9X2lCWB+ZU1 FrDHWu/aqN4hEOjTxiZj8SlFPQAX+bDlmfMAuFfdWW6l08sSDScXy/fIgT4X834Dfka3Jkski3Lvg w9r0K2hm25LNEPpr+S18FhvN3mNBoJybJ1mqmURzOSeeUODTjhpPnxXYym7FImwfeg14W1Id5yAHx vM5nrF+4tryByyg2UYX6GoDfl58eWS18aAD9CAkPzK6pcfEjlRgZ/1tYUdqrgwUWol2YPWlJCgSRA xALPYuaOehDuoc4jUkZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qsIZW-008kgv-1x; Mon, 16 Oct 2023 08:03:30 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qsIZF-008kXV-1l for linux-arm-kernel@lists.infradead.org; Mon, 16 Oct 2023 08:03:17 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id DB3E860C08; Mon, 16 Oct 2023 08:03:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2829C433C7; Mon, 16 Oct 2023 08:03:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697443392; bh=c7a9L14jBEObnIeAaXqau7YnPS7SZfWdMeERsE4wt28=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=eaFVo6tQo7FZbaS+Cyv0nG1BDHEFZaurJPgTpC8giONOC0MGAgUlxF/kmDYq9vsYi 943NKmK7/1T0J6TDR+FsWxYD1OohPThFKpj+ZSnDzHs9u1NwGtdj+aLGI7LYlIH55L E3Uxj1g88wgvmGYHKx4XTPAlfJcdmKE8RRKRz3cg= Subject: Patch "arm64: die(): pass 'err' as long" has been added to the 5.10-stable tree To: alexandru.elisei@arm.com,amit.kachhap@arm.com,anshuman.khandual@arm.com,ardb@kernel.org,broonie@kernel.org,catalin.marinas@arm.com,ebiederm@xmission.com,f.fainelli@gmail.com,gregkh@linuxfoundation.org,haibinzhang@tencent.com,hewenliang4@huawei.com,james.morse@arm.com,linux-arm-kernel@lists.infradead.org,mark.rutland@arm.com,ruanjinjie@huawei.com,sashal@kernel.org,scott@os.amperecomputing.com,stable@kernel.org,will@kernel.org,youngmin.nam@samsung.com,yuzenghui@huawei.com Cc: From: Date: Mon, 16 Oct 2023 10:02:24 +0200 In-Reply-To: <20231011100545.979577-3-ruanjinjie@huawei.com> Message-ID: <2023101624-coat-jingling-3fc1@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_010313_680800_20FCCE65 X-CRM114-Status: GOOD ( 16.72 ) 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.10-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.10 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:06:29 2023 From: Jinjie Ruan Date: Wed, 11 Oct 2023 10:05:32 +0000 Subject: arm64: die(): pass 'err' as long To: , , , , , , , , , , , , , , , , , , Cc: Message-ID: <20231011100545.979577-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 @@ -90,12 +90,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 */ @@ -116,7 +116,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.10/arm64-factor-insn-read-out-of-call_undef_hook.patch queue-5.10/arm64-rework-el0-mrs-emulation.patch queue-5.10/arm64-die-pass-err-as-long.patch queue-5.10/arm64-armv8_deprecated-rework-deprected-instruction-handling.patch queue-5.10/arm64-armv8_deprecated-fix-unused-function-error.patch queue-5.10/arm64-armv8_deprecated-move-aarch32-helper-earlier.patch queue-5.10/arm64-consistently-pass-esr_elx-to-die.patch queue-5.10/arm64-factor-out-el1-ssbs-emulation-hook.patch queue-5.10/arm64-report-el1-undefs-better.patch queue-5.10/arm64-armv8_deprecated-fold-ops-into-insn_emulation.patch queue-5.10/arm64-rework-bti-exception-handling.patch queue-5.10/arm64-rework-fpac-exception-handling.patch queue-5.10/arm64-split-el0-el1-undef-handlers.patch queue-5.10/arm64-allow-kprobes-on-el0-handlers.patch queue-5.10/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