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>] [day] [month] [year] [list]
Message-ID: <20250923004941.982086-1-dylanbhatch@google.com>
Date: Tue, 23 Sep 2025 00:49:41 +0000
From: Dylan Hatch <dylanbhatch@...gle.com>
To: Josh Poimboeuf <jpoimboe@...nel.org>, Peter Zijlstra <peterz@...radead.org>
Cc: Dylan Hatch <dylanbhatch@...gle.com>, Roman Gushchin <roman.gushchin@...ux.dev>, 
	Weinan Liu <wnliu@...gle.com>, Naveen N Rao <naveen@...nel.org>, 
	Christophe Leroy <christophe.leroy@...roup.eu>, Sathvika Vasireddy <sv@...ux.ibm.com>, 
	Michael Ellerman <mpe@...erman.id.au>, linux-kernel@...r.kernel.org
Subject: [PATCH] objtool: Let --hacks=jump_label read special sections with alts.

The objtool command line 'objtool --hacks=jump_label foo.o' on its own
should be expected to rewrite jump labels to NOPs. This means the
add_special_section_alts() code path needs to run when only this option
is provided.

This is mainly relevant in certain debugging situations, but could
potentially also fix kernel builds in which objtool is run with
--hacks=jump_label but without --orc, --stackval, --uaccess, or
--hacks=noinstr.

Fixes: de6fbcedf5ab ("objtool: Read special sections with alts only when specific options are selected")
Signed-off-by: Dylan Hatch <dylanbhatch@...gle.com>
---
 tools/objtool/check.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index d14f20ef1db1..1b4b4bd7dc90 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2562,7 +2562,7 @@ static int decode_sections(struct objtool_file *file)
 	 * Must be before add_jump_destinations(), which depends on 'func'
 	 * being set for alternatives, to enable proper sibling call detection.
 	 */
-	if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr) {
+	if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr || opts.hack_jump_label) {
 		ret = add_special_section_alts(file);
 		if (ret)
 			return ret;
-- 
2.51.0.534.gc79095c0ca-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