lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <176527182912.498.3228329252559034654.tip-bot2@tip-bot2>
Date: Tue, 09 Dec 2025 09:17:09 -0000
From: "tip-bot2 for Heiko Carstens" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Heiko Carstens <hca@...ux.ibm.com>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject:
 [tip: core/urgent] bug: Let report_but_entry() provide the correct bugaddr

The following commit has been merged into the core/urgent branch of tip:

Commit-ID:     477fa55e3de7c40ba47f10c837c6a32e300893a1
Gitweb:        https://git.kernel.org/tip/477fa55e3de7c40ba47f10c837c6a32e300893a1
Author:        Heiko Carstens <hca@...ux.ibm.com>
AuthorDate:    Mon, 08 Dec 2025 21:06:58 +01:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Tue, 09 Dec 2025 10:14:46 +01:00

bug: Let report_but_entry() provide the correct bugaddr

report_bug_entry() always provides zero for bugaddr but could easily
extract the correct address from the provided bug_entry. Just do that to
have proper warning messages.

E.g. adding an artificial

void foo(void) { WARN_ONCE(1, "bar"); }

function generates this warning message:
WARNING: arch/s390/kernel/setup.c:1017 at 0x0, CPU#0: swapper/0/0
                                          ^^^

With the correct bug address this changes to:
WARNING: arch/s390/kernel/setup.c:1017 at foo+0x1c/0x40, CPU#0: swapper/0/0
                                          ^^^^^^^^^^^^^

Fixes: 7d2c27a0ec5e ("bug: Add report_bug_entry()")
Signed-off-by: Heiko Carstens <hca@...ux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: https://patch.msgid.link/20251208200658.3431511-1-hca@linux.ibm.com
---
 lib/bug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bug.c b/lib/bug.c
index edd9041..c6f691f 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -262,7 +262,7 @@ enum bug_trap_type report_bug_entry(struct bug_entry *bug, struct pt_regs *regs)
 	bool rcu = false;
 
 	rcu = warn_rcu_enter();
-	ret = __report_bug(bug, 0, regs);
+	ret = __report_bug(bug, bug_addr(bug), regs);
 	warn_rcu_exit(rcu);
 
 	return ret;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