From: Alexandre Chartre Date: Fri, 21 Nov 2025 09:53:26 +0000 (+0100) Subject: objtool: Do not validate IBT for .return_sites and .call_sites X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c3b7d044fc5ac99a31ce9420431b90e21ed55503;p=thirdparty%2Fkernel%2Flinux.git objtool: Do not validate IBT for .return_sites and .call_sites The .return_sites and .call_sites sections reference text addresses, but not with the intent to indirect branch to them, so they don't need to be validated for IBT. This is useful when running objtool on object files which already have .return_sites or .call_sites sections, for example to re-run objtool after it has reported an error or a warning. Signed-off-by: Alexandre Chartre Signed-off-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf Link: https://patch.msgid.link/20251121095340.464045-17-alexandre.chartre@oracle.com --- diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 442b655e3f25f..4ebadf94f8af2 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -4753,6 +4753,8 @@ static int validate_ibt(struct objtool_file *file) !strcmp(sec->name, ".llvm.call-graph-profile") || !strcmp(sec->name, ".llvm_bb_addr_map") || !strcmp(sec->name, "__tracepoints") || + !strcmp(sec->name, ".return_sites") || + !strcmp(sec->name, ".call_sites") || !strcmp(sec->name, "__patchable_function_entries")) continue;