LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Matthew Keenan <matt@opcode-solutions.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	stable@kernel.org
Subject: Re: Linux 2.6.22.18
Date: Mon, 11 Feb 2008 08:32:14 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.1.00.0802110822450.2920@woody.linux-foundation.org> (raw)
In-Reply-To: <1202729485.24584.5.camel@bazbox.opcode-solutions.com>



On Mon, 11 Feb 2008, Matthew Keenan wrote:
> 
> Maybe I'm missing something here, but is there are reason that the patch
> for 2.6.22 differs from 2.6.2[34]? The "if(unlikely(!base))" is removed
> in the latter.

No real reason, except that there are simply two versions of the patches 
floating around: the original (that added the "access_ok()"), and the one 
I actually applied to the development tree (in which I hand-edited the 
patch to remove the old "!base" comparison, since I thought that one was 
just wrong).

Which one you prefer is probably a matter of taste, and which one you 
ended up picking up is probably a matter of just luck. They are basically 
the same, with the only difference being whether you think NULL is special 
or not. I don't personally think it should be, and if people want to put 
data at their linear address zero, they may have reasons for it (vm86 mode 
is one such reason, things like wine might be another - basically some 
environments may have legacy reasons to think that address 0 can be 
something else than just NULL).

For any *normal* program, this should be totally immaterial, since address 
0 won't be mapped, and you'll just take an EFAULT later. And from the 
security standpoint in this particular case, address 0 is a perfectly 
normal user address, so there is nothing special about it.

[ What _is_ special about address 0 is that if the kernel forgets some 
  NULL pointer check, we'd want to see an oops, not a user space access. 

  But that's really a totally different class of bug, and quite frankly, 
  if you want to disallow people mmap'ing at offset zero, it's an mmap() 
  issue, not anything else. See the new SECURITY_DEFAULT_MMAP_MIN_ADDR 
  thing for that. ]

In this particular case, maybe some -stable person might have felt that 
they just didn't want to change semantics for the NULL pointer, or maybe 
they didn't even notice that what I committed to the development tree was 
slightly changed. It _really_ doesn't matter.

			Linus

      parent reply	other threads:[~2008-02-11 16:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11  7:43 Greg Kroah-Hartman
2008-02-11  7:43 ` Greg Kroah-Hartman
2008-02-11 11:31   ` Matthew Keenan
2008-02-11 15:45     ` Greg KH
2008-02-12 17:48       ` Florian Weimer
2008-02-12 17:50         ` Greg KH
2008-02-11 16:32     ` Linus Torvalds [this message]

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=alpine.LFD.1.00.0802110822450.2920@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@opcode-solutions.com \
    --cc=stable@kernel.org \
    --subject='Re: Linux 2.6.22.18' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).