diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-01-06 10:54:48 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-01-06 10:54:48 +1100 |
commit | 439c4cff34bce913ddf0ace7ad76a82888a0b259 (patch) | |
tree | 44b3ac7296342eb2328024413016ad99643cb89a /include/linux | |
parent | f4e1edf7c901311c1925de7b403673b5c82f1262 (diff) | |
parent | 286c12f72ad295bbc27cfe67b0922bfc09732af7 (diff) |
Merge commit 'safe-poison-pointers/auto-safe-poison-pointers-next'
Diffstat (limited to 'include/linux')
-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..f2de9a999f4a 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 _AC(CONFIG_ILLEGAL_POINTER_VALUE, UL) +#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 **********/ /* |