xref: /openbmc/linux/arch/x86/include/asm/cfi.h (revision 3db55767)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_CFI_H
3 #define _ASM_X86_CFI_H
4 
5 /*
6  * Clang Control Flow Integrity (CFI) support.
7  *
8  * Copyright (C) 2022 Google LLC
9  */
10 
11 #include <linux/cfi.h>
12 
13 #ifdef CONFIG_CFI_CLANG
14 enum bug_trap_type handle_cfi_failure(struct pt_regs *regs);
15 #else
16 static inline enum bug_trap_type handle_cfi_failure(struct pt_regs *regs)
17 {
18 	return BUG_TRAP_TYPE_NONE;
19 }
20 #endif /* CONFIG_CFI_CLANG */
21 
22 #endif /* _ASM_X86_CFI_H */
23