Commit 951ddecf authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Borislav Petkov
Browse files

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: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
parent 7c81c0c9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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) {