summaryrefslogtreecommitdiff
path: root/drivers/misc/lkdtm.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2016-07-16 02:04:39 +0300
committerKees Cook <keescook@chromium.org>2016-07-16 02:14:45 +0300
commit6d2e91a662256fd88ec0505567a59d21094ed415 (patch)
tree97c6a4c79a66ffa019f1c648e81fcef687e97fb1 /drivers/misc/lkdtm.h
parent2b271cb7203dd4dcea991119367df2ed7e66f3c7 (diff)
downloadlinux-6d2e91a662256fd88ec0505567a59d21094ed415.tar.xz
lkdtm: silence warnings about function declarations
When building under W=1, the lack of lkdtm.h in lkdtm_usercopy.c and lkdtm_rodata.c was discovered. This fixes the issue and consolidates the common header and the pr_fmt macro for simplicity and regularity across each test source file. Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/misc/lkdtm.h')
-rw-r--r--drivers/misc/lkdtm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/misc/lkdtm.h b/drivers/misc/lkdtm.h
index d70a41741bb3..fdf954c2107f 100644
--- a/drivers/misc/lkdtm.h
+++ b/drivers/misc/lkdtm.h
@@ -1,6 +1,10 @@
#ifndef __LKDTM_H
#define __LKDTM_H
+#define pr_fmt(fmt) "lkdtm: " fmt
+
+#include <linux/kernel.h>
+
/* lkdtm_bugs.c */
void __init lkdtm_bugs_init(int *recur_param);
void lkdtm_PANIC(void);
@@ -53,5 +57,4 @@ void lkdtm_USERCOPY_STACK_FRAME_FROM(void);
void lkdtm_USERCOPY_STACK_BEYOND(void);
void lkdtm_USERCOPY_KERNEL(void);
-
#endif