Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Vegard Nossum | dfec072 | 2008-04-04 00:51:41 +0200 | [diff] [blame] | 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 |