From: Ralf Baechle <ralf@linux-mips.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@redhat.com>,
Linux Arch list <linux-arch@vger.kernel.org>
Subject: Re: copy_mount_options()
Date: Sun, 22 Aug 2004 13:50:14 +0200 [thread overview]
Message-ID: <20040822115014.GA29005@linux-mips.org> (raw)
In-Reply-To: <1093043745.9529.254.camel@gaston>
On Sat, Aug 21, 2004 at 09:15:46AM +1000, Benjamin Herrenschmidt wrote:
> > Basically, copy_mount_options() requires exact byte granularity
> > to exception reporting from copy_from_user(). If you don't
> > do this it can break things like busybox's mount().
>
> Yup, old problem, reported before several times. Another issue
> that pops up with it and busybox is that copy_mount_options will
> touch an entire page from the passed pointer. If the pointer you
> pass is near the end of your data/bss area, you end up touching
> the area between stack and bss, and potentially cause the stack
> to grow all the way down to the bss.
On MIPS it's been triggering a special case in verify_area which make
it return -EFAULT if the arguments area includes the last byte of the
2GB userspace as busybox does. A proper fix of verify_area would have
inflated the verify_area() code by one instruction so I reduced
TASK_SIZE a bit ...
Ralf
prev parent reply other threads:[~2004-08-22 11:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-20 20:01 copy_mount_options() David S. Miller
2004-08-20 20:10 ` copy_mount_options() Andrew Morton
2004-08-20 21:11 ` copy_mount_options() David S. Miller
2004-08-20 21:31 ` copy_mount_options() Andrew Morton
2004-08-20 21:40 ` copy_mount_options() David S. Miller
2004-08-20 22:47 ` copy_mount_options() Andrew Morton
2004-08-20 23:18 ` copy_mount_options() Anton Blanchard
2004-08-20 23:51 ` copy_mount_options() David S. Miller
2004-08-21 0:07 ` copy_mount_options() Andrew Morton
2004-08-21 7:50 ` copy_mount_options() Rusty Russell
2004-08-20 23:15 ` copy_mount_options() Benjamin Herrenschmidt
2004-08-22 11:50 ` Ralf Baechle [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=20040822115014.GA29005@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=benh@kernel.crashing.org \
--cc=davem@redhat.com \
--cc=linux-arch@vger.kernel.org \
/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