Linux-arch Archive mirror
 help / color / mirror / Atom feed
* [PATCH] uapi: fix asm/ipcbuf.h userspace compilation errors
@ 2017-02-26 18:29 Dmitry V. Levin
  2017-02-26 18:29 ` Dmitry V. Levin
  2017-03-01 16:23 ` Arnd Bergmann
  0 siblings, 2 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-02-26 18:29 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Martin Schwidefsky, Heiko Carstens, David S. Miller, Chris Zankel,
	Max Filippov, linux-arch, linux-s390, sparclinux, linux-xtensa,
	linux-kernel

Include <linux/posix_types.h> to fix asm/ipcbuf.h userspace compilation
errors like this:

/usr/include/asm-generic/ipcbuf.h:20:2: error: unknown type name '__kernel_key_t'
  __kernel_key_t  key;
/usr/include/asm-generic/ipcbuf.h:21:2: error: unknown type name '__kernel_uid32_t'
  __kernel_uid32_t uid;
/usr/include/asm-generic/ipcbuf.h:22:2: error: unknown type name '__kernel_gid32_t'
  __kernel_gid32_t gid;
/usr/include/asm-generic/ipcbuf.h:23:2: error: unknown type name '__kernel_uid32_t'
  __kernel_uid32_t cuid;
/usr/include/asm-generic/ipcbuf.h:24:2: error: unknown type name '__kernel_gid32_t'
  __kernel_gid32_t cgid;
/usr/include/asm-generic/ipcbuf.h:25:2: error: unknown type name '__kernel_mode_t'
  __kernel_mode_t  mode;
