linux/arch
Avi Kivity 5d5890b7cd core, x86: make LIST_POISON less deadly
commit a29815a333 upstream.

The list macros use LIST_POISON1 and LIST_POISON2 as undereferencable
pointers in order to trap erronous use of freed list_heads.  Unfortunately
userspace can arrange for those pointers to actually be dereferencable,
potentially turning an oops to an expolit.

To avoid this allow architectures (currently x86_64 only) to override
the default values for these pointers with truly-undereferencable values.
This is easy on x86_64 as the virtual address space is large and contains
areas that cannot be mapped.

Other 64-bit architectures will likely find similar unmapped ranges.

[ingo: switch to 0xdead000000000000 as the unmapped area]
[ingo: add comments, cleanup]
[jaswinder: eliminate sparse warnings]

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-12 14:57:00 -07:00
..
alpha untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
arm ARM: 6031/1: fix Thumb-2 decompressor 2010-04-26 07:41:24 -07:00
avr32 untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
blackfin FDPIC: Respect PT_GNU_STACK exec protection markings when creating NOMMU stack 2010-02-09 04:50:49 -08:00
cris untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
frv FDPIC: Respect PT_GNU_STACK exec protection markings when creating NOMMU stack 2010-02-09 04:50:49 -08:00
h8300 untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
ia64 KVM: fix the handling of dirty bitmaps to avoid overflows 2010-04-26 07:41:37 -07:00
m32r untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
m68k untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
m68knommu untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
microblaze untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
mips MIPS: Cleanup forgotten label_module_alloc in tlbex.c 2010-04-01 15:58:04 -07:00
mn10300 untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
parisc untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
powerpc powerpc: TIF_ABI_PENDING bit removal 2010-02-09 04:51:02 -08:00
s390 S390: fix single stepped svcs with TRACE_IRQFLAGS=y 2010-02-09 04:50:43 -08:00
score untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
sh sh: Fix FDPIC binary loader 2010-04-26 07:41:17 -07:00
sparc sparc64: Make prom entry spinlock NMI safe. 2010-04-01 15:58:16 -07:00
um x86: Fix breakage of UML from the changes in the rwsem system 2010-04-26 07:41:28 -07:00
x86 core, x86: make LIST_POISON less deadly 2010-05-12 14:57:00 -07:00
xtensa untangle the do_mremap() mess 2010-01-18 10:19:11 -08:00
.gitignore
Kconfig oprofile: remove tracing build dependency 2010-03-15 08:49:47 -07:00