Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@oss.sgi.com>
To: Quinn Jensen <jensenq@Lineo.COM>
Cc: Erik Andersen <andersen@Lineo.COM>,
	Michael Shmulevich <michaels@jungo.com>,
	busybox@opensource.lineo.com,
	"linux-mips@oss.sgi.com" <linux-mips@oss.sgi.com>
Subject: Re: [BusyBox] 0.48 - Can't mount /proc
Date: Tue, 16 Jan 2001 05:13:29 -0200	[thread overview]
Message-ID: <20010116051329.C2068@bacchus.dhis.org> (raw)
In-Reply-To: <3A5DD6A8.1040600@Lineo.COM>; from jensenq@Lineo.COM on Thu, Jan 11, 2001 at 08:52:08AM -0700

On Thu, Jan 11, 2001 at 08:52:08AM -0700, Quinn Jensen wrote:

> Here's a kernel patch.  The __access_ok macro looks one byte
> too far and fails.  Since copy_mount_options() isn't
> sure how long the string arguments are, it just copies
> to the end of the page.  Since this is on busybox's
> stack, the copy wants to go all the way to 0x7FFFFFF
> and hits this corner case.

I don't like this solution as it inflates the kernel noticably.  Actually
even the bug itself hasn't been one; this off by one mistake was deliberatly
accepted in the - obviously wrong - assumption that nobody would ever try to
use the last byte of userspace.  See also the Alpha variant of the code;
looks like they suffer from the same problem.

My solution will be to truncate userspace by by at least 4kb.  I've choosen
to even truncate it by 32kb; this will also make the layout of the address
space for 32-bit processes on 64-bit kernels and 32-bit kernel identical
again.

  Ralf

  parent reply	other threads:[~2001-01-16  7:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3A5CAC53.60700@jungo.com>
     [not found] ` <20010110122159.A24714@lineo.com>
2001-01-11  7:28   ` [BusyBox] 0.48 - Can't mount /proc Michael Shmulevich
2001-01-11  7:28     ` Michael Shmulevich
2001-01-11 11:48     ` Erik Andersen
2001-01-11 12:04       ` Florian Lohoff
2001-01-11 15:52         ` Quinn Jensen
2001-01-11 15:52           ` Quinn Jensen
2001-01-16  7:13           ` Ralf Baechle [this message]
2001-01-11 20:25     ` Ralf Baechle

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=20010116051329.C2068@bacchus.dhis.org \
    --to=ralf@oss.sgi.com \
    --cc=andersen@Lineo.COM \
    --cc=busybox@opensource.lineo.com \
    --cc=jensenq@Lineo.COM \
    --cc=linux-mips@oss.sgi.com \
    --cc=michaels@jungo.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox