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
| ||
|
Date: Wed, 23 Oct 2013 15:51:21 +0900 From: Atzm Watanabe <atzm@...atosphere.co.jp> To: Stephen Hemminger <stephen@...workplumber.org> Cc: Ben Hutchings <bhutchings@...arflare.com>, <netdev@...r.kernel.org> Subject: Re: [PATCH] packet: Deliver VLAN TPID to userspace At Tue, 22 Oct 2013 15:41:10 -0700, Stephen Hemminger wrote: > > On Tue, 22 Oct 2013 11:56:31 +0900 > Atzm Watanabe <atzm@...atosphere.co.jp> wrote: > > > Hmm... I think TPACKET{,2,3}_HDRLEN should not be removed without > > careful considerations. Because some userspace programs (e.g libpcap) > > are using them in order to check mmap ability of the kernel... > > > That's bad because it means the library then depends on the headers > of the machine it was built on, not the machine it is running on. I often > build software on boxes where /usr/include version of kernel headers is out dated. Yes, this means that building such library with the new header (TPACKET{,2,3}_HDRLEN were deleted) will make the binary that does not support PACKET_MMAP. :-( So, IMHO, we should be prudent in deleting TPACKET{,2,3}_HDRLEN, otherwise we will break such userspace programs very easily... e.g. snippet of the latest libpcap-1.4.0 (pcap-linux.c): /* check for memory mapped access avaibility. We assume every needed * struct is defined if the macro TPACKET_HDRLEN is defined, because it * uses many ring related structs and macros */ # ifdef TPACKET_HDRLEN # define HAVE_PACKET_RING # ifdef TPACKET2_HDRLEN # define HAVE_TPACKET2 # else # define TPACKET_V1 0 # endif /* TPACKET2_HDRLEN */ # endif /* TPACKET_HDRLEN */ It looks like PACKET_MMAP is used when HAVE_PACKET_RING is defined. -- 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