diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-12-01 11:38:01 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-12-01 11:38:01 +1100 |
commit | 26293c83fb02d6234f23e2c30e8e3e4a2e96f27e (patch) | |
tree | 556fdbe93263dc8f9a8cc99513f28059b3335835 /include | |
parent | 08345e32c74ef9dbb5641fe3521b2bf7f246193a (diff) | |
parent | 83b6db87f94969d1da4f71c3400deab1f58da164 (diff) |
Merge commit 'safe-poison-pointers/auto-safe-poison-pointers-next'
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/poison.h | 16 |
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 **********/ /* |