]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - arch/x86/include/asm/kmemcheck.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / arch / x86 / include / asm / kmemcheck.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef ASM_X86_KMEMCHECK_H
3 #define ASM_X86_KMEMCHECK_H
4
5 #include <linux/types.h>
6 #include <asm/ptrace.h>
7
8 #ifdef CONFIG_KMEMCHECK
9 bool kmemcheck_active(struct pt_regs *regs);
10
11 void kmemcheck_show(struct pt_regs *regs);
12 void kmemcheck_hide(struct pt_regs *regs);
13
14 bool kmemcheck_fault(struct pt_regs *regs,
15 unsigned long address, unsigned long error_code);
16 bool kmemcheck_trap(struct pt_regs *regs);
17 #else
18 static inline bool kmemcheck_active(struct pt_regs *regs)
19 {
20 return false;
21 }
22
23 static inline void kmemcheck_show(struct pt_regs *regs)
24 {
25 }
26
27 static inline void kmemcheck_hide(struct pt_regs *regs)
28 {
29 }
30
31 static inline bool kmemcheck_fault(struct pt_regs *regs,
32 unsigned long address, unsigned long error_code)
33 {
34 return false;
35 }
36
37 static inline bool kmemcheck_trap(struct pt_regs *regs)
38 {
39 return false;
40 }
41 #endif /* CONFIG_KMEMCHECK */
42
43 #endif