/usr/include/asm-generic/ipcbuf.h:27:35: error: '__kernel_mode_t' undeclared here (not in a function)
  unsigned char  __pad1[4 - 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 <ldv@altlinux.org>
---
 include/uapi/asm-generic/ipcbuf.h     | 2 ++
 arch/s390/include/uapi/asm/ipcbuf.h   | 2 ++
 arch/sparc/include/uapi/asm/ipcbuf.h  | 2 ++
 arch/xtensa/include/uapi/asm/ipcbuf.h | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h
index 3dbcc1e..909f825 100644
--- a/include/uapi/asm-generic/ipcbuf.h
+++ b/include/uapi/asm-generic/ipcbuf.h
@@ -1,6 +1,8 @@
 #ifndef __ASM_GENERIC_IPCBUF_H
 #define __ASM_GENERIC_IPCBUF_H
 
+#include <linux/posix_types.h>
+
 /*
  * The generic ipc64_perm structure:
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/s390/include/uapi/asm/ipcbuf.h b/arch/s390/include/uapi/asm/ipcbuf.h
index 37f293d..9f1185c 100644
--- a/arch/s390/include/uapi/asm/ipcbuf.h
+++ b/arch/s390/include/uapi/asm/ipcbuf.h
@@ -1,6 +1,8 @@
 #ifndef __S390_IPCBUF_H__
 #define __S390_IPCBUF_H__
 
+#include <linux/posix_types.h>
+
 /*
  * The user_ipc_perm structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/ipcbuf.h b/arch/sparc/include/uapi/asm/ipcbuf.h
index 66013b4..b7b1bcb 100644
--- a/arch/sparc/include/uapi/asm/ipcbuf.h
+++ b/arch/sparc/include/uapi/asm/ipcbuf.h
@@ -1,6 +1,8 @@
 #ifndef __SPARC_IPCBUF_H
 #define __SPARC_IPCBUF_H
 
+#include <linux/posix_types.h>
+
 /*
  * The ipc64_perm structure for sparc/sparc64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/ipcbuf.h b/arch/xtensa/include/uapi/asm/ipcbuf.h
index c33aa6a..7442e48 100644
--- a/arch/xtensa/include/uapi/asm/ipcbuf.h
+++ b/arch/xtensa/include/uapi/asm/ipcbuf.h
@@ -11,6 +11,8 @@
 #ifndef _XTENSA_IPCBUF_H
 #define _XTENSA_IPCBUF_H
 
+#include <linux/posix_types.h>
+
 /*
  * Pad space is left for:
  * - 32-bit mode_t and seq
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH] uapi: fix asm/ipcbuf.h userspace compilation errors
  2017-02-26 18:29 [PATCH] uapi: fix asm/ipcbuf.h userspace compilation errors Dmitry V. Levin
@ 2017-02-26 18:29 ` Dmitry V. Levin
  2017-03-01 16:23 ` Arnd Bergmann
  1 sibling, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-02-26 18:29 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Martin Schwidefsky, Heiko Carstens, David S. Miller, Chris Zankel,
	Max Filippov, linux-arch, linux-s390, sparclinux, linux-xtensa,
	linux-kernel

Include <linux/posix_types.h> to fix asm/ipcbuf.h userspace compilation
errors like this:

/usr/include/asm-generic/ipcbuf.h:20:2: error: unknown type name '__kernel_key_t'
  __kernel_key_t  key;
/usr/include/asm-generic/ipcbuf.h:21:2: error: unknown type name '__kernel_uid32_t'
  __kernel_uid32_t uid;
/usr/include/asm-generic/ipcbuf.h:22:2: error: unknown type name '__kernel_gid32_t'
  __kernel_gid32_t gid;
/usr/include/asm-generic/ipcbuf.h:23:2: error: unknown type name '__kernel_uid32_t'
  __kernel_uid32_t cuid;
/usr/include/asm-generic/ipcbuf.h:24:2: error: unknown type name '__kernel_gid32_t'
  __kernel_gid32_t cgid;
/usr/include/asm-generic/ipcbuf.h:25:2: error: unknown type name '__kernel_mode_t'
  __kernel_mode_t  mode;
/usr/include/asm-generic/ipcbuf.h:27:35: error: '__kernel_mode_t' undeclared here (not in a function)
  unsigned char  __pad1[4 - 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 <ldv@altlinux.org>
---
 include/uapi/asm-generic/ipcbuf.h     | 2 ++
 arch/s390/include/uapi/asm/ipcbuf.h   | 2 ++
 arch/sparc/include/uapi/asm/ipcbuf.h  | 2 ++
 arch/xtensa/include/uapi/asm/ipcbuf.h | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h
index 3dbcc1e..909f825 100644
--- a/include/uapi/asm-generic/ipcbuf.h
+++ b/include/uapi/asm-generic/ipcbuf.h
@@ -1,6 +1,8 @@
 #ifndef __ASM_GENERIC_IPCBUF_H
 #define __ASM_GENERIC_IPCBUF_H
 
+#include <linux/posix_types.h>
+
 /*
  * The generic ipc64_perm structure:
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/s390/include/uapi/asm/ipcbuf.h b/arch/s390/include/uapi/asm/ipcbuf.h
index 37f293d..9f1185c 100644
--- a/arch/s390/include/uapi/asm/ipcbuf.h
+++ b/arch/s390/include/uapi/asm/ipcbuf.h
@@ -1,6 +1,8 @@
 #ifndef __S390_IPCBUF_H__
 #define __S390_IPCBUF_H__
 
+#include <linux/posix_types.h>
+
 /*
  * The user_ipc_perm structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/ipcbuf.h b/arch/sparc/include/uapi/asm/ipcbuf.h
index 66013b4..b7b1bcb 100644
--- a/arch/sparc/include/uapi/asm/ipcbuf.h
+++ b/arch/sparc/include/uapi/asm/ipcbuf.h
@@ -1,6 +1,8 @@
 #ifndef __SPARC_IPCBUF_H
 #define __SPARC_IPCBUF_H
 
+#include <linux/posix_types.h>
+
 /*
  * The ipc64_perm structure for sparc/sparc64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/ipcbuf.h b/arch/xtensa/include/uapi/asm/ipcbuf.h
index c33aa6a..7442e48 100644
--- a/arch/xtensa/include/uapi/asm/ipcbuf.h
+++ b/arch/xtensa/include/uapi/asm/ipcbuf.h
@@ -11,6 +11,8 @@
 #ifndef _XTENSA_IPCBUF_H
 #define _XTENSA_IPCBUF_H
 
+#include <linux/posix_types.h>
+
 /*
  * Pad space is left for:
  * - 32-bit mode_t and seq
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH] uapi: fix asm/ipcbuf.h userspace compilation errors
  2017-02-26 18:29 [PATCH] uapi: fix asm/ipcbuf.h userspace compilation errors Dmitry V. Levin
  2017-02-26 18:29 ` Dmitry V. Levin
@ 2017-03-01 16:23 ` Arnd Bergmann
  2017-03-02  0:22   ` [PATCH 1/3] uapi: fix asm/msgbuf.h " Dmitry V. Levin
                     ` (2 more replies)
  1 sibling, 3 replies; 28+ messages in thread
From: Arnd Bergmann @ 2017-03-01 16:23 UTC (permalink / raw)
  To: Dmitry V. Levin
  Cc: Martin Schwidefsky, Heiko Carstens, David S. Miller, Chris Zankel,
	Max Filippov, linux-arch, linux-s390, sparclinux, linux-xtensa,
	Linux Kernel Mailing List

On Sun, Feb 26, 2017 at 7:29 PM, Dmitry V. Levin <ldv@altlinux.org> wrote:
> Include <linux/posix_types.h> to fix asm/ipcbuf.h userspace compilation
> errors like this:
>
> /usr/include/asm-generic/ipcbuf.h:20:2: error: unknown type name '__kernel_key_t'
>   __kernel_key_t  key;
> /usr/include/asm-generic/ipcbuf.h:21:2: error: unknown type name '__kernel_uid32_t'
>   __kernel_uid32_t uid;
> /usr/include/asm-generic/ipcbuf.h:22:2: error: unknown type name '__kernel_gid32_t'
>   __kernel_gid32_t gid;
> /usr/include/asm-generic/ipcbuf.h:23:2: error: unknown type name '__kernel_uid32_t'
>   __kernel_uid32_t cuid;
> /usr/include/asm-generic/ipcbuf.h:24:2: error: unknown type name '__kernel_gid32_t'
>   __kernel_gid32_t cgid;
> /usr/include/asm-generic/ipcbuf.h:25:2: error: unknown type name '__kernel_mode_t'
>   __kernel_mode_t  mode;
> /usr/include/asm-generic/ipcbuf.h:27:35: error: '__kernel_mode_t' undeclared here (not in a function)
>   unsigned char  __pad1[4 - 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 <ldv@altlinux.org>
> ---
>  include/uapi/asm-generic/ipcbuf.h     | 2 ++
>  arch/s390/include/uapi/asm/ipcbuf.h   | 2 ++
>  arch/sparc/include/uapi/asm/ipcbuf.h  | 2 ++
>  arch/xtensa/include/uapi/asm/ipcbuf.h | 2 ++
>  4 files changed, 8 insertions(+)
>
> diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h
> index 3dbcc1e..909f825 100644
> --- a/include/uapi/asm-generic/ipcbuf.h
> +++ b/include/uapi/asm-generic/ipcbuf.h
> @@ -1,6 +1,8 @@
>  #ifndef __ASM_GENERIC_IPCBUF_H
>  #define __ASM_GENERIC_IPCBUF_H
>
> +#include <linux/posix_types.h>
> +


Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/3] uapi: fix asm/msgbuf.h userspace compilation errors
  2017-03-01 16:23 ` Arnd Bergmann
@ 2017-03-02  0:22   ` Dmitry V. Levin
  2017-03-02  0:22     ` Dmitry V. Levin
  2017-03-02  0:22   ` [PATCH 2/3] uapi: fix asm/sembuf.h " Dmitry V. Levin
  2017-03-02  0:22   ` [PATCH 3/3] uapi: fix asm/shmbuf.h " Dmitry V. Levin
  2 siblings, 1 reply; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-02  0:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Tony Luck, Fenghua Yu,
	Ralf Baechle, David Howells, James E.J. Bottomley, Helge Deller,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, David S. Miller, Chris Zankel,
	Max Filippov, linux-arch, linux-alpha, linux-ia64, linux-mips,
	linux-am33-list

Include <asm/ipcbuf.h> to fix asm/msgbuf.h userspace compilation errors
like this:

/usr/include/asm-generic/msgbuf.h:25:20: error: field 'msg_perm' has incomplete type
  struct ipc64_perm msg_perm;
/usr/include/asm-generic/msgbuf.h:26:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_stime; /* last msgsnd time */
/usr/include/asm-generic/msgbuf.h:30:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_rtime; /* last msgrcv time */
/usr/include/asm-generic/msgbuf.h:34:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_ctime; /* last change time */
/usr/include/asm-generic/msgbuf.h:38:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_cbytes; /* current number of bytes on queue */
/usr/include/asm-generic/msgbuf.h:39:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_qnum; /* number of messages in queue */
/usr/include/asm-generic/msgbuf.h:40:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_qbytes; /* max number of bytes on queue */
/usr/include/asm-generic/msgbuf.h:41:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t msg_lspid; /* pid of last msgsnd */
/usr/include/asm-generic/msgbuf.h:42:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t msg_lrpid; /* last receive pid */
/usr/include/asm-generic/msgbuf.h:43:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused4;
/usr/include/asm-generic/msgbuf.h:44:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused5;

Signed-off-by: Dmitry V. Levin <ldv@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 ++
 arch/ia64/include/uapi/asm/msgbuf.h    | 2 ++
 arch/m32r/include/uapi/asm/msgbuf.h    | 2 ++
 arch/mips/include/uapi/asm/msgbuf.h    | 1 +
 arch/mn10300/include/uapi/asm/msgbuf.h | 2 ++
 arch/parisc/include/uapi/asm/msgbuf.h  | 1 +
 arch/powerpc/include/uapi/asm/msgbuf.h | 2 ++
 arch/s390/include/uapi/asm/msgbuf.h    | 2 ++
 arch/sparc/include/uapi/asm/msgbuf.h   | 2 ++
 arch/xtensa/include/uapi/asm/msgbuf.h  | 2 ++
 13 files changed, 23 insertions(+)

diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h
index f55ecc4..f3c3b43 100644
--- a/include/uapi/asm-generic/msgbuf.h
+++ b/include/uapi/asm-generic/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_MSGBUF_H
 #define __ASM_GENERIC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 /*
  * generic msqid64_ds structure.
diff --git a/arch/alpha/include/uapi/asm/msgbuf.h b/arch/alpha/include/uapi/asm/msgbuf.h
index 9849650..8de899a 100644
--- a/arch/alpha/include/uapi/asm/msgbuf.h
+++ b/arch/alpha/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_MSGBUF_H
 #define _ALPHA_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The msqid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/msgbuf.h b/arch/avr32/include/uapi/asm/msgbuf.h
index 9eae6ef..45cdffb 100644
--- a/arch/avr32/include/uapi/asm/msgbuf.h
+++ b/arch/avr32/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_MSGBUF_H
 #define _UAPI__ASM_AVR32_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for i386 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/msgbuf.h b/arch/frv/include/uapi/asm/msgbuf.h
index 97ceb55..92d6656 100644
--- a/arch/frv/include/uapi/asm/msgbuf.h
+++ b/arch/frv/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/msgbuf.h b/arch/ia64/include/uapi/asm/msgbuf.h
index 6c64c0d..9a31b60 100644
--- a/arch/ia64/include/uapi/asm/msgbuf.h
+++ b/arch/ia64/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_MSGBUF_H
 #define _ASM_IA64_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/msgbuf.h b/arch/m32r/include/uapi/asm/msgbuf.h
index 0d5a877..4786c0c 100644
--- a/arch/m32r/include/uapi/asm/msgbuf.h
+++ b/arch/m32r/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_MSGBUF_H
 #define _ASM_M32R_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for m32r architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/msgbuf.h b/arch/mips/include/uapi/asm/msgbuf.h
index df849e8..c84a388 100644
--- a/arch/mips/include/uapi/asm/msgbuf.h
+++ b/arch/mips/include/uapi/asm/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 
 /*
  * The msqid64_ds structure for the MIPS architecture.
diff --git a/arch/mn10300/include/uapi/asm/msgbuf.h b/arch/mn10300/include/uapi/asm/msgbuf.h
index 8b60245..f1c5dd5 100644
--- a/arch/mn10300/include/uapi/asm/msgbuf.h
+++ b/arch/mn10300/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/msgbuf.h b/arch/parisc/include/uapi/asm/msgbuf.h
index 2e83ac7..c70f1d3 100644
--- a/arch/parisc/include/uapi/asm/msgbuf.h
+++ b/arch/parisc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_MSGBUF_H
 #define _PARISC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/msgbuf.h b/arch/powerpc/include/uapi/asm/msgbuf.h
index dd76743..3b87d25 100644
--- a/arch/powerpc/include/uapi/asm/msgbuf.h
+++ b/arch/powerpc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_MSGBUF_H
 #define _ASM_POWERPC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for the PowerPC architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/s390/include/uapi/asm/msgbuf.h b/arch/s390/include/uapi/asm/msgbuf.h
index 1bbdee9..ab04112 100644
--- a/arch/s390/include/uapi/asm/msgbuf.h
+++ b/arch/s390/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_MSGBUF_H
 #define _S390_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The msqid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/msgbuf.h b/arch/sparc/include/uapi/asm/msgbuf.h
index efc7cbe9..699f631 100644
--- a/arch/sparc/include/uapi/asm/msgbuf.h
+++ b/arch/sparc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_MSGBUF_H
 #define _SPARC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for sparc64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/msgbuf.h b/arch/xtensa/include/uapi/asm/msgbuf.h
index 693c967..b75458b 100644
--- a/arch/xtensa/include/uapi/asm/msgbuf.h
+++ b/arch/xtensa/include/uapi/asm/msgbuf.h
@@ -17,6 +17,8 @@
 #ifndef _XTENSA_MSGBUF_H
 #define _XTENSA_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 struct msqid64_ds {
 	struct ipc64_perm msg_perm;
 #ifdef __XTENSA_EB__
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 1/3] uapi: fix asm/msgbuf.h userspace compilation errors
  2017-03-02  0:22   ` [PATCH 1/3] uapi: fix asm/msgbuf.h " Dmitry V. Levin
@ 2017-03-02  0:22     ` Dmitry V. Levin
  0 siblings, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-02  0:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Tony Luck, Fenghua Yu,
	Ralf Baechle, David Howells, James E.J. Bottomley, Helge Deller,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, David S. Miller, Chris Zankel,
	Max Filippov, linux-arch, linux-alpha, linux-ia64, linux-mips,
	linux-am33-list, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, linux-xtensa, linux-kernel

Include <asm/ipcbuf.h> to fix asm/msgbuf.h userspace compilation errors
like this:

/usr/include/asm-generic/msgbuf.h:25:20: error: field 'msg_perm' has incomplete type
  struct ipc64_perm msg_perm;
/usr/include/asm-generic/msgbuf.h:26:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_stime; /* last msgsnd time */
/usr/include/asm-generic/msgbuf.h:30:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_rtime; /* last msgrcv time */
/usr/include/asm-generic/msgbuf.h:34:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_ctime; /* last change time */
/usr/include/asm-generic/msgbuf.h:38:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_cbytes; /* current number of bytes on queue */
/usr/include/asm-generic/msgbuf.h:39:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_qnum; /* number of messages in queue */
/usr/include/asm-generic/msgbuf.h:40:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_qbytes; /* max number of bytes on queue */
/usr/include/asm-generic/msgbuf.h:41:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t msg_lspid; /* pid of last msgsnd */
/usr/include/asm-generic/msgbuf.h:42:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t msg_lrpid; /* last receive pid */
/usr/include/asm-generic/msgbuf.h:43:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused4;
/usr/include/asm-generic/msgbuf.h:44:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused5;

Signed-off-by: Dmitry V. Levin <ldv@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 ++
 arch/ia64/include/uapi/asm/msgbuf.h    | 2 ++
 arch/m32r/include/uapi/asm/msgbuf.h    | 2 ++
 arch/mips/include/uapi/asm/msgbuf.h    | 1 +
 arch/mn10300/include/uapi/asm/msgbuf.h | 2 ++
 arch/parisc/include/uapi/asm/msgbuf.h  | 1 +
 arch/powerpc/include/uapi/asm/msgbuf.h | 2 ++
 arch/s390/include/uapi/asm/msgbuf.h    | 2 ++
 arch/sparc/include/uapi/asm/msgbuf.h   | 2 ++
 arch/xtensa/include/uapi/asm/msgbuf.h  | 2 ++
 13 files changed, 23 insertions(+)

diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h
index f55ecc4..f3c3b43 100644
--- a/include/uapi/asm-generic/msgbuf.h
+++ b/include/uapi/asm-generic/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_MSGBUF_H
 #define __ASM_GENERIC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 /*
  * generic msqid64_ds structure.
diff --git a/arch/alpha/include/uapi/asm/msgbuf.h b/arch/alpha/include/uapi/asm/msgbuf.h
index 9849650..8de899a 100644
--- a/arch/alpha/include/uapi/asm/msgbuf.h
+++ b/arch/alpha/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_MSGBUF_H
 #define _ALPHA_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The msqid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/msgbuf.h b/arch/avr32/include/uapi/asm/msgbuf.h
index 9eae6ef..45cdffb 100644
--- a/arch/avr32/include/uapi/asm/msgbuf.h
+++ b/arch/avr32/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_MSGBUF_H
 #define _UAPI__ASM_AVR32_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for i386 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/msgbuf.h b/arch/frv/include/uapi/asm/msgbuf.h
index 97ceb55..92d6656 100644
--- a/arch/frv/include/uapi/asm/msgbuf.h
+++ b/arch/frv/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/msgbuf.h b/arch/ia64/include/uapi/asm/msgbuf.h
index 6c64c0d..9a31b60 100644
--- a/arch/ia64/include/uapi/asm/msgbuf.h
+++ b/arch/ia64/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_MSGBUF_H
 #define _ASM_IA64_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/msgbuf.h b/arch/m32r/include/uapi/asm/msgbuf.h
index 0d5a877..4786c0c 100644
--- a/arch/m32r/include/uapi/asm/msgbuf.h
+++ b/arch/m32r/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_MSGBUF_H
 #define _ASM_M32R_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for m32r architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/msgbuf.h b/arch/mips/include/uapi/asm/msgbuf.h
index df849e8..c84a388 100644
--- a/arch/mips/include/uapi/asm/msgbuf.h
+++ b/arch/mips/include/uapi/asm/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 
 /*
  * The msqid64_ds structure for the MIPS architecture.
diff --git a/arch/mn10300/include/uapi/asm/msgbuf.h b/arch/mn10300/include/uapi/asm/msgbuf.h
index 8b60245..f1c5dd5 100644
--- a/arch/mn10300/include/uapi/asm/msgbuf.h
+++ b/arch/mn10300/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/msgbuf.h b/arch/parisc/include/uapi/asm/msgbuf.h
index 2e83ac7..c70f1d3 100644
--- a/arch/parisc/include/uapi/asm/msgbuf.h
+++ b/arch/parisc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_MSGBUF_H
 #define _PARISC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/msgbuf.h b/arch/powerpc/include/uapi/asm/msgbuf.h
index dd76743..3b87d25 100644
--- a/arch/powerpc/include/uapi/asm/msgbuf.h
+++ b/arch/powerpc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_MSGBUF_H
 #define _ASM_POWERPC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for the PowerPC architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/s390/include/uapi/asm/msgbuf.h b/arch/s390/include/uapi/asm/msgbuf.h
index 1bbdee9..ab04112 100644
--- a/arch/s390/include/uapi/asm/msgbuf.h
+++ b/arch/s390/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_MSGBUF_H
 #define _S390_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The msqid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/msgbuf.h b/arch/sparc/include/uapi/asm/msgbuf.h
index efc7cbe9..699f631 100644
--- a/arch/sparc/include/uapi/asm/msgbuf.h
+++ b/arch/sparc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_MSGBUF_H
 #define _SPARC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for sparc64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/msgbuf.h b/arch/xtensa/include/uapi/asm/msgbuf.h
index 693c967..b75458b 100644
--- a/arch/xtensa/include/uapi/asm/msgbuf.h
+++ b/arch/xtensa/include/uapi/asm/msgbuf.h
@@ -17,6 +17,8 @@
 #ifndef _XTENSA_MSGBUF_H
 #define _XTENSA_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 struct msqid64_ds {
 	struct ipc64_perm msg_perm;
 #ifdef __XTENSA_EB__
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 2/3] uapi: fix asm/sembuf.h userspace compilation errors
  2017-03-01 16:23 ` Arnd Bergmann
  2017-03-02  0:22   ` [PATCH 1/3] uapi: fix asm/msgbuf.h " Dmitry V. Levin
@ 2017-03-02  0:22   ` Dmitry V. Levin
  2017-03-02  0:22     ` Dmitry V. Levin
  2017-03-02  0:22   ` [PATCH 3/3] uapi: fix asm/shmbuf.h " Dmitry V. Levin
  2 siblings, 1 reply; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-02  0:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Tony Luck, Fenghua Yu,
	Ralf Baechle, David Howells, James E.J. Bottomley, Helge Deller,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, David S. Miller,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Chris Zankel,
	Max Filippov

Include <asm/ipcbuf.h> to fix asm/sembuf.h userspace compilation errors
like this:

/usr/include/asm/sembuf.h:14:20: error: field 'sem_perm' has incomplete type
  struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
/usr/include/asm/sembuf.h:15:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t sem_otime; /* last semop time */
/usr/include/asm/sembuf.h:16:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused1;
/usr/include/asm/sembuf.h:17:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t sem_ctime; /* last change time */
/usr/include/asm/sembuf.h:18:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused2;
/usr/include/asm/sembuf.h:19:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t sem_nsems; /* no. of semaphores in array */
/usr/include/asm/sembuf.h:20:2: error: unknown 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 <ldv@altlinux.org>
---
 include/uapi/asm-generic/sembuf.h      | 1 +
 arch/alpha/include/uapi/asm/sembuf.h   | 2 ++
 arch/avr32/include/uapi/asm/sembuf.h   | 2 ++
 arch/frv/include/uapi/asm/sembuf.h     | 2 ++
 arch/ia64/include/uapi/asm/sembuf.h    | 2 ++
 arch/m32r/include/uapi/asm/sembuf.h    | 2 ++
 arch/mips/include/uapi/asm/sembuf.h    | 2 ++
 arch/mn10300/include/uapi/asm/sembuf.h | 2 ++
 arch/parisc/include/uapi/asm/sembuf.h  | 1 +
 arch/powerpc/include/uapi/asm/sembuf.h | 2 ++
 arch/s390/include/uapi/asm/sembuf.h    | 2 ++
 arch/sparc/include/uapi/asm/sembuf.h   | 2 ++
 arch/x86/include/uapi/asm/sembuf.h     | 2 ++
 arch/xtensa/include/uapi/asm/sembuf.h  | 1 +
 14 files changed, 25 insertions(+)

diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h
index 4cb2c13..1d910d7 100644
--- a/include/uapi/asm-generic/sembuf.h
+++ b/include/uapi/asm-generic/sembuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_SEMBUF_H
 #define __ASM_GENERIC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /*
diff --git a/arch/alpha/include/uapi/asm/sembuf.h b/arch/alpha/include/uapi/asm/sembuf.h
index 7b38b15..b6bdd5f 100644
--- a/arch/alpha/include/uapi/asm/sembuf.h
+++ b/arch/alpha/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_SEMBUF_H
 #define _ALPHA_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The semid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/sembuf.h b/arch/avr32/include/uapi/asm/sembuf.h
index 6c6f7cf..ec4ddd6 100644
--- a/arch/avr32/include/uapi/asm/sembuf.h
+++ b/arch/avr32/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_SEMBUF_H
 #define _UAPI__ASM_AVR32_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
 * The semid64_ds structure for AVR32 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/sembuf.h b/arch/frv/include/uapi/asm/sembuf.h
index 164b127..0d73641 100644
--- a/arch/frv/include/uapi/asm/sembuf.h
+++ b/arch/frv/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/sembuf.h b/arch/ia64/include/uapi/asm/sembuf.h
index 1340fbc..2e218b0 100644
--- a/arch/ia64/include/uapi/asm/sembuf.h
+++ b/arch/ia64/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_SEMBUF_H
 #define _ASM_IA64_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/sembuf.h b/arch/m32r/include/uapi/asm/sembuf.h
index c9873d6..58ad1f8 100644
--- a/arch/m32r/include/uapi/asm/sembuf.h
+++ b/arch/m32r/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_SEMBUF_H
 #define _ASM_M32R_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for m32r architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/sembuf.h b/arch/mips/include/uapi/asm/sembuf.h
index e1085ac..a55ab3c 100644
--- a/arch/mips/include/uapi/asm/sembuf.h
+++ b/arch/mips/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for the MIPS architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mn10300/include/uapi/asm/sembuf.h b/arch/mn10300/include/uapi/asm/sembuf.h
index 301f3f9..3529f55 100644
--- a/arch/mn10300/include/uapi/asm/sembuf.h
+++ b/arch/mn10300/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/sembuf.h b/arch/parisc/include/uapi/asm/sembuf.h
index c20971b..cff5e43 100644
--- a/arch/parisc/include/uapi/asm/sembuf.h
+++ b/arch/parisc/include/uapi/asm/sembuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_SEMBUF_H
 #define _PARISC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/sembuf.h b/arch/powerpc/include/uapi/asm/sembuf.h
index 99a4193..d001c0a 100644
--- a/arch/powerpc/include/uapi/asm/sembuf.h
+++ b/arch/powerpc/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_SEMBUF_H
 #define _ASM_POWERPC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/arch/s390/include/uapi/asm/sembuf.h b/arch/s390/include/uapi/asm/sembuf.h
index 32626b0..734c9de 100644
--- a/arch/s390/include/uapi/asm/sembuf.h
+++ b/arch/s390/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_SEMBUF_H
 #define _S390_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The semid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/sembuf.h b/arch/sparc/include/uapi/asm/sembuf.h
index faee1be..28f7060 100644
--- a/arch/sparc/include/uapi/asm/sembuf.h
+++ b/arch/sparc/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_SEMBUF_H
 #define _SPARC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for sparc architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/x86/include/uapi/asm/sembuf.h b/arch/x86/include/uapi/asm/sembuf.h
index cc2d6a3..d88cc89 100644
--- a/arch/x86/include/uapi/asm/sembuf.h
+++ b/arch/x86/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_X86_SEMBUF_H
 #define _ASM_X86_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for x86 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/sembuf.h b/arch/xtensa/include/uapi/asm/sembuf.h
index c158704..2494c41 100644
--- a/arch/xtensa/include/uapi/asm/sembuf.h
+++ b/arch/xtensa/include/uapi/asm/sembuf.h
@@ -21,6 +21,7 @@
 #ifndef _XTENSA_SEMBUF_H
 #define _XTENSA_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/byteorder.h>
 
 struct semid64_ds {
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 2/3] uapi: fix asm/sembuf.h userspace compilation errors
  2017-03-02  0:22   ` [PATCH 2/3] uapi: fix asm/sembuf.h " Dmitry V. Levin
@ 2017-03-02  0:22     ` Dmitry V. Levin
  0 siblings, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-02  0:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Tony Luck, Fenghua Yu,
	Ralf Baechle, David Howells, James E.J. Bottomley, Helge Deller,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, David S. Miller,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Chris Zankel,
	Max Filippov, linux-arch, linux-alpha, linux-ia64, linux-mips,
	linux-am33-list, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, linux-xtensa, linux-kernel

Include <asm/ipcbuf.h> to fix asm/sembuf.h userspace compilation errors
like this:

/usr/include/asm/sembuf.h:14:20: error: field 'sem_perm' has incomplete type
  struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
/usr/include/asm/sembuf.h:15:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t sem_otime; /* last semop time */
/usr/include/asm/sembuf.h:16:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused1;
/usr/include/asm/sembuf.h:17:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t sem_ctime; /* last change time */
/usr/include/asm/sembuf.h:18:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused2;
/usr/include/asm/sembuf.h:19:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t sem_nsems; /* no. of semaphores in array */
/usr/include/asm/sembuf.h:20:2: error: unknown 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 <ldv@altlinux.org>
---
 include/uapi/asm-generic/sembuf.h      | 1 +
 arch/alpha/include/uapi/asm/sembuf.h   | 2 ++
 arch/avr32/include/uapi/asm/sembuf.h   | 2 ++
 arch/frv/include/uapi/asm/sembuf.h     | 2 ++
 arch/ia64/include/uapi/asm/sembuf.h    | 2 ++
 arch/m32r/include/uapi/asm/sembuf.h    | 2 ++
 arch/mips/include/uapi/asm/sembuf.h    | 2 ++
 arch/mn10300/include/uapi/asm/sembuf.h | 2 ++
 arch/parisc/include/uapi/asm/sembuf.h  | 1 +
 arch/powerpc/include/uapi/asm/sembuf.h | 2 ++
 arch/s390/include/uapi/asm/sembuf.h    | 2 ++
 arch/sparc/include/uapi/asm/sembuf.h   | 2 ++
 arch/x86/include/uapi/asm/sembuf.h     | 2 ++
 arch/xtensa/include/uapi/asm/sembuf.h  | 1 +
 14 files changed, 25 insertions(+)

diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h
index 4cb2c13..1d910d7 100644
--- a/include/uapi/asm-generic/sembuf.h
+++ b/include/uapi/asm-generic/sembuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_SEMBUF_H
 #define __ASM_GENERIC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /*
diff --git a/arch/alpha/include/uapi/asm/sembuf.h b/arch/alpha/include/uapi/asm/sembuf.h
index 7b38b15..b6bdd5f 100644
--- a/arch/alpha/include/uapi/asm/sembuf.h
+++ b/arch/alpha/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_SEMBUF_H
 #define _ALPHA_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The semid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/sembuf.h b/arch/avr32/include/uapi/asm/sembuf.h
index 6c6f7cf..ec4ddd6 100644
--- a/arch/avr32/include/uapi/asm/sembuf.h
+++ b/arch/avr32/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_SEMBUF_H
 #define _UAPI__ASM_AVR32_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
 * The semid64_ds structure for AVR32 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/sembuf.h b/arch/frv/include/uapi/asm/sembuf.h
index 164b127..0d73641 100644
--- a/arch/frv/include/uapi/asm/sembuf.h
+++ b/arch/frv/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/sembuf.h b/arch/ia64/include/uapi/asm/sembuf.h
index 1340fbc..2e218b0 100644
--- a/arch/ia64/include/uapi/asm/sembuf.h
+++ b/arch/ia64/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_SEMBUF_H
 #define _ASM_IA64_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/sembuf.h b/arch/m32r/include/uapi/asm/sembuf.h
index c9873d6..58ad1f8 100644
--- a/arch/m32r/include/uapi/asm/sembuf.h
+++ b/arch/m32r/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_SEMBUF_H
 #define _ASM_M32R_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for m32r architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/sembuf.h b/arch/mips/include/uapi/asm/sembuf.h
index e1085ac..a55ab3c 100644
--- a/arch/mips/include/uapi/asm/sembuf.h
+++ b/arch/mips/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for the MIPS architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mn10300/include/uapi/asm/sembuf.h b/arch/mn10300/include/uapi/asm/sembuf.h
index 301f3f9..3529f55 100644
--- a/arch/mn10300/include/uapi/asm/sembuf.h
+++ b/arch/mn10300/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/sembuf.h b/arch/parisc/include/uapi/asm/sembuf.h
index c20971b..cff5e43 100644
--- a/arch/parisc/include/uapi/asm/sembuf.h
+++ b/arch/parisc/include/uapi/asm/sembuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_SEMBUF_H
 #define _PARISC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/sembuf.h b/arch/powerpc/include/uapi/asm/sembuf.h
index 99a4193..d001c0a 100644
--- a/arch/powerpc/include/uapi/asm/sembuf.h
+++ b/arch/powerpc/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_SEMBUF_H
 #define _ASM_POWERPC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/arch/s390/include/uapi/asm/sembuf.h b/arch/s390/include/uapi/asm/sembuf.h
index 32626b0..734c9de 100644
--- a/arch/s390/include/uapi/asm/sembuf.h
+++ b/arch/s390/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_SEMBUF_H
 #define _S390_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The semid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/sembuf.h b/arch/sparc/include/uapi/asm/sembuf.h
index faee1be..28f7060 100644
--- a/arch/sparc/include/uapi/asm/sembuf.h
+++ b/arch/sparc/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_SEMBUF_H
 #define _SPARC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for sparc architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/x86/include/uapi/asm/sembuf.h b/arch/x86/include/uapi/asm/sembuf.h
index cc2d6a3..d88cc89 100644
--- a/arch/x86/include/uapi/asm/sembuf.h
+++ b/arch/x86/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_X86_SEMBUF_H
 #define _ASM_X86_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for x86 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/sembuf.h b/arch/xtensa/include/uapi/asm/sembuf.h
index c158704..2494c41 100644
--- a/arch/xtensa/include/uapi/asm/sembuf.h
+++ b/arch/xtensa/include/uapi/asm/sembuf.h
@@ -21,6 +21,7 @@
 #ifndef _XTENSA_SEMBUF_H
 #define _XTENSA_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/byteorder.h>
 
 struct semid64_ds {
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 3/3] uapi: fix asm/shmbuf.h userspace compilation errors
  2017-03-01 16:23 ` Arnd Bergmann
  2017-03-02  0:22   ` [PATCH 1/3] uapi: fix asm/msgbuf.h " Dmitry V. Levin
  2017-03-02  0:22   ` [PATCH 2/3] uapi: fix asm/sembuf.h " Dmitry V. Levin
@ 2017-03-02  0:22   ` Dmitry V. Levin
  2017-03-02  0:22     ` Dmitry V. Levin
  2017-03-02 13:14     ` Arnd Bergmann
  2 siblings, 2 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-02  0:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Tony Luck, Fenghua Yu,
	Ralf Baechle, David Howells, James E.J. Bottomley, Helge Deller,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, David S. Miller, Chris Zankel,
	Max Filippov, linux-arch, linux-alpha, linux-ia64, linux-mips,
	linux-am33-list

Include <asm/ipcbuf.h> to fix asm/shmbuf.h userspace compilation errors
like this:

/usr/include/asm-generic/shmbuf.h:26:20: error: field 'shm_perm' has incomplete type
  struct ipc64_perm shm_perm; /* operation perms */
/usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_atime; /* last attach time */
/usr/include/asm-generic/shmbuf.h:32:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_dtime; /* last detach time */
/usr/include/asm-generic/shmbuf.h:36:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_ctime; /* last change time */
/usr/include/asm-generic/shmbuf.h:40:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t  shm_cpid; /* pid of creator */
/usr/include/asm-generic/shmbuf.h:41:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t  shm_lpid; /* pid of last operator */
/usr/include/asm-generic/shmbuf.h:42:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shm_nattch; /* no. of current attaches */
/usr/include/asm-generic/shmbuf.h:43:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused4;
/usr/include/asm-generic/shmbuf.h:44:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused5;
/usr/include/asm-generic/shmbuf.h:48:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmax;
/usr/include/asm-generic/shmbuf.h:49:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmin;
/usr/include/asm-generic/shmbuf.h:50:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmni;
/usr/include/asm-generic/shmbuf.h:51:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmseg;
/usr/include/asm-generic/shmbuf.h:52:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmall;
/usr/include/asm-generic/shmbuf.h:53:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused1;
/usr/include/asm-generic/shmbuf.h:54:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused2;
/usr/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 <ldv@altlinux.org>
---
 include/uapi/asm-generic/shmbuf.h      | 1 +
 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/shmbuf.h    | 2 ++
 arch/m32r/include/uapi/asm/shmbuf.h    | 2 ++
 arch/mips/include/uapi/asm/shmbuf.h    | 2 ++
 arch/mn10300/include/uapi/asm/shmbuf.h | 2 ++
 arch/parisc/include/uapi/asm/shmbuf.h  | 1 +
 arch/powerpc/include/uapi/asm/shmbuf.h | 2 ++
 arch/s390/include/uapi/asm/shmbuf.h    | 2 ++
 arch/sparc/include/uapi/asm/shmbuf.h   | 2 ++
 arch/xtensa/include/uapi/asm/shmbuf.h  | 2 ++
 13 files changed, 24 insertions(+)

diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 7e9fb2f..2a6d508 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_SHMBUF_H
 #define __ASM_GENERIC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /*
diff --git a/arch/alpha/include/uapi/asm/shmbuf.h b/arch/alpha/include/uapi/asm/shmbuf.h
index 37ee84f..6156099 100644
--- a/arch/alpha/include/uapi/asm/shmbuf.h
+++ b/arch/alpha/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_SHMBUF_H
 #define _ALPHA_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h
index b94cf8b..c8e5234 100644
--- a/arch/avr32/include/uapi/asm/shmbuf.h
+++ b/arch/avr32/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_SHMBUF_H
 #define _UAPI__ASM_AVR32_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for i386 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/shmbuf.h b/arch/frv/include/uapi/asm/shmbuf.h
index 4c6e711..943746c 100644
--- a/arch/frv/include/uapi/asm/shmbuf.h
+++ b/arch/frv/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/shmbuf.h b/arch/ia64/include/uapi/asm/shmbuf.h
index 585002a..ca81d77e 100644
--- a/arch/ia64/include/uapi/asm/shmbuf.h
+++ b/arch/ia64/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_SHMBUF_H
 #define _ASM_IA64_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/shmbuf.h b/arch/m32r/include/uapi/asm/shmbuf.h
index b0cdf0a..714de6e 100644
--- a/arch/m32r/include/uapi/asm/shmbuf.h
+++ b/arch/m32r/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_SHMBUF_H
 #define _ASM_M32R_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for M32R architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
index f994438..f47d193 100644
--- a/arch/mips/include/uapi/asm/shmbuf.h
+++ b/arch/mips/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for the MIPS architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mn10300/include/uapi/asm/shmbuf.h b/arch/mn10300/include/uapi/asm/shmbuf.h
index 8f300cc..71df684 100644
--- a/arch/mn10300/include/uapi/asm/shmbuf.h
+++ b/arch/mn10300/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/shmbuf.h b/arch/parisc/include/uapi/asm/shmbuf.h
index 750e13e..d8105ef 100644
--- a/arch/parisc/include/uapi/asm/shmbuf.h
+++ b/arch/parisc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_SHMBUF_H
 #define _PARISC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h
index 8efa396..7937289 100644
--- a/arch/powerpc/include/uapi/asm/shmbuf.h
+++ b/arch/powerpc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_SHMBUF_H
 #define _ASM_POWERPC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/arch/s390/include/uapi/asm/shmbuf.h b/arch/s390/include/uapi/asm/shmbuf.h
index eed2e28..9ce1d9f 100644
--- a/arch/s390/include/uapi/asm/shmbuf.h
+++ b/arch/s390/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_SHMBUF_H
 #define _S390_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/shmbuf.h b/arch/sparc/include/uapi/asm/shmbuf.h
index 83a1605..f651952 100644
--- a/arch/sparc/include/uapi/asm/shmbuf.h
+++ b/arch/sparc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_SHMBUF_H
 #define _SPARC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for sparc architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
index ad4b012..ad90d05 100644
--- a/arch/xtensa/include/uapi/asm/shmbuf.h
+++ b/arch/xtensa/include/uapi/asm/shmbuf.h
@@ -19,6 +19,8 @@
 #ifndef _XTENSA_SHMBUF_H
 #define _XTENSA_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 #if defined (__XTENSA_EL__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 3/3] uapi: fix asm/shmbuf.h userspace compilation errors
  2017-03-02  0:22   ` [PATCH 3/3] uapi: fix asm/shmbuf.h " Dmitry V. Levin
@ 2017-03-02  0:22     ` Dmitry V. Levin
  2017-03-02 13:14     ` Arnd Bergmann
  1 sibling, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-02  0:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Tony Luck, Fenghua Yu,
	Ralf Baechle, David Howells, James E.J. Bottomley, Helge Deller,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, David S. Miller, Chris Zankel,
	Max Filippov, linux-arch, linux-alpha, linux-ia64, linux-mips,
	linux-am33-list, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, linux-xtensa, linux-kernel

Include <asm/ipcbuf.h> to fix asm/shmbuf.h userspace compilation errors
like this:

/usr/include/asm-generic/shmbuf.h:26:20: error: field 'shm_perm' has incomplete type
  struct ipc64_perm shm_perm; /* operation perms */
/usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_atime; /* last attach time */
/usr/include/asm-generic/shmbuf.h:32:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_dtime; /* last detach time */
/usr/include/asm-generic/shmbuf.h:36:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_ctime; /* last change time */
/usr/include/asm-generic/shmbuf.h:40:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t  shm_cpid; /* pid of creator */
/usr/include/asm-generic/shmbuf.h:41:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t  shm_lpid; /* pid of last operator */
/usr/include/asm-generic/shmbuf.h:42:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shm_nattch; /* no. of current attaches */
/usr/include/asm-generic/shmbuf.h:43:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused4;
/usr/include/asm-generic/shmbuf.h:44:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused5;
/usr/include/asm-generic/shmbuf.h:48:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmax;
/usr/include/asm-generic/shmbuf.h:49:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmin;
/usr/include/asm-generic/shmbuf.h:50:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmni;
/usr/include/asm-generic/shmbuf.h:51:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmseg;
/usr/include/asm-generic/shmbuf.h:52:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmall;
/usr/include/asm-generic/shmbuf.h:53:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused1;
/usr/include/asm-generic/shmbuf.h:54:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused2;
/usr/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 <ldv@altlinux.org>
---
 include/uapi/asm-generic/shmbuf.h      | 1 +
 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/shmbuf.h    | 2 ++
 arch/m32r/include/uapi/asm/shmbuf.h    | 2 ++
 arch/mips/include/uapi/asm/shmbuf.h    | 2 ++
 arch/mn10300/include/uapi/asm/shmbuf.h | 2 ++
 arch/parisc/include/uapi/asm/shmbuf.h  | 1 +
 arch/powerpc/include/uapi/asm/shmbuf.h | 2 ++
 arch/s390/include/uapi/asm/shmbuf.h    | 2 ++
 arch/sparc/include/uapi/asm/shmbuf.h   | 2 ++
 arch/xtensa/include/uapi/asm/shmbuf.h  | 2 ++
 13 files changed, 24 insertions(+)

diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 7e9fb2f..2a6d508 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_SHMBUF_H
 #define __ASM_GENERIC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /*
diff --git a/arch/alpha/include/uapi/asm/shmbuf.h b/arch/alpha/include/uapi/asm/shmbuf.h
index 37ee84f..6156099 100644
--- a/arch/alpha/include/uapi/asm/shmbuf.h
+++ b/arch/alpha/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_SHMBUF_H
 #define _ALPHA_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h
index b94cf8b..c8e5234 100644
--- a/arch/avr32/include/uapi/asm/shmbuf.h
+++ b/arch/avr32/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_SHMBUF_H
 #define _UAPI__ASM_AVR32_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for i386 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/shmbuf.h b/arch/frv/include/uapi/asm/shmbuf.h
index 4c6e711..943746c 100644
--- a/arch/frv/include/uapi/asm/shmbuf.h
+++ b/arch/frv/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/shmbuf.h b/arch/ia64/include/uapi/asm/shmbuf.h
index 585002a..ca81d77e 100644
--- a/arch/ia64/include/uapi/asm/shmbuf.h
+++ b/arch/ia64/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_SHMBUF_H
 #define _ASM_IA64_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/shmbuf.h b/arch/m32r/include/uapi/asm/shmbuf.h
index b0cdf0a..714de6e 100644
--- a/arch/m32r/include/uapi/asm/shmbuf.h
+++ b/arch/m32r/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_SHMBUF_H
 #define _ASM_M32R_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for M32R architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
index f994438..f47d193 100644
--- a/arch/mips/include/uapi/asm/shmbuf.h
+++ b/arch/mips/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for the MIPS architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mn10300/include/uapi/asm/shmbuf.h b/arch/mn10300/include/uapi/asm/shmbuf.h
index 8f300cc..71df684 100644
--- a/arch/mn10300/include/uapi/asm/shmbuf.h
+++ b/arch/mn10300/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/shmbuf.h b/arch/parisc/include/uapi/asm/shmbuf.h
index 750e13e..d8105ef 100644
--- a/arch/parisc/include/uapi/asm/shmbuf.h
+++ b/arch/parisc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_SHMBUF_H
 #define _PARISC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h
index 8efa396..7937289 100644
--- a/arch/powerpc/include/uapi/asm/shmbuf.h
+++ b/arch/powerpc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_SHMBUF_H
 #define _ASM_POWERPC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/arch/s390/include/uapi/asm/shmbuf.h b/arch/s390/include/uapi/asm/shmbuf.h
index eed2e28..9ce1d9f 100644
--- a/arch/s390/include/uapi/asm/shmbuf.h
+++ b/arch/s390/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_SHMBUF_H
 #define _S390_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/shmbuf.h b/arch/sparc/include/uapi/asm/shmbuf.h
index 83a1605..f651952 100644
--- a/arch/sparc/include/uapi/asm/shmbuf.h
+++ b/arch/sparc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_SHMBUF_H
 #define _SPARC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for sparc architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
index ad4b012..ad90d05 100644
--- a/arch/xtensa/include/uapi/asm/shmbuf.h
+++ b/arch/xtensa/include/uapi/asm/shmbuf.h
@@ -19,6 +19,8 @@
 #ifndef _XTENSA_SHMBUF_H
 #define _XTENSA_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 #if defined (__XTENSA_EL__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH] uapi: fix another asm/shmbuf.h userspace compilation error
@ 2017-03-02  0:46 Dmitry V. Levin
  2017-03-02  0:46 ` Dmitry V. Levin
  2017-03-02 13:07 ` Arnd Bergmann
  0 siblings, 2 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-02  0:46 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Haavard Skinnemoen, Hans-Christian Egtvedt, Tony Luck, Fenghua Yu,
	Ralf Baechle, David Howells, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, Martin Schwidefsky,
	Heiko Carstens, David S. Miller, Chris Zankel, Max Filippov,
	linux-arch, linux-alpha, linux-ia64

Replace size_t with __kernel_size_t to fix asm/shmbuf.h userspace
compilation errors like this:

/usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t'
  size_t   shm_segsz; /* size of segment (bytes) */

x32 is the only architecture where sizeof(size_t) is less than
sizeof(__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. Levin <ldv@altlinux.org>
---
 include/uapi/asm-generic/shmbuf.h      | 2 +-
 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/shmbuf.h    | 2 +-
 arch/m32r/include/uapi/asm/shmbuf.h    | 2 +-
 arch/mips/include/uapi/asm/shmbuf.h    | 2 +-
 arch/mn10300/include/uapi/asm/shmbuf.h | 2 +-
 arch/powerpc/include/uapi/asm/shmbuf.h | 2 +-
 arch/s390/include/uapi/asm/shmbuf.h    | 2 +-
 arch/sparc/include/uapi/asm/shmbuf.h   | 2 +-
 arch/xtensa/include/uapi/asm/shmbuf.h  | 4 ++--
 12 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 2a6d508..0756934 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -25,7 +25,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 #if __BITS_PER_LONG != 64
 	unsigned long		__unused1;
diff --git a/arch/alpha/include/uapi/asm/shmbuf.h b/arch/alpha/include/uapi/asm/shmbuf.h
index 6156099..e32ed1f 100644
--- a/arch/alpha/include/uapi/asm/shmbuf.h
+++ b/arch/alpha/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/avr32/include/uapi/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h
index c8e5234..2804f25 100644
--- a/arch/avr32/include/uapi/asm/shmbuf.h
+++ b/arch/avr32/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/frv/include/uapi/asm/shmbuf.h b/arch/frv/include/uapi/asm/shmbuf.h
index 943746c..2af199f 100644
--- a/arch/frv/include/uapi/asm/shmbuf.h
+++ b/arch/frv/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/ia64/include/uapi/asm/shmbuf.h b/arch/ia64/include/uapi/asm/shmbuf.h
index ca81d77e..8e35495 100644
--- a/arch/ia64/include/uapi/asm/shmbuf.h
+++ b/arch/ia64/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/m32r/include/uapi/asm/shmbuf.h b/arch/m32r/include/uapi/asm/shmbuf.h
index 714de6e..fa36b9e 100644
--- a/arch/m32r/include/uapi/asm/shmbuf.h
+++ b/arch/m32r/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/mips/include/uapi/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
index f47d193..95c53ff 100644
--- a/arch/mips/include/uapi/asm/shmbuf.h
+++ b/arch/mips/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/mn10300/include/uapi/asm/shmbuf.h b/arch/mn10300/include/uapi/asm/shmbuf.h
index 71df684..e156878 100644
--- a/arch/mn10300/include/uapi/asm/shmbuf.h
+++ b/arch/mn10300/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/powerpc/include/uapi/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h
index 7937289..a2425e5 100644
--- a/arch/powerpc/include/uapi/asm/shmbuf.h
+++ b/arch/powerpc/include/uapi/asm/shmbuf.h
@@ -38,7 +38,7 @@ struct shmid64_ds {
 #ifndef __powerpc64__
 	unsigned long		__unused4;
 #endif
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_pid_t		shm_cpid;	/* pid of creator */
 	__kernel_pid_t		shm_lpid;	/* pid of last operator */
 	unsigned long		shm_nattch;	/* no. of current attaches */
diff --git a/arch/s390/include/uapi/asm/shmbuf.h b/arch/s390/include/uapi/asm/shmbuf.h
index 9ce1d9f..9ddf9e0 100644
--- a/arch/s390/include/uapi/asm/shmbuf.h
+++ b/arch/s390/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 #ifndef __s390x__
 	unsigned long		__unused1;
diff --git a/arch/sparc/include/uapi/asm/shmbuf.h b/arch/sparc/include/uapi/asm/shmbuf.h
index f651952..ed72656 100644
--- a/arch/sparc/include/uapi/asm/shmbuf.h
+++ b/arch/sparc/include/uapi/asm/shmbuf.h
@@ -27,7 +27,7 @@ struct shmid64_ds {
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	PADDING(__pad3)
 	__kernel_time_t		shm_ctime;	/* last change time */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_pid_t		shm_cpid;	/* pid of creator */
 	__kernel_pid_t		shm_lpid;	/* pid of last operator */
 	unsigned long		shm_nattch;	/* no. of current attaches */
diff --git a/arch/xtensa/include/uapi/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
index ad90d05..8d9206e 100644
--- a/arch/xtensa/include/uapi/asm/shmbuf.h
+++ b/arch/xtensa/include/uapi/asm/shmbuf.h
@@ -24,7 +24,7 @@
 #if defined (__XTENSA_EL__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
@@ -40,7 +40,7 @@ struct shmid64_ds {
 #elif defined (__XTENSA_EB__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH] uapi: fix another asm/shmbuf.h userspace compilation error
  2017-03-02  0:46 [PATCH] uapi: fix another asm/shmbuf.h userspace compilation error Dmitry V. Levin
@ 2017-03-02  0:46 ` Dmitry V. Levin
  2017-03-02 13:07 ` Arnd Bergmann
  1 sibling, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-02  0:46 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Haavard Skinnemoen, Hans-Christian Egtvedt, Tony Luck, Fenghua Yu,
	Ralf Baechle, David Howells, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, Martin Schwidefsky,
	Heiko Carstens, David S. Miller, Chris Zankel, Max Filippov,
	linux-arch, linux-alpha, linux-ia64, linux-mips, linux-am33-list,
	linuxppc-dev, linux-s390, sparclinux, linux-xtensa, linux-kernel

Replace size_t with __kernel_size_t to fix asm/shmbuf.h userspace
compilation errors like this:

/usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t'
  size_t   shm_segsz; /* size of segment (bytes) */

x32 is the only architecture where sizeof(size_t) is less than
sizeof(__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. Levin <ldv@altlinux.org>
---
 include/uapi/asm-generic/shmbuf.h      | 2 +-
 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/shmbuf.h    | 2 +-
 arch/m32r/include/uapi/asm/shmbuf.h    | 2 +-
 arch/mips/include/uapi/asm/shmbuf.h    | 2 +-
 arch/mn10300/include/uapi/asm/shmbuf.h | 2 +-
 arch/powerpc/include/uapi/asm/shmbuf.h | 2 +-
 arch/s390/include/uapi/asm/shmbuf.h    | 2 +-
 arch/sparc/include/uapi/asm/shmbuf.h   | 2 +-
 arch/xtensa/include/uapi/asm/shmbuf.h  | 4 ++--
 12 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 2a6d508..0756934 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -25,7 +25,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 #if __BITS_PER_LONG != 64
 	unsigned long		__unused1;
diff --git a/arch/alpha/include/uapi/asm/shmbuf.h b/arch/alpha/include/uapi/asm/shmbuf.h
index 6156099..e32ed1f 100644
--- a/arch/alpha/include/uapi/asm/shmbuf.h
+++ b/arch/alpha/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/avr32/include/uapi/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h
index c8e5234..2804f25 100644
--- a/arch/avr32/include/uapi/asm/shmbuf.h
+++ b/arch/avr32/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/frv/include/uapi/asm/shmbuf.h b/arch/frv/include/uapi/asm/shmbuf.h
index 943746c..2af199f 100644
--- a/arch/frv/include/uapi/asm/shmbuf.h
+++ b/arch/frv/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/ia64/include/uapi/asm/shmbuf.h b/arch/ia64/include/uapi/asm/shmbuf.h
index ca81d77e..8e35495 100644
--- a/arch/ia64/include/uapi/asm/shmbuf.h
+++ b/arch/ia64/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/m32r/include/uapi/asm/shmbuf.h b/arch/m32r/include/uapi/asm/shmbuf.h
index 714de6e..fa36b9e 100644
--- a/arch/m32r/include/uapi/asm/shmbuf.h
+++ b/arch/m32r/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/mips/include/uapi/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
index f47d193..95c53ff 100644
--- a/arch/mips/include/uapi/asm/shmbuf.h
+++ b/arch/mips/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/mn10300/include/uapi/asm/shmbuf.h b/arch/mn10300/include/uapi/asm/shmbuf.h
index 71df684..e156878 100644
--- a/arch/mn10300/include/uapi/asm/shmbuf.h
+++ b/arch/mn10300/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/powerpc/include/uapi/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h
index 7937289..a2425e5 100644
--- a/arch/powerpc/include/uapi/asm/shmbuf.h
+++ b/arch/powerpc/include/uapi/asm/shmbuf.h
@@ -38,7 +38,7 @@ struct shmid64_ds {
 #ifndef __powerpc64__
 	unsigned long		__unused4;
 #endif
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_pid_t		shm_cpid;	/* pid of creator */
 	__kernel_pid_t		shm_lpid;	/* pid of last operator */
 	unsigned long		shm_nattch;	/* no. of current attaches */
diff --git a/arch/s390/include/uapi/asm/shmbuf.h b/arch/s390/include/uapi/asm/shmbuf.h
index 9ce1d9f..9ddf9e0 100644
--- a/arch/s390/include/uapi/asm/shmbuf.h
+++ b/arch/s390/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 #ifndef __s390x__
 	unsigned long		__unused1;
diff --git a/arch/sparc/include/uapi/asm/shmbuf.h b/arch/sparc/include/uapi/asm/shmbuf.h
index f651952..ed72656 100644
--- a/arch/sparc/include/uapi/asm/shmbuf.h
+++ b/arch/sparc/include/uapi/asm/shmbuf.h
@@ -27,7 +27,7 @@ struct shmid64_ds {
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	PADDING(__pad3)
 	__kernel_time_t		shm_ctime;	/* last change time */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_pid_t		shm_cpid;	/* pid of creator */
 	__kernel_pid_t		shm_lpid;	/* pid of last operator */
 	unsigned long		shm_nattch;	/* no. of current attaches */
diff --git a/arch/xtensa/include/uapi/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
index ad90d05..8d9206e 100644
--- a/arch/xtensa/include/uapi/asm/shmbuf.h
+++ b/arch/xtensa/include/uapi/asm/shmbuf.h
@@ -24,7 +24,7 @@
 #if defined (__XTENSA_EL__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
@@ -40,7 +40,7 @@ struct shmid64_ds {
 #elif defined (__XTENSA_EB__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH] uapi: fix another asm/shmbuf.h userspace compilation error
  2017-03-02  0:46 [PATCH] uapi: fix another asm/shmbuf.h userspace compilation error Dmitry V. Levin
  2017-03-02  0:46 ` Dmitry V. Levin
@ 2017-03-02 13:07 ` Arnd Bergmann
  2017-03-02 13:07   ` Arnd Bergmann
                     ` (2 more replies)
  1 sibling, 3 replies; 28+ messages in thread
From: Arnd Bergmann @ 2017-03-02 13:07 UTC (permalink / raw)
  To: Dmitry V. Levin
  Cc: linux-mips, linux-ia64, linux-xtensa, Heiko Carstens,
	David Howells, Max Filippov, Paul Mackerras, H. Peter Anvin,
	sparclinux, Hans-Christian Egtvedt, linux-arch, linux-s390,
	linux-am33-list, x86, Ingo Molnar, Haavard Skinnemoen, Fenghua Yu,
	Thomas Gleixner, Chris Zankel, Tony Luck,
	Linux Kernel Mailing List, Ralf Baechle

On Thu, Mar 2, 2017 at 1:46 AM, Dmitry V. Levin <ldv@altlinux.org> wrote:
> Replace size_t with __kernel_size_t to fix asm/shmbuf.h userspace
> compilation errors like this:
>
> /usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t'
>   size_t   shm_segsz; /* size of segment (bytes) */
>
> x32 is the only architecture where sizeof(size_t) is less than
> sizeof(__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. Levin <ldv@altlinux.org>

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH] uapi: fix another asm/shmbuf.h userspace compilation error
  2017-03-02 13:07 ` Arnd Bergmann
@ 2017-03-02 13:07   ` Arnd Bergmann
  2017-03-26  3:27   ` [PATCH 0/5] uapi: fix userspace compilation of asm/ ipc headers Dmitry V. Levin
  2017-08-04 15:22   ` [PATCH] " James Hogan
  2 siblings, 0 replies; 28+ messages in thread
From: Arnd Bergmann @ 2017-03-02 13:07 UTC (permalink / raw)
  To: Dmitry V. Levin
  Cc: linux-mips, linux-ia64, linux-xtensa, Heiko Carstens,
	David Howells, Max Filippov, Paul Mackerras, H. Peter Anvin,
	sparclinux, Hans-Christian Egtvedt, linux-arch, linux-s390,
	linux-am33-list, x86, Ingo Molnar, Haavard Skinnemoen, Fenghua Yu,
	Thomas Gleixner, Chris Zankel, Tony Luck,
	Linux Kernel Mailing List, Ralf Baechle, linux-alpha,
	Martin Schwidefsky, linuxppc-dev, David S. Miller

On Thu, Mar 2, 2017 at 1:46 AM, Dmitry V. Levin <ldv@altlinux.org> wrote:
> Replace size_t with __kernel_size_t to fix asm/shmbuf.h userspace
> compilation errors like this:
>
> /usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t'
>   size_t   shm_segsz; /* size of segment (bytes) */
>
> x32 is the only architecture where sizeof(size_t) is less than
> sizeof(__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. Levin <ldv@altlinux.org>

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 3/3] uapi: fix asm/shmbuf.h userspace compilation errors
  2017-03-02  0:22   ` [PATCH 3/3] uapi: fix asm/shmbuf.h " Dmitry V. Levin
  2017-03-02  0:22     ` Dmitry V. Levin
@ 2017-03-02 13:14     ` Arnd Bergmann
  2017-03-02 13:14       ` Arnd Bergmann
  2021-12-27 10:53       ` [PATCH v2] " Dmitry V. Levin
  1 sibling, 2 replies; 28+ messages in thread
From: Arnd Bergmann @ 2017-03-02 13:14 UTC (permalink / raw)
  To: Dmitry V. Levin
  Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Tony Luck, Fenghua Yu,
	Ralf Baechle, David Howells, James E.J. Bottomley, Helge Deller,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, David S. Miller, Chris Zankel,
	Max Filippov, linux-arch, linux-alpha, linux-ia64, linux-mips

On Thu, Mar 2, 2017 at 1:22 AM, Dmitry V. Levin <ldv@altlinux.org> wrote:
> Include <asm/ipcbuf.h> to fix asm/shmbuf.h userspace compilation errors
> like this:
>
> /usr/include/asm-generic/shmbuf.h:26:20: error: field 'shm_perm' has incomplete type
>   struct ipc64_perm shm_perm; /* operation perms */
> /usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name '__kernel_time_t'
>   __kernel_time_t  shm_atime; /* last attach time */
> /usr/include/asm-generic/shmbuf.h:32:2: error: unknown type name '__kernel_time_t'
>   __kernel_time_t  shm_dtime; /* last detach time */
> /usr/include/asm-generic/shmbuf.h:36:2: error: unknown type name '__kernel_time_t'
>   __kernel_time_t  shm_ctime; /* last change time */
> /usr/include/asm-generic/shmbuf.h:40:2: error: unknown type name '__kernel_pid_t'
>   __kernel_pid_t  shm_cpid; /* pid of creator */
> /usr/include/asm-generic/shmbuf.h:41:2: error: unknown type name '__kernel_pid_t'
>   __kernel_pid_t  shm_lpid; /* pid of last operator */
> /usr/include/asm-generic/shmbuf.h:42:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shm_nattch; /* no. of current attaches */
> /usr/include/asm-generic/shmbuf.h:43:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t __unused4;
> /usr/include/asm-generic/shmbuf.h:44:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t __unused5;
> /usr/include/asm-generic/shmbuf.h:48:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shmmax;
> /usr/include/asm-generic/shmbuf.h:49:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shmmin;
> /usr/include/asm-generic/shmbuf.h:50:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shmmni;
> /usr/include/asm-generic/shmbuf.h:51:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shmseg;
> /usr/include/asm-generic/shmbuf.h:52:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shmall;
> /usr/include/asm-generic/shmbuf.h:53:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t __unused1;
> /usr/include/asm-generic/shmbuf.h:54:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t __unused2;
> /usr/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 <ldv@altlinux.org>
> ---

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 3/3] uapi: fix asm/shmbuf.h userspace compilation errors
  2017-03-02 13:14     ` Arnd Bergmann
@ 2017-03-02 13:14       ` Arnd Bergmann
  2021-12-27 10:53       ` [PATCH v2] " Dmitry V. Levin
  1 sibling, 0 replies; 28+ messages in thread
From: Arnd Bergmann @ 2017-03-02 13:14 UTC (permalink / raw)
  To: Dmitry V. Levin
  Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Tony Luck, Fenghua Yu,
	Ralf Baechle, David Howells, James E.J. Bottomley, Helge Deller,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, Heiko Carstens, David S. Miller, Chris Zankel,
	Max Filippov, linux-arch, linux-alpha, linux-ia64, linux-mips,
	linux-am33-list, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, linux-xtensa, Linux Kernel Mailing List

On Thu, Mar 2, 2017 at 1:22 AM, Dmitry V. Levin <ldv@altlinux.org> wrote:
> Include <asm/ipcbuf.h> to fix asm/shmbuf.h userspace compilation errors
> like this:
>
> /usr/include/asm-generic/shmbuf.h:26:20: error: field 'shm_perm' has incomplete type
>   struct ipc64_perm shm_perm; /* operation perms */
> /usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name '__kernel_time_t'
>   __kernel_time_t  shm_atime; /* last attach time */
> /usr/include/asm-generic/shmbuf.h:32:2: error: unknown type name '__kernel_time_t'
>   __kernel_time_t  shm_dtime; /* last detach time */
> /usr/include/asm-generic/shmbuf.h:36:2: error: unknown type name '__kernel_time_t'
>   __kernel_time_t  shm_ctime; /* last change time */
> /usr/include/asm-generic/shmbuf.h:40:2: error: unknown type name '__kernel_pid_t'
>   __kernel_pid_t  shm_cpid; /* pid of creator */
> /usr/include/asm-generic/shmbuf.h:41:2: error: unknown type name '__kernel_pid_t'
>   __kernel_pid_t  shm_lpid; /* pid of last operator */
> /usr/include/asm-generic/shmbuf.h:42:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shm_nattch; /* no. of current attaches */
> /usr/include/asm-generic/shmbuf.h:43:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t __unused4;
> /usr/include/asm-generic/shmbuf.h:44:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t __unused5;
> /usr/include/asm-generic/shmbuf.h:48:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shmmax;
> /usr/include/asm-generic/shmbuf.h:49:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shmmin;
> /usr/include/asm-generic/shmbuf.h:50:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shmmni;
> /usr/include/asm-generic/shmbuf.h:51:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shmseg;
> /usr/include/asm-generic/shmbuf.h:52:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t shmall;
> /usr/include/asm-generic/shmbuf.h:53:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t __unused1;
> /usr/include/asm-generic/shmbuf.h:54:2: error: unknown type name '__kernel_ulong_t'
>   __kernel_ulong_t __unused2;
> /usr/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 <ldv@altlinux.org>
> ---

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 0/5] uapi: fix userspace compilation of asm/ ipc headers
  2017-03-02 13:07 ` Arnd Bergmann
  2017-03-02 13:07   ` Arnd Bergmann
@ 2017-03-26  3:27   ` Dmitry V. Levin
  2017-03-26  3:30     ` [PATCH 1/5] uapi: fix asm/ipcbuf.h userspace compilation errors Dmitry V. Levin
                       ` (4 more replies)
  2017-08-04 15:22   ` [PATCH] " James Hogan
  2 siblings, 5 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-26  3:27 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Morton; +Cc: linux-arch, linux-kernel

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
  uapi: fix asm/msgbuf.h userspace compilation errors
  uapi: fix asm/sembuf.h userspace compilation errors
  uapi: fix asm/shmbuf.h userspace compilation errors
  uapi: fix another asm/shmbuf.h userspace compilation error

 arch/alpha/include/uapi/asm/msgbuf.h   | 2 ++
 arch/alpha/include/uapi/asm/sembuf.h   | 2 ++
 arch/alpha/include/uapi/asm/shmbuf.h   | 4 +++-
 arch/avr32/include/uapi/asm/msgbuf.h   | 2 ++
 arch/avr32/include/uapi/asm/sembuf.h   | 2 ++
 arch/avr32/include/uapi/asm/shmbuf.h   | 4 +++-
 arch/frv/include/uapi/asm/msgbuf.h     | 2 ++
 arch/frv/include/uapi/asm/sembuf.h     | 2 ++
 arch/frv/include/uapi/asm/shmbuf.h     | 4 +++-
 arch/ia64/include/uapi/asm/msgbuf.h    | 2 ++
 arch/ia64/include/uapi/asm/sembuf.h    | 2 ++
 arch/ia64/include/uapi/asm/shmbuf.h    | 4 +++-
 arch/m32r/include/uapi/asm/msgbuf.h    | 2 ++
 arch/m32r/include/uapi/asm/sembuf.h    | 2 ++
 arch/m32r/include/uapi/asm/shmbuf.h    | 4 +++-
 arch/mips/include/uapi/asm/msgbuf.h    | 1 +
 arch/mips/include/uapi/asm/sembuf.h    | 2 ++
 arch/mips/include/uapi/asm/shmbuf.h    | 4 +++-
 arch/mn10300/include/uapi/asm/msgbuf.h | 2 ++
 arch/mn10300/include/uapi/asm/sembuf.h | 2 ++
 arch/mn10300/include/uapi/asm/shmbuf.h | 4 +++-
 arch/parisc/include/uapi/asm/msgbuf.h  | 1 +
 arch/parisc/include/uapi/asm/sembuf.h  | 1 +
 arch/parisc/include/uapi/asm/shmbuf.h  | 1 +
 arch/powerpc/include/uapi/asm/msgbuf.h | 2 ++
 arch/powerpc/include/uapi/asm/sembuf.h | 2 ++
 arch/powerpc/include/uapi/asm/shmbuf.h | 4 +++-
 arch/s390/include/uapi/asm/ipcbuf.h    | 2 ++
 arch/s390/include/uapi/asm/msgbuf.h    | 2 ++
 arch/s390/include/uapi/asm/sembuf.h    | 2 ++
 arch/s390/include/uapi/asm/shmbuf.h    | 4 +++-
 arch/sparc/include/uapi/asm/ipcbuf.h   | 2 ++
 arch/sparc/include/uapi/asm/msgbuf.h   | 2 ++
 arch/sparc/include/uapi/asm/sembuf.h   | 2 ++
 arch/sparc/include/uapi/asm/shmbuf.h   | 4 +++-
 arch/x86/include/uapi/asm/sembuf.h     | 2 ++
 arch/xtensa/include/uapi/asm/ipcbuf.h  | 2 ++
 arch/xtensa/include/uapi/asm/msgbuf.h  | 2 ++
 arch/xtensa/include/uapi/asm/sembuf.h  | 1 +
 arch/xtensa/include/uapi/asm/shmbuf.h  | 6 ++++--
 include/uapi/asm-generic/ipcbuf.h      | 2 ++
 include/uapi/asm-generic/msgbuf.h      | 1 +
 include/uapi/asm-generic/sembuf.h      | 1 +
 include/uapi/asm-generic/shmbuf.h      | 3 ++-
 44 files changed, 93 insertions(+), 13 deletions(-)

-- 
ldv

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/5] uapi: fix asm/ipcbuf.h userspace compilation errors
  2017-03-26  3:27   ` [PATCH 0/5] uapi: fix userspace compilation of asm/ ipc headers Dmitry V. Levin
