Re: [PATCH] seccomp: cap SECCOMP_RET_ERRNO data to MAX_ERRNO

2015-02-06 Thread Dmitry V. Levin
by userspace. Acked-by: Dmitry V. Levin l...@altlinux.org -- ldv -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: a method to distinguish between syscall-enter/exit-stop

2015-02-06 Thread Dmitry V. Levin
On Fri, Feb 06, 2015 at 12:07:03PM -0800, Kees Cook wrote: On Fri, Feb 6, 2015 at 11:32 AM, Andy Lutomirski l...@amacapital.net wrote: On Fri, Feb 6, 2015 at 11:23 AM, Kees Cook keesc...@chromium.org wrote: [...] And an unrelated thought: 3) Can't we find some way to fix the inability of

Re: a method to distinguish between syscall-enter/exit-stop

2015-02-06 Thread Dmitry V. Levin
On Fri, Feb 06, 2015 at 05:07:41PM -0800, Kees Cook wrote: On Fri, Feb 6, 2015 at 3:17 PM, Dmitry V. Levin l...@altlinux.org wrote: On Fri, Feb 06, 2015 at 12:07:03PM -0800, Kees Cook wrote: On Fri, Feb 6, 2015 at 11:32 AM, Andy Lutomirski l...@amacapital.net wrote: On Fri, Feb 6, 2015

Re: [PATCH v5 3/5] x86: Split syscall_trace_enter into two phases

2015-02-05 Thread Dmitry V. Levin
On Thu, Feb 05, 2015 at 01:27:16PM -0800, Kees Cook wrote: On Thu, Feb 5, 2015 at 1:19 PM, Dmitry V. Levin l...@altlinux.org wrote: Hi, On Fri, Sep 05, 2014 at 03:13:54PM -0700, Andy Lutomirski wrote: This splits syscall_trace_enter into syscall_trace_enter_phase1

Re: [PATCH v5 3/5] x86: Split syscall_trace_enter into two phases

2015-02-05 Thread Dmitry V. Levin
Hi, On Fri, Sep 05, 2014 at 03:13:54PM -0700, Andy Lutomirski wrote: This splits syscall_trace_enter into syscall_trace_enter_phase1 and syscall_trace_enter_phase2. Only phase 2 has full pt_regs, and only phase 2 is permitted to modify any of pt_regs except for orig_ax. This breaks ptrace,

Re: [PATCH v5 3/5] x86: Split syscall_trace_enter into two phases

2015-02-05 Thread Dmitry V. Levin
On Thu, Feb 05, 2015 at 03:12:39PM -0800, Kees Cook wrote: On Thu, Feb 5, 2015 at 1:52 PM, Andy Lutomirski l...@amacapital.net wrote: On Thu, Feb 5, 2015 at 1:40 PM, Dmitry V. Levin l...@altlinux.org wrote: On Thu, Feb 05, 2015 at 01:27:16PM -0800, Kees Cook wrote: On Thu, Feb 5, 2015 at 1

Re: [PATCH v5 3/5] x86: Split syscall_trace_enter into two phases

2015-02-05 Thread Dmitry V. Levin
On Thu, Feb 05, 2015 at 04:09:06PM -0800, Andy Lutomirski wrote: On Thu, Feb 5, 2015 at 3:49 PM, Kees Cook keesc...@chromium.org wrote: On Thu, Feb 5, 2015 at 3:39 PM, Dmitry V. Levin l...@altlinux.org wrote: [...] There is a clear difference: before these changes, SECCOMP_RET_ERRNO used

[PATCH] vfs: show_vfsstat: do not ignore errors from show_devname method

2015-03-19 Thread Dmitry V. Levin
Explicitly check show_devname method return code and bail out in case of an error. This fixes regression introduced by commit 9d4d65748a5c. Signed-off-by: Dmitry V. Levin l...@altlinux.org --- fs/proc_namespace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/proc_namespace.c b/fs

[RESEND PATCH] vfs: show_vfsstat: do not ignore errors from show_devname method

2015-11-18 Thread Dmitry V. Levin
Date: Thu, 19 Mar 2015 11:10:54 + Explicitly check show_devname method return code and bail out in case of an error. This fixes regression introduced by commit 9d4d65748a5c. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- fs/proc_namespace.c | 2 ++ 1 file changed, 2 inse

