linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained
@ 2019-10-30  6:38 Masahiro Yamada
  2019-10-30  6:38 ` [PATCH 2/3] arch: msgbuf.h: make uapi asm/msgbuf.h self-contained Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Masahiro Yamada @ 2019-10-30  6:38 UTC (permalink / raw)
  To: Andrew Morton, linux-arch
  Cc: linux-s390, linux-kernel, linux-mips, x86, Arnd Bergmann,
	sparclinux, linuxppc-dev, Masahiro Yamada

The user-space cannot compile <asm/ipcbuf.h> due to some missing type
definitions. For example, building it for x86 fails as follows:

  CC      usr/include/asm/ipcbuf.h.s
In file included from ./usr/include/asm/ipcbuf.h:1:0,
                 from <command-line>:32:
./usr/include/asm-generic/ipcbuf.h:21:2: error: unknown type name ‘__kernel_key_t’
  __kernel_key_t  key;
  ^~~~~~~~~~~~~~
./usr/include/asm-generic/ipcbuf.h:22:2: error: unknown type name ‘__kernel_uid32_t’
  __kernel_uid32_t uid;
  ^~~~~~~~~~~~~~~~
./usr/include/asm-generic/ipcbuf.h:23:2: error: unknown type name ‘__kernel_gid32_t’
  __kernel_gid32_t gid;
  ^~~~~~~~~~~~~~~~
./usr/include/asm-generic/ipcbuf.h:24:2: error: unknown type name ‘__kernel_uid32_t’
  __kernel_uid32_t cuid;
  ^~~~~~~~~~~~~~~~
./usr/include/asm-generic/ipcbuf.h:25:2: error: unknown type name ‘__kernel_gid32_t’
  __kernel_gid32_t cgid;
  ^~~~~~~~~~~~~~~~
./usr/include/asm-generic/ipcbuf.h:26:2: error: unknown type name ‘__kernel_mode_t’
  __kernel_mode_t  mode;
  ^~~~~~~~~~~~~~~
./usr/include/asm-generic/ipcbuf.h:28: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:31:2: error: unknown type name ‘__kernel_ulong_t’
  __kernel_ulong_t __unused1;
  ^~~~~~~~~~~~~~~~
./usr/include/asm-generic/ipcbuf.h:32:2: error: unknown type name ‘__kernel_ulong_t’
  __kernel_ulong_t __unused2;
  ^~~~~~~~~~~~~~~~

It is just a matter of missing include directive.

Include <asm/posix_types.h> to make it self-contained, and add it to
the compile-test coverage.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 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 ++
 usr/include/Makefile                  | 1 -
 5 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/s390/include/uapi/asm/ipcbuf.h b/arch/s390/include/uapi/asm/ipcbuf.h
index 5b1c4f47c656..1030cd186899 100644
--- a/arch/s390/include/uapi/asm/ipcbuf.h
+++ b/arch/s390/include/uapi/asm/ipcbuf.h
@@ -2,6 +2,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 9d0d125500e2..5b933a598a33 100644
--- a/arch/sparc/include/uapi/asm/ipcbuf.h
+++ b/arch/sparc/include/uapi/asm/ipcbuf.h
@@ -2,6 +2,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 a57afa0b606f..3bd0642f6660 100644
--- a/arch/xtensa/include/uapi/asm/ipcbuf.h
+++ b/arch/xtensa/include/uapi/asm/ipcbuf.h
@@ -12,6 +12,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 7d80dbd336fb..41a01b494fc7 100644
--- a/include/uapi/asm-generic/ipcbuf.h
+++ b/include/uapi/asm-generic/ipcbuf.h
@@ -2,6 +2,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/usr/include/Makefile b/usr/include/Makefile
index 57b20f7b6729..70f8fe256aed 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -16,7 +16,6 @@ override c_flags = $(UAPI_CFLAGS) -Wp,-MD,$(depfile) -I$(objtree)/usr/include
 # Please consider to fix the header first.
 #
 # Sorted alphabetically.
-header-test- += asm/ipcbuf.h
 header-test- += asm/msgbuf.h
 header-test- += asm/sembuf.h
 header-test- += asm/shmbuf.h
-- 
2.17.1


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

* [PATCH 2/3] arch: msgbuf.h: make uapi asm/msgbuf.h self-contained
  2019-10-30  6:38 [PATCH 1/3] arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained Masahiro Yamada
@ 2019-10-30  6:38 ` Masahiro Yamada
  2019-10-30  6:38 ` [PATCH 3/3] arch: sembuf.h: make uapi asm/sembuf.h self-contained Masahiro Yamada
  2019-10-31  1:33 ` [PATCH 1/3] arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained Masahiro Yamada
  2 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2019-10-30  6:38 UTC (permalink / raw)
  To: Andrew Morton, linux-arch
  Cc: linux-s390, linux-kernel, linux-mips, x86, Arnd Bergmann,
	sparclinux, linuxppc-dev, Masahiro Yamada

