cfi.h 457 B

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