Re: [PATCH v2] bpf: fix uapi bpf_prog_info fields alignment

2019-06-25 Thread Dmitry V. Levin
On Tue, Jun 25, 2019 at 08:19:35AM -0700, Alexei Starovoitov wrote: > On Tue, Jun 25, 2019 at 8:08 AM Dmitry V. Levin wrote: > > On Tue, Jun 25, 2019 at 07:16:55AM -0700, Alexei Starovoitov wrote: > > > On Tue, Jun 25, 2019 at 4:07 AM Baruch Siach wrote: > >

Re: [PATCH v2] bpf: fix uapi bpf_prog_info fields alignment

2019-06-25 Thread Dmitry V. Levin
alignment > > like m68k. Embed gpl_compatible into an anonymous union with 32-bit pad > > member to restore alignment of following fields. > > > > Thanks to Dmitry V. Levin his analysis of this bug history. > > > > Cc: Jiri Olsa > > Cc: Daniel Borkmann &

[PATCH iproute2] configure: fix typo in check_xt_old_internal_h

2019-01-07 Thread Dmitry V. Levin
Fixes: 377a09902a57 ("configure: Minor code cleanup") Signed-off-by: Dmitry V. Levin --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index b85eb58b..45fcffb6 100755 --- a/configure +++ b/configure @@ -115,7 +11

Re: "bpf: Improve the info.func_info and info.func_info_rec_size behavior" breaks strace self tests

2019-01-04 Thread Dmitry V. Levin
On Fri, Jan 04, 2019 at 10:25:24AM +0100, Heiko Carstens wrote: > On Thu, Jan 03, 2019 at 11:52:51PM +, Martin Lau wrote: > > On Thu, Jan 03, 2019 at 11:41:18PM +0100, Heiko Carstens wrote: > > > On Thu, Jan 03, 2019 at 07:12:05PM +, Martin Lau wrote: > > > > On Thu, Jan 03, 2019 at 12:46:1

[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: # v4.13+ Signed-off-by: Dmitry V. Levin --- include/net/tls.h| 4 include/uapi/linux/tls.h | 4 2 files changed, 4

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

2017-11-12 Thread Dmitry V. Levin
amily */ Fixes: 727f8914477e ("rxrpc: Expose UAPI definitions to userspace") Cc: # v4.14 Signed-off-by: Dmitry V. Levin --- include/uapi/linux/rxrpc.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/rxrpc.h b/include/uapi/linux/rxrpc.

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

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 > Cc: Dave Watson

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 > Cc: netdev@vger.kernel.org > Cc: Dmitry V. Levin > --- > include/uapi/linux/socket.h | 4 > 1 file changed, 4 insertions(+) > > diff --git a/include/uap

Re: uapi: MAX_ADDR_LEN vs. numeric 32

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

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

2017-03-07 Thread Dmitry V. Levin
where 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: Dmitr

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" > 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 compilation error: > > &g

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

2017-02-27 Thread Dmitry V. Levin
where 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. Levi

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

2017-02-23 Thread Dmitry V. Levin
expected ',' 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_

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

2017-02-23 Thread Dmitry V. Levin
u64 rx_trace[RDS_MSG_RX_DGRAM_TRACE_MAX]; Fixes: 3289025aedc0 ("RDS: add receive message trace used by application") Signed-off-by: Dmitry V. Levin Acked-by: Santosh Shilimkar --- v2: fixed "Fixes:" line include/uapi/linux/rds.h | 10 +- 1 file changed, 5 insertions(+)

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

2017-02-23 Thread Dmitry V. Levin
wing linux/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:

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

2017-02-22 Thread Dmitry V. Levin
wing linux/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: Dmit

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

2017-02-22 Thread Dmitry V. Levin
u64 rx_trace[RDS_MSG_RX_DGRAM_TRACE_MAX]; Fixes: 3289025a("RDS: add receive message trace used by application") Signed-off-by: Dmitry V. Levin --- include/uapi/linux/rds.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/rds.h b/include/

[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 --- include/uapi/linux/llc.h | 1 + 1 file

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

2017-02-22 Thread Dmitry V. Levin
#x27;laddr' has incomplete type struct in6_addr laddr; /* local tunnel end-point address */ Signed-off-by: Dmitry V. Levin --- 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 48af63c..

[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 --

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

2017-02-21 Thread Dmitry V. Levin
/time.h:31:0: warning: "ITIMER_VIRTUAL" redefined /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 --- include/uapi/linux/libc-compat.h | 56 +

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" > > Date: Mon, 20 Feb 2017 14:58:41 +0300 > > > > > Include (guarded by ifndef __KERNEL__) to fix

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" > Date: Mon, 20 Feb 2017 14:58:41 +0300 > > > Include (guarded by ifndef __KERNEL__) to fix > > the following linux/if.h userspace compilation errors: > > Wouldn't

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

2017-02-20 Thread Dmitry V. Levin
users of struct ifreq who might rely on ifru_addr et al members being of type struct sockaddr. Signed-off-by: Dmitry V. Levin --- 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 ---

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

2017-02-16 Thread Dmitry V. Levin
_addr' has incomplete type struct sockaddr_storage dest_addr; Signed-off-by: Dmitry V. Levin --- 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 10064

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

2017-02-16 Thread Dmitry V. Levin
ux/rds.h:261:4: error: unknown type name 'uint64_t' uint64_t compare_mask; /usr/include/linux/rds.h:262:4: error: unknown type name 'uint64_t' uint64_t swap_mask; /usr/include/linux/rds.h:265:4: error: unknown type name 'uint64_t' uint64_t add; /usr/include/

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

2017-02-16 Thread Dmitry V. Levin
uct sockaddr_in6 grp; /usr/include/linux/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. Le

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

2017-02-16 Thread Dmitry V. Levin
usr/include/linux/mroute.h:109:17: error: field 'im_src' has 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 --- v2: Cc'ed net

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

2017-02-16 Thread Dmitry V. Levin
pe struct in6_addr 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 --- v2: Cc'ed netdev include/uapi/linux/ipv6_route.h | 1 + 1 file changed, 1 insertion(

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

2017-02-14 Thread Dmitry V. Levin
27; Fixes: 47c3e7783be4 ("net: l2tp: deprecate PPPOL2TP_MSG_* in favour of L2TP_MSG_*") Signed-off-by: Dmitry V. Levin --- 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/uapi/linux/l2tp.h

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" > 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_pppol2tp.h:21, > >

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

2017-02-14 Thread Dmitry V. Levin
"net: l2tp: deprecate PPPOL2TP_MSG_* in favour of L2TP_MSG_*") Signed-off-by: Dmitry V. Levin --- 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 6418c4d..54a404e

[PATCH] unix_diag: fix incorrect sign extension in unix_lookup_by_ino

2016-02-18 Thread Dmitry V. Levin
ts 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 Cc: --- net/unix/diag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/unix/diag.c b/net/unix/diag.c index c5