From: Peter Zijlstra Date: Tue, 14 Jun 2022 21:15:47 +0000 (+0200) Subject: objtool: Treat .text.__x86.* as noinstr X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=951ddecf435659553ed15a9214e153a3af43a9a1;p=linux.git objtool: Treat .text.__x86.* as noinstr Needed because zen_untrain_ret() will be called from noinstr code. Also makes sense since the thunks MUST NOT contain instrumentation nor be poked with dynamic instrumentation. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Reviewed-by: Josh Poimboeuf Signed-off-by: Borislav Petkov --- diff --git a/tools/objtool/check.c b/tools/objtool/check.c index f6d4ffa824320..b98fd68013c31 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -376,7 +376,8 @@ static int decode_instructions(struct objtool_file *file) sec->text = true; if (!strcmp(sec->name, ".noinstr.text") || - !strcmp(sec->name, ".entry.text")) + !strcmp(sec->name, ".entry.text") || + !strncmp(sec->name, ".text.__x86.", 12)) sec->noinstr = true; for (offset = 0; offset < sec->sh.sh_size; offset += insn->len) {