[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <165039891592.4207.1506577697956201551.tip-bot2@tip-bot2>
Date: Tue, 19 Apr 2022 20:08:35 -0000
From: "tip-bot2 for Josh Poimboeuf" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Josh Poimboeuf <jpoimboe@...hat.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/urgent] objtool: Print data address for "!ENDBR" data warnings
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 4baae989e638e9bf4b7d29bc5e36b581fddcca52
Gitweb: https://git.kernel.org/tip/4baae989e638e9bf4b7d29bc5e36b581fddcca52
Author: Josh Poimboeuf <jpoimboe@...hat.com>
AuthorDate: Mon, 18 Apr 2022 09:50:29 -07:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Tue, 19 Apr 2022 21:58:50 +02:00
objtool: Print data address for "!ENDBR" data warnings
When a "!ENDBR" warning is reported for a data section, objtool just
prints the text address of the relocation target twice, without giving
any clues about the location of the original data reference:
vmlinux.o: warning: objtool: dcbnl_netdevice_event()+0x0: .text+0xb64680: data relocation to !ENDBR: dcbnl_netdevice_event+0x0
Instead, print the address of the data reference, in addition to the
address of the relocation target.
vmlinux.o: warning: objtool: dcbnl_nb+0x0: .data..read_mostly+0xe260: data relocation to !ENDBR: dcbnl_netdevice_event+0x0
Fixes: 89bc853eae4a ("objtool: Find unused ENDBR instructions")
Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: https://lkml.kernel.org/r/762e88d51300e8eaf0f933a5b0feae20ac033bea.1650300597.git.jpoimboe@redhat.com
---
tools/objtool/check.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index e3a675d..b822a6d 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -3817,11 +3817,8 @@ static int validate_ibt(struct objtool_file *file)
struct instruction *dest;
dest = validate_ibt_reloc(file, reloc);
- if (is_data && dest && !dest->noendbr) {
- warn_noendbr("data ", reloc->sym->sec,
- reloc->sym->offset + reloc->addend,
- dest);
- }
+ if (is_data && dest && !dest->noendbr)
+ warn_noendbr("data ", sec, reloc->offset, dest);
}
}
Powered by blists - more mailing lists