linux-stable/tools/objtool
Josh Poimboeuf 1cbdc6f368 objtool: Fix UNWIND_HINT_{SAVE,RESTORE} across basic blocks
[ Upstream commit 10b4c4bce3 ]

If SAVE and RESTORE unwind hints are in different basic blocks, and
objtool sees the RESTORE before the SAVE, it errors out with:

  vmlinux.o: warning: objtool: vmw_port_hb_in+0x242: objtool isn't smart enough to handle this CFI save/restore combo

In such a case, defer following the RESTORE block until the
straight-line path gets followed later.

Fixes: 8faea26e61 ("objtool: Re-add UNWIND_HINT_{SAVE_RESTORE}")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402240702.zJFNmahW-lkp@intel.com/
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Link: https://lore.kernel.org/r/20240227073527.avcm5naavbv3cj5s@treble
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:19:35 -04:00
..
Documentation objtool: Move noreturn function list to separate file 2023-05-16 06:31:55 -07:00
arch x86/cpu: Rename original retbleed methods 2023-08-16 21:47:53 +02:00
include/objtool objtool/x86: Fix SRSO mess 2023-08-16 09:39:16 +02:00
.gitignore
Build
Makefile
builtin-check.c objtool: Add verbose option for disassembling affected functions 2023-05-16 06:31:51 -07:00
check.c objtool: Fix UNWIND_HINT_{SAVE,RESTORE} across basic blocks 2024-03-26 18:19:35 -04:00
elf.c objtool: initialize all of struct elf 2023-07-10 09:52:28 +02:00
noreturns.h cred: get rid of CONFIG_DEBUG_CREDENTIALS 2023-12-20 17:01:51 +01:00
objtool.c objtool: Propagate early errors 2023-11-20 11:58:52 +01:00
orc_dump.c
orc_gen.c objtool: Add elf_create_section_pair() 2023-06-07 10:03:17 -07:00
special.c objtool: Get rid of reloc->addend 2023-06-07 10:03:23 -07:00
sync-check.sh
weak.c