@ 2017-03-26  3:30     ` Dmitry V. Levin
  2017-03-26  3:30     ` [PATCH 2/5] uapi: fix asm/msgbuf.h " Dmitry V. Levin
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-26  3:30 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Morton; +Cc: linux-arch, linux-kernel

Date: Sat, 25 Feb 2017 12:34:56 +0000

Include <linux/posix_types.h> to fix asm/ipcbuf.h userspace compilation
errors like this:

/usr/include/asm-generic/ipcbuf.h:20:2: error: unknown type name '__kernel_key_t'
  __kernel_key_t  key;
/usr/include/asm-generic/ipcbuf.h:21:2: error: unknown type name '__kernel_uid32_t'
  __kernel_uid32_t uid;
/usr/include/asm-generic/ipcbuf.h:22:2: error: unknown type name '__kernel_gid32_t'
  __kernel_gid32_t gid;
/usr/include/asm-generic/ipcbuf.h:23:2: error: unknown type name '__kernel_uid32_t'
  __kernel_uid32_t cuid;
/usr/include/asm-generic/ipcbuf.h:24:2: error: unknown type name '__kernel_gid32_t'
  __kernel_gid32_t cgid;
/usr/include/asm-generic/ipcbuf.h:25:2: error: unknown type name '__kernel_mode_t'
  __kernel_mode_t  mode;
