From: Paul Chavent <Paul.Chavent@onera.fr>
To: Daniel Borkmann <danborkmann@iogearbox.net>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] packet mmap : allow the user to choose tx data offset.
Date: Fri, 19 Oct 2012 15:50:18 +0200 [thread overview]
Message-ID: <50815A9A.7050009@onera.fr> (raw)
In-Reply-To: <CAD6jFURov5oB+ck33JzCYQoBo9mYsEM9c0rHz9gmcgdMKgmwCg@mail.gmail.com>
There is a point where I'm wrong in my last reply :
On 10/19/2012 01:36 PM, Daniel Borkmann wrote:
>> + int off;
>
> For offsets, better use off_t, or here u32. Also, add a newline after
> variable declaration.
i use int because of arithmetics :
off_max = po->tx_ring.frame_size - tp_len;
If the user give a bad tp_len (> po->tx_ring.frame_size), with unsigned
we will probably miss the check that follow :
if (unlikely((off < off_min) || (off_max < off)))
next prev parent reply other threads:[~2012-10-19 13:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 7:21 [PATCH net-next] packet mmap : allow the user to choose tx data offset Paul Chavent
2012-10-19 11:36 ` Daniel Borkmann
2012-10-19 13:43 ` Paul Chavent
2012-10-20 12:39 ` Daniel Borkmann
2012-10-20 17:13 ` pchavent
2012-10-20 17:35 ` Daniel Borkmann
2012-10-19 13:50 ` Paul Chavent [this message]
2012-10-19 14:28 ` Paul Chavent
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=50815A9A.7050009@onera.fr \
--to=paul.chavent@onera.fr \
--cc=danborkmann@iogearbox.net \
--cc=davem@davemloft.net \
--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