lkml.org 
[lkml]   [2009]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] core, x86: make LIST_POISON less deadly
Hi Linus,

On Sun, 20 Dec 2009 15:22:30 +0200 Avi Kivity <avi@redhat.com> wrote:
>
> From: Avi Kivity <avi@qumranet.com>
>
> 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>

The above fixed version of this patch has been in linux-next (via the tip
tree) for one year minus one day.

--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-12-28 02:13    [W:0.032 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site