[PATCH v4 16/21] objtool: Disable CFI warnings

Kees Cook keescook at chromium.org
Wed Aug 31 11:23:34 PDT 2022


On Tue, Aug 30, 2022 at 04:31:24PM -0700, Sami Tolvanen wrote:
> 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 at google.com>

Reviewed-by: Kees Cook <keescook at chromium.org>

-- 
Kees Cook



More information about the linux-arm-kernel mailing list