summaryrefslogtreecommitdiffstats
path: root/tools/objtool
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-04-22 12:32:01 +0200
committerPeter Zijlstra <peterz@infradead.org>2022-04-22 12:32:01 +0200
commit3398b12d10271c008ed48fecc6577a5940d7cdf3 (patch)
treea42c0f8e5bf46ee32ea5d2520b385f1b8546d8ed /tools/objtool
parentobjtool: Fix code relocs vs weak symbols (diff)
parentx86/Kconfig: fix the spelling of 'becoming' in X86_KERNEL_IBT config (diff)
downloadlinux-3398b12d10271c008ed48fecc6577a5940d7cdf3.tar.xz
linux-3398b12d10271c008ed48fecc6577a5940d7cdf3.zip
Merge branch 'tip/x86/urgent'
Merge the x86/urgent objtool/IBT changes as a base Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'tools/objtool')
-rw-r--r--tools/objtool/check.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 3f6785415894..ca5b74603008 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -184,6 +184,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
"do_group_exit",
"stop_this_cpu",
"__invalid_creds",
+ "cpu_startup_entry",
};
if (!func)
@@ -3217,9 +3218,8 @@ validate_ibt_reloc(struct objtool_file *file, struct reloc *reloc)
static void warn_noendbr(const char *msg, struct section *sec, unsigned long offset,
struct instruction *dest)
{
- WARN_FUNC("%srelocation to !ENDBR: %s+0x%lx", sec, offset, msg,
- dest->func ? dest->func->name : dest->sec->name,
- dest->func ? dest->offset - dest->func->offset : dest->offset);
+ WARN_FUNC("%srelocation to !ENDBR: %s", sec, offset, msg,
+ offstr(dest->sec, dest->offset));
}
static void validate_ibt_dest(struct objtool_file *file, struct instruction *insn,
@@ -3823,11 +3823,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);
}
}