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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201301161205.04502.vapier@gentoo.org>
Date:	Wed, 16 Jan 2013 12:04:56 -0500
From:	Mike Frysinger <vapier@...too.org>
To:	libc-alpha@...rceware.org
Cc:	Ben Hutchings <bhutchings@...arflare.com>,
	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>,
	Cong Wang <amwang@...hat.com>,
	Thomas Backlund <tmb@...eia.org>,
	Eric Blake <eblake@...hat.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, libvirt-list@...hat.com,
	tgraf@...g.ch, David Miller <davem@...emloft.net>, schwab@...e.de,
	carlos@...temhalted.org
Subject: Re: Redefinition of struct in6_addr in <netinet/in.h> and <linux/in6.h>

On Wednesday 16 January 2013 10:47:12 Ben Hutchings wrote:
> On Wed, 2013-01-16 at 23:21 +0900, YOSHIFUJI Hideaki wrote:
> > Cong Wang wrote:
> > > (Cc'ing some glibc developers...)
> > > 
> > > Hello,
> > > 
> > > In glibc source file inet/netinet/in.h and kernel source file
> > > include/uapi/linux/in6.h, both define struct in6_addr, and both are
> > > visible to user applications. Thomas reported a conflict below.
> > > 
> > > So, how can we handle this? /me is wondering why we didn't see this
> > > before.
> 
> [...]
> 
> > This is not a new issue.  In addition to this,
> > netinet/in.h also conflits with linux/in.h.
> > 
> > We might have
> > 
> >  #if !defined(__GLIBC__) || !defined(_NETINET_IN_H)
> >  
> >  #endif
> > 
> > around those conflicting definitions in uapi/linux/in{,6}.h.
> 
> This only solves half the problem, as <netinet/in.h> might be included
> after <linux/in.h>.  Also, not all Linux userland uses glibc.

certainly true, but the current expectation is that you don't mix your ABIs.  
if you're programming with the C library API, then use the C library headers.  
if you're banging directly on the kernel, then use the kernel headers.  not 
saying it's a perfect solution, but it works for the vast majority of use 
cases.
-mike

Download attachment "signature.asc " of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