summaryrefslogtreecommitdiff
path: root/tools/objtool
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-06-14 23:15:47 +0200
committerBorislav Petkov <bp@suse.de>2022-06-27 10:33:59 +0200
commit951ddecf435659553ed15a9214e153a3af43a9a1 (patch)
tree1be58a4e84cbc180693531d5fc8878ecb203ca9d /tools/objtool
parent7c81c0c9210c9bfab2bae76aab2999de5bad27db (diff)
downloadlinux-rpi-951ddecf435659553ed15a9214e153a3af43a9a1.tar.gz
linux-rpi-951ddecf435659553ed15a9214e153a3af43a9a1.tar.bz2
linux-rpi-951ddecf435659553ed15a9214e153a3af43a9a1.zip
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) <peterz@infradead.org> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'tools/objtool')
-rw-r--r--tools/objtool/check.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index f6d4ffa82432..b98fd68013c3 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) {