lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52B49038.3070307@redhat.com>
Date:	Fri, 20 Dec 2013 19:45:12 +0100
From:	Daniel Borkmann <dborkman@...hat.com>
To:	David Miller <davem@...emloft.net>
CC:	nvbolhuis@...valley.nl, netdev@...r.kernel.org,
	linux-net@...r.kernel.org
Subject: Re: i386 vs x86_64 struct tpacket_hdr layout

On 12/20/2013 07:38 PM, David Miller wrote:
> From: Norbert van Bolhuis <nvbolhuis@...valley.nl>
> Date: Fri, 20 Dec 2013 14:30:06 +0100
>
>>
>> I'm compiling my 32bit application with -m32 on a x86_64
>> system/kernel.
>>
>> Things aren't working because for my application tp_len is at offset 4
>> but for the kernel it is at offset 8.
>>
>> struct tpacket_hdr {
>>          unsigned long   tp_status;
>>          unsigned int    tp_len;
>>          unsigned int    tp_snaplen;
>>          unsigned short  tp_mac;
>>          unsigned short  tp_net;
>>          unsigned int    tp_sec;
>>          unsigned int    tp_usec;
>> };
>>
>> How is this suppose to work ?
>
> This is why you should use tpacket layout v2 or v3, rather than v1,
> they fix these issues.

Norbert, please also read Documentation/networking/packet_mmap.txt

Thanks !
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