/usr/include/asm-generic/ipcbuf.h:27:35: error: '__kernel_mode_t' undeclared here (not in a function)
  unsigned char  __pad1[4 - 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 <ldv@altlinux.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/s390/include/uapi/asm/ipcbuf.h   | 2 ++
 arch/sparc/include/uapi/asm/ipcbuf.h  | 2 ++
 arch/xtensa/include/uapi/asm/ipcbuf.h | 2 ++
 include/uapi/asm-generic/ipcbuf.h     | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/arch/s390/include/uapi/asm/ipcbuf.h b/arch/s390/include/uapi/asm/ipcbuf.h
index 37f293d..9f1185c 100644
--- a/arch/s390/include/uapi/asm/ipcbuf.h
+++ b/arch/s390/include/uapi/asm/ipcbuf.h
@@ -1,6 +1,8 @@
 #ifndef __S390_IPCBUF_H__
 #define __S390_IPCBUF_H__
 
+#include <linux/posix_types.h>
+
 /*
  * The user_ipc_perm structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/ipcbuf.h b/arch/sparc/include/uapi/asm/ipcbuf.h
index 66013b4..b7b1bcb 100644
--- a/arch/sparc/include/uapi/asm/ipcbuf.h
+++ b/arch/sparc/include/uapi/asm/ipcbuf.h
@@ -1,6 +1,8 @@
 #ifndef __SPARC_IPCBUF_H
 #define __SPARC_IPCBUF_H
 
+#include <linux/posix_types.h>
+
 /*
  * The ipc64_perm structure for sparc/sparc64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/ipcbuf.h b/arch/xtensa/include/uapi/asm/ipcbuf.h
index c33aa6a..7442e48 100644
--- a/arch/xtensa/include/uapi/asm/ipcbuf.h
+++ b/arch/xtensa/include/uapi/asm/ipcbuf.h
@@ -11,6 +11,8 @@
 #ifndef _XTENSA_IPCBUF_H
 #define _XTENSA_IPCBUF_H
 
+#include <linux/posix_types.h>
+
 /*
  * Pad space is left for:
  * - 32-bit mode_t and seq
diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h
index 3dbcc1e..909f825 100644
--- a/include/uapi/asm-generic/ipcbuf.h
+++ b/include/uapi/asm-generic/ipcbuf.h
@@ -1,6 +1,8 @@
 #ifndef __ASM_GENERIC_IPCBUF_H
 #define __ASM_GENERIC_IPCBUF_H
 
+#include <linux/posix_types.h>
+
 /*
  * The generic ipc64_perm structure:
  * Note extra padding because this structure is passed back and forth
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 2/5] uapi: fix asm/msgbuf.h userspace compilation errors
  2017-03-26  3:27   ` [PATCH 0/5] uapi: fix userspace compilation of asm/ ipc headers Dmitry V. Levin
  2017-03-26  3:30     ` [PATCH 1/5] uapi: fix asm/ipcbuf.h userspace compilation errors Dmitry V. Levin
@ 2017-03-26  3:30     ` Dmitry V. Levin
  2017-03-26  3:30       ` Dmitry V. Levin
  2017-03-26  3:30     ` [PATCH 3/5] uapi: fix asm/sembuf.h " Dmitry V. Levin
                       ` (2 subsequent siblings)
  4 siblings, 1 reply; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-26  3:30 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Morton; +Cc: linux-arch, linux-kernel

Date: Sat, 25 Feb 2017 12:34:56 +0000

Include <asm/ipcbuf.h> to fix asm/msgbuf.h userspace compilation errors
like this:

/usr/include/asm-generic/msgbuf.h:25:20: error: field 'msg_perm' has incomplete type
  struct ipc64_perm msg_perm;
/usr/include/asm-generic/msgbuf.h:26:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_stime; /* last msgsnd time */
/usr/include/asm-generic/msgbuf.h:30:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_rtime; /* last msgrcv time */
/usr/include/asm-generic/msgbuf.h:34:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_ctime; /* last change time */
/usr/include/asm-generic/msgbuf.h:38:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_cbytes; /* current number of bytes on queue */
/usr/include/asm-generic/msgbuf.h:39:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_qnum; /* number of messages in queue */
/usr/include/asm-generic/msgbuf.h:40:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_qbytes; /* max number of bytes on queue */
/usr/include/asm-generic/msgbuf.h:41:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t msg_lspid; /* pid of last msgsnd */
/usr/include/asm-generic/msgbuf.h:42:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t msg_lrpid; /* last receive pid */
/usr/include/asm-generic/msgbuf.h:43:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused4;
/usr/include/asm-generic/msgbuf.h:44:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused5;

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/alpha/include/uapi/asm/msgbuf.h   | 2 ++
 arch/avr32/include/uapi/asm/msgbuf.h   | 2 ++
 arch/frv/include/uapi/asm/msgbuf.h     | 2 ++
 arch/ia64/include/uapi/asm/msgbuf.h    | 2 ++
 arch/m32r/include/uapi/asm/msgbuf.h    | 2 ++
 arch/mips/include/uapi/asm/msgbuf.h    | 1 +
 arch/mn10300/include/uapi/asm/msgbuf.h | 2 ++
 arch/parisc/include/uapi/asm/msgbuf.h  | 1 +
 arch/powerpc/include/uapi/asm/msgbuf.h | 2 ++
 arch/s390/include/uapi/asm/msgbuf.h    | 2 ++
 arch/sparc/include/uapi/asm/msgbuf.h   | 2 ++
 arch/xtensa/include/uapi/asm/msgbuf.h  | 2 ++
 include/uapi/asm-generic/msgbuf.h      | 1 +
 13 files changed, 23 insertions(+)

diff --git a/arch/alpha/include/uapi/asm/msgbuf.h b/arch/alpha/include/uapi/asm/msgbuf.h
index 9849650..8de899a 100644
--- a/arch/alpha/include/uapi/asm/msgbuf.h
+++ b/arch/alpha/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_MSGBUF_H
 #define _ALPHA_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The msqid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/msgbuf.h b/arch/avr32/include/uapi/asm/msgbuf.h
index 9eae6ef..45cdffb 100644
--- a/arch/avr32/include/uapi/asm/msgbuf.h
+++ b/arch/avr32/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_MSGBUF_H
 #define _UAPI__ASM_AVR32_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for i386 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/msgbuf.h b/arch/frv/include/uapi/asm/msgbuf.h
index 97ceb55..92d6656 100644
--- a/arch/frv/include/uapi/asm/msgbuf.h
+++ b/arch/frv/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/msgbuf.h b/arch/ia64/include/uapi/asm/msgbuf.h
index 6c64c0d..9a31b60 100644
--- a/arch/ia64/include/uapi/asm/msgbuf.h
+++ b/arch/ia64/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_MSGBUF_H
 #define _ASM_IA64_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/msgbuf.h b/arch/m32r/include/uapi/asm/msgbuf.h
index 0d5a877..4786c0c 100644
--- a/arch/m32r/include/uapi/asm/msgbuf.h
+++ b/arch/m32r/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_MSGBUF_H
 #define _ASM_M32R_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for m32r architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/msgbuf.h b/arch/mips/include/uapi/asm/msgbuf.h
index df849e8..c84a388 100644
--- a/arch/mips/include/uapi/asm/msgbuf.h
+++ b/arch/mips/include/uapi/asm/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 
 /*
  * The msqid64_ds structure for the MIPS architecture.
diff --git a/arch/mn10300/include/uapi/asm/msgbuf.h b/arch/mn10300/include/uapi/asm/msgbuf.h
index 8b60245..f1c5dd5 100644
--- a/arch/mn10300/include/uapi/asm/msgbuf.h
+++ b/arch/mn10300/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/msgbuf.h b/arch/parisc/include/uapi/asm/msgbuf.h
index 2e83ac7..c70f1d3 100644
--- a/arch/parisc/include/uapi/asm/msgbuf.h
+++ b/arch/parisc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_MSGBUF_H
 #define _PARISC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/msgbuf.h b/arch/powerpc/include/uapi/asm/msgbuf.h
index dd76743..3b87d25 100644
--- a/arch/powerpc/include/uapi/asm/msgbuf.h
+++ b/arch/powerpc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_MSGBUF_H
 #define _ASM_POWERPC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for the PowerPC architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/s390/include/uapi/asm/msgbuf.h b/arch/s390/include/uapi/asm/msgbuf.h
index 1bbdee9..ab04112 100644
--- a/arch/s390/include/uapi/asm/msgbuf.h
+++ b/arch/s390/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_MSGBUF_H
 #define _S390_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The msqid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/msgbuf.h b/arch/sparc/include/uapi/asm/msgbuf.h
index efc7cbe9..699f631 100644
--- a/arch/sparc/include/uapi/asm/msgbuf.h
+++ b/arch/sparc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_MSGBUF_H
 #define _SPARC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for sparc64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/msgbuf.h b/arch/xtensa/include/uapi/asm/msgbuf.h
index 693c967..b75458b 100644
--- a/arch/xtensa/include/uapi/asm/msgbuf.h
+++ b/arch/xtensa/include/uapi/asm/msgbuf.h
@@ -17,6 +17,8 @@
 #ifndef _XTENSA_MSGBUF_H
 #define _XTENSA_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 struct msqid64_ds {
 	struct ipc64_perm msg_perm;
 #ifdef __XTENSA_EB__
diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h
index f55ecc4..f3c3b43 100644
--- a/include/uapi/asm-generic/msgbuf.h
+++ b/include/uapi/asm-generic/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_MSGBUF_H
 #define __ASM_GENERIC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 /*
  * generic msqid64_ds structure.
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 2/5] uapi: fix asm/msgbuf.h userspace compilation errors
  2017-03-26  3:30     ` [PATCH 2/5] uapi: fix asm/msgbuf.h " Dmitry V. Levin
@ 2017-03-26  3:30       ` Dmitry V. Levin
  0 siblings, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-26  3:30 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Morton; +Cc: linux-arch, linux-kernel

Date: Sat, 25 Feb 2017 12:34:56 +0000

Include <asm/ipcbuf.h> to fix asm/msgbuf.h userspace compilation errors
like this:

/usr/include/asm-generic/msgbuf.h:25:20: error: field 'msg_perm' has incomplete type
  struct ipc64_perm msg_perm;
/usr/include/asm-generic/msgbuf.h:26:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_stime; /* last msgsnd time */
/usr/include/asm-generic/msgbuf.h:30:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_rtime; /* last msgrcv time */
/usr/include/asm-generic/msgbuf.h:34:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t msg_ctime; /* last change time */
/usr/include/asm-generic/msgbuf.h:38:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_cbytes; /* current number of bytes on queue */
/usr/include/asm-generic/msgbuf.h:39:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_qnum; /* number of messages in queue */
/usr/include/asm-generic/msgbuf.h:40:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t msg_qbytes; /* max number of bytes on queue */
/usr/include/asm-generic/msgbuf.h:41:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t msg_lspid; /* pid of last msgsnd */
/usr/include/asm-generic/msgbuf.h:42:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t msg_lrpid; /* last receive pid */
/usr/include/asm-generic/msgbuf.h:43:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused4;
/usr/include/asm-generic/msgbuf.h:44:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused5;

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/alpha/include/uapi/asm/msgbuf.h   | 2 ++
 arch/avr32/include/uapi/asm/msgbuf.h   | 2 ++
 arch/frv/include/uapi/asm/msgbuf.h     | 2 ++
 arch/ia64/include/uapi/asm/msgbuf.h    | 2 ++
 arch/m32r/include/uapi/asm/msgbuf.h    | 2 ++
 arch/mips/include/uapi/asm/msgbuf.h    | 1 +
 arch/mn10300/include/uapi/asm/msgbuf.h | 2 ++
 arch/parisc/include/uapi/asm/msgbuf.h  | 1 +
 arch/powerpc/include/uapi/asm/msgbuf.h | 2 ++
 arch/s390/include/uapi/asm/msgbuf.h    | 2 ++
 arch/sparc/include/uapi/asm/msgbuf.h   | 2 ++
 arch/xtensa/include/uapi/asm/msgbuf.h  | 2 ++
 include/uapi/asm-generic/msgbuf.h      | 1 +
 13 files changed, 23 insertions(+)

diff --git a/arch/alpha/include/uapi/asm/msgbuf.h b/arch/alpha/include/uapi/asm/msgbuf.h
index 9849650..8de899a 100644
--- a/arch/alpha/include/uapi/asm/msgbuf.h
+++ b/arch/alpha/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_MSGBUF_H
 #define _ALPHA_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The msqid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/msgbuf.h b/arch/avr32/include/uapi/asm/msgbuf.h
index 9eae6ef..45cdffb 100644
--- a/arch/avr32/include/uapi/asm/msgbuf.h
+++ b/arch/avr32/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_MSGBUF_H
 #define _UAPI__ASM_AVR32_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for i386 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/msgbuf.h b/arch/frv/include/uapi/asm/msgbuf.h
index 97ceb55..92d6656 100644
--- a/arch/frv/include/uapi/asm/msgbuf.h
+++ b/arch/frv/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/msgbuf.h b/arch/ia64/include/uapi/asm/msgbuf.h
index 6c64c0d..9a31b60 100644
--- a/arch/ia64/include/uapi/asm/msgbuf.h
+++ b/arch/ia64/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_MSGBUF_H
 #define _ASM_IA64_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/msgbuf.h b/arch/m32r/include/uapi/asm/msgbuf.h
index 0d5a877..4786c0c 100644
--- a/arch/m32r/include/uapi/asm/msgbuf.h
+++ b/arch/m32r/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_MSGBUF_H
 #define _ASM_M32R_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for m32r architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/msgbuf.h b/arch/mips/include/uapi/asm/msgbuf.h
index df849e8..c84a388 100644
--- a/arch/mips/include/uapi/asm/msgbuf.h
+++ b/arch/mips/include/uapi/asm/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 
 /*
  * The msqid64_ds structure for the MIPS architecture.
diff --git a/arch/mn10300/include/uapi/asm/msgbuf.h b/arch/mn10300/include/uapi/asm/msgbuf.h
index 8b60245..f1c5dd5 100644
--- a/arch/mn10300/include/uapi/asm/msgbuf.h
+++ b/arch/mn10300/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/msgbuf.h b/arch/parisc/include/uapi/asm/msgbuf.h
index 2e83ac7..c70f1d3 100644
--- a/arch/parisc/include/uapi/asm/msgbuf.h
+++ b/arch/parisc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_MSGBUF_H
 #define _PARISC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/msgbuf.h b/arch/powerpc/include/uapi/asm/msgbuf.h
index dd76743..3b87d25 100644
--- a/arch/powerpc/include/uapi/asm/msgbuf.h
+++ b/arch/powerpc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_MSGBUF_H
 #define _ASM_POWERPC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for the PowerPC architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/s390/include/uapi/asm/msgbuf.h b/arch/s390/include/uapi/asm/msgbuf.h
index 1bbdee9..ab04112 100644
--- a/arch/s390/include/uapi/asm/msgbuf.h
+++ b/arch/s390/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_MSGBUF_H
 #define _S390_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The msqid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/msgbuf.h b/arch/sparc/include/uapi/asm/msgbuf.h
index efc7cbe9..699f631 100644
--- a/arch/sparc/include/uapi/asm/msgbuf.h
+++ b/arch/sparc/include/uapi/asm/msgbuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_MSGBUF_H
 #define _SPARC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for sparc64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/msgbuf.h b/arch/xtensa/include/uapi/asm/msgbuf.h
index 693c967..b75458b 100644
--- a/arch/xtensa/include/uapi/asm/msgbuf.h
+++ b/arch/xtensa/include/uapi/asm/msgbuf.h
@@ -17,6 +17,8 @@
 #ifndef _XTENSA_MSGBUF_H
 #define _XTENSA_MSGBUF_H
 
+#include <asm/ipcbuf.h>
+
 struct msqid64_ds {
 	struct ipc64_perm msg_perm;
 #ifdef __XTENSA_EB__
diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h
index f55ecc4..f3c3b43 100644
--- a/include/uapi/asm-generic/msgbuf.h
+++ b/include/uapi/asm-generic/msgbuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_MSGBUF_H
 #define __ASM_GENERIC_MSGBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 /*
  * generic msqid64_ds structure.
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 3/5] uapi: fix asm/sembuf.h userspace compilation errors
  2017-03-26  3:27   ` [PATCH 0/5] uapi: fix userspace compilation of asm/ ipc headers Dmitry V. Levin
  2017-03-26  3:30     ` [PATCH 1/5] uapi: fix asm/ipcbuf.h userspace compilation errors Dmitry V. Levin
  2017-03-26  3:30     ` [PATCH 2/5] uapi: fix asm/msgbuf.h " Dmitry V. Levin
@ 2017-03-26  3:30     ` Dmitry V. Levin
  2017-03-26  3:30       ` Dmitry V. Levin
  2017-03-26  3:30     ` [PATCH 4/5] uapi: fix asm/shmbuf.h " Dmitry V. Levin
  2017-03-26  3:30     ` [PATCH 5/5] uapi: fix another asm/shmbuf.h userspace compilation error Dmitry V. Levin
  4 siblings, 1 reply; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-26  3:30 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Morton; +Cc: linux-arch, linux-kernel

Date: Sat, 25 Feb 2017 12:34:56 +0000

Include <asm/ipcbuf.h> to fix asm/sembuf.h userspace compilation errors
like this:

/usr/include/asm/sembuf.h:14:20: error: field 'sem_perm' has incomplete type
  struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
/usr/include/asm/sembuf.h:15:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t sem_otime; /* last semop time */
/usr/include/asm/sembuf.h:16:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused1;
/usr/include/asm/sembuf.h:17:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t sem_ctime; /* last change time */
/usr/include/asm/sembuf.h:18:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused2;
/usr/include/asm/sembuf.h:19:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t sem_nsems; /* no. of semaphores in array */
/usr/include/asm/sembuf.h:20:2: error: unknown 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 <ldv@altlinux.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/alpha/include/uapi/asm/sembuf.h   | 2 ++
 arch/avr32/include/uapi/asm/sembuf.h   | 2 ++
 arch/frv/include/uapi/asm/sembuf.h     | 2 ++
 arch/ia64/include/uapi/asm/sembuf.h    | 2 ++
 arch/m32r/include/uapi/asm/sembuf.h    | 2 ++
 arch/mips/include/uapi/asm/sembuf.h    | 2 ++
 arch/mn10300/include/uapi/asm/sembuf.h | 2 ++
 arch/parisc/include/uapi/asm/sembuf.h  | 1 +
 arch/powerpc/include/uapi/asm/sembuf.h | 2 ++
 arch/s390/include/uapi/asm/sembuf.h    | 2 ++
 arch/sparc/include/uapi/asm/sembuf.h   | 2 ++
 arch/x86/include/uapi/asm/sembuf.h     | 2 ++
 arch/xtensa/include/uapi/asm/sembuf.h  | 1 +
 include/uapi/asm-generic/sembuf.h      | 1 +
 14 files changed, 25 insertions(+)

diff --git a/arch/alpha/include/uapi/asm/sembuf.h b/arch/alpha/include/uapi/asm/sembuf.h
index 7b38b15..b6bdd5f 100644
--- a/arch/alpha/include/uapi/asm/sembuf.h
+++ b/arch/alpha/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_SEMBUF_H
 #define _ALPHA_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The semid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/sembuf.h b/arch/avr32/include/uapi/asm/sembuf.h
index 6c6f7cf..ec4ddd6 100644
--- a/arch/avr32/include/uapi/asm/sembuf.h
+++ b/arch/avr32/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_SEMBUF_H
 #define _UAPI__ASM_AVR32_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
 * The semid64_ds structure for AVR32 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/sembuf.h b/arch/frv/include/uapi/asm/sembuf.h
index 164b127..0d73641 100644
--- a/arch/frv/include/uapi/asm/sembuf.h
+++ b/arch/frv/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/sembuf.h b/arch/ia64/include/uapi/asm/sembuf.h
index 1340fbc..2e218b0 100644
--- a/arch/ia64/include/uapi/asm/sembuf.h
+++ b/arch/ia64/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_SEMBUF_H
 #define _ASM_IA64_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/sembuf.h b/arch/m32r/include/uapi/asm/sembuf.h
index c9873d6..58ad1f8 100644
--- a/arch/m32r/include/uapi/asm/sembuf.h
+++ b/arch/m32r/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_SEMBUF_H
 #define _ASM_M32R_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for m32r architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/sembuf.h b/arch/mips/include/uapi/asm/sembuf.h
index e1085ac..a55ab3c 100644
--- a/arch/mips/include/uapi/asm/sembuf.h
+++ b/arch/mips/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for the MIPS architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mn10300/include/uapi/asm/sembuf.h b/arch/mn10300/include/uapi/asm/sembuf.h
index 301f3f9..3529f55 100644
--- a/arch/mn10300/include/uapi/asm/sembuf.h
+++ b/arch/mn10300/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/sembuf.h b/arch/parisc/include/uapi/asm/sembuf.h
index c20971b..cff5e43 100644
--- a/arch/parisc/include/uapi/asm/sembuf.h
+++ b/arch/parisc/include/uapi/asm/sembuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_SEMBUF_H
 #define _PARISC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/sembuf.h b/arch/powerpc/include/uapi/asm/sembuf.h
index 99a4193..d001c0a 100644
--- a/arch/powerpc/include/uapi/asm/sembuf.h
+++ b/arch/powerpc/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_SEMBUF_H
 #define _ASM_POWERPC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/arch/s390/include/uapi/asm/sembuf.h b/arch/s390/include/uapi/asm/sembuf.h
index 32626b0..734c9de 100644
--- a/arch/s390/include/uapi/asm/sembuf.h
+++ b/arch/s390/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_SEMBUF_H
 #define _S390_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The semid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/sembuf.h b/arch/sparc/include/uapi/asm/sembuf.h
index faee1be..28f7060 100644
--- a/arch/sparc/include/uapi/asm/sembuf.h
+++ b/arch/sparc/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_SEMBUF_H
 #define _SPARC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for sparc architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/x86/include/uapi/asm/sembuf.h b/arch/x86/include/uapi/asm/sembuf.h
index cc2d6a3..d88cc89 100644
--- a/arch/x86/include/uapi/asm/sembuf.h
+++ b/arch/x86/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_X86_SEMBUF_H
 #define _ASM_X86_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for x86 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/sembuf.h b/arch/xtensa/include/uapi/asm/sembuf.h
index c158704..2494c41 100644
--- a/arch/xtensa/include/uapi/asm/sembuf.h
+++ b/arch/xtensa/include/uapi/asm/sembuf.h
@@ -21,6 +21,7 @@
 #ifndef _XTENSA_SEMBUF_H
 #define _XTENSA_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/byteorder.h>
 
 struct semid64_ds {
diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h
index 4cb2c13..1d910d7 100644
--- a/include/uapi/asm-generic/sembuf.h
+++ b/include/uapi/asm-generic/sembuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_SEMBUF_H
 #define __ASM_GENERIC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /*
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 3/5] uapi: fix asm/sembuf.h userspace compilation errors
  2017-03-26  3:30     ` [PATCH 3/5] uapi: fix asm/sembuf.h " Dmitry V. Levin
@ 2017-03-26  3:30       ` Dmitry V. Levin
  0 siblings, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-26  3:30 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Morton; +Cc: linux-arch, linux-kernel

Date: Sat, 25 Feb 2017 12:34:56 +0000

Include <asm/ipcbuf.h> to fix asm/sembuf.h userspace compilation errors
like this:

/usr/include/asm/sembuf.h:14:20: error: field 'sem_perm' has incomplete type
  struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
/usr/include/asm/sembuf.h:15:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t sem_otime; /* last semop time */
/usr/include/asm/sembuf.h:16:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused1;
/usr/include/asm/sembuf.h:17:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t sem_ctime; /* last change time */
/usr/include/asm/sembuf.h:18:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused2;
/usr/include/asm/sembuf.h:19:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t sem_nsems; /* no. of semaphores in array */
/usr/include/asm/sembuf.h:20:2: error: unknown 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 <ldv@altlinux.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/alpha/include/uapi/asm/sembuf.h   | 2 ++
 arch/avr32/include/uapi/asm/sembuf.h   | 2 ++
 arch/frv/include/uapi/asm/sembuf.h     | 2 ++
 arch/ia64/include/uapi/asm/sembuf.h    | 2 ++
 arch/m32r/include/uapi/asm/sembuf.h    | 2 ++
 arch/mips/include/uapi/asm/sembuf.h    | 2 ++
 arch/mn10300/include/uapi/asm/sembuf.h | 2 ++
 arch/parisc/include/uapi/asm/sembuf.h  | 1 +
 arch/powerpc/include/uapi/asm/sembuf.h | 2 ++
 arch/s390/include/uapi/asm/sembuf.h    | 2 ++
 arch/sparc/include/uapi/asm/sembuf.h   | 2 ++
 arch/x86/include/uapi/asm/sembuf.h     | 2 ++
 arch/xtensa/include/uapi/asm/sembuf.h  | 1 +
 include/uapi/asm-generic/sembuf.h      | 1 +
 14 files changed, 25 insertions(+)

diff --git a/arch/alpha/include/uapi/asm/sembuf.h b/arch/alpha/include/uapi/asm/sembuf.h
index 7b38b15..b6bdd5f 100644
--- a/arch/alpha/include/uapi/asm/sembuf.h
+++ b/arch/alpha/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_SEMBUF_H
 #define _ALPHA_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The semid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/sembuf.h b/arch/avr32/include/uapi/asm/sembuf.h
index 6c6f7cf..ec4ddd6 100644
--- a/arch/avr32/include/uapi/asm/sembuf.h
+++ b/arch/avr32/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_SEMBUF_H
 #define _UAPI__ASM_AVR32_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
 * The semid64_ds structure for AVR32 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/sembuf.h b/arch/frv/include/uapi/asm/sembuf.h
index 164b127..0d73641 100644
--- a/arch/frv/include/uapi/asm/sembuf.h
+++ b/arch/frv/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/sembuf.h b/arch/ia64/include/uapi/asm/sembuf.h
index 1340fbc..2e218b0 100644
--- a/arch/ia64/include/uapi/asm/sembuf.h
+++ b/arch/ia64/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_SEMBUF_H
 #define _ASM_IA64_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/sembuf.h b/arch/m32r/include/uapi/asm/sembuf.h
index c9873d6..58ad1f8 100644
--- a/arch/m32r/include/uapi/asm/sembuf.h
+++ b/arch/m32r/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_SEMBUF_H
 #define _ASM_M32R_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for m32r architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/sembuf.h b/arch/mips/include/uapi/asm/sembuf.h
index e1085ac..a55ab3c 100644
--- a/arch/mips/include/uapi/asm/sembuf.h
+++ b/arch/mips/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for the MIPS architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mn10300/include/uapi/asm/sembuf.h b/arch/mn10300/include/uapi/asm/sembuf.h
index 301f3f9..3529f55 100644
--- a/arch/mn10300/include/uapi/asm/sembuf.h
+++ b/arch/mn10300/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/sembuf.h b/arch/parisc/include/uapi/asm/sembuf.h
index c20971b..cff5e43 100644
--- a/arch/parisc/include/uapi/asm/sembuf.h
+++ b/arch/parisc/include/uapi/asm/sembuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_SEMBUF_H
 #define _PARISC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/sembuf.h b/arch/powerpc/include/uapi/asm/sembuf.h
index 99a4193..d001c0a 100644
--- a/arch/powerpc/include/uapi/asm/sembuf.h
+++ b/arch/powerpc/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_SEMBUF_H
 #define _ASM_POWERPC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/arch/s390/include/uapi/asm/sembuf.h b/arch/s390/include/uapi/asm/sembuf.h
index 32626b0..734c9de 100644
--- a/arch/s390/include/uapi/asm/sembuf.h
+++ b/arch/s390/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_SEMBUF_H
 #define _S390_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The semid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/sembuf.h b/arch/sparc/include/uapi/asm/sembuf.h
index faee1be..28f7060 100644
--- a/arch/sparc/include/uapi/asm/sembuf.h
+++ b/arch/sparc/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_SEMBUF_H
 #define _SPARC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for sparc architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/x86/include/uapi/asm/sembuf.h b/arch/x86/include/uapi/asm/sembuf.h
index cc2d6a3..d88cc89 100644
--- a/arch/x86/include/uapi/asm/sembuf.h
+++ b/arch/x86/include/uapi/asm/sembuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_X86_SEMBUF_H
 #define _ASM_X86_SEMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The semid64_ds structure for x86 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/sembuf.h b/arch/xtensa/include/uapi/asm/sembuf.h
index c158704..2494c41 100644
--- a/arch/xtensa/include/uapi/asm/sembuf.h
+++ b/arch/xtensa/include/uapi/asm/sembuf.h
@@ -21,6 +21,7 @@
 #ifndef _XTENSA_SEMBUF_H
 #define _XTENSA_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/byteorder.h>
 
 struct semid64_ds {
diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h
index 4cb2c13..1d910d7 100644
--- a/include/uapi/asm-generic/sembuf.h
+++ b/include/uapi/asm-generic/sembuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_SEMBUF_H
 #define __ASM_GENERIC_SEMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /*
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 4/5] uapi: fix asm/shmbuf.h userspace compilation errors
  2017-03-26  3:27   ` [PATCH 0/5] uapi: fix userspace compilation of asm/ ipc headers Dmitry V. Levin
                       ` (2 preceding siblings ...)
  2017-03-26  3:30     ` [PATCH 3/5] uapi: fix asm/sembuf.h " Dmitry V. Levin
@ 2017-03-26  3:30     ` Dmitry V. Levin
  2017-03-26  3:30       ` Dmitry V. Levin
  2017-03-26  3:30     ` [PATCH 5/5] uapi: fix another asm/shmbuf.h userspace compilation error Dmitry V. Levin
  4 siblings, 1 reply; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-26  3:30 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Morton; +Cc: linux-arch, linux-kernel

Date: Sat, 25 Feb 2017 12:34:56 +0000

Include <asm/ipcbuf.h> to fix asm/shmbuf.h userspace compilation errors
like this:

/usr/include/asm-generic/shmbuf.h:26:20: error: field 'shm_perm' has incomplete type
  struct ipc64_perm shm_perm; /* operation perms */
/usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_atime; /* last attach time */
/usr/include/asm-generic/shmbuf.h:32:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_dtime; /* last detach time */
/usr/include/asm-generic/shmbuf.h:36:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_ctime; /* last change time */
/usr/include/asm-generic/shmbuf.h:40:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t  shm_cpid; /* pid of creator */
/usr/include/asm-generic/shmbuf.h:41:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t  shm_lpid; /* pid of last operator */
/usr/include/asm-generic/shmbuf.h:42:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shm_nattch; /* no. of current attaches */
/usr/include/asm-generic/shmbuf.h:43:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused4;
/usr/include/asm-generic/shmbuf.h:44:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused5;
/usr/include/asm-generic/shmbuf.h:48:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmax;
/usr/include/asm-generic/shmbuf.h:49:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmin;
/usr/include/asm-generic/shmbuf.h:50:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmni;
/usr/include/asm-generic/shmbuf.h:51:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmseg;
/usr/include/asm-generic/shmbuf.h:52:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmall;
/usr/include/asm-generic/shmbuf.h:53:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused1;
/usr/include/asm-generic/shmbuf.h:54:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused2;
/usr/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 <ldv@altlinux.org>
Acked-by: Arnd Bergmann <arnd@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/shmbuf.h    | 2 ++
 arch/m32r/include/uapi/asm/shmbuf.h    | 2 ++
 arch/mips/include/uapi/asm/shmbuf.h    | 2 ++
 arch/mn10300/include/uapi/asm/shmbuf.h | 2 ++
 arch/parisc/include/uapi/asm/shmbuf.h  | 1 +
 arch/powerpc/include/uapi/asm/shmbuf.h | 2 ++
 arch/s390/include/uapi/asm/shmbuf.h    | 2 ++
 arch/sparc/include/uapi/asm/shmbuf.h   | 2 ++
 arch/xtensa/include/uapi/asm/shmbuf.h  | 2 ++
 include/uapi/asm-generic/shmbuf.h      | 1 +
 13 files changed, 24 insertions(+)

diff --git a/arch/alpha/include/uapi/asm/shmbuf.h b/arch/alpha/include/uapi/asm/shmbuf.h
index 37ee84f..6156099 100644
--- a/arch/alpha/include/uapi/asm/shmbuf.h
+++ b/arch/alpha/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_SHMBUF_H
 #define _ALPHA_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h
index b94cf8b..c8e5234 100644
--- a/arch/avr32/include/uapi/asm/shmbuf.h
+++ b/arch/avr32/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_SHMBUF_H
 #define _UAPI__ASM_AVR32_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for i386 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/shmbuf.h b/arch/frv/include/uapi/asm/shmbuf.h
index 4c6e711..943746c 100644
--- a/arch/frv/include/uapi/asm/shmbuf.h
+++ b/arch/frv/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/shmbuf.h b/arch/ia64/include/uapi/asm/shmbuf.h
index 585002a..ca81d77e 100644
--- a/arch/ia64/include/uapi/asm/shmbuf.h
+++ b/arch/ia64/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_SHMBUF_H
 #define _ASM_IA64_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/shmbuf.h b/arch/m32r/include/uapi/asm/shmbuf.h
index b0cdf0a..714de6e 100644
--- a/arch/m32r/include/uapi/asm/shmbuf.h
+++ b/arch/m32r/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_SHMBUF_H
 #define _ASM_M32R_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for M32R architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
index f994438..f47d193 100644
--- a/arch/mips/include/uapi/asm/shmbuf.h
+++ b/arch/mips/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for the MIPS architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mn10300/include/uapi/asm/shmbuf.h b/arch/mn10300/include/uapi/asm/shmbuf.h
index 8f300cc..71df684 100644
--- a/arch/mn10300/include/uapi/asm/shmbuf.h
+++ b/arch/mn10300/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/shmbuf.h b/arch/parisc/include/uapi/asm/shmbuf.h
index 750e13e..d8105ef 100644
--- a/arch/parisc/include/uapi/asm/shmbuf.h
+++ b/arch/parisc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_SHMBUF_H
 #define _PARISC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h
index 8efa396..7937289 100644
--- a/arch/powerpc/include/uapi/asm/shmbuf.h
+++ b/arch/powerpc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_SHMBUF_H
 #define _ASM_POWERPC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/arch/s390/include/uapi/asm/shmbuf.h b/arch/s390/include/uapi/asm/shmbuf.h
index eed2e28..9ce1d9f 100644
--- a/arch/s390/include/uapi/asm/shmbuf.h
+++ b/arch/s390/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_SHMBUF_H
 #define _S390_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/shmbuf.h b/arch/sparc/include/uapi/asm/shmbuf.h
index 83a1605..f651952 100644
--- a/arch/sparc/include/uapi/asm/shmbuf.h
+++ b/arch/sparc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_SHMBUF_H
 #define _SPARC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for sparc architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
index ad4b012..ad90d05 100644
--- a/arch/xtensa/include/uapi/asm/shmbuf.h
+++ b/arch/xtensa/include/uapi/asm/shmbuf.h
@@ -19,6 +19,8 @@
 #ifndef _XTENSA_SHMBUF_H
 #define _XTENSA_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 #if defined (__XTENSA_EL__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 7e9fb2f..2a6d508 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_SHMBUF_H
 #define __ASM_GENERIC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /*
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 4/5] uapi: fix asm/shmbuf.h userspace compilation errors
  2017-03-26  3:30     ` [PATCH 4/5] uapi: fix asm/shmbuf.h " Dmitry V. Levin
@ 2017-03-26  3:30       ` Dmitry V. Levin
  0 siblings, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-26  3:30 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Morton; +Cc: linux-arch, linux-kernel

