Kees Cook | 9a49a52 | 2016-02-22 14:09:29 -0800 | [diff] [blame] | 1 | #ifndef __LKDTM_H |
| 2 | #define __LKDTM_H |
| 3 | |
Kees Cook | 6d2e91a | 2016-07-15 16:04:39 -0700 | [diff] [blame] | 4 | #define pr_fmt(fmt) "lkdtm: " fmt |
| 5 | |
| 6 | #include <linux/kernel.h> |
| 7 | |
Kees Cook | 00f496c | 2016-06-26 22:17:25 -0700 | [diff] [blame] | 8 | /* lkdtm_bugs.c */ |
| 9 | void __init lkdtm_bugs_init(int *recur_param); |
| 10 | void lkdtm_PANIC(void); |
| 11 | void lkdtm_BUG(void); |
| 12 | void lkdtm_WARNING(void); |
| 13 | void lkdtm_EXCEPTION(void); |
| 14 | void lkdtm_LOOP(void); |
| 15 | void lkdtm_OVERFLOW(void); |
| 16 | void lkdtm_CORRUPT_STACK(void); |
| 17 | void lkdtm_UNALIGNED_LOAD_STORE_WRITE(void); |
| 18 | void lkdtm_SOFTLOCKUP(void); |
| 19 | void lkdtm_HARDLOCKUP(void); |
| 20 | void lkdtm_SPINLOCKUP(void); |
| 21 | void lkdtm_HUNG_TASK(void); |
Kees Cook | ff86b30 | 2017-02-03 15:26:50 -0800 | [diff] [blame] | 22 | void lkdtm_REFCOUNT_SATURATE_INC(void); |
| 23 | void lkdtm_REFCOUNT_SATURATE_ADD(void); |
| 24 | void lkdtm_REFCOUNT_ZERO_DEC(void); |
| 25 | void lkdtm_REFCOUNT_ZERO_INC(void); |
| 26 | void lkdtm_REFCOUNT_ZERO_SUB(void); |
| 27 | void lkdtm_REFCOUNT_ZERO_ADD(void); |
Kees Cook | 6819d10 | 2016-08-17 14:42:12 -0700 | [diff] [blame] | 28 | void lkdtm_CORRUPT_LIST_ADD(void); |
| 29 | void lkdtm_CORRUPT_LIST_DEL(void); |
Kees Cook | e22aa9d | 2017-03-24 10:51:25 -0700 | [diff] [blame] | 30 | void lkdtm_CORRUPT_USER_DS(void); |
Kees Cook | 00f496c | 2016-06-26 22:17:25 -0700 | [diff] [blame] | 31 | |
Kees Cook | ffc514f | 2016-06-26 21:45:23 -0700 | [diff] [blame] | 32 | /* lkdtm_heap.c */ |
| 33 | void lkdtm_OVERWRITE_ALLOCATION(void); |
| 34 | void lkdtm_WRITE_AFTER_FREE(void); |
| 35 | void lkdtm_READ_AFTER_FREE(void); |
| 36 | void lkdtm_WRITE_BUDDY_AFTER_FREE(void); |
| 37 | void lkdtm_READ_BUDDY_AFTER_FREE(void); |
| 38 | |
Kees Cook | 0d9eb29 | 2016-06-26 15:12:31 -0700 | [diff] [blame] | 39 | /* lkdtm_perms.c */ |
| 40 | void __init lkdtm_perms_init(void); |
| 41 | void lkdtm_WRITE_RO(void); |
| 42 | void lkdtm_WRITE_RO_AFTER_INIT(void); |
| 43 | void lkdtm_WRITE_KERN(void); |
| 44 | void lkdtm_EXEC_DATA(void); |
| 45 | void lkdtm_EXEC_STACK(void); |
| 46 | void lkdtm_EXEC_KMALLOC(void); |
| 47 | void lkdtm_EXEC_VMALLOC(void); |
| 48 | void lkdtm_EXEC_RODATA(void); |
| 49 | void lkdtm_EXEC_USERSPACE(void); |
| 50 | void lkdtm_ACCESS_USERSPACE(void); |
| 51 | |
Kees Cook | a3dff71 | 2016-06-26 08:46:23 -0700 | [diff] [blame] | 52 | /* lkdtm_rodata.c */ |
Kees Cook | 9a49a52 | 2016-02-22 14:09:29 -0800 | [diff] [blame] | 53 | void lkdtm_rodata_do_nothing(void); |
| 54 | |
Kees Cook | a3dff71 | 2016-06-26 08:46:23 -0700 | [diff] [blame] | 55 | /* lkdtm_usercopy.c */ |
| 56 | void __init lkdtm_usercopy_init(void); |
| 57 | void __exit lkdtm_usercopy_exit(void); |
| 58 | void lkdtm_USERCOPY_HEAP_SIZE_TO(void); |
| 59 | void lkdtm_USERCOPY_HEAP_SIZE_FROM(void); |
| 60 | void lkdtm_USERCOPY_HEAP_FLAG_TO(void); |
| 61 | void lkdtm_USERCOPY_HEAP_FLAG_FROM(void); |
| 62 | void lkdtm_USERCOPY_STACK_FRAME_TO(void); |
| 63 | void lkdtm_USERCOPY_STACK_FRAME_FROM(void); |
| 64 | void lkdtm_USERCOPY_STACK_BEYOND(void); |
| 65 | void lkdtm_USERCOPY_KERNEL(void); |
| 66 | |
Kees Cook | 9a49a52 | 2016-02-22 14:09:29 -0800 | [diff] [blame] | 67 | #endif |