From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, jon.maloy@ericsson.com,
allan.stephens@windriver.com,
Dan Rosenberg <drosenberg@vsecurity.com>
Subject: Re: [PATCH] net: Limit socket I/O iovec total length to INT_MAX.
Date: Fri, 29 Oct 2010 18:32:58 +0100 [thread overview]
Message-ID: <20101029173258.GW19804@ZenIV.linux.org.uk> (raw)
In-Reply-To: <AANLkTi=zieMoDdHgB_aY4xN=A6ErrjUWpaME1WwWrvnL@mail.gmail.com>
On Fri, Oct 29, 2010 at 10:01:19AM -0700, Linus Torvalds wrote:
> On Fri, Oct 29, 2010 at 9:45 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > I don't see anything obviously broken (and we obviously have allowed
> > iov_len == 0 cases all along, so if anything, breakage won't be new).
> > However, I wonder if things like sendmsg() for datagrams have warranties
> > against silent truncation. ?Davem?
>
> You missed that discussion - my argument is that anybody who thinks
> that they can send a single packet that is 2GB+ in size are already
> screwed. And the packet protocol will have some inherent upper limit
> anyway (possibly introduced by just allocation issues, but quite
> likely inherent to the protocol itself)
Sure, but... do we want to send something truncated in that case or
should we just fail? Note that with your change previously deliberately
b0rken iovecs (anything with sum of lengths equal to 1<<31 on 32bit)
will get a chance to be accepted *OR* (much more likely) get rejected with
unexpected error value. It may well be OK, but I'd like to hear from
network folks...
next prev parent reply other threads:[~2010-10-29 17:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-28 18:22 [PATCH] net: Limit socket I/O iovec total length to INT_MAX David Miller
2010-10-28 18:33 ` Linus Torvalds
2010-10-28 18:37 ` David Miller
2010-10-29 6:40 ` Linus Torvalds
2010-10-29 14:00 ` Dan Rosenberg
2010-10-29 15:28 ` Linus Torvalds
2010-10-29 16:21 ` Linus Torvalds
2010-10-29 16:45 ` Al Viro
2010-10-29 17:01 ` Linus Torvalds
2010-10-29 17:32 ` Al Viro [this message]
2010-10-29 19:32 ` David Miller
2010-10-29 19:37 ` Linus Torvalds
2010-10-29 19:55 ` David Miller
2010-10-29 20:22 ` Dan Rosenberg
2010-10-29 18:51 ` Rick Jones
2010-10-29 18:59 ` Linus Torvalds
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=20101029173258.GW19804@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=allan.stephens@windriver.com \
--cc=davem@davemloft.net \
--cc=drosenberg@vsecurity.com \
--cc=jon.maloy@ericsson.com \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.