Date: Sat, 25 Feb 2017 12:34:56 +0000

Include <asm/ipcbuf.h> to fix asm/shmbuf.h userspace compilation errors
like this:

/usr/include/asm-generic/shmbuf.h:26:20: error: field 'shm_perm' has incomplete type
  struct ipc64_perm shm_perm; /* operation perms */
/usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_atime; /* last attach time */
/usr/include/asm-generic/shmbuf.h:32:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_dtime; /* last detach time */
/usr/include/asm-generic/shmbuf.h:36:2: error: unknown type name '__kernel_time_t'
  __kernel_time_t  shm_ctime; /* last change time */
/usr/include/asm-generic/shmbuf.h:40:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t  shm_cpid; /* pid of creator */
/usr/include/asm-generic/shmbuf.h:41:2: error: unknown type name '__kernel_pid_t'
  __kernel_pid_t  shm_lpid; /* pid of last operator */
/usr/include/asm-generic/shmbuf.h:42:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shm_nattch; /* no. of current attaches */
/usr/include/asm-generic/shmbuf.h:43:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused4;
/usr/include/asm-generic/shmbuf.h:44:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused5;
/usr/include/asm-generic/shmbuf.h:48:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmax;
/usr/include/asm-generic/shmbuf.h:49:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmin;
/usr/include/asm-generic/shmbuf.h:50:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmmni;
/usr/include/asm-generic/shmbuf.h:51:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmseg;
/usr/include/asm-generic/shmbuf.h:52:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t shmall;
/usr/include/asm-generic/shmbuf.h:53:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused1;
/usr/include/asm-generic/shmbuf.h:54:2: error: unknown type name '__kernel_ulong_t'
  __kernel_ulong_t __unused2;