[RESEND PATCH 3/4] vfs: show_mountinfo: cleanup error code checks

2015-12-02 Thread Dmitry V. Levin
Wed, 18 Nov 2015 21:08:33 + Check err variable right after each assignment. This change makes initialization of err redundant, so remove the initialization. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- fs/proc_namespace.c | 20 +++- 1 file changed, 11 inse

[RESEND PATCH 4/4] vfs: show_vfsstat: remove redundant initialization and check of error code

2015-12-02 Thread Dmitry V. Levin
Date: Wed, 18 Nov 2015 21:09:45 + As err variable is now always checked right after each assignment, its initialization is redundant and could be safely removed. For the same reason, the last check of err is also redundant and could be removed as well. Signed-off-by: Dmitry V. Levin &l

[RESEND PATCH 2/4] vfs: show_vfsmnt: remove redundant initialization of error code

2015-12-02 Thread Dmitry V. Levin
Date: Wed, 18 Nov 2015 21:07:10 + As err variable is now always checked right after the first assignment, its initialization is redundant and could be safely removed. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- fs/proc_namespace.c | 2 +- 1 file changed, 1 insertion

[RESEND v2 PATCH 1/4] vfs: show_vfsstat: do not ignore errors from show_devname method

2015-12-02 Thread Dmitry V. Levin
Date: Thu, 19 Mar 2015 11:10:54 + Explicitly check show_devname method return code and bail out in case of an error. This fixes regression introduced by commit 9d4d65748a5c. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- fs/proc_namespace.c | 2 ++ 1 file changed, 2 inse

[PATCH] x86/signal: fix restart_syscall number for x32 tasks

2015-11-30 Thread Dmitry V. Levin
/tests/restart_syscall.test Reported-and-tested-by: Elvira Khabirova <lineprint...@gmail.com> Signed-off-by: Dmitry V. Levin <l...@altlinux.org> Cc: sta...@vger.kernel.org --- arch/x86/kernel/signal.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git

[PATCH] sh64: fix __NR_fgetxattr

2015-12-08 Thread Dmitry V. Levin
According to arch/sh/kernel/syscalls_64.S and common sense, __NR_fgetxattr has to be defined to 259, but it doesn't. Instead, it's defined to 269, which is of course used by another syscall, __NR_sched_setaffinity in this case. This bug was found by strace test suite. Signed-off-by: Dmitry V

Re: [PATCH] x86/signal: fix restart_syscall number for x32 tasks

2015-12-12 Thread Dmitry V. Levin
On Mon, Dec 07, 2015 at 03:22:06PM -0800, Andy Lutomirski wrote: > [not real reply because I'm using a bad internet connection right now > and I'm not set up with my usual Gmane reply hack right now] > > The new code is (whitespace-damaged): > > static inline unsigned long

[PATCH] sparc64: fix incorrect sign extension in sys_sparc64_personality

2015-12-26 Thread Dmitry V. Levin
; to "long int" that happens on return from sys_sparc64_personality. For example, a userspace call personality((unsigned) -EINVAL) will result to any subsequent personality call, including absolutely harmless read-only personality(0x) call, failing with errno set to EINVAL. Signed-off-by: Dmitry V.

[PATCH] x86/signal: Cleanup get_nr_restart_syscall

2015-12-18 Thread Dmitry V. Levin
Check for TS_COMPAT instead of TIF_IA32 to distinguish ia32 tasks from 64-bit tasks. Check for __X32_SYSCALL_BIT only if CONFIG_X86_X32_ABI is defined. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> Cc: Elvira Khabirova <lineprint...@gmail.com> Cc: Andy Lutomirski <l...

[PATCH v2] x86/signal: Cleanup get_nr_restart_syscall

2015-12-19 Thread Dmitry V. Levin
Check for TS_COMPAT instead of TIF_IA32 to distinguish ia32 tasks from 64-bit tasks. Check for __X32_SYSCALL_BIT iff CONFIG_X86_X32_ABI is defined. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> Cc: Elvira Khabirova <lineprint...@gmail.com> Cc: Andy Lutomirski <l...@amacapit

[PATCH 1/3] vfs: show_vfsmnt: remove redundant initialization of error code

2015-11-18 Thread Dmitry V. Levin
As err variable is now always checked right after the first assignment, its initialization is redundant and could be safely removed. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- fs/proc_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc_names

