From: Andrew Morton <akpm@linux-foundation.org>
To: netdev@vger.kernel.org
Cc: bugzilla-daemon@bugzilla.kernel.org,
bugme-daemon@bugzilla.kernel.org, bono@onlinehome.de
Subject: Re: [Bugme-new] [Bug 16603] New: send of data > 4 GB fails on 64 bit systems
Date: Mon, 27 Sep 2010 16:15:40 -0700 [thread overview]
Message-ID: <20100927161540.776f748e.akpm@linux-foundation.org> (raw)
In-Reply-To: <bug-16603-10286@https.bugzilla.kernel.org/>
(switched to email. Please respond via emailed reply-to-all, not via the
bugzilla web interface).
On Mon, 16 Aug 2010 10:01:09 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=16603
>
> Summary: send of data > 4 GB fails on 64 bit systems
> Product: Networking
> Version: 2.5
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: IPV4
> AssignedTo: shemminger@linux-foundation.org
> ReportedBy: bono@onlinehome.de
> Regression: No
>
>
> Sending of data using linux function send fails if size is too large. glibc
> function is:
>
> ssize_t send(int sockfd, const void *buf, size_t len, int flags);
>
> Type of len is size_t, argument is stored in a kernel structure msgheader which
> contains an iovec. This iovec contains a size_t (64bit) length field, but in
> the linux kernel in function tcp_sendmsg the following lines
>
> while (--iovlen >= 0) {
> int seglen = iov->iov_len;
> unsigned char __user *from = iov->iov_base;
>
>
> convert the len to int (32 bit).
>
> Thus sending of 5 GB of data results in 1 GB sent (no problem), but sending of
> 4 GB results in 0 bytes sent.
>
> Workaround in userspace is easy (e.g. instead of len use len < 0x8000000 ? len
> : 0x7fffffff) but the kernel should handle this correctly.
>
whoops.
Yes, I think seglen should be size_t. Do you know if making that
change fixes the bug?
next parent reply other threads:[~2010-09-27 23:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-16603-10286@https.bugzilla.kernel.org/>
2010-09-27 23:15 ` Andrew Morton [this message]
2010-09-28 2:41 ` [Bugme-new] [Bug 16603] New: send of data > 4 GB fails on 64 bit systems David Miller
2010-09-28 3:24 ` David Miller
2010-09-28 3:56 ` Andrew Morton
2010-09-28 4:07 ` 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=20100927161540.776f748e.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bono@onlinehome.de \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).