linux/tools/objtool
Sami Tolvanen 3c68a92d17 objtool: Disable CFI warnings
The __cfi_ preambles contain a mov instruction that embeds the KCFI
type identifier in the following format:

  ; type preamble
  __cfi_function:
    mov <id>, %eax
  function:
    ...

While the preamble symbols are STT_FUNC and contain valid
instructions, they are never executed and always fall through. Skip
the warning for them.

.kcfi_traps sections point to CFI traps in text sections. Also skip
the warning about them referencing !ENDBR instructions.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220908215504.3686827-18-samitolvanen@google.com
2022-09-26 10:13:15 -07:00
..
arch/x86 x86,objtool: Create .return_sites 2022-06-27 10:33:58 +02:00
Documentation objtool: Update documentation 2022-04-22 12:32:05 +02:00
include/objtool x86/retbleed: Add fine grained Kconfig knobs 2022-06-29 17:43:41 +02:00
.gitignore
Build objtool: Ditch subcommands 2022-04-22 12:32:01 +02:00
builtin-check.c x86/retbleed: Add fine grained Kconfig knobs 2022-06-29 17:43:41 +02:00
check.c objtool: Disable CFI warnings 2022-09-26 10:13:15 -07:00
elf.c objtool: Preserve special st_shndx indexes in elf_update_symbol 2022-09-26 10:13:15 -07:00
Makefile Kbuild updates for v5.19 2022-05-26 12:09:50 -07:00
objtool.c x86,objtool: Create .return_sites 2022-06-27 10:33:58 +02:00
orc_dump.c
orc_gen.c Merge branch 'objtool/urgent' 2021-10-07 00:40:17 +02:00
special.c objtool,x86: Replace alternatives with .retpoline_sites 2021-10-28 23:25:25 +02:00
sync-check.sh
weak.c objtool: Ditch subcommands 2022-04-22 12:32:01 +02:00