From: Nelson Elhage <nelhage@ksplice.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
robert.olsson@its.uu.se, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, eugene@redhat.com
Subject: Re: [PATCH] pktgen: Remove a dangerous debug print.
Date: Wed, 27 Oct 2010 15:49:05 -0400 [thread overview]
Message-ID: <20101027194905.GQ16803@ksplice.com> (raw)
In-Reply-To: <1288208499.2658.19.camel@edumazet-laptop>
I tested this and was able to oops both amd64 and i386 test machines with 8k
writes to the pktgen file. I haven't investigated whether that's because there's
no PAGE_SIZE limit, or because one page ends up being enough to cause a problem
on all my test machines.
- Nelson
On Wed, Oct 27, 2010 at 09:41:39PM +0200, Eric Dumazet wrote:
> Le mercredi 27 octobre 2010 à 15:28 -0400, Nelson Elhage a écrit :
> > How would you feel about limiting the debug print to at most, say, 512 or 1024
> > bytes? Even if it's only accessible to root by default, I don't a userspace
> > program should be able to accidentally corrupt the kernel stack by writing too
> > many bytes to a file in /proc.
>
> Arent /proc writes limited to PAGE_SIZE anyway ?
>
> On x86 at least, you cannot corrupt kernel stack, since its bigger than
> PAGE_SIZE.
>
> I agree pktgen code is a bit ugly and needs a cleanup, but who
> cares ? :)
>
>
>
>
next prev parent reply other threads:[~2010-10-27 19:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 19:13 [PATCH] pktgen: Remove a dangerous debug print Nelson Elhage
2010-10-27 19:21 ` David Miller
2010-10-27 19:28 ` Nelson Elhage
2010-10-27 19:30 ` David Miller
2010-10-27 19:41 ` Eric Dumazet
2010-10-27 19:49 ` Nelson Elhage [this message]
2010-10-27 20:38 ` Ben Greear
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=20101027194905.GQ16803@ksplice.com \
--to=nelhage@ksplice.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=eugene@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robert.olsson@its.uu.se \
/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