The user-space cannot compile <asm/msgbuf.h> due to some missing type
definitions. For example, building it for x86 fails as follows:

  CC      usr/include/asm/msgbuf.h.s
In file included from ./usr/include/asm/msgbuf.h:6:0,
                 from <command-line>:32:
./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:27:2: error: unknown type name ‘__kernel_time_t’
  __kernel_time_t msg_stime; /* last msgsnd time */
  ^~~~~~~~~~~~~~~
./usr/include/asm-generic/msgbuf.h:28:2: error: unknown type name ‘__kernel_time_t’
  __kernel_time_t msg_rtime; /* last msgrcv time */
  ^~~~~~~~~~~~~~~
./usr/include/asm-generic/msgbuf.h:29:2: error: unknown type name ‘__kernel_time_t’
  __kernel_time_t msg_ctime; /* last change time */
  ^~~~~~~~~~~~~~~
./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 */
  ^~~~~~~~~~~~~~

It is just a matter of missing include directive.

Include <asm/ipcbuf.h> to make it self-contained, and add it to
the compile-test coverage.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/mips/include/uapi/asm/msgbuf.h    | 1 +
 arch/parisc/include/uapi/asm/msgbuf.h  | 1 +
 arch/powerpc/include/uapi/asm/msgbuf.h | 2 ++
 arch/sparc/include/uapi/asm/msgbuf.h   | 2 ++
 arch/x86/include/uapi/asm/msgbuf.h     | 3 +++
 arch/xtensa/include/uapi/asm/msgbuf.h  | 2 ++
 include/uapi/asm-generic/msgbuf.h      | 2 ++
 usr/include/Makefile                   | 1 -
 8 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/arch/mips/include/uapi/asm/msgbuf.h b/arch/mips/include/uapi/asm/msgbuf.h
