Re: [PATCH] x86/cfi: Use symmetric SYM_START and SYM_END in __CFI_TYPE()

From: Peter Zijlstra

Date: Thu Jun 11 2026 - 15:29:00 EST


On Thu, Jun 11, 2026 at 05:57:15PM +0200, Jens Remus wrote:
> Commit ccace936eec7 ("x86: Add types to indirectly called assembly
> functions") introduced a x86-specific implementation of __CFI_TYPE()
> using an asymmetric combination of SYM_START() and SYM_FUNC_END() to
> add a symbol to the KCFI type identifier that precedes a function.
>
> This asymmetric combination is an issue if SYM_FUNC_END() ever gets
> extended in a way that requires it to be used symmetrically with
> SYM_FUNC_START*(). For instance to emit DWARF CFI directives that
> denote the start/end of a function. [1]
>
> Use SYM_END() with SYM_T_FUNC instead. No functional change, as the
> generic implementation of SYM_FUNC_END(name) expands into
> SYM_END(name, SYM_T_FUNC).
>
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
> Closes: https://sashiko.dev/#/patchset/20260522110427.2816637-1-jremus@xxxxxxxxxxxxx?part=3 [1]
> Signed-off-by: Jens Remus <jremus@xxxxxxxxxxxxx>

Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>