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:   Wed, 9 Aug 2017 02:00:42 +0300
From:   "Dmitry V. Levin" <ldv@...linux.org>
To:     Mikko Rapeli <mikko.rapeli@....fi>
Cc:     linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH v06 15/36] uapi linux/socket.h: include sys/socket.h in
 user space

On Sun, Aug 06, 2017 at 06:44:06PM +0200, Mikko Rapeli wrote:
> This libc header has sockaddr definition in user space.
> 
> Fixes user space compilation errors like these from kernel headers including
> only linux/socket.h:
> 
> error: field ‘ifru_addr’ has incomplete type
> struct sockaddr ifru_addr;
> error: field ‘_sockaddr’ has incomplete type
> struct sockaddr  _sockaddr;
> error: invalid application of ‘sizeof’ to incomplete type ‘struct sockaddr’
> 
> With this following uapi headers now compile in user space:
> 
> rdma/rdma_user_rxe.h
> linux/vm_sockets.h
> linux/ncp_fs.h
> linux/nfc.h
> linux/phonet.h
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@....fi>
> Cc: netdev@...r.kernel.org
> Cc: Dmitry V. Levin <ldv@...linux.org>
> ---
>  include/uapi/linux/socket.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/uapi/linux/socket.h b/include/uapi/linux/socket.h
> index 76ab0c68561e..8a81197cc08b 100644
> --- a/include/uapi/linux/socket.h
> +++ b/include/uapi/linux/socket.h
> @@ -1,6 +1,10 @@
>  #ifndef _UAPI_LINUX_SOCKET_H
>  #define _UAPI_LINUX_SOCKET_H
>  
> +#ifndef __KERNEL__
> +#include <sys/socket.h>
> +#endif

This is scary because of infamous libc vs uapi interoperability issues.
Couldn't we fix affected headers instead?


-- 
ldv

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