Re: [PATCH v3 09/16] x86: Use an opaque type for functions not callable from C

From: Kees Cook
Date: Tue Sep 14 2021 - 15:33:38 EST


On Tue, Sep 14, 2021 at 12:10:38PM -0700, Sami Tolvanen wrote:
> The kernel has several assembly functions that are not directly callable
> from C. Use an opaque type for these function prototypes to make misuse
> harder, and to avoid the need to annotate references to these functions
> for Clang's Control-Flow Integrity (CFI).
>
> Suggested-by: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
> Suggested-by: Alexander Lobakin <alobakin@xxxxx>
> Signed-off-by: Sami Tolvanen <samitolvanen@xxxxxxxxxx>

This looks clean to me.

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

--
Kees Cook