linux/tools/objtool
Josh Poimboeuf c44b4b9eeb objtool: Fix skip_alt_group() for non-alternative STAC/CLAC
If an insn->alt points to a STAC/CLAC instruction, skip_alt_group()
assumes it's part of an alternative ("alt group") as opposed to some
other kind of "alt" such as an exception fixup.

While that assumption may hold true in the current code base, Linus has
an out-of-tree patch which breaks that assumption by replacing the
STAC/CLAC alternatives with raw STAC/CLAC instructions.

Make skip_alt_group() more robust by making sure it's actually an alt
group before continuing.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Fixes: 2d12c6fb78 ("objtool: Remove ANNOTATE_IGNORE_ALTERNATIVE from CLAC/STAC")
Closes: https://lore.kernel.org/CAHk-=wi6goUT36sR8GE47_P-aVrd5g38=VTRHpktWARbyE-0ow@mail.gmail.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://patch.msgid.link/3d22415f7b8e06a64e0873b21f48389290eeaa49.1761767616.git.jpoimboe@kernel.org
2025-11-01 07:43:20 +01:00
..
Documentation objtool: Fix up some outdated references to ENTRY/ENDPROC 2025-03-25 09:20:27 +01:00
arch - Add functionality to provide runtime firmware updates for the non-x86 parts 2025-09-30 13:40:35 -07:00
include/objtool - Remove a bunch of asm implementing condition flags testing in KVM's 2025-10-11 11:19:16 -07:00
.gitignore
Build
Makefile objtool: Hide unnecessary compiler error message 2025-03-12 15:43:38 -07:00
builtin-check.c objtool: Add action to check for absence of absolute relocations 2025-09-03 17:59:51 +02:00
check.c objtool: Fix skip_alt_group() for non-alternative STAC/CLAC 2025-11-01 07:43:20 +01:00
elf.c objtool: Speed up SHT_GROUP reindexing 2025-05-14 13:09:02 +02:00
noreturns.h x86/sev: Zap snp_abort() 2025-09-04 13:15:59 +02:00
objtool.c objtool: Change "warning:" to "error: " for fatal errors 2025-04-01 09:07:13 +02:00
orc_dump.c objtool: Change "warning:" to "error: " for fatal errors 2025-04-01 09:07:13 +02:00
orc_gen.c objtool/x86: Separate arch-specific and generic parts 2024-03-11 22:23:47 +08:00
special.c objtool: Change "warning:" to "error: " for fatal errors 2025-04-01 09:07:13 +02:00
sync-check.sh objtool: Add objtool_types.h 2023-03-23 23:18:56 +01:00
weak.c