[PATCH 3/3] vfs: show_vfsstat: remove redundant initialization and check of error code

2015-11-18 Thread Dmitry V. Levin
As err variable is now always checked right after each assignment, its initialization is redundant and could be safely removed. For the same reason, the last check of err is also redundant and could be removed as well. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- fs/proc_names

[PATCH 2/3] vfs: show_mountinfo: cleanup error code checks

2015-11-18 Thread Dmitry V. Levin
Check err variable right after each assignment. This change makes initialization of err redundant, so remove the initialization. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- fs/proc_namespace.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff

Re: [PATCH 8/8] Use __kernel_long_t in struct mq_attr

2015-11-23 Thread Dmitry V. Levin
On Fri, Dec 27, 2013 at 02:14:24PM -0800, H.J. Lu wrote: > Both x32 and x86-64 use the same struct mq_attr for system calls. But > x32 long is 32-bit. This patch replaces long with __kernel_long_t in > struct mq_attr. > > Signed-off-by: H.J. Lu > --- >

[PATCH] uapi: use __u64 instead of u64

2016-05-30 Thread Dmitry V. Levin
This bug was found by strace test suite. Fixes: 6b526ed70cf1 ("btrfs: introduce device delete by devid") Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/btrfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/btrfs.

[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

[RESEND v3 PATCH] vfs: show_vfsstat: do not ignore errors from show_devname method

2016-02-18 Thread Dmitry V. Levin
Date: Thu, 19 Mar 2015 11:10:54 + Explicitly check show_devname method return code and bail out in case of an error. This fixes regression introduced by commit 9d4d65748a5c. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- fs/proc_namespace.c | 2 ++ 1 file changed, 2 inse

[RESEND v4 PATCH] vfs: show_vfsstat: do not ignore errors from show_devname method

2016-03-20 Thread Dmitry V. Levin
Date: Thu, 19 Mar 2015 11:10:54 + Explicitly check show_devname method return code and bail out in case of an error. This fixes regression introduced by commit 9d4d65748a5c. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- fs/proc_namespace.c | 2 ++ 1 file changed, 2 inse

[PATCH] parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls

2016-04-26 Thread Dmitry V. Levin
trace test suite. Cc: sta...@vger.kernel.org Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- arch/parisc/kernel/syscall.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index c976ebf..57b4836 100644 -

Re: [PATCH] parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls

2016-04-26 Thread Dmitry V. Levin
On Tue, Apr 26, 2016 at 10:45:11PM -0400, Mike Frysinger wrote: > On 27 Apr 2016 04:56, Dmitry V. Levin wrote: > > Do not load one entry beyond the end of the syscall table when the > > syscall number of a traced process equals to __NR_Linux_syscalls. > > Similar bug w

Re: [PATCH] x86: use compat version for preadv2 and pwritev2

2016-05-12 Thread Dmitry V. Levin
On Thu, May 12, 2016 at 09:30:37AM +0200, Christoph Hellwig wrote: > On Wed, May 11, 2016 at 11:48:17AM +0300, Dmitry V. Levin wrote: > > Similar to preadv and pwritev, preadv2 and pwritev2 need compat entries > > in the 32-bit syscall table. > > > > This bug was

Re: [PATCH] x86: use compat version for preadv2 and pwritev2

2016-05-11 Thread Dmitry V. Levin
On Wed, May 11, 2016 at 12:14:11PM +0200, Thomas Gleixner wrote: > On Wed, 11 May 2016, Dmitry V. Levin wrote: > > Similar to preadv and pwritev, preadv2 and pwritev2 need compat entries > > in the 32-bit syscall table. > > So this is 2016 and we added a syscalls which r

[PATCH] x86: use compat version for preadv2 and pwritev2

2016-05-11 Thread Dmitry V. Levin
Similar to preadv and pwritev, preadv2 and pwritev2 need compat entries in the 32-bit syscall table. This bug was found by strace test suite. Fixes: 4babf2c5efb7 ("x86: wire up preadv2 and pwritev2") Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- arch/x86/entry/syscall

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

[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

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

Re: [PATCH] Add pidfs filesystem

2017-02-22 Thread Dmitry V. Levin
On Tue, Feb 21, 2017 at 03:57:47PM +0100, Oleg Nesterov wrote: > On 02/18, Alexey Gladkov wrote: > > > > This patch allows to mount only the part of /proc related to pids > > without rest objects. Since this is an addon to /proc, flags applied to > > /proc have an effect on this pidfs filesystem.

[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 1/2] uapi: fix definition of struct sockaddr_nfc_llcp on x32 and mips n32

2017-02-20 Thread Dmitry V. Levin
ame 'size_t' size_t service_name_len; Cc: sta...@vger.kernel.org Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/nfc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index 399f39f..f8ccc

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

2017-02-20 Thread Dmitry V. Levin
sa_family; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/nfc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index f8ccc12..1b6d54a 100644 --- a/include/uapi/linux/nfc.h +++ b/include/uapi

Re: [PATCH 1/2] uapi: fix definition of struct sockaddr_nfc_llcp on x32 and mips n32

2017-02-20 Thread Dmitry V. Levin
On Mon, Feb 20, 2017 at 09:15:33PM +0300, Dmitry V. Levin wrote: > Replace size_t with __kernel_size_t to fix definition of struct > sockaddr_nfc_llcp on architectures like x32 and mips n32 where > sizeof(size_t) < sizeof(__kernel_size_t). > > This also fixes the following lin

[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] uapi: fix linux/kexec.h userspace compilation errors

2017-02-22 Thread Dmitry V. Levin
Include (guarded by #ifndef __KERNEL__) to fix the following linux/kexec.h userspace compilation errors: /usr/include/linux/kexec.h:53:2: error: unknown type name 'size_t' size_t bufsz; /usr/include/linux/kexec.h:55:2: error: unknown type name 'size_t' size_t memsz; Signed-off-by: Dmitry V

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

2017-02-23 Thread Dmitry V. Levin
Include like some of uapi/linux/netfilter/xt_*.h headers do to fix the following linux/netfilter/xt_hashlimit.h userspace compilation error: /usr/include/linux/netfilter/xt_hashlimit.h:90:12: error: 'NAME_MAX' undeclared here (not in a function) char name[NAME_MAX]; Signed-off-by: Dmitry V

[PATCH] uapi: fix drm/omap_drm.h userspace compilation errors

2017-02-25 Thread Dmitry V. Levin
: unknown type name 'uint32_t' uint32_t __pad; Fixes: ef6503e89194 ("drm: Kbuild: add omap_drm.h to the installed headers") Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/drm/omap_drm.h | 38 +++--- 1 file changed, 19 insertions(

Re: + uapi-fix-linux-sysctlh-userspace-compilation-errors.patch added to -mm tree

2017-02-24 Thread Dmitry V. Levin
On Fri, Feb 24, 2017 at 05:35:33PM +0300, Alexey Dobriyan wrote: > On Thu, Feb 23, 2017 at 02:44:31PM -0800, a...@linux-foundation.org wrote: > > /usr/include/linux/sysctl.h:38:2: error: unknown type name 'size_t' > > size_t *oldlenp; > > /usr/include/linux/sysctl.h:40:2: error: unknown type

[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

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

2017-02-22 Thread Dmitry V. Levin
"uapi: Use __kernel_long_t in struct mq_attr") Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/mqueue.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/mqueue.h b/include/uapi/linux/mqueue.h index d0a2b8e..4170778 100644 --- a/include

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

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

2017-02-22 Thread Dmitry V. Levin
On Thu, Feb 23, 2017 at 02:37:46PM +1300, Eric W. Biederman wrote: > "Dmitry V. Levin" <l...@altlinux.org> writes: > > > Include (guarded by #ifndef __KERNEL__) to fix the following > > linux/kexec.h userspace compilation errors: > > > > /usr/includ

[PATCH] uapi: stop including linux/sysctl.h in uapi/linux/netfilter.h

2017-02-22 Thread Dmitry V. Levin
linux/netfilter.h is the last uapi header file that includes linux/sysctl.h but it does not depend on definitions provided by this essentially dead header file. Suggested-by: Eric W. Biederman <ebied...@xmission.com> Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- includ

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

2017-02-22 Thread Dmitry V. Levin
userspace compilation of uapi headers that include linux/sysctl.h, e.g. linux/netfilter.h. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/sysctl.h | 4 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h

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

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

2017-02-15 Thread Dmitry V. Levin
Include to fix the following linux/dlm_netlink.h userspace compilation error: /usr/include/linux/dlm_netlink.h:35:21: error: 'DLM_RESNAME_MAXLEN' undeclared here (not in a function) char resource_name[DLM_RESNAME_MAXLEN]; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- includ

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

2017-02-15 Thread Dmitry V. Levin
"uapi: Use __kernel_long_t in struct mq_attr") Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/mqueue.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/mqueue.h b/include/uapi/linux/mqueue.h index d0a2b8e..4170778 100644 --- a/include

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

2017-02-15 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> --- include/uapi/linux/mroute6

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

2017-02-15 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> --- include/uapi/linux/ipv6_route.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi

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

2017-02-15 Thread Dmitry V. Levin
incomplete type struct sockaddr_storage dest_addr; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- 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 100644 --- a/includ

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

2017-02-15 Thread Dmitry V. Levin
Stop using NULL to fix the following linux/btrfs.h userspace compilation error: /usr/include/linux/btrfs.h: In function 'btrfs_err_str': /usr/include/linux/btrfs.h:740:11: error: 'NULL' undeclared (first use in this function) return NULL; Signed-off-by: Dmitry V. Levin <l...@altlinux.

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

2017-02-15 Thread Dmitry V. Levin
: error: unknown type name 'uint8_t' uint8_t __pad1; /usr/include/linux/target_core_user.h:119:4: error: unknown type name 'uint16_t' uint16_t __pad2; /usr/include/linux/target_core_user.h:120:4: error: unknown type name 'uint32_t' uint32_t __pad3; Signed-off-by: Dmitry V. Levin &l

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

2017-02-15 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> --- include/uapi/linux/mroute.h | 1 + 1 file changed, 1 insertion(+) diff

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

2017-02-15 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] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h

2017-02-15 Thread Dmitry V. Levin
' undeclared (first use in this function) return NULL; Suggested-by: Jeff Mahoney <je...@suse.com> Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- v2: remove btrfs_err_str rather than fix it include/uapi/linux/btrfs.h | 27 --- 1 file changed,

Re: [PATCH v7 7/8] uapi: export all headers under uapi directories

2017-02-27 Thread Dmitry V. Levin
On Mon, Feb 27, 2017 at 05:01:55PM +0100, Nicolas Dichtel wrote: > Le 24/02/2017 à 17:49, Nicolas Dichtel a écrit : > > Regularly, when a new header is created in include/uapi/, the developer > > forgets to add it in the corresponding Kbuild file. This error is usually > > detected after the

[RFC PATCH] uapi: move struct reiserfs_security_handle out from linux/reiserfs_xattr.h

2017-02-27 Thread Dmitry V. Levin
linux/reiserfs_xattr.h userspace compilation error: /usr/include/linux/reiserfs_xattr.h:21:2: error: unknown type name 'size_t' size_t length; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- Perhaps the whole file could be moved out from the UAPI. I'm not sure about that, though

[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 asm/signal.h userspace compilation errors

2017-02-25 Thread Dmitry V. Levin
n32, however, #include seems to be the most straightforward way to obtain the definition for sigaltstack.ss_size's type. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/asm-generic/signal.h | 3 +++ arch/alpha/include/uapi/asm/signal.h | 3 +++ arch/arm/include

[PATCH v2] uapi: fix asm/signal.h userspace compilation errors

2017-03-01 Thread Dmitry V. Levin
) < sizeof(__kernel_size_t). Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- v2: create a separate patch for x86, replace size_t with __kernel_size_t instead of including . include/uapi/asm-generic/signal.h | 2 +- arch/alpha/include/uapi/asm/signal.h | 2 +- arch/arm/include

[PATCH 3/3] uapi: fix asm/shmbuf.h userspace compilation errors

2017-03-01 Thread Dmitry V. Levin
: error: unknown type name '__kernel_ulong_t' __kernel_ulong_t __unused3; /usr/include/asm-generic/shmbuf.h:56:2: error: unknown type name '__kernel_ulong_t' __kernel_ulong_t __unused4; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/asm-generic/shmbuf.h | 1 + arch

[PATCH] uapi: fix another asm/shmbuf.h userspace compilation error

2017-03-01 Thread Dmitry V. Levin
(__kernel_size_t), but as the kernel treats shm_segsz field as __kernel_size_t anyway, UAPI should follow. Thanks to little-endiannes of x32 and 64-bit alignment of the field following shm_segsz, this change doesn't break ABI, and the difference doesn't manifest itself easily. Signed-off-by: Dmitry V

[PATCH 1/3] uapi: fix asm/msgbuf.h userspace compilation errors

2017-03-01 Thread Dmitry V. Levin
'__kernel_ulong_t' __kernel_ulong_t __unused5; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/asm-generic/msgbuf.h | 1 + arch/alpha/include/uapi/asm/msgbuf.h | 2 ++ arch/avr32/include/uapi/asm/msgbuf.h | 2 ++ arch/frv/include/uapi/asm/msgbuf.h | 2 ++

[PATCH v2] x86/uapi: fix asm/signal.h userspace compilation error

2017-03-01 Thread Dmitry V. Levin
Replace size_t to fix the following asm/signal.h userspace compilation error: /usr/include/asm/signal.h:126:2: error: unknown type name 'size_t' size_t ss_size; size_t is replaced with __kernel_size_t in all cases except x32 where unsigned int has to be used instead. Signed-off-by: Dmitry V

[PATCH 2/3] uapi: fix asm/sembuf.h userspace compilation errors

2017-03-01 Thread Dmitry V. Levin
' __kernel_ulong_t __unused3; /usr/include/asm/sembuf.h:21:2: error: unknown type name '__kernel_ulong_t' __kernel_ulong_t __unused4; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/asm-generic/sembuf.h | 1 + arch/alpha/include/uapi/asm/sembuf.h | 2 ++ arch/avr32/includ

Re: [PATCH v2] x86/uapi: fix asm/signal.h userspace compilation error

2017-03-01 Thread Dmitry V. Levin
On Wed, Mar 01, 2017 at 04:26:29PM -0800, h...@zytor.com wrote: > On March 1, 2017 4:18:54 PM PST, "Dmitry V. Levin" <l...@altlinux.org> wrote: > >Replace size_t to fix the following asm/signal.h userspace compilation > >error: > > > >/usr/include/a

[PATCH 3/3] uapi: fix scsi/scsi_bsg_fc.h userspace compilation errors

2017-02-28 Thread Dmitry V. Levin
ype name 'uint32_t' uint32_t msgcode; /usr/include/scsi/scsi_bsg_fc.h:306:2: error: unknown type name 'uint32_t' uint32_t result; /usr/include/scsi/scsi_bsg_fc.h:309:2: error: unknown type name 'uint32_t' uint32_t reply_payload_rcv_len; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- inc

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

2017-02-28 Thread Dmitry V. Levin
/cld.h:49:2: error: unknown type name 'uint32_t' uint32_t cm_xid; /* transaction id */ /usr/include/linux/nfsd/cld.h:51:3: error: unknown type name 'int64_t' int64_t cm_gracetime; /* grace period start time */ Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/linux/nfsd

[PATCH 2/3] uapi: fix scsi/scsi_netlink_fc.h userspace compilation errors

2017-02-28 Thread Dmitry V. Levin
(not in a function) } __attribute__((aligned(sizeof(uint64_t; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/scsi/scsi_netlink_fc.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/uapi/scsi/scsi_netlink_fc.h b/include/uap

[PATCH 1/3] uapi: fix scsi/scsi_netlink.h userspace compilation errors

2017-02-28 Thread Dmitry V. Levin
/scsi/scsi_netlink.h:48:33: error: 'uint64_t' undeclared here (not in a function) } __attribute__((aligned(sizeof(uint64_t; /usr/include/scsi/scsi_netlink.h:92:2: error: expected specifier-qualifier-list before 'uint64_t' uint64_t vendor_id; Signed-off-by: Dmitry V. Levin <l...@altlinux.

[PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h

2017-02-28 Thread Dmitry V. Levin
' undeclared (first use in this function) return NULL; Suggested-by: Jeff Mahoney <je...@suse.com> Signed-off-by: Dmitry V. Levin <l...@altlinux.org> Reviewed-by: David Sterba <dste...@suse.com> --- v3: the patch seems to be lost, resending with updated list of addr

Re: [PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h

2017-03-02 Thread Dmitry V. Levin
On Thu, Mar 02, 2017 at 12:42:12PM +0100, David Sterba wrote: > On Wed, Mar 01, 2017 at 03:54:35PM +0100, David Sterba wrote: > > On Wed, Mar 01, 2017 at 02:12:50AM +0300, Dmitry V. Levin wrote: > > > btrfs_err_str function is not called from anywhere and is replicated >

[PATCH] uapi: fix asm/ipcbuf.h userspace compilation errors

2017-02-26 Thread Dmitry V. Levin
-generic/ipcbuf.h:30:2: error: unknown type name '__kernel_ulong_t' __kernel_ulong_t __unused1; /usr/include/asm-generic/ipcbuf.h:31:2: error: unknown type name '__kernel_ulong_t' __kernel_ulong_t __unused2; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- include/uapi/asm-g

Re: + uapi-fix-linux-sysctlh-userspace-compilation-errors.patch added to -mm tree

2017-02-27 Thread Dmitry V. Levin
On Sat, Feb 25, 2017 at 01:35:51AM +0300, Dmitry V. Levin wrote: > On Fri, Feb 24, 2017 at 05:35:33PM +0300, Alexey Dobriyan wrote: > > On Thu, Feb 23, 2017 at 02:44:31PM -0800, a...@linux-foundation.org wrote: > > > /usr/include/linux/sysctl.h:38:2: error: unknown

Re: + uapi-fix-linux-sysctlh-userspace-compilation-errors.patch added to -mm tree

2017-02-27 Thread Dmitry V. Levin
On Mon, Feb 27, 2017 at 12:38:16PM +0300, Alexey Dobriyan wrote: > On Sat, Feb 25, 2017 at 1:35 AM, Dmitry V. Levin <l...@altlinux.org> wrote: > > On Fri, Feb 24, 2017 at 05:35:33PM +0300, Alexey Dobriyan wrote: > >> On Thu, Feb 23, 2017 at 02:44:31PM -0800, a...@li

[PATCH 0/5] uapi: fix userspace compilation of asm/ ipc headers

2017-03-25 Thread Dmitry V. Levin
This is resend of short series of trivial userspace compilation fixes acked earlier by Arnd Bergmann. Nobody else from the long Cc list of the original patch series has shown any interest at all, so I've trimmed Cc down. Dmitry V. Levin (5): uapi: fix asm/ipcbuf.h userspace compilation errors

[PATCH 4/5] uapi: fix asm/shmbuf.h userspace compilation errors

2017-03-25 Thread Dmitry V. Levin
/include/asm-generic/shmbuf.h:55:2: error: unknown type name '__kernel_ulong_t' __kernel_ulong_t __unused3; /usr/include/asm-generic/shmbuf.h:56:2: error: unknown type name '__kernel_ulong_t' __kernel_ulong_t __unused4; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> Acked-by

[PATCH 5/5] uapi: fix another asm/shmbuf.h userspace compilation error

2017-03-25 Thread Dmitry V. Levin
itself easily. Signed-off-by: Dmitry V. Levin <l...@altlinux.org> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/alpha/include/uapi/asm/shmbuf.h | 2 +- arch/avr32/include/uapi/asm/shmbuf.h | 2 +- arch/frv/include/uapi/asm/shmbuf.h | 2 +- arch/ia64/include/uapi/asm/shm

[PATCH 3/5] uapi: fix asm/sembuf.h userspace compilation errors

2017-03-25 Thread Dmitry V. Levin
type name '__kernel_ulong_t' __kernel_ulong_t __unused3; /usr/include/asm/sembuf.h:21:2: error: unknown type name '__kernel_ulong_t' __kernel_ulong_t __unused4; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/alpha/include/uapi/

[PATCH 1/5] uapi: fix asm/ipcbuf.h userspace compilation errors

2017-03-25 Thread Dmitry V. Levin
- sizeof(__kernel_mode_t)]; /usr/include/asm-generic/ipcbuf.h:30:2: error: unknown type name '__kernel_ulong_t' __kernel_ulong_t __unused1; /usr/include/asm-generic/ipcbuf.h:31:2: error: unknown type name '__kernel_ulong_t' __kernel_ulong_t __unused2; Signed-off-by: Dmitry V. Levin &l

[PATCH 2/5] uapi: fix asm/msgbuf.h userspace compilation errors

2017-03-25 Thread Dmitry V. Levin
/msgbuf.h:44:2: error: unknown type name '__kernel_ulong_t' __kernel_ulong_t __unused5; Signed-off-by: Dmitry V. Levin <l...@altlinux.org> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/alpha/include/uapi/asm/msgbuf.h | 2 ++ arch/avr32/include/uapi/asm/msgbuf.h | 2 ++ arch

  1   2   3   4   5   6   7   >