/usr/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 <ldv@altlinux.org>
Acked-by: Arnd Bergmann <arnd@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/shmbuf.h    | 2 ++
 arch/m32r/include/uapi/asm/shmbuf.h    | 2 ++
 arch/mips/include/uapi/asm/shmbuf.h    | 2 ++
 arch/mn10300/include/uapi/asm/shmbuf.h | 2 ++
 arch/parisc/include/uapi/asm/shmbuf.h  | 1 +
 arch/powerpc/include/uapi/asm/shmbuf.h | 2 ++
 arch/s390/include/uapi/asm/shmbuf.h    | 2 ++
 arch/sparc/include/uapi/asm/shmbuf.h   | 2 ++
 arch/xtensa/include/uapi/asm/shmbuf.h  | 2 ++
 include/uapi/asm-generic/shmbuf.h      | 1 +
 13 files changed, 24 insertions(+)

diff --git a/arch/alpha/include/uapi/asm/shmbuf.h b/arch/alpha/include/uapi/asm/shmbuf.h
index 37ee84f..6156099 100644
--- a/arch/alpha/include/uapi/asm/shmbuf.h
+++ b/arch/alpha/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_SHMBUF_H
 #define _ALPHA_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for alpha architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/avr32/include/uapi/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h
index b94cf8b..c8e5234 100644
--- a/arch/avr32/include/uapi/asm/shmbuf.h
+++ b/arch/avr32/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI__ASM_AVR32_SHMBUF_H
 #define _UAPI__ASM_AVR32_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for i386 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/frv/include/uapi/asm/shmbuf.h b/arch/frv/include/uapi/asm/shmbuf.h
