From: "Michael S. Tsirkin" <mst@redhat.com>
To: David Stevens <dlstevens@us.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>,
David Woodhouse <David.Woodhouse@intel.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
netdev-owner@vger.kernel.org, Paul Moore <paul.moore@hp.com>,
sri@linux.vnet.ibm.com
Subject: Re: [PATCH RFC] tun: add ioctl to modify vnet header size
Date: Thu, 18 Mar 2010 00:11:17 +0200 [thread overview]
Message-ID: <20100317221117.GA7541@redhat.com> (raw)
In-Reply-To: <OFB24B6EEE.B788B01F-ON882576E9.00789167-882576E9.0079198A@us.ibm.com>
On Wed, Mar 17, 2010 at 03:02:44PM -0700, David Stevens wrote:
> netdev-owner@vger.kernel.org wrote on 03/17/2010 02:35:04 PM:
>
> > On Wed, Mar 17, 2010 at 02:10:11PM -0700, David Stevens wrote:
> > > Shouldn't we enforce a maximum too? Esp. if overflow/underflow
> > > will break any of the checks when it's used.
> > >
> > > +-DLS
> >
> > So the maximum is MAX_INT :)
> > I don't think it can break any checks that aren't
> > already broken - what do you have in mind?
>
> I was thinking more like a page. At least, it'd be better
> to fail when trying to set it large than failing allocations
> later. As a header, it really ought to be small.
> But if it works, or fails gracefully, at 2^31-1 on 32-bit
> machines, negative values, etc, then it's ok. Just a suggestion.
>
> +-DLS
All this does is set how much of the buffer to skip, this option does
not allocate any memory. So if you set it to a value > length that you
passed in, you get -EINVAL. Anything else should work. Negative values
are checked for and return -EINVAL when you try to set it. At least,
all that's by design - pls take a look at the code and if you see any
issues, speak up please.
I agree we don't really need to support very large values here,
it just seemed less work.
--
MST
next prev parent reply other threads:[~2010-03-17 22:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 15:45 [PATCH RFC] tun: add ioctl to modify vnet header size Michael S. Tsirkin
2010-03-17 21:10 ` David Stevens
2010-03-17 21:35 ` Michael S. Tsirkin
2010-03-17 22:02 ` David Stevens
2010-03-17 22:11 ` Michael S. Tsirkin [this message]
2010-03-22 3:17 ` David Miller
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=20100317221117.GA7541@redhat.com \
--to=mst@redhat.com \
--cc=David.Woodhouse@intel.com \
--cc=davem@davemloft.net \
--cc=dlstevens@us.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev-owner@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paul.moore@hp.com \
--cc=sri@linux.vnet.ibm.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).