diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-06-26 11:41:13 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-06-26 11:41:13 +1000 |
commit | e622d212de04a24e2a6412b5a549ca9973a91dd9 (patch) | |
tree | 8832ec4e9fef939b074a2bfba820b02b72b40a77 | |
parent | 3a7f2e03b18e1f662b071d06f134bb53e456c860 (diff) | |
parent | 5d641e7bbb8ed48f231bc902eecab2cc598f34a4 (diff) |
Merge commit 'safe-poison-pointers/auto-safe-poison-pointers-next'
-rw-r--r-- | arch/x86/Kconfig | 5 | ||||
-rw-r--r-- | include/linux/poison.h | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 400135148555..2969f5d2265a 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1021,6 +1021,11 @@ config ARCH_MEMORY_PROBE def_bool X86_64 depends on MEMORY_HOTPLUG +config ILLEGAL_POINTER_VALUE + hex + default 0 if X86_32 + default 0xffffc10000000000 if X86_64 + source "mm/Kconfig" config HIGHPTE diff --git a/include/linux/poison.h b/include/linux/poison.h index 9f31683728fd..0d105a56e668 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h @@ -1,14 +1,20 @@ #ifndef _LINUX_POISON_H #define _LINUX_POISON_H +#ifdef CONFIG_ILLEGAL_POINTER_VALUE +#define POISON_POINTER_DELTA CONFIG_ILLEGAL_POINTER_VALUE +#else +#define POISON_POINTER_DELTA 0L +#endif + /********** include/linux/list.h **********/ /* * 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 **********/ /* |