On Tue, Apr 22, 2025 at 02:34:42PM -0400, Steven Rostedt wrote:
> From: Josh Poimboeuf <[email protected]>
> 
> The DWARF .cfi_startproc annotation needs to be at the very beginning of
> a function.  But with kernel IBT that doesn't happen as ENDBR is
> sneakily embedded in SYM_FUNC_START.  As a result the DWARF unwinding
> info is wrong at the beginning of all the VDSO functions.
> 
> Fix it by adding CFI_STARTPROC and CFI_ENDPROC to SYM_FUNC_START_* and
> SYM_FUNC_END respectively.  Note this only affects VDSO, as the CFI_*
> macros are empty for the kernel proper.
> 
> Fixes: c4691712b546 ("x86/linkage: Add ENDBR to SYM_FUNC_START*()")
> Signed-off-by: Josh Poimboeuf <[email protected]>
> [ Fixed rebased issues. May need extra review ]
> Signed-off-by: Steven Rostedt (Google) <[email protected]>
> ---
> Changes since v4: 
> https://lore.kernel.org/all/5c7992c111adee94e242fbca2b3e64ab8e96e595.1737511963.git.jpoim...@kernel.org/
> 
> - Rebased to latest kernel which had changes to the ENDBR caused by:
>   582077c94052 ("x86/cfi: Clean up linkage")

The code looks good, though that bug was already fixed up by
582077c94052 ("x86/cfi: Clean up linkage").  So this is really just a
cleanup now.  The "Fixes" tag can be removed, with the commit log
something like: 

Add CFI_STARTPROC and CFI_ENDPROC annotations to the SYM_FUNC_* macros
so the VDSO asm functions don't need to add them manually.  Note this
only affects VDSO, the CFI_* macros are empty for the kernel proper.

-- 
Josh

Reply via email to