9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: quanstro@labs.coraid.com (erik quanstrom)
Subject: [9fans] problem with rminnich's 9vx
Date: Tue, 29 Mar 2011 15:05:06 -0400	[thread overview]
Message-ID: <f0c2709cec07d0b5d9859559cee4d03c@coraid.com> (raw)
In-Reply-To: <93e7f16f74e02c457615970a0b22d7fd@terzarima.net>

On Tue Mar 29 12:48:21 EDT 2011, forsyth at terzarima.net wrote:
> in fact, even 64k might be too big a value for the given buf if it's near the
> top of memory (eg, a local variable on a stack that's in high memory);
> the PowerPC reference in the original comment is misleading because that
> was just a particular system where the general problem appeared.

if that's the case, isn't this already a bug.  the stack doesn't go past
the end of memory, so how could sprint(buf, "x") not overwrite junk
past the end of the stack anyway?

also, since this is the kernel, you either get a 4k or a 4k - sizeof(Mach)
structure (depending on if up is set or not), so the maximum sprint
to something on the stack is always going to be < 4k.

- erik



  reply	other threads:[~2011-03-29 19:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29  9:00 Mathieu Lonjaret
2011-03-29  9:18 ` Noah Evans
2011-03-29  9:25   ` Mathieu Lonjaret
2011-03-29  9:33     ` Noah Evans
2011-03-29  9:47 ` yy
2011-03-29 11:49   ` Mathieu Lonjaret
2011-03-29 15:06 ` Christoph Lohmann
2011-03-29 15:42   ` Mathieu Lonjaret
2011-03-29 16:09     ` ron minnich
2011-03-29 16:20       ` Mathieu Lonjaret
2011-03-29 17:16         ` ron minnich
2011-03-29 20:25           ` Charles Forsyth
2011-03-29 20:16             ` ron minnich
2011-03-29 16:46       ` yy
2011-03-29 15:16 ` ron minnich
2011-03-29 16:44   ` Charles Forsyth
2011-03-29 17:00     ` Charles Forsyth
2011-03-29 19:05       ` erik quanstrom [this message]
2011-03-29 19:50         ` ron minnich
2011-03-29 20:20         ` Charles Forsyth
2011-03-29 20:55           ` erik quanstrom

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=f0c2709cec07d0b5d9859559cee4d03c@coraid.com \
    --to=quanstro@labs.coraid.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;
as well as URLs for NNTP newsgroup(s).