include/linux/poison.h: use POISON_POINTER_DELTA for poison pointers
authorVasily Kulikov <[email protected]>
Sat, 16 Jan 2016 00:57:55 +0000 (16:57 -0800)
committerLinus Torvalds <[email protected]>
Sat, 16 Jan 2016 19:17:22 +0000 (11:17 -0800)
TIMER_ENTRY_STATIC and TAIL_MAPPING are defined as poison pointers which
should point to nowhere.  Redefine them using POISON_POINTER_DELTA
arithmetics to make sure they really point to non-mappable area declared
by the target architecture.

Signed-off-by: Vasily Kulikov <[email protected]>
Acked-by: Thomas Gleixner <[email protected]>
Cc: Solar Designer <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/poison.h

index 76c3b6c38c16e341ce8952ba988543a230d800de..4a27153574e2839546fb40ee8e8afea483e33cef 100644 (file)
  * Magic number "tsta" to indicate a static timer initializer
  * for the object debugging code.
  */
-#define TIMER_ENTRY_STATIC     ((void *) 0x74737461)
+#define TIMER_ENTRY_STATIC     ((void *) 0x300 + POISON_POINTER_DELTA)
 
 /********** mm/debug-pagealloc.c **********/
 #define PAGE_POISON 0xaa
 
 /********** mm/page_alloc.c ************/
 
-#define TAIL_MAPPING   ((void *) 0x01014A11 + POISON_POINTER_DELTA)
+#define TAIL_MAPPING   ((void *) 0x400 + POISON_POINTER_DELTA)
 
 /********** mm/slab.c **********/
 /*