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]
Date:	Fri, 26 Aug 2011 16:42:48 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 05/10] headers, net: Define struct
 __kernel_sockaddr, replacing struct sockaddr

On Fri, Aug 26, 2011 at 11:08:20AM -0400, David Miller wrote:
> From: Ben Hutchings <ben@...adent.org.uk>
> Date: Thu, 25 Aug 2011 05:44:15 +0100
> 
> > Commit 9c501935a3cdcf6b1d35aaee3aa11c7a7051a305 ('net: Support
> > inclusion of <linux/socket.h> before <sys/socket.h>') removed the
> > definition of struct sockaddr for userland.
> > 
> > But we still have several headers using struct sockaddr, and we
> > shouldn't make them include <sys/socket.h> as that risks recursive
> > inclusion in future.  Define and use an identical struct
> > __kernel_sockaddr instead.
> > 
> > Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
>  ...
> >  
> > -/*
> > - *	1003.1g requires sa_family_t and that sa_data is char.
> > - */
> > +#define sockaddr __kernel_sockaddr
> 
> This cure is worse than the disease.
> 
> Now any application that includes sys/socket.h one way or another is
> now going to get a real hard build failure since __kernel_sockaddr
> will effectively get redefined.
[...]
 
This #define is in the #ifdef __KERNEL__ section.  I don't want t
change all the in-kernel users to say __kernel_sockaddr.  This is
just the same as the preceding 'typedef __kernel_sa_family_t
sa_family_t' except that you can't create struct aliases that way.

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
                                                              - Albert Camus
--
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