blob: 67d27be60405489580e7d794ae4263984301e98a [file] [log] [blame]
Kees Cook9a49a522016-02-22 14:09:29 -08001#ifndef __LKDTM_H
2#define __LKDTM_H
3
Kees Cook6d2e91a2016-07-15 16:04:39 -07004#define pr_fmt(fmt) "lkdtm: " fmt
5
6#include <linux/kernel.h>
7
Kees Cook00f496c2016-06-26 22:17:25 -07008/* lkdtm_bugs.c */
9void __init lkdtm_bugs_init(int *recur_param);
10void lkdtm_PANIC(void);
11void lkdtm_BUG(void);
12void lkdtm_WARNING(void);
13void lkdtm_EXCEPTION(void);
14void lkdtm_LOOP(void);
15void lkdtm_OVERFLOW(void);
16void lkdtm_CORRUPT_STACK(void);
17void lkdtm_UNALIGNED_LOAD_STORE_WRITE(void);
18void lkdtm_SOFTLOCKUP(void);
19void lkdtm_HARDLOCKUP(void);
20void lkdtm_SPINLOCKUP(void);
21void lkdtm_HUNG_TASK(void);
Kees Cookff86b302017-02-03 15:26:50 -080022void lkdtm_REFCOUNT_SATURATE_INC(void);
23void lkdtm_REFCOUNT_SATURATE_ADD(void);
24void lkdtm_REFCOUNT_ZERO_DEC(void);
25void lkdtm_REFCOUNT_ZERO_INC(void);
26void lkdtm_REFCOUNT_ZERO_SUB(void);
27void lkdtm_REFCOUNT_ZERO_ADD(void);
Kees Cook6819d102016-08-17 14:42:12 -070028void lkdtm_CORRUPT_LIST_ADD(void);
29void lkdtm_CORRUPT_LIST_DEL(void);
Kees Cook00f496c2016-06-26 22:17:25 -070030
Kees Cookffc514f2016-06-26 21:45:23 -070031/* lkdtm_heap.c */
32void lkdtm_OVERWRITE_ALLOCATION(void);
33void lkdtm_WRITE_AFTER_FREE(void);
34void lkdtm_READ_AFTER_FREE(void);
35void lkdtm_WRITE_BUDDY_AFTER_FREE(void);
36void lkdtm_READ_BUDDY_AFTER_FREE(void);
37
Kees Cook0d9eb292016-06-26 15:12:31 -070038/* lkdtm_perms.c */
39void __init lkdtm_perms_init(void);
40void lkdtm_WRITE_RO(void);
41void lkdtm_WRITE_RO_AFTER_INIT(void);
42void lkdtm_WRITE_KERN(void);
43void lkdtm_EXEC_DATA(void);
44void lkdtm_EXEC_STACK(void);
45void lkdtm_EXEC_KMALLOC(void);
46void lkdtm_EXEC_VMALLOC(void);
47void lkdtm_EXEC_RODATA(void);
48void lkdtm_EXEC_USERSPACE(void);
49void lkdtm_ACCESS_USERSPACE(void);
50
Kees Cooka3dff712016-06-26 08:46:23 -070051/* lkdtm_rodata.c */
Kees Cook9a49a522016-02-22 14:09:29 -080052void lkdtm_rodata_do_nothing(void);
53
Kees Cooka3dff712016-06-26 08:46:23 -070054/* lkdtm_usercopy.c */
55void __init lkdtm_usercopy_init(void);
56void __exit lkdtm_usercopy_exit(void);
57void lkdtm_USERCOPY_HEAP_SIZE_TO(void);
58void lkdtm_USERCOPY_HEAP_SIZE_FROM(void);
59void lkdtm_USERCOPY_HEAP_FLAG_TO(void);
60void lkdtm_USERCOPY_HEAP_FLAG_FROM(void);
61void lkdtm_USERCOPY_STACK_FRAME_TO(void);
62void lkdtm_USERCOPY_STACK_FRAME_FROM(void);
63void lkdtm_USERCOPY_STACK_BEYOND(void);
64void lkdtm_USERCOPY_KERNEL(void);
65
Kees Cook9a49a522016-02-22 14:09:29 -080066#endif