All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Avi Kivity <avi@qumranet.com>
Cc: Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Make LIST_POISON less deadly
Date: Tue, 20 May 2008 13:24:05 +0200	[thread overview]
Message-ID: <87k5hpgqwa.fsf@basil.nowhere.org> (raw)
In-Reply-To: <1211125094-32167-1-git-send-email-avi@qumranet.com> (Avi Kivity's message of "Sun, 18 May 2008 18:38:14 +0300")

Avi Kivity <avi@qumranet.com> writes:

> 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-undereferncable values.
> This is easy on x86_64 as the virtual address space is smaller than
> the range spanned by pointer values.

Hmm, thought I had sent a reply earlier, but don't see it so again.
My apologies if you see it twice.

The problem with your address values is that they're non canonical
and will result in a #GP, not #PF and oops handler cannot display
the address which will make them much less obvious.

I would rather use a guaranteed to be unmapped but canonical
address like in the ffffc10000000000 - ffffc1ffffffffff range
so that you still get page faults.

-Andi

  parent reply	other threads:[~2008-05-20 11:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-18 15:38 [PATCH] Make LIST_POISON less deadly Avi Kivity
2008-05-19 13:01 ` Ingo Molnar
2008-05-19 13:18   ` Avi Kivity
2008-05-19 13:22     ` Ingo Molnar
2008-05-19 13:35       ` Avi Kivity
2008-05-19 13:45   ` Avi Kivity
2008-05-19 19:04     ` Sam Ravnborg
2008-05-20  7:06       ` Avi Kivity
2008-05-20 11:24 ` Andi Kleen [this message]
2008-05-20 11:34   ` Avi Kivity
2008-05-20 11:49     ` Andi Kleen
2008-05-20 11:52       ` Avi Kivity
2008-05-20 12:04         ` Andi Kleen
2008-05-20 12:04         ` Ingo Molnar
2008-05-20 16:47 ` Pavel Machek
2008-05-20 16:50   ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k5hpgqwa.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=akpm@osdl.org \
    --cc=avi@qumranet.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.