blob: 945a0337fbcf54c8da8eb5ee49916886704e3947 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Vegard Nossumdfec0722008-04-04 00:51:41 +02002#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
9bool kmemcheck_active(struct pt_regs *regs);
10
11void kmemcheck_show(struct pt_regs *regs);
12void kmemcheck_hide(struct pt_regs *regs);
13
14bool kmemcheck_fault(struct pt_regs *regs,
15 unsigned long address, unsigned long error_code);
16bool kmemcheck_trap(struct pt_regs *regs);
17#else
18static inline bool kmemcheck_active(struct pt_regs *regs)
19{
20 return false;
21}
22
23static inline void kmemcheck_show(struct pt_regs *regs)
24{
25}
26
27static inline void kmemcheck_hide(struct pt_regs *regs)
28{
29}
30
31static inline bool kmemcheck_fault(struct pt_regs *regs,
32 unsigned long address, unsigned long error_code)
33{
34 return false;
35}
36
37static inline bool kmemcheck_trap(struct pt_regs *regs)
38{
39 return false;
40}
41#endif /* CONFIG_KMEMCHECK */
42
43#endif