xref: /linux-6.15/include/linux/cfi.h (revision 92efda8e)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Clang Control Flow Integrity (CFI) support.
4  *
5  * Copyright (C) 2021 Google LLC
6  */
7 #ifndef _LINUX_CFI_H
8 #define _LINUX_CFI_H
9 
10 #ifdef CONFIG_CFI_CLANG
11 typedef void (*cfi_check_fn)(uint64_t id, void *ptr, void *diag);
12 
13 /* Compiler-generated function in each module, and the kernel */
14 extern void __cfi_check(uint64_t id, void *ptr, void *diag);
15 
16 #endif /* CONFIG_CFI_CLANG */
17 
18 #endif /* _LINUX_CFI_H */
19