index 4c6e711..943746c 100644
--- a/arch/frv/include/uapi/asm/shmbuf.h
+++ b/arch/frv/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for FR-V architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/ia64/include/uapi/asm/shmbuf.h b/arch/ia64/include/uapi/asm/shmbuf.h
index 585002a..ca81d77e 100644
--- a/arch/ia64/include/uapi/asm/shmbuf.h
+++ b/arch/ia64/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_IA64_SHMBUF_H
 #define _ASM_IA64_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for IA-64 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/m32r/include/uapi/asm/shmbuf.h b/arch/m32r/include/uapi/asm/shmbuf.h
index b0cdf0a..714de6e 100644
--- a/arch/m32r/include/uapi/asm/shmbuf.h
+++ b/arch/m32r/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_M32R_SHMBUF_H
 #define _ASM_M32R_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for M32R architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mips/include/uapi/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
index f994438..f47d193 100644
--- a/arch/mips/include/uapi/asm/shmbuf.h
+++ b/arch/mips/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for the MIPS architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/mn10300/include/uapi/asm/shmbuf.h b/arch/mn10300/include/uapi/asm/shmbuf.h
index 8f300cc..71df684 100644
--- a/arch/mn10300/include/uapi/asm/shmbuf.h
+++ b/arch/mn10300/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for MN10300 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/parisc/include/uapi/asm/shmbuf.h b/arch/parisc/include/uapi/asm/shmbuf.h
index 750e13e..d8105ef 100644
--- a/arch/parisc/include/uapi/asm/shmbuf.h
+++ b/arch/parisc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,7 @@
 #ifndef _PARISC_SHMBUF_H
 #define _PARISC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /* 
diff --git a/arch/powerpc/include/uapi/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h
index 8efa396..7937289 100644
--- a/arch/powerpc/include/uapi/asm/shmbuf.h
+++ b/arch/powerpc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_POWERPC_SHMBUF_H
 #define _ASM_POWERPC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/arch/s390/include/uapi/asm/shmbuf.h b/arch/s390/include/uapi/asm/shmbuf.h
index eed2e28..9ce1d9f 100644
--- a/arch/s390/include/uapi/asm/shmbuf.h
+++ b/arch/s390/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _S390_SHMBUF_H
 #define _S390_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for S/390 architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/sparc/include/uapi/asm/shmbuf.h b/arch/sparc/include/uapi/asm/shmbuf.h
index 83a1605..f651952 100644
--- a/arch/sparc/include/uapi/asm/shmbuf.h
+++ b/arch/sparc/include/uapi/asm/shmbuf.h
@@ -1,6 +1,8 @@
 #ifndef _SPARC_SHMBUF_H
 #define _SPARC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for sparc architecture.
  * Note extra padding because this structure is passed back and forth
diff --git a/arch/xtensa/include/uapi/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
index ad4b012..ad90d05 100644
--- a/arch/xtensa/include/uapi/asm/shmbuf.h
+++ b/arch/xtensa/include/uapi/asm/shmbuf.h
@@ -19,6 +19,8 @@
 #ifndef _XTENSA_SHMBUF_H
 #define _XTENSA_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 #if defined (__XTENSA_EL__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 7e9fb2f..2a6d508 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -1,6 +1,7 @@
 #ifndef __ASM_GENERIC_SHMBUF_H
 #define __ASM_GENERIC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
 #include <asm/bitsperlong.h>
 
 /*
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 5/5] uapi: fix another asm/shmbuf.h userspace compilation error
  2017-03-26  3:27   ` [PATCH 0/5] uapi: fix userspace compilation of asm/ ipc headers Dmitry V. Levin
                       ` (3 preceding siblings ...)
  2017-03-26  3:30     ` [PATCH 4/5] uapi: fix asm/shmbuf.h " Dmitry V. Levin
@ 2017-03-26  3:30     ` Dmitry V. Levin
  2017-03-26  3:30       ` Dmitry V. Levin
  4 siblings, 1 reply; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-26  3:30 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Morton; +Cc: linux-arch, linux-kernel

Date: Sat, 25 Feb 2017 12:34:56 +0000

Replace size_t with __kernel_size_t to fix asm/shmbuf.h userspace
compilation errors like this:

/usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t'
  size_t   shm_segsz; /* size of segment (bytes) */

