From: chetan loke <loke.chetan@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kaber@trash.net,
johann.baudy@gnu-log.net, Chetan Loke <lokec@ccs.neu.edu>
Subject: Re: [af-packet 1/2] Enhance af-packet to provide (near zero)lossless packet capture functionality.
Date: Wed, 8 Jun 2011 18:10:02 -0400 [thread overview]
Message-ID: <BANLkTi=_EFRaiPuT=OjwRaJ4XPw0sUhcnA@mail.gmail.com> (raw)
In-Reply-To: <1307507754.3102.18.camel@edumazet-laptop>
On Wed, Jun 8, 2011 at 12:35 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le mardi 07 juin 2011 à 23:13 -0400, Chetan Loke a écrit :
>>
>> +struct tpacket3_hdr {
>> + __u32 tp_status;
>> + __u32 tp_len;
>> + __u32 tp_snaplen;
>> + __u16 tp_mac;
>> + __u16 tp_net;
>
>> + __u32 tp_sec;
>> + __u32 tp_nsec;
>> + __u16 tp_vlan_tci;
>
> missing "__u16 tp_padding;" here
>
> check :
>
> http://git2.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commit;h=13fcb7bd322164c67926ffe272846d4860196dc6
Eric, thanks for pointing that. I will add the padding. But just out
of curiosity, how is the information being leaked in tpacket_rcv()?
If someone is capturing packets then they have access to all the data
anyways. Also, tpacket_rcv doesn't memset the frame-element to 'zero'
before calling
skb_copy_bits(). And we would never want to memset anyways.
thnx
Chetan Loke
next prev parent reply other threads:[~2011-06-08 22:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 3:13 [af-packet 0/2] Enhance af-packet to provide (near zero)lossless packet capture functionality Chetan Loke
2011-06-08 3:13 ` [af-packet 1/2] " Chetan Loke
2011-06-08 4:35 ` Eric Dumazet
2011-06-08 22:10 ` chetan loke [this message]
2011-06-08 22:22 ` Eric Dumazet
2011-06-08 16:03 ` Stephen Hemminger
2011-06-08 3:13 ` [af-packet 2/2] " Chetan Loke
2011-06-08 4:18 ` Joe Perches
2011-06-08 22:01 ` chetan loke
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='BANLkTi=_EFRaiPuT=OjwRaJ4XPw0sUhcnA@mail.gmail.com' \
--to=loke.chetan@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=johann.baudy@gnu-log.net \
--cc=kaber@trash.net \
--cc=lokec@ccs.neu.edu \
--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).