[lkml]   [2021]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v5 03/15] linkage: Add DECLARE_NOT_CALLED_FROM_C
On Wed, Oct 13, 2021 at 11:16:46AM -0700, Sami Tolvanen wrote:
> The kernel has several assembly functions, which are not directly
> callable from C but need to be referred to from C code. This change adds
> the DECLARE_NOT_CALLED_FROM_C macro, which allows us to declare these
> symbols using an opaque type, which makes misuse harder, and avoids the
> need to annotate references to the functions for Clang's Control-Flow
> Integrity (CFI).
> Suggested-by: Andy Lutomirski <>
> Suggested-by: Steven Rostedt <>
> Signed-off-by: Sami Tolvanen <>

I like this; I have a sense CFI won't stay the only user of this

Reviewed-by: Kees Cook <>

Kees Cook

 \ /
  Last update: 2021-10-13 21:00    [W:0.268 / U:2.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site