x32 is the only architecture where sizeof(size_t) is less than
sizeof(__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. Levin <ldv@altlinux.org>
Acked-by: Arnd Bergmann <arnd@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/shmbuf.h    | 2 +-
 arch/m32r/include/uapi/asm/shmbuf.h    | 2 +-
 arch/mips/include/uapi/asm/shmbuf.h    | 2 +-
 arch/mn10300/include/uapi/asm/shmbuf.h | 2 +-
 arch/powerpc/include/uapi/asm/shmbuf.h | 2 +-
 arch/s390/include/uapi/asm/shmbuf.h    | 2 +-
 arch/sparc/include/uapi/asm/shmbuf.h   | 2 +-
 arch/xtensa/include/uapi/asm/shmbuf.h  | 4 ++--
 include/uapi/asm-generic/shmbuf.h      | 2 +-
 12 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/alpha/include/uapi/asm/shmbuf.h b/arch/alpha/include/uapi/asm/shmbuf.h
index 6156099..e32ed1f 100644
--- a/arch/alpha/include/uapi/asm/shmbuf.h
+++ b/arch/alpha/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/avr32/include/uapi/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h
index c8e5234..2804f25 100644
--- a/arch/avr32/include/uapi/asm/shmbuf.h
+++ b/arch/avr32/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/frv/include/uapi/asm/shmbuf.h b/arch/frv/include/uapi/asm/shmbuf.h
index 943746c..2af199f 100644
--- a/arch/frv/include/uapi/asm/shmbuf.h
+++ b/arch/frv/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/ia64/include/uapi/asm/shmbuf.h b/arch/ia64/include/uapi/asm/shmbuf.h
index ca81d77e..8e35495 100644
--- a/arch/ia64/include/uapi/asm/shmbuf.h
+++ b/arch/ia64/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/m32r/include/uapi/asm/shmbuf.h b/arch/m32r/include/uapi/asm/shmbuf.h
index 714de6e..fa36b9e 100644
--- a/arch/m32r/include/uapi/asm/shmbuf.h
+++ b/arch/m32r/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/mips/include/uapi/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
index f47d193..95c53ff 100644
--- a/arch/mips/include/uapi/asm/shmbuf.h
+++ b/arch/mips/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/mn10300/include/uapi/asm/shmbuf.h b/arch/mn10300/include/uapi/asm/shmbuf.h
index 71df684..e156878 100644
--- a/arch/mn10300/include/uapi/asm/shmbuf.h
+++ b/arch/mn10300/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/powerpc/include/uapi/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h
index 7937289..a2425e5 100644
--- a/arch/powerpc/include/uapi/asm/shmbuf.h
+++ b/arch/powerpc/include/uapi/asm/shmbuf.h
@@ -38,7 +38,7 @@ struct shmid64_ds {
 #ifndef __powerpc64__
 	unsigned long		__unused4;
 #endif
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_pid_t		shm_cpid;	/* pid of creator */
 	__kernel_pid_t		shm_lpid;	/* pid of last operator */
 	unsigned long		shm_nattch;	/* no. of current attaches */
diff --git a/arch/s390/include/uapi/asm/shmbuf.h b/arch/s390/include/uapi/asm/shmbuf.h
index 9ce1d9f..9ddf9e0 100644
--- a/arch/s390/include/uapi/asm/shmbuf.h
+++ b/arch/s390/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 #ifndef __s390x__
 	unsigned long		__unused1;
diff --git a/arch/sparc/include/uapi/asm/shmbuf.h b/arch/sparc/include/uapi/asm/shmbuf.h
index f651952..ed72656 100644
--- a/arch/sparc/include/uapi/asm/shmbuf.h
+++ b/arch/sparc/include/uapi/asm/shmbuf.h
@@ -27,7 +27,7 @@ struct shmid64_ds {
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	PADDING(__pad3)
 	__kernel_time_t		shm_ctime;	/* last change time */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_pid_t		shm_cpid;	/* pid of creator */
 	__kernel_pid_t		shm_lpid;	/* pid of last operator */
 	unsigned long		shm_nattch;	/* no. of current attaches */
diff --git a/arch/xtensa/include/uapi/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
index ad90d05..8d9206e 100644
--- a/arch/xtensa/include/uapi/asm/shmbuf.h
+++ b/arch/xtensa/include/uapi/asm/shmbuf.h
@@ -24,7 +24,7 @@
 #if defined (__XTENSA_EL__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
@@ -40,7 +40,7 @@ struct shmid64_ds {
 #elif defined (__XTENSA_EB__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 2a6d508..0756934 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -25,7 +25,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 #if __BITS_PER_LONG != 64
 	unsigned long		__unused1;
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 5/5] uapi: fix another asm/shmbuf.h userspace compilation error
  2017-03-26  3:30     ` [PATCH 5/5] uapi: fix another asm/shmbuf.h userspace compilation error Dmitry V. Levin
@ 2017-03-26  3:30       ` Dmitry V. Levin
  0 siblings, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2017-03-26  3:30 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Morton; +Cc: linux-arch, linux-kernel

Date: Sat, 25 Feb 2017 12:34:56 +0000

Replace size_t with __kernel_size_t to fix asm/shmbuf.h userspace
compilation errors like this:

/usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t'
  size_t   shm_segsz; /* size of segment (bytes) */

x32 is the only architecture where sizeof(size_t) is less than
sizeof(__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. Levin <ldv@altlinux.org>
Acked-by: Arnd Bergmann <arnd@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/shmbuf.h    | 2 +-
 arch/m32r/include/uapi/asm/shmbuf.h    | 2 +-
 arch/mips/include/uapi/asm/shmbuf.h    | 2 +-
 arch/mn10300/include/uapi/asm/shmbuf.h | 2 +-
 arch/powerpc/include/uapi/asm/shmbuf.h | 2 +-
 arch/s390/include/uapi/asm/shmbuf.h    | 2 +-
 arch/sparc/include/uapi/asm/shmbuf.h   | 2 +-
 arch/xtensa/include/uapi/asm/shmbuf.h  | 4 ++--
 include/uapi/asm-generic/shmbuf.h      | 2 +-
 12 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/alpha/include/uapi/asm/shmbuf.h b/arch/alpha/include/uapi/asm/shmbuf.h
index 6156099..e32ed1f 100644
--- a/arch/alpha/include/uapi/asm/shmbuf.h
+++ b/arch/alpha/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/avr32/include/uapi/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h
index c8e5234..2804f25 100644
--- a/arch/avr32/include/uapi/asm/shmbuf.h
+++ b/arch/avr32/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/frv/include/uapi/asm/shmbuf.h b/arch/frv/include/uapi/asm/shmbuf.h
index 943746c..2af199f 100644
--- a/arch/frv/include/uapi/asm/shmbuf.h
+++ b/arch/frv/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/ia64/include/uapi/asm/shmbuf.h b/arch/ia64/include/uapi/asm/shmbuf.h
index ca81d77e..8e35495 100644
--- a/arch/ia64/include/uapi/asm/shmbuf.h
+++ b/arch/ia64/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/m32r/include/uapi/asm/shmbuf.h b/arch/m32r/include/uapi/asm/shmbuf.h
index 714de6e..fa36b9e 100644
--- a/arch/m32r/include/uapi/asm/shmbuf.h
+++ b/arch/m32r/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/mips/include/uapi/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
index f47d193..95c53ff 100644
--- a/arch/mips/include/uapi/asm/shmbuf.h
+++ b/arch/mips/include/uapi/asm/shmbuf.h
@@ -14,7 +14,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	__kernel_time_t		shm_ctime;	/* last change time */
diff --git a/arch/mn10300/include/uapi/asm/shmbuf.h b/arch/mn10300/include/uapi/asm/shmbuf.h
index 71df684..e156878 100644
--- a/arch/mn10300/include/uapi/asm/shmbuf.h
+++ b/arch/mn10300/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/arch/powerpc/include/uapi/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h
index 7937289..a2425e5 100644
--- a/arch/powerpc/include/uapi/asm/shmbuf.h
+++ b/arch/powerpc/include/uapi/asm/shmbuf.h
@@ -38,7 +38,7 @@ struct shmid64_ds {
 #ifndef __powerpc64__
 	unsigned long		__unused4;
 #endif
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_pid_t		shm_cpid;	/* pid of creator */
 	__kernel_pid_t		shm_lpid;	/* pid of last operator */
 	unsigned long		shm_nattch;	/* no. of current attaches */
diff --git a/arch/s390/include/uapi/asm/shmbuf.h b/arch/s390/include/uapi/asm/shmbuf.h
index 9ce1d9f..9ddf9e0 100644
--- a/arch/s390/include/uapi/asm/shmbuf.h
+++ b/arch/s390/include/uapi/asm/shmbuf.h
@@ -15,7 +15,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 #ifndef __s390x__
 	unsigned long		__unused1;
diff --git a/arch/sparc/include/uapi/asm/shmbuf.h b/arch/sparc/include/uapi/asm/shmbuf.h
index f651952..ed72656 100644
--- a/arch/sparc/include/uapi/asm/shmbuf.h
+++ b/arch/sparc/include/uapi/asm/shmbuf.h
@@ -27,7 +27,7 @@ struct shmid64_ds {
 	__kernel_time_t		shm_dtime;	/* last detach time */
 	PADDING(__pad3)
 	__kernel_time_t		shm_ctime;	/* last change time */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_pid_t		shm_cpid;	/* pid of creator */
 	__kernel_pid_t		shm_lpid;	/* pid of last operator */
 	unsigned long		shm_nattch;	/* no. of current attaches */
diff --git a/arch/xtensa/include/uapi/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
index ad90d05..8d9206e 100644
--- a/arch/xtensa/include/uapi/asm/shmbuf.h
+++ b/arch/xtensa/include/uapi/asm/shmbuf.h
@@ -24,7 +24,7 @@
 #if defined (__XTENSA_EL__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
@@ -40,7 +40,7 @@ struct shmid64_ds {
 #elif defined (__XTENSA_EB__)
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 	unsigned long		__unused1;
 	__kernel_time_t		shm_dtime;	/* last detach time */
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 2a6d508..0756934 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -25,7 +25,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_time_t		shm_atime;	/* last attach time */
 #if __BITS_PER_LONG != 64
 	unsigned long		__unused1;
-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH] uapi: fix another asm/shmbuf.h userspace compilation error
  2017-03-02 13:07 ` Arnd Bergmann
  2017-03-02 13:07   ` Arnd Bergmann
  2017-03-26  3:27   ` [PATCH 0/5] uapi: fix userspace compilation of asm/ ipc headers Dmitry V. Levin
@ 2017-08-04 15:22   ` James Hogan
  2017-08-04 15:22     ` James Hogan
  2 siblings, 1 reply; 28+ messages in thread
From: James Hogan @ 2017-08-04 15:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Dmitry V. Levin, linux-mips, linux-ia64, linux-xtensa,
	Heiko Carstens, David Howells, Max Filippov, Paul Mackerras,
	H. Peter Anvin, sparclinux, Hans-Christian Egtvedt, linux-arch,
	linux-s390, linux-am33-list, x86, Ingo Molnar, Haavard Skinnemoen,
	Fenghua Yu, Thomas Gleixner, Chris Zankel, Tony Luck,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 970 bytes --]

On Thu, Mar 02, 2017 at 02:07:20PM +0100, Arnd Bergmann wrote:
> On Thu, Mar 2, 2017 at 1:46 AM, Dmitry V. Levin <ldv@altlinux.org> wrote:
> > Replace size_t with __kernel_size_t to fix asm/shmbuf.h userspace
> > compilation errors like this:
> >
> > /usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t'
> >   size_t   shm_segsz; /* size of segment (bytes) */
> >
> > x32 is the only architecture where sizeof(size_t) is less than
> > sizeof(__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. Levin <ldv@altlinux.org>
> 
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Out of interest, is there a plan for merging these patches from Dmitry?

Cheers
James

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH] uapi: fix another asm/shmbuf.h userspace compilation error
  2017-08-04 15:22   ` [PATCH] " James Hogan
@ 2017-08-04 15:22     ` James Hogan
  0 siblings, 0 replies; 28+ messages in thread
From: James Hogan @ 2017-08-04 15:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Dmitry V. Levin, linux-mips, linux-ia64, linux-xtensa,
	Heiko Carstens, David Howells, Max Filippov, Paul Mackerras,
	H. Peter Anvin, sparclinux, Hans-Christian Egtvedt, linux-arch,
	linux-s390, linux-am33-list, x86, Ingo Molnar, Haavard Skinnemoen,
	Fenghua Yu, Thomas Gleixner, Chris Zankel, Tony Luck,
	Linux Kernel Mailing List, Ralf Baechle, linux-alpha,
	Martin Schwidefsky, linuxppc-dev, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 970 bytes --]

On Thu, Mar 02, 2017 at 02:07:20PM +0100, Arnd Bergmann wrote:
> On Thu, Mar 2, 2017 at 1:46 AM, Dmitry V. Levin <ldv@altlinux.org> wrote:
> > Replace size_t with __kernel_size_t to fix asm/shmbuf.h userspace
> > compilation errors like this:
> >
> > /usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t'
> >   size_t   shm_segsz; /* size of segment (bytes) */
> >
> > x32 is the only architecture where sizeof(size_t) is less than
> > sizeof(__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. Levin <ldv@altlinux.org>
> 
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Out of interest, is there a plan for merging these patches from Dmitry?

Cheers
James

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH v2] uapi: fix asm/shmbuf.h userspace compilation errors
  2017-03-02 13:14     ` Arnd Bergmann
  2017-03-02 13:14       ` Arnd Bergmann
@ 2021-12-27 10:53       ` Dmitry V. Levin
  1 sibling, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2021-12-27 10:53 UTC (permalink / raw)
  To: Masahiro Yamada, Arnd Bergmann; +Cc: linux-arch, linux-kernel

Userspace cannot compile <asm/shmbuf.h> due to some missing type
definitions.  For example, compiling it for x86_64 fails with the
following diagnostics:

  HDRTEST usr/include/asm/shmbuf.h
In file included from ./usr/include/asm/shmbuf.h:6,
                 from <command-line>:
./usr/include/asm-generic/shmbuf.h:26:33: error: field 'shm_perm' has incomplete type
   26 |         struct ipc64_perm       shm_perm;       /* operation perms */
      |                                 ^~~~~~~~
./usr/include/asm-generic/shmbuf.h:27:9: error: unknown type name 'size_t'
   27 |         size_t                  shm_segsz;      /* size of segment (bytes) */
      |         ^~~~~~
./usr/include/asm-generic/shmbuf.h:40:9: error: unknown type name '__kernel_pid_t'
   40 |         __kernel_pid_t          shm_cpid;       /* pid of creator */
      |         ^~~~~~~~~~~~~~
./usr/include/asm-generic/shmbuf.h:41:9: error: unknown type name '__kernel_pid_t'
   41 |         __kernel_pid_t          shm_lpid;       /* pid of last operator */
      |         ^~~~~~~~~~~~~~

Replace size_t with __kernel_size_t and include <asm/ipcbuf.h> to make
asm/shmbuf.h self-contained, also add it to the compile-test coverage.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---

This was submitted almost 5 years ago [1] and acked by Arnd, so I was
under impression that it was applied among others of this kind, but,
apparently, it's still relevant.

v2: squash two patches into a single patch, update commit message,
remove usr/include/Makefile exception for asm/shmbuf.h.

[1] https://lore.kernel.org/lkml/20170302004607.GE27132@altlinux.org/T/#u

 arch/mips/include/uapi/asm/shmbuf.h    | 6 ++++--
 arch/parisc/include/uapi/asm/shmbuf.h  | 1 +
 arch/powerpc/include/uapi/asm/shmbuf.h | 4 +++-
 arch/sparc/include/uapi/asm/shmbuf.h   | 4 +++-
 arch/x86/include/uapi/asm/shmbuf.h     | 4 +++-
 arch/xtensa/include/uapi/asm/shmbuf.h  | 4 +++-
 include/uapi/asm-generic/shmbuf.h      | 3 ++-
 usr/include/Makefile                   | 1 -
 8 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/arch/mips/include/uapi/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
index 680bb95b2240..cfddd497e6a8 100644
--- a/arch/mips/include/uapi/asm/shmbuf.h
+++ b/arch/mips/include/uapi/asm/shmbuf.h
@@ -2,6 +2,8 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * The shmid64_ds structure for the MIPS architecture.
  * Note extra padding because this structure is passed back and forth
@@ -16,7 +18,7 @@
 #ifdef __mips64
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	long			shm_atime;	/* last attach time */
 	long			shm_dtime;	/* last detach time */
 	long			shm_ctime;	/* last change time */
@@ -29,7 +31,7 @@ struct shmid64_ds {
 #else
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	unsigned long		shm_atime;	/* last attach time */
 	unsigned long		shm_dtime;	/* last detach time */
 	unsigned long		shm_ctime;	/* last change time */
diff --git a/arch/parisc/include/uapi/asm/shmbuf.h b/arch/parisc/include/uapi/asm/shmbuf.h
index 5da3089be65e..4b1d6c0b1216 100644
--- a/arch/parisc/include/uapi/asm/shmbuf.h
+++ b/arch/parisc/include/uapi/asm/shmbuf.h
@@ -3,6 +3,7 @@
 #define _PARISC_SHMBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
 
 /* 
  * The shmid64_ds structure for parisc architecture.
diff --git a/arch/powerpc/include/uapi/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h
index 00422b2f3c63..8a274dbf7b20 100644
--- a/arch/powerpc/include/uapi/asm/shmbuf.h
+++ b/arch/powerpc/include/uapi/asm/shmbuf.h
@@ -2,6 +2,8 @@
 #ifndef _ASM_POWERPC_SHMBUF_H
 #define _ASM_POWERPC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -34,7 +36,7 @@ struct shmid64_ds {
 	unsigned long		shm_ctime;	/* last change time */
 	unsigned long		__unused4;
 #endif
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_pid_t		shm_cpid;	/* pid of creator */
 	__kernel_pid_t		shm_lpid;	/* pid of last operator */
 	unsigned long		shm_nattch;	/* no. of current attaches */
diff --git a/arch/sparc/include/uapi/asm/shmbuf.h b/arch/sparc/include/uapi/asm/shmbuf.h
index a5d7d8d681c4..1b10b3c91d1b 100644
--- a/arch/sparc/include/uapi/asm/shmbuf.h
+++ b/arch/sparc/include/uapi/asm/shmbuf.h
@@ -2,6 +2,8 @@
 #ifndef _SPARC_SHMBUF_H
 #define _SPARC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 /* 
  * The shmid64_ds structure for sparc architecture.
  * Note extra padding because this structure is passed back and forth
@@ -25,7 +27,7 @@ struct shmid64_ds {
 	unsigned long		shm_ctime_high;
 	unsigned long		shm_ctime;	/* last change time */
 #endif
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_pid_t		shm_cpid;	/* pid of creator */
 	__kernel_pid_t		shm_lpid;	/* pid of last operator */
 	unsigned long		shm_nattch;	/* no. of current attaches */
diff --git a/arch/x86/include/uapi/asm/shmbuf.h b/arch/x86/include/uapi/asm/shmbuf.h
index fce18eaa070c..3e61a65d8512 100644
--- a/arch/x86/include/uapi/asm/shmbuf.h
+++ b/arch/x86/include/uapi/asm/shmbuf.h
@@ -13,9 +13,11 @@
  * from other 32-bit architectures.
  */
 
+#include <asm/ipcbuf.h>
+
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	__kernel_long_t		shm_atime;	/* last attach time */
 	__kernel_long_t		shm_dtime;	/* last detach time */
 	__kernel_long_t		shm_ctime;	/* last change time */
diff --git a/arch/xtensa/include/uapi/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
index 554a57a6a90f..a54411e1ec2a 100644
--- a/arch/xtensa/include/uapi/asm/shmbuf.h
+++ b/arch/xtensa/include/uapi/asm/shmbuf.h
@@ -20,9 +20,11 @@
 #ifndef _XTENSA_SHMBUF_H
 #define _XTENSA_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 	unsigned long		shm_atime;	/* last attach time */
 	unsigned long		shm_atime_high;
 	unsigned long		shm_dtime;	/* last detach time */
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 2bab955e0fed..dc16f82be778 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -3,6 +3,7 @@
 #define __ASM_GENERIC_SHMBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
 
 /*
  * The shmid64_ds structure for x86 architecture.
@@ -24,7 +25,7 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
 #if __BITS_PER_LONG == 64
 	long			shm_atime;	/* last attach time */
 	long			shm_dtime;	/* last detach time */
diff --git a/usr/include/Makefile b/usr/include/Makefile
index 1c2ae1368079..129d13e71691 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -20,7 +20,6 @@ override c_flags = $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I$(objtree)/usr/include
 # Please consider to fix the header first.
 #
 # Sorted alphabetically.
-no-header-test += asm/shmbuf.h
 no-header-test += asm/signal.h
 no-header-test += asm/ucontext.h
 no-header-test += drm/vmwgfx_drm.h

-- 
ldv

^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2021-12-27 10:53 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-26 18:29 [PATCH] uapi: fix asm/ipcbuf.h userspace compilation errors Dmitry V. Levin
2017-02-26 18:29 ` Dmitry V. Levin
2017-03-01 16:23 ` Arnd Bergmann
2017-03-02  0:22   ` [PATCH 1/3] uapi: fix asm/msgbuf.h " Dmitry V. Levin
2017-03-02  0:22     ` Dmitry V. Levin
2017-03-02  0:22   ` [PATCH 2/3] uapi: fix asm/sembuf.h " Dmitry V. Levin
2017-03-02  0:22     ` Dmitry V. Levin
2017-03-02  0:22   ` [PATCH 3/3] uapi: fix asm/shmbuf.h " Dmitry V. Levin
2017-03-02  0:22     ` Dmitry V. Levin
2017-03-02 13:14     ` Arnd Bergmann
2017-03-02 13:14       ` Arnd Bergmann
2021-12-27 10:53       ` [PATCH v2] " Dmitry V. Levin
  -- strict thread matches above, loose matches on Subject: below --
2017-03-02  0:46 [PATCH] uapi: fix another asm/shmbuf.h userspace compilation error Dmitry V. Levin
2017-03-02  0:46 ` Dmitry V. Levin
2017-03-02 13:07 ` Arnd Bergmann
2017-03-02 13:07   ` Arnd Bergmann
2017-03-26  3:27   ` [PATCH 0/5] uapi: fix userspace compilation of asm/ ipc headers Dmitry V. Levin
2017-03-26  3:30     ` [PATCH 1/5] uapi: fix asm/ipcbuf.h userspace compilation errors Dmitry V. Levin
2017-03-26  3:30     ` [PATCH 2/5] uapi: fix asm/msgbuf.h " Dmitry V. Levin
2017-03-26  3:30       ` Dmitry V. Levin
2017-03-26  3:30     ` [PATCH 3/5] uapi: fix asm/sembuf.h " Dmitry V. Levin
2017-03-26  3:30       ` Dmitry V. Levin
2017-03-26  3:30     ` [PATCH 4/5] uapi: fix asm/shmbuf.h " Dmitry V. Levin
2017-03-26  3:30       ` Dmitry V. Levin
2017-03-26  3:30     ` [PATCH 5/5] uapi: fix another asm/shmbuf.h userspace compilation error Dmitry V. Levin
2017-03-26  3:30       ` Dmitry V. Levin
2017-08-04 15:22   ` [PATCH] " James Hogan
2017-08-04 15:22     ` James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).