summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-09-04 12:32:06 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2008-09-04 12:32:06 +1000
commitd1a2f09db4eecb9aea28010e45043469616b63c9 (patch)
treefb588a4d76ada8894dc168f1fb8500a1f8b55622 /include
parent93c5fe335cb79c36f94e81da50bd4c7f83374309 (diff)
parente2705a618c36abd789ccaa15370729290cf170c0 (diff)
Merge commit 'safe-poison-pointers/auto-safe-poison-pointers-next'
Diffstat (limited to 'include')
-rw-r--r--include/linux/poison.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/poison.h b/include/linux/poison.h
index 9f31683728fd..603d3bda31d9 100644
--- a/include/linux/poison.h
+++ b/include/linux/poison.h
@@ -2,13 +2,25 @@
#define _LINUX_POISON_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 CONFIG_ILLEGAL_POINTER_VALUE
+#else
+# define POISON_POINTER_DELTA 0
+#endif
+
/*
* These are non-NULL pointers that will result in page faults
* under normal circumstances, used to verify that nobody uses
* 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 **********/
/*