[PATCH] unix_diag: fix incorrect sign extension in unix_lookup_by_ino

2016-02-18 Thread Dmitry V. Levin
to incorrect comparison on 64-bit architectures for inode numbers greater than INT_MAX. This bug was found by strace test suite. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> Cc: <sta...@vger.kernel.org> --- net/unix/diag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH] uapi: fix linux/if.h userspace compilation errors

2017-02-21 Thread Dmitry V. Levin
On Tue, Feb 21, 2017 at 11:19:14PM +0300, Dmitry V. Levin wrote: > On Tue, Feb 21, 2017 at 12:10:22PM -0500, David Miller wrote: > > From: "Dmitry V. Levin" <l...@altlinux.org> > > Date: Mon, 20 Feb 2017 14:58:41 +0300 > > > > > Include (guarded by

Re: [PATCH] uapi: fix linux/if.h userspace compilation errors

2017-02-21 Thread Dmitry V. Levin
On Tue, Feb 21, 2017 at 12:10:22PM -0500, David Miller wrote: > From: "Dmitry V. Levin" <l...@altlinux.org> > Date: Mon, 20 Feb 2017 14:58:41 +0300 > > > Include (guarded by ifndef __KERNEL__) to fix > > the following linux/if.h userspace compilation error

[PATCH 2/2] uapi: add a compatibility layer between linux/uio.h and glibc

2017-02-21 Thread Dmitry V. Levin
Do not define struct iovec in linux/uio.h when or is already included and provides these definitions. This fixes the following compilation error when or is included before : /usr/include/linux/uio.h:16:8: error: redefinition of 'struct iovec' Signed-off-by: Dmitry V. Levin &l

[PATCH 1/2] uapi: add a compatibility layer between linux/time.h and glibc

2017-02-21 Thread Dmitry V. Levin
/usr/include/linux/time.h:32:0: warning: "ITIMER_PROF" redefined /usr/include/linux/time.h:39:8: error: redefinition of 'struct itimerval' Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/libc-compat.h | 56 +

[PATCH] uapi: fix linux/if.h userspace compilation errors

2017-02-20 Thread Dmitry V. Levin
et al members being of type struct sockaddr. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/if.h | 4 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h index 1158a04..259617a 100644 --- a/include/uapi/linux/if.h

[PATCH] uapi: fix rdma/mlx5-abi.h userspace compilation errors

2017-02-23 Thread Dmitry V. Levin
pected ',' or '}' before numeric constant MLX5_LIB_CAP_4K_UAR = (u64)1 << 0, Include to fix the following rdma/mlx5-abi.h userspace compilation error: /usr/include/rdma/mlx5-abi.h:286:12: error: 'ETH_ALEN' undeclared here (not in a function) __u8 dmac[ETH_ALEN]; Signed-off-by: Dmitry

[PATCH] uapi: fix linux/llc.h userspace compilation error

2017-02-22 Thread Dmitry V. Levin
Include to fix the following linux/llc.h userspace compilation error: /usr/include/linux/llc.h:26:27: error: 'IFHWADDRLEN' undeclared here (not in a function) unsigned char sllc_mac[IFHWADDRLEN]; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/llc.h | 1 +

[PATCH] uapi: fix linux/ip6_tunnel.h userspace compilation errors

2017-02-22 Thread Dmitry V. Levin
incomplete type struct in6_addr laddr; /* local tunnel end-point address */ Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/ip6_tunnel.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/ip6_tunnel.h b/include/uapi/linux/ip6_tunnel.h index 4

[PATCH v2] uapi: fix linux/rds.h userspace compilation errors

2017-02-23 Thread Dmitry V. Levin
: 3289025aedc0 ("RDS: add receive message trace used by application") Signed-off-by: Dmitry V. Levin <l...@altlinux.org> Acked-by: Santosh Shilimkar <santosh.shilim...@oracle.com> --- v2: fixed "Fixes:" line include/uapi/linux/rds.h | 10 +- 1 file changed, 5 ins

[PATCH v2] uapi: fix linux/seg6.h and linux/seg6_iptunnel.h userspace compilation errors

2017-02-23 Thread Dmitry V. Levin
/seg6_iptunnel.h userspace compilation error: /usr/include/linux/seg6_iptunnel.h:26:21: error: array type has incomplete element type 'struct ipv6_sr_hdr' struct ipv6_sr_hdr srh[0]; Fixes: a50a05f497a2 ("ipv6: sr: add missing Kbuild export for header files") Signed-off-by: Dmitry V

[PATCH] uapi: fix linux/rds.h userspace compilation errors

2017-02-22 Thread Dmitry V. Levin
: 3289025a("RDS: add receive message trace used by application") Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/rds.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h index

[PATCH] uapi: fix linux/seg6.h and linux/seg6_iptunnel.h userspace compilation errors

2017-02-22 Thread Dmitry V. Levin
/seg6_iptunnel.h userspace compilation error: /usr/include/linux/seg6_iptunnel.h:26:21: error: array type has incomplete element type 'struct ipv6_sr_hdr' struct ipv6_sr_hdr srh[0]; Fixes: a50a05f4("ipv6: sr: add missing Kbuild export for header files") Signed-off-by: Dmitry V. Levin <l...

[PATCH] uapi: fix linux/if_pppol2tp.h userspace compilation errors

2017-02-14 Thread Dmitry V. Levin
l2tp: deprecate PPPOL2TP_MSG_* in favour of L2TP_MSG_*") Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/if_pppol2tp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/if_pppol2tp.h b/include/uapi/linux/if_pppol2tp.h index

Re: [PATCH] uapi: fix linux/if_pppol2tp.h userspace compilation errors

2017-02-14 Thread Dmitry V. Levin
On Tue, Feb 14, 2017 at 02:37:23PM -0500, David Miller wrote: > From: "Dmitry V. Levin" <l...@altlinux.org> > Date: Tue, 14 Feb 2017 13:33:53 +0300 > > > In file included from /usr/include/linux/l2tp.h:12:0, > > from /usr/include/linux/if_pp

[PATCH v2] uapi: fix linux/if_pppol2tp.h userspace compilation errors

2017-02-14 Thread Dmitry V. Levin
: 47c3e7783be4 ("net: l2tp: deprecate PPPOL2TP_MSG_* in favour of L2TP_MSG_*") Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- v2: change uapi/linux/l2tp.h to fix include/uapi/linux/l2tp.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/uap

[PATCH v2 2/2] uapi: fix linux/rds.h userspace compilation error

2017-02-16 Thread Dmitry V. Levin
incomplete type struct sockaddr_storage dest_addr; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- v2: Cc'ed netdev include/uapi/linux/rds.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h index 3ff5cc2..804c9b2

[PATCH v2] uapi: fix linux/mroute6.h userspace compilation errors

2017-02-16 Thread Dmitry V. Levin
/mroute6.h:132:18: error: field 'im6_src' has incomplete type struct in6_addr im6_src, im6_dst; /usr/include/linux/mroute6.h:132:27: error: field 'im6_dst' has incomplete type struct in6_addr im6_src, im6_dst; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- v2: Cc'ed netdev includ

[PATCH v2] uapi: fix linux/mroute.h userspace compilation errors

2017-02-16 Thread Dmitry V. Levin
incomplete type struct in_addr im_src,im_dst; /usr/include/linux/mroute.h:109:24: error: field 'im_dst' has incomplete type struct in_addr im_src,im_dst; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- v2: Cc'ed netdev include/uapi/linux/mroute.h | 1 + 1 file changed, 1 ins

[PATCH v2 1/2] uapi: fix linux/rds.h userspace compilation errors

2017-02-16 Thread Dmitry V. Levin
flags; /usr/include/linux/rds.h:270:2: error: unknown type name 'uint64_t' uint64_t user_token; /usr/include/linux/rds.h:274:2: error: unknown type name 'uint64_t' uint64_t user_token; /usr/include/linux/rds.h:275:2: error: unknown type name 'int32_t' int32_t status; Signed-off-by: Dmitry V

[PATCH v2] uapi: fix linux/ipv6_route.h userspace compilation errors

2017-02-16 Thread Dmitry V. Levin
rtmsg_src; /ust/include/linux/ipv6_route.h:44:19: error: field 'rtmsg_gateway' has incomplete type struct in6_addr rtmsg_gateway; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- v2: Cc'ed netdev include/uapi/linux/ipv6_route.h | 1 + 1 file changed, 1 insertion(+) diff

[RFC PATCH] uapi: fix linux/packet_diag.h userspace compilation error

2017-02-27 Thread Dmitry V. Levin
the numeric value of MAX_ADDR_LEN is used, uapi/linux/if_link.h already does the same, and there are no UAPI headers besides these two that use MAX_ADDR_LEN. The alternative fix would be to include which pulls in other headers and a lot of definitions with them. Signed-off-by: Dmitry V. Levin &l

[PATCH] uapi: fix linux/packet_diag.h userspace compilation error

2017-03-07 Thread Dmitry V. Levin
the numeric value of MAX_ADDR_LEN is used instead of symbolic one, uapi/linux/if_link.h already does the same: $ grep MAX_ADDR_LEN include/uapi/linux/if_link.h __u8 mac[32]; /* MAX_ADDR_LEN */ There are no UAPI headers besides these two that use MAX_ADDR_LEN. Signed-off-by: Dmitry V. Levin &l

Re: [RFC PATCH] uapi: fix linux/packet_diag.h userspace compilation error

2017-03-07 Thread Dmitry V. Levin
On Tue, Mar 07, 2017 at 12:16:49PM -0800, David Miller wrote: > From: "Dmitry V. Levin" <l...@altlinux.org> > Date: Tue, 28 Feb 2017 04:39:30 +0300 > > > Replace MAX_ADDR_LEN with its numeric value to fix the following > > linux/packet_diag.h userspace com

Re: uapi: MAX_ADDR_LEN vs. numeric 32

2017-08-04 Thread Dmitry V. Levin
the patches, but lets try again... > > I rebased my tree now and saw > > commit 745cb7f8a5de0805cade3de3991b7a95317c7c73 > Author: Dmitry V. Levin <l...@altlinux.org> > Date: Tue Mar 7 23:50:50 2017 +0300 > > uapi: fix linux/packet_diag.h userspace compilation

Re: [PATCH v06 35/36] uapi linux/tls.h: don't include in user space

2017-08-08 Thread Dmitry V. Levin
On Sun, Aug 06, 2017 at 06:44:26PM +0200, Mikko Rapeli wrote: > It is not needed and not part of uapi headers, but causes > user space compilation error: > > fatal error: net/tcp.h: No such file or directory > #include > ^ > > Signed-off-by: Mikko Rapeli

Re: [PATCH v06 15/36] uapi linux/socket.h: include sys/socket.h in user space

2017-08-08 Thread Dmitry V. Levin
; linux/vm_sockets.h > linux/ncp_fs.h > linux/nfc.h > linux/phonet.h > > Signed-off-by: Mikko Rapeli <mikko.rap...@iki.fi> > Cc: netdev@vger.kernel.org > Cc: Dmitry V. Levin <l...@altlinux.org> > --- > include/uapi/linux/socket.h | 4 > 1 file chan

Re: [PATCH v06 35/36] uapi linux/tls.h: don't include in user space

2017-09-04 Thread Dmitry V. Levin
On Wed, Aug 09, 2017 at 02:25:54AM +0300, Dmitry V. Levin wrote: > On Sun, Aug 06, 2017 at 06:44:26PM +0200, Mikko Rapeli wrote: > > It is not needed and not part of uapi headers, but causes > > user space compilation error: > > > > fatal error: net/tcp.h: No such file

[PATCH] uapi: fix linux/rxrpc.h userspace compilation errors

2017-11-12 Thread Dmitry V. Levin
UAPI definitions to userspace") Cc: <sta...@vger.kernel.org> # v4.14 Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/rxrpc.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/rxrpc.h b/include/ua

[PATCH] uapi: fix linux/tls.h userspace compilation error

2017-11-13 Thread Dmitry V. Levin
for userspace, cleanup this header file further by moving other redundant includes to net/tls.h. Fixes: 3c4d7559159b ("tls: kernel TLS support") Cc: <sta...@vger.kernel.org> # v4.13+ Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/net/tls.h| 4 in