|
@@ -2,13 +2,25 @@
|
|
#define _LINUX_POISON_H
|
|
#define _LINUX_POISON_H
|
|
|
|
|
|
/********** include/linux/list.h **********/
|
|
/********** include/linux/list.h **********/
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * Architectures might want to move the poison pointer offset
|
|
|
|
+ * into some well-recognized area such as 0xdead000000000000,
|
|
|
|
+ * that is also not mappable by user-space exploits:
|
|
|
|
+ */
|
|
|
|
+#ifdef CONFIG_ILLEGAL_POINTER_VALUE
|
|
|
|
+# define POISON_POINTER_DELTA _AC(CONFIG_ILLEGAL_POINTER_VALUE, UL)
|
|
|
|
+#else
|
|
|
|
+# define POISON_POINTER_DELTA 0
|
|
|
|
+#endif
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* These are non-NULL pointers that will result in page faults
|
|
* These are non-NULL pointers that will result in page faults
|
|
* under normal circumstances, used to verify that nobody uses
|
|
* under normal circumstances, used to verify that nobody uses
|
|
* non-initialized list entries.
|
|
* non-initialized list entries.
|
|
*/
|
|
*/
|
|
-#define LIST_POISON1 ((void *) 0x00100100)
|
|
|
|
-#define LIST_POISON2 ((void *) 0x00200200)
|
|
|
|
|
|
+#define LIST_POISON1 ((void *) 0x00100100 + POISON_POINTER_DELTA)
|
|
|
|
+#define LIST_POISON2 ((void *) 0x00200200 + POISON_POINTER_DELTA)
|
|
|
|
|
|
/********** include/linux/timer.h **********/
|
|
/********** include/linux/timer.h **********/
|
|
/*
|
|
/*
|