Skip to content
Commit 10b4c4bc authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Kees Cook
Browse files

objtool: Fix UNWIND_HINT_{SAVE,RESTORE} across basic blocks



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: 8faea26e ("objtool: Re-add UNWIND_HINT_{SAVE_RESTORE}")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402240702.zJFNmahW-lkp@intel.com/


Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
Link: https://lore.kernel.org/r/20240227073527.avcm5naavbv3cj5s@treble


Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent c5e6d3d8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment