blob: cfa1039c62e725289cfe74aebb7a36de92b22eb2 [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);
22void lkdtm_ATOMIC_UNDERFLOW(void);
23void lkdtm_ATOMIC_OVERFLOW(void);
Kees Cook6819d102016-08-17 14:42:12 -070024void lkdtm_CORRUPT_LIST_ADD(void);
25void lkdtm_CORRUPT_LIST_DEL(void);
Kees Cook00f496c2016-06-26 22:17:25 -070026
Kees Cookffc514f2016-06-26 21:45:23 -070027/* lkdtm_heap.c */
28void lkdtm_OVERWRITE_ALLOCATION(void);
29void lkdtm_WRITE_AFTER_FREE(void);
30void lkdtm_READ_AFTER_FREE(void);
31void lkdtm_WRITE_BUDDY_AFTER_FREE(void);
32void lkdtm_READ_BUDDY_AFTER_FREE(void);
33
Kees Cook0d9eb292016-06-26 15:12:31 -070034/* lkdtm_perms.c */
35void __init lkdtm_perms_init(void);
36void lkdtm_WRITE_RO(void);
37void lkdtm_WRITE_RO_AFTER_INIT(void);
38void lkdtm_WRITE_KERN(void);
39void lkdtm_EXEC_DATA(void);
40void lkdtm_EXEC_STACK(void);
41void lkdtm_EXEC_KMALLOC(void);
42void lkdtm_EXEC_VMALLOC(void);
43void lkdtm_EXEC_RODATA(void);
44void lkdtm_EXEC_USERSPACE(void);
45void lkdtm_ACCESS_USERSPACE(void);
46
Kees Cooka3dff712016-06-26 08:46:23 -070047/* lkdtm_rodata.c */
Kees Cook9a49a522016-02-22 14:09:29 -080048void lkdtm_rodata_do_nothing(void);
49
Kees Cooka3dff712016-06-26 08:46:23 -070050/* lkdtm_usercopy.c */
51void __init lkdtm_usercopy_init(void);
52void __exit lkdtm_usercopy_exit(void);
53void lkdtm_USERCOPY_HEAP_SIZE_TO(void);
54void lkdtm_USERCOPY_HEAP_SIZE_FROM(void);
55void lkdtm_USERCOPY_HEAP_FLAG_TO(void);
56void lkdtm_USERCOPY_HEAP_FLAG_FROM(void);
57void lkdtm_USERCOPY_STACK_FRAME_TO(void);
58void lkdtm_USERCOPY_STACK_FRAME_FROM(void);
59void lkdtm_USERCOPY_STACK_BEYOND(void);
60void lkdtm_USERCOPY_KERNEL(void);
61
Kees Cook9a49a522016-02-22 14:09:29 -080062#endif