From: Eric Dumazet <eric.dumazet@gmail.com>
To: Rick Jones <rick.jones2@hp.com>
Cc: David Miller <davem@davemloft.net>,
remi@remlab.net, levinsasha928@gmail.com,
remi.denis-courmont@nokia.com, davej@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] phonet: Check input from user before allocating
Date: Tue, 03 Apr 2012 05:14:04 +0200 [thread overview]
Message-ID: <1333422844.18626.26.camel@edumazet-glaptop> (raw)
In-Reply-To: <4F7A62FE.2050103@hp.com>
On Mon, 2012-04-02 at 19:39 -0700, Rick Jones wrote:
> On 04/02/2012 07:34 PM, Eric Dumazet wrote:
> > On Mon, 2012-04-02 at 19:29 -0700, Rick Jones wrote:
> >> I don't know it isn't entirely bitrotted, but there are streaming and
> >> datagram AF_UNIX tests in netperf - they require conditional inclusion
> >> via ./configure --enable-unixdomain:
> >>
> >> http://www.netperf.org/svn/netperf2/trunk/doc/netperf.html#DG_005fSTREAM
> >>
> >
> > Ah yes of course, I'll try that.
> >
It seems netperf has some problems zith AF_UNIX dgram :
socket(PF_FILE, SOCK_DGRAM, 0) = 4
setsockopt(4, SOL_SOCKET, SO_SNDBUF, [0], 4) = 0
getsockopt(4, SOL_SOCKET, SO_SNDBUF, [2048], [4]) = 0
setsockopt(4, SOL_SOCKET, SO_RCVBUF, [0], 4) = 0
getsockopt(4, SOL_SOCKET, SO_RCVBUF, [2288], [4]) = 0
sendto(3, "\0\0\0+\377\377\377\377\0\0\0\0\0\0\10\0\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0"..., 256, 0, NULL, 0) = 256
select(1024, [3], NULL, NULL, {120, 0}) = 1 (in [3], left {119, 979635})
recvfrom(3, "\0\0\0,\0\0\0\0\0\0\10\360\0\0\10\0\0\0\0\0\0\0\0\n\0\0\0\0\0\0\0\0"..., 256, 0, NULL, NULL) = 256
connect(4, {sa_family=AF_FILE, path="/tmp/netpe62HGNM"}, 110) = 0
rt_sigaction(SIGALRM, {0x403171, [ALRM], SA_RESTORER|SA_INTERRUPT, 0x7f691f026af0}, NULL, 8) = 0
alarm(10) = 0
sendto(4, "netperf\0netperf\0netperf\0netperf\0"..., 2048, 0, NULL, 0) = -1 EMSGSIZE (Message too long)
dup(2) = 5
fcntl(5, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(5, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 3), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f691fa18000
lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(5, "dg_send: data send error: Messag"..., 43dg_send: data send error: Message too long
) = 43
close(5) = 0
munmap(0x7f691fa18000, 4096) = 0
exit_group(1) = ?
I guess the SO_SNDBUF/SO_RCVBUF limits are a bit too low ?
Tried this on an old kernel as well.
Linux edumazet-glaptop 2.6.38-13-generic #57~lucid1-Ubuntu SMP Tue Mar 6 20:05:46 UTC 2012 x86_64 GNU/Linux
next prev parent reply other threads:[~2012-04-03 3:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 20:31 [PATCH] phonet: Check input from user before allocating Sasha Levin
2012-04-02 19:00 ` Rémi Denis-Courmont
2012-04-02 21:38 ` David Miller
2012-04-02 19:01 ` Rémi Denis-Courmont
2012-04-02 21:40 ` David Miller
2012-04-03 1:53 ` Eric Dumazet
2012-04-03 1:59 ` David Miller
2012-04-03 2:15 ` Eric Dumazet
2012-04-03 2:23 ` David Miller
2012-04-03 2:29 ` Eric Dumazet
2012-04-03 2:29 ` Rick Jones
2012-04-03 2:34 ` Eric Dumazet
2012-04-03 2:39 ` Rick Jones
2012-04-03 3:14 ` Eric Dumazet [this message]
2012-04-03 18:18 ` Rick Jones
2012-04-03 15:28 ` [PATCH v2 net-next] af_unix: reduce high order page allocations Eric Dumazet
2012-04-03 20:43 ` David Miller
2012-04-03 6:36 ` [PATCH] phonet: Check input from user before allocating Rémi Denis-Courmont
2012-04-03 6:38 ` 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=1333422844.18626.26.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davej@redhat.com \
--cc=davem@davemloft.net \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=remi.denis-courmont@nokia.com \
--cc=remi@remlab.net \
--cc=rick.jones2@hp.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