index 46aa15b13e4e..2722f9b82cf2 100644
--- a/arch/mips/include/uapi/asm/msgbuf.h
+++ b/arch/mips/include/uapi/asm/msgbuf.h
@@ -2,6 +2,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/parisc/include/uapi/asm/msgbuf.h b/arch/parisc/include/uapi/asm/msgbuf.h
index 6a2e9ab2ef8d..02ae1f616347 100644
--- a/arch/parisc/include/uapi/asm/msgbuf.h
+++ b/arch/parisc/include/uapi/asm/msgbuf.h
@@ -3,6 +3,7 @@
 #define _PARISC_MSGBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
 
 /* 
  * The msqid64_ds structure for parisc architecture, copied from sparc.
diff --git a/arch/powerpc/include/uapi/asm/msgbuf.h b/arch/powerpc/include/uapi/asm/msgbuf.h
index 2b1b37797a47..30d5e1b45553 100644
--- a/arch/powerpc/include/uapi/asm/msgbuf.h
+++ b/arch/powerpc/include/uapi/asm/msgbuf.h
@@ -2,6 +2,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/sparc/include/uapi/asm/msgbuf.h b/arch/sparc/include/uapi/asm/msgbuf.h
index ffc46c211d6d..81a8460fdd67 100644
--- a/arch/sparc/include/uapi/asm/msgbuf.h
+++ b/arch/sparc/include/uapi/asm/msgbuf.h
@@ -2,6 +2,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/x86/include/uapi/asm/msgbuf.h b/arch/x86/include/uapi/asm/msgbuf.h
index 90ab9a795b49..e09fd2363300 100644
--- a/arch/x86/include/uapi/asm/msgbuf.h
+++ b/arch/x86/include/uapi/asm/msgbuf.h
@@ -5,6 +5,9 @@
 #if !defined(__x86_64__) || !defined(__ILP32__)
 #include <asm-generic/msgbuf.h>
 #else
+
+#include <asm/ipcbuf.h>
+
 /*
  * The msqid64_ds structure for x86 architecture with x32 ABI.
  *
diff --git a/arch/xtensa/include/uapi/asm/msgbuf.h b/arch/xtensa/include/uapi/asm/msgbuf.h
index d6915e9f071c..1ed2c85b693a 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 9fe4881557cb..7cdc7e52490d 100644
--- a/include/uapi/asm-generic/msgbuf.h
+++ b/include/uapi/asm-generic/msgbuf.h
@@ -3,6 +3,8 @@
 #define __ASM_GENERIC_MSGBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
+
 /*
  * generic msqid64_ds structure.
  *
diff --git a/usr/include/Makefile b/usr/include/Makefile
index 70f8fe256aed..099d7401aa23 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -16,7 +16,6 @@ override c_flags = $(UAPI_CFLAGS) -Wp,-MD,$(depfile) -I$(objtree)/usr/include
 # Please consider to fix the header first.
 #
 # Sorted alphabetically.
-header-test- += asm/msgbuf.h
 header-test- += asm/sembuf.h
 header-test- += asm/shmbuf.h
 header-test- += asm/signal.h
-- 
2.17.1


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

* [PATCH 3/3] arch: sembuf.h: make uapi asm/sembuf.h self-contained
  2019-10-30  6:38 [PATCH 1/3] arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained Masahiro Yamada
  2019-10-30  6:38 ` [PATCH 2/3] arch: msgbuf.h: make uapi asm/msgbuf.h self-contained Masahiro Yamada
@ 2019-10-30  6:38 ` Masahiro Yamada
  2019-11-08  5:51   ` Masahiro Yamada
  2019-10-31  1:33 ` [PATCH 1/3] arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained Masahiro Yamada
  2 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2019-10-30  6:38 UTC (permalink / raw)
  To: Andrew Morton, linux-arch
  Cc: linux-s390, linux-kernel, linux-mips, x86, Arnd Bergmann,
	sparclinux, linuxppc-dev, Masahiro Yamada

The user-space cannot compile <asm/sembuf.h> due to some missing type
definitions. For example, building it for x86 fails as follows:

  CC      usr/include/asm/sembuf.h.s
In file included from <command-line>:32:0:
./usr/include/asm/sembuf.h:17:20: error: field ‘sem_perm’ has incomplete type
  struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
                    ^~~~~~~~
./usr/include/asm/sembuf.h:24:2: error: unknown type name ‘__kernel_time_t’
  __kernel_time_t sem_otime; /* last semop time */
  ^~~~~~~~~~~~~~~
./usr/include/asm/sembuf.h:25:2: error: unknown type name ‘__kernel_ulong_t’
  __kernel_ulong_t __unused1;
  ^~~~~~~~~~~~~~~~
./usr/include/asm/sembuf.h:26:2: error: unknown type name ‘__kernel_time_t’
  __kernel_time_t sem_ctime; /* last change time */
  ^~~~~~~~~~~~~~~
./usr/include/asm/sembuf.h:27:2: error: unknown type name ‘__kernel_ulong_t’
  __kernel_ulong_t __unused2;
  ^~~~~~~~~~~~~~~~
./usr/include/asm/sembuf.h:29:2: error: unknown type name ‘__kernel_ulong_t’
  __kernel_ulong_t sem_nsems; /* no. of semaphores in array */
  ^~~~~~~~~~~~~~~~
./usr/include/asm/sembuf.h:30:2: error: unknown type name ‘__kernel_ulong_t’
  __kernel_ulong_t __unused3;
  ^~~~~~~~~~~~~~~~
./usr/include/asm/sembuf.h:31:2: error: unknown type name ‘__kernel_ulong_t’
  __kernel_ulong_t __unused4;
  ^~~~~~~~~~~~~~~~

It is just a matter of missing include directive.

Include <asm/ipcbuf.h> to make it self-contained, and add it to
the compile-test coverage.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/mips/include/uapi/asm/sembuf.h    | 2 ++
 arch/parisc/include/uapi/asm/sembuf.h  | 1 +
 arch/powerpc/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 +
 usr/include/Makefile                   | 1 -
 8 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/mips/include/uapi/asm/sembuf.h b/arch/mips/include/uapi/asm/sembuf.h
index 60c89e6cb25b..7d135b93bebd 100644
--- a/arch/mips/include/uapi/asm/sembuf.h
+++ b/arch/mips/include/uapi/asm/sembuf.h
@@ -2,6 +2,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/parisc/include/uapi/asm/sembuf.h b/arch/parisc/include/uapi/asm/sembuf.h
index 3c31163b1241..b17a2460b184 100644
--- a/arch/parisc/include/uapi/asm/sembuf.h
+++ b/arch/parisc/include/uapi/asm/sembuf.h
@@ -3,6 +3,7 @@
 #define _PARISC_SEMBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
 
 /* 
  * The semid64_ds structure for parisc architecture.
diff --git a/arch/powerpc/include/uapi/asm/sembuf.h b/arch/powerpc/include/uapi/asm/sembuf.h
index 3f60946f77e3..f42c9c3502c7 100644
--- a/arch/powerpc/include/uapi/asm/sembuf.h
+++ b/arch/powerpc/include/uapi/asm/sembuf.h
@@ -2,6 +2,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/sparc/include/uapi/asm/sembuf.h b/arch/sparc/include/uapi/asm/sembuf.h
index f3d309c2e1cd..5d7764cdf80f 100644
--- a/arch/sparc/include/uapi/asm/sembuf.h
+++ b/arch/sparc/include/uapi/asm/sembuf.h
@@ -2,6 +2,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 89de6cd9f0a7..da0464af7aa6 100644
--- a/arch/x86/include/uapi/asm/sembuf.h
+++ b/arch/x86/include/uapi/asm/sembuf.h
@@ -2,6 +2,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 09f348d643f1..3b9cdd406dfe 100644
--- a/arch/xtensa/include/uapi/asm/sembuf.h
+++ b/arch/xtensa/include/uapi/asm/sembuf.h
@@ -22,6 +22,7 @@
 #define _XTENSA_SEMBUF_H
 
 #include <asm/byteorder.h>
+#include <asm/ipcbuf.h>
 
 struct semid64_ds {
 	struct ipc64_perm sem_perm;		/* permissions .. see ipc.h */
diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h
index 0bae010f1b64..5807fcd643ba 100644
--- a/include/uapi/asm-generic/sembuf.h
+++ b/include/uapi/asm-generic/sembuf.h
@@ -3,6 +3,7 @@
 #define __ASM_GENERIC_SEMBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
 
 /*
  * The semid64_ds structure for x86 architecture.
diff --git a/usr/include/Makefile b/usr/include/Makefile
index 099d7401aa23..107d04bd5ee3 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -16,7 +16,6 @@ override c_flags = $(UAPI_CFLAGS) -Wp,-MD,$(depfile) -I$(objtree)/usr/include
 # Please consider to fix the header first.
 #
 # Sorted alphabetically.
-header-test- += asm/sembuf.h
 header-test- += asm/shmbuf.h
 header-test- += asm/signal.h
 header-test- += asm/ucontext.h
-- 
2.17.1


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

* Re: [PATCH 1/3] arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained
  2019-10-30  6:38 [PATCH 1/3] arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained Masahiro Yamada
  2019-10-30  6:38 ` [PATCH 2/3] arch: msgbuf.h: make uapi asm/msgbuf.h self-contained Masahiro Yamada
  2019-10-30  6:38 ` [PATCH 3/3] arch: sembuf.h: make uapi asm/sembuf.h self-contained Masahiro Yamada
@ 2019-10-31  1:33 ` Masahiro Yamada
  2019-10-31  1:53   ` Andrew Morton
  2 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2019-10-31  1:33 UTC (permalink / raw)
  To: Andrew Morton, linux-arch
  Cc: linux-s390, Linux Kernel Mailing List, linux-mips, X86 ML,
	Arnd Bergmann, sparclinux, linuxppc-dev

Hi Andrew,

I think this patch has already been picked up to your tree,
but I noticed a typo in the commit message just now.
Please see below.

On Wed, Oct 30, 2019 at 3:40 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> The user-space cannot compile <asm/ipcbuf.h> due to some missing type
> definitions. For example, building it for x86 fails as follows:
>
>   CC      usr/include/asm/ipcbuf.h.s
> In file included from ./usr/include/asm/ipcbuf.h:1:0,
>                  from <command-line>:32:
> ./usr/include/asm-generic/ipcbuf.h:21:2: error: unknown type name ‘__kernel_key_t’
>   __kernel_key_t  key;
>   ^~~~~~~~~~~~~~
> ./usr/include/asm-generic/ipcbuf.h:22:2: error: unknown type name ‘__kernel_uid32_t’
>   __kernel_uid32_t uid;
>   ^~~~~~~~~~~~~~~~
> ./usr/include/asm-generic/ipcbuf.h:23:2: error: unknown type name ‘__kernel_gid32_t’
>   __kernel_gid32_t gid;
>   ^~~~~~~~~~~~~~~~
> ./usr/include/asm-generic/ipcbuf.h:24:2: error: unknown type name ‘__kernel_uid32_t’
>   __kernel_uid32_t cuid;
>   ^~~~~~~~~~~~~~~~
> ./usr/include/asm-generic/ipcbuf.h:25:2: error: unknown type name ‘__kernel_gid32_t’
>   __kernel_gid32_t cgid;
>   ^~~~~~~~~~~~~~~~
> ./usr/include/asm-generic/ipcbuf.h:26:2: error: unknown type name ‘__kernel_mode_t’
>   __kernel_mode_t  mode;
>   ^~~~~~~~~~~~~~~
> ./usr/include/asm-generic/ipcbuf.h:28: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:31:2: error: unknown type name ‘__kernel_ulong_t’
>   __kernel_ulong_t __unused1;
>   ^~~~~~~~~~~~~~~~
> ./usr/include/asm-generic/ipcbuf.h:32:2: error: unknown type name ‘__kernel_ulong_t’
>   __kernel_ulong_t __unused2;
>   ^~~~~~~~~~~~~~~~
>
> It is just a matter of missing include directive.
>
> Include <asm/posix_types.h> to make it self-contained, and add it to

Include <linux/posix_type.h> to make ...

Could you please fix it up locally?


Thank you.
Masahiro Yamada



> the compile-test coverage.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
>  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 ++
>  usr/include/Makefile                  | 1 -
>  5 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/arch/s390/include/uapi/asm/ipcbuf.h b/arch/s390/include/uapi/asm/ipcbuf.h
> index 5b1c4f47c656..1030cd186899 100644
> --- a/arch/s390/include/uapi/asm/ipcbuf.h
> +++ b/arch/s390/include/uapi/asm/ipcbuf.h
> @@ -2,6 +2,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 9d0d125500e2..5b933a598a33 100644
> --- a/arch/sparc/include/uapi/asm/ipcbuf.h
> +++ b/arch/sparc/include/uapi/asm/ipcbuf.h
> @@ -2,6 +2,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 a57afa0b606f..3bd0642f6660 100644
> --- a/arch/xtensa/include/uapi/asm/ipcbuf.h
> +++ b/arch/xtensa/include/uapi/asm/ipcbuf.h
> @@ -12,6 +12,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 7d80dbd336fb..41a01b494fc7 100644
> --- a/include/uapi/asm-generic/ipcbuf.h
> +++ b/include/uapi/asm-generic/ipcbuf.h
> @@ -2,6 +2,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/usr/include/Makefile b/usr/include/Makefile
> index 57b20f7b6729..70f8fe256aed 100644
> --- a/usr/include/Makefile
> +++ b/usr/include/Makefile
> @@ -16,7 +16,6 @@ override c_flags = $(UAPI_CFLAGS) -Wp,-MD,$(depfile) -I$(objtree)/usr/include
>  # Please consider to fix the header first.
>  #
>  # Sorted alphabetically.
> -header-test- += asm/ipcbuf.h
>  header-test- += asm/msgbuf.h
>  header-test- += asm/sembuf.h
>  header-test- += asm/shmbuf.h
> --
> 2.17.1
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 1/3] arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained
  2019-10-31  1:33 ` [PATCH 1/3] arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained Masahiro Yamada
@ 2019-10-31  1:53   ` Andrew Morton
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2019-10-31  1:53 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-arch, linux-s390, Linux Kernel Mailing List, linux-mips,
	X86 ML, Arnd Bergmann, sparclinux, linuxppc-dev

On Thu, 31 Oct 2019 10:33:00 +0900 Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> Hi Andrew,
> 
> I think this patch has already been picked up to your tree,
> but I noticed a typo in the commit message just now.
> Please see below.
> 
> ...
>
> > Include <asm/posix_types.h> to make it self-contained, and add it to
> 
> Include <linux/posix_type.h> to make ...
> 
> Could you please fix it up locally?

No probs, done.

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

* Re: [PATCH 3/3] arch: sembuf.h: make uapi asm/sembuf.h self-contained
  2019-10-30  6:38 ` [PATCH 3/3] arch: sembuf.h: make uapi asm/sembuf.h self-contained Masahiro Yamada
@ 2019-11-08  5:51   ` Masahiro Yamada
  0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2019-11-08  5:51 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-s390, Linux Kernel Mailing List, linux-mips, X86 ML,
	Arnd Bergmann, sparclinux, linuxppc-dev, linux-arch

Hi Andrew,

I think you modified the commit log before applying this patch.
I just noticed a typo.


commit 411865d8dd2c31f56eefc54bc16fabb47e1bfb73
Author: Masahiro Yamada <yamada.masahiro@socionext.com>
Date:   Wed Nov 6 16:07:08 2019 +1100

    arch: sembuf.h: make uapi asm/sembuf.h self-contained

    Uuserspace cannot compile <asm/sembuf.h> due to some missing type
    definitions.  For example, building it for x86 fails as follows:



If possible, could you fix up  s/Uuserspace/Userspace/  ?


Thanks.
Masahiro Yamada





On Wed, Oct 30, 2019 at 3:40 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> The user-space cannot compile <asm/sembuf.h> due to some missing type
> definitions. For example, building it for x86 fails as follows:
>
>   CC      usr/include/asm/sembuf.h.s
> In file included from <command-line>:32:0:
> ./usr/include/asm/sembuf.h:17:20: error: field ‘sem_perm’ has incomplete type
>   struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
>                     ^~~~~~~~
> ./usr/include/asm/sembuf.h:24:2: error: unknown type name ‘__kernel_time_t’
>   __kernel_time_t sem_otime; /* last semop time */
>   ^~~~~~~~~~~~~~~
> ./usr/include/asm/sembuf.h:25:2: error: unknown type name ‘__kernel_ulong_t’
>   __kernel_ulong_t __unused1;
>   ^~~~~~~~~~~~~~~~
> ./usr/include/asm/sembuf.h:26:2: error: unknown type name ‘__kernel_time_t’
>   __kernel_time_t sem_ctime; /* last change time */
>   ^~~~~~~~~~~~~~~
> ./usr/include/asm/sembuf.h:27:2: error: unknown type name ‘__kernel_ulong_t’
>   __kernel_ulong_t __unused2;
>   ^~~~~~~~~~~~~~~~
> ./usr/include/asm/sembuf.h:29:2: error: unknown type name ‘__kernel_ulong_t’
>   __kernel_ulong_t sem_nsems; /* no. of semaphores in array */
>   ^~~~~~~~~~~~~~~~
> ./usr/include/asm/sembuf.h:30:2: error: unknown type name ‘__kernel_ulong_t’
>   __kernel_ulong_t __unused3;
>   ^~~~~~~~~~~~~~~~
> ./usr/include/asm/sembuf.h:31:2: error: unknown type name ‘__kernel_ulong_t’
>   __kernel_ulong_t __unused4;
>   ^~~~~~~~~~~~~~~~
>
> It is just a matter of missing include directive.
>
> Include <asm/ipcbuf.h> to make it self-contained, and add it to
> the compile-test coverage.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
>  arch/mips/include/uapi/asm/sembuf.h    | 2 ++
>  arch/parisc/include/uapi/asm/sembuf.h  | 1 +
>  arch/powerpc/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 +
>  usr/include/Makefile                   | 1 -
>  8 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/include/uapi/asm/sembuf.h b/arch/mips/include/uapi/asm/sembuf.h
> index 60c89e6cb25b..7d135b93bebd 100644
> --- a/arch/mips/include/uapi/asm/sembuf.h
> +++ b/arch/mips/include/uapi/asm/sembuf.h
> @@ -2,6 +2,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/parisc/include/uapi/asm/sembuf.h b/arch/parisc/include/uapi/asm/sembuf.h
> index 3c31163b1241..b17a2460b184 100644
> --- a/arch/parisc/include/uapi/asm/sembuf.h
> +++ b/arch/parisc/include/uapi/asm/sembuf.h
> @@ -3,6 +3,7 @@
>  #define _PARISC_SEMBUF_H
>
>  #include <asm/bitsperlong.h>
> +#include <asm/ipcbuf.h>
>
>  /*
>   * The semid64_ds structure for parisc architecture.
> diff --git a/arch/powerpc/include/uapi/asm/sembuf.h b/arch/powerpc/include/uapi/asm/sembuf.h
> index 3f60946f77e3..f42c9c3502c7 100644
> --- a/arch/powerpc/include/uapi/asm/sembuf.h
> +++ b/arch/powerpc/include/uapi/asm/sembuf.h
> @@ -2,6 +2,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/sparc/include/uapi/asm/sembuf.h b/arch/sparc/include/uapi/asm/sembuf.h
> index f3d309c2e1cd..5d7764cdf80f 100644
> --- a/arch/sparc/include/uapi/asm/sembuf.h
> +++ b/arch/sparc/include/uapi/asm/sembuf.h
> @@ -2,6 +2,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 89de6cd9f0a7..da0464af7aa6 100644
> --- a/arch/x86/include/uapi/asm/sembuf.h
> +++ b/arch/x86/include/uapi/asm/sembuf.h
> @@ -2,6 +2,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 09f348d643f1..3b9cdd406dfe 100644
> --- a/arch/xtensa/include/uapi/asm/sembuf.h
> +++ b/arch/xtensa/include/uapi/asm/sembuf.h
> @@ -22,6 +22,7 @@
>  #define _XTENSA_SEMBUF_H
>
>  #include <asm/byteorder.h>
> +#include <asm/ipcbuf.h>
>
>  struct semid64_ds {
>         struct ipc64_perm sem_perm;             /* permissions .. see ipc.h */
> diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h
> index 0bae010f1b64..5807fcd643ba 100644
> --- a/include/uapi/asm-generic/sembuf.h
> +++ b/include/uapi/asm-generic/sembuf.h
> @@ -3,6 +3,7 @@
>  #define __ASM_GENERIC_SEMBUF_H
>
>  #include <asm/bitsperlong.h>
> +#include <asm/ipcbuf.h>
>
>  /*
>   * The semid64_ds structure for x86 architecture.
> diff --git a/usr/include/Makefile b/usr/include/Makefile
> index 099d7401aa23..107d04bd5ee3 100644
> --- a/usr/include/Makefile
> +++ b/usr/include/Makefile
> @@ -16,7 +16,6 @@ override c_flags = $(UAPI_CFLAGS) -Wp,-MD,$(depfile) -I$(objtree)/usr/include
>  # Please consider to fix the header first.
>  #
>  # Sorted alphabetically.
> -header-test- += asm/sembuf.h
>  header-test- += asm/shmbuf.h
>  header-test- += asm/signal.h
>  header-test- += asm/ucontext.h
> --
> 2.17.1
>


-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2019-11-08  5:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30  6:38 [PATCH 1/3] arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained Masahiro Yamada
2019-10-30  6:38 ` [PATCH 2/3] arch: msgbuf.h: make uapi asm/msgbuf.h self-contained Masahiro Yamada
2019-10-30  6:38 ` [PATCH 3/3] arch: sembuf.h: make uapi asm/sembuf.h self-contained Masahiro Yamada
2019-11-08  5:51   ` Masahiro Yamada
2019-10-31  1:33 ` [PATCH 1/3] arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained Masahiro Yamada
2019-10-31  1:53   ` Andrew Morton

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 NNTP newsgroup(s).