diff options
author | Kees Cook <keescook@chromium.org> | 2016-07-15 16:04:39 -0700 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2016-07-15 16:14:45 -0700 |
commit | 6d2e91a662256fd88ec0505567a59d21094ed415 (patch) | |
tree | 97c6a4c79a66ffa019f1c648e81fcef687e97fb1 /drivers/misc/lkdtm.h | |
parent | 2b271cb7203dd4dcea991119367df2ed7e66f3c7 (diff) | |
download | linux-6d2e91a662256fd88ec0505567a59d21094ed415.tar.gz linux-6d2e91a662256fd88ec0505567a59d21094ed415.tar.bz2 linux-6d2e91a662256fd88ec0505567a59d21094ed415.zip |
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.h | 5 |
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 |