Skip to contentSkip to conversation

Add more export headers to compile-test coverage

PATCH In review Masahiro Yamada 4 participants 19 messages Feb 10, 2022 – Mar 13, 2022

Subsystems (14)
Arm (32-bit) x86 PowerPC Kbuild +10 more subsystems
lore
Share & tools
lore
#0 lore raw

cover Add more export headers to compile-test coverage

Masahiro Yamada (6):
signal.h: add linux/signal.h and asm/signal.h to UAPI compile-test
coverage
shmbuf.h: add asm/shmbuf.h to UAPI compile-test coverage android/binder.h: add linux/android/binder(fs).h to UAPI compile-test
coverage
fsmap.h: add linux/fsmap.h to UAPI compile-test coverage kexec.h: add linux/kexec.h to UAPI compile-test coverage reiserfs_xattr.h: add linux/reiserfs_xattr.h to UAPI compile-test
coverage

 arch/alpha/include/uapi/asm/signal.h   | 2 +-
 arch/arm/include/uapi/asm/signal.h     | 2 +-
 arch/h8300/include/uapi/asm/signal.h   | 2 +-
 arch/ia64/include/uapi/asm/signal.h    | 2 +-
 arch/m68k/include/uapi/asm/signal.h    | 2 +-
 arch/mips/include/uapi/asm/shmbuf.h    | 7 +++++--
 arch/mips/include/uapi/asm/signal.h    | 2 +-
 arch/parisc/include/uapi/asm/shmbuf.h  | 2 ++
 arch/parisc/include/uapi/asm/signal.h  | 2 +-
 arch/powerpc/include/uapi/asm/shmbuf.h | 5 ++++-
 arch/powerpc/include/uapi/asm/signal.h | 2 +-
 arch/s390/include/uapi/asm/signal.h    | 2 +-
 arch/sparc/include/uapi/asm/shmbuf.h   | 5 ++++-
 arch/sparc/include/uapi/asm/signal.h   | 3 ++-
 arch/x86/include/uapi/asm/shmbuf.h     | 6 +++++-
 arch/x86/include/uapi/asm/signal.h     | 2 +-
 arch/xtensa/include/uapi/asm/shmbuf.h  | 5 ++++-
 arch/xtensa/include/uapi/asm/signal.h  | 2 +-
 include/uapi/asm-generic/shmbuf.h      | 4 +++-
 include/uapi/asm-generic/signal.h      | 2 +-
 include/uapi/linux/android/binder.h    | 4 ++--
 include/uapi/linux/fsmap.h             | 2 +-
 include/uapi/linux/kexec.h             | 4 ++--
 include/uapi/linux/reiserfs_xattr.h    | 2 +-
 usr/include/Makefile                   | 8 --------
 25 files changed, 47 insertions(+), 34 deletions(-)
Signature · 1 line
2.32.0
#1 lore raw

PATCH 1/6 signal.h: add linux/signal.h and asm/signal.h to UAPI compile-test coverage

linux/signal.h and asm/signal.h are currently excluded from the UAPI compile-test because of the errors like follows:

HDRTEST usr/include/asm/signal.h
In file included from <command-line>:
./usr/include/asm/signal.h:103:9: error: unknown type name ‘size_t’

    103 |         size_t ss_size;
        |         ^~~~~~

The errors can be fixed by replacing size_t with __kernel_size_t.

Then, remove the no-header-test entries from user/include/Makefile.

---

 arch/alpha/include/uapi/asm/signal.h   | 2 +-
 arch/arm/include/uapi/asm/signal.h     | 2 +-
 arch/h8300/include/uapi/asm/signal.h   | 2 +-
 arch/ia64/include/uapi/asm/signal.h    | 2 +-
 arch/m68k/include/uapi/asm/signal.h    | 2 +-
 arch/mips/include/uapi/asm/signal.h    | 2 +-
 arch/parisc/include/uapi/asm/signal.h  | 2 +-
 arch/powerpc/include/uapi/asm/signal.h | 2 +-
 arch/s390/include/uapi/asm/signal.h    | 2 +-
 arch/sparc/include/uapi/asm/signal.h   | 3 ++-
 arch/x86/include/uapi/asm/signal.h     | 2 +-
 arch/xtensa/include/uapi/asm/signal.h  | 2 +-
 include/uapi/asm-generic/signal.h      | 2 +-
 usr/include/Makefile                   | 2 --
 14 files changed, 14 insertions(+), 15 deletions(-)
arch/alpha/include/uapi/asm/signal.h +1 -1
index a69dd8d080a8..1413075f7616 100644
@@ -100,7 +100,7 @@ struct sigaction {
 typedef struct sigaltstack {
 	void __user *ss_sp;
 	int ss_flags;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 /* sigstack(2) is deprecated, and will be withdrawn in a future version
arch/arm/include/uapi/asm/signal.h +1 -1
index c9a3ea1d8d41..9e2178420db2 100644
@@ -93,7 +93,7 @@ struct sigaction {
 typedef struct sigaltstack {
 	void __user *ss_sp;
 	int ss_flags;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 
arch/h8300/include/uapi/asm/signal.h +1 -1
index 2cd0dce2b6a6..1165481f80f6 100644
@@ -85,7 +85,7 @@ struct sigaction {
 typedef struct sigaltstack {
 	void *ss_sp;
 	int ss_flags;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 
arch/ia64/include/uapi/asm/signal.h +1 -1
index 38166a88e4c9..63d574e802a2 100644
@@ -90,7 +90,7 @@ struct siginfo;
 typedef struct sigaltstack {
 	void __user *ss_sp;
 	int ss_flags;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 
arch/m68k/include/uapi/asm/signal.h +1 -1
index 4619291df601..80f520b9b10b 100644
@@ -83,7 +83,7 @@ struct sigaction {
 typedef struct sigaltstack {
 	void __user *ss_sp;
 	int ss_flags;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 #endif /* _UAPI_M68K_SIGNAL_H */
arch/mips/include/uapi/asm/signal.h +1 -1
index e6c78a15cb2f..94a00f82e373 100644
@@ -100,7 +100,7 @@ struct sigaction {
 /* IRIX compatible stack_t  */
 typedef struct sigaltstack {
 	void __user *ss_sp;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 	int ss_flags;
 } stack_t;
 
arch/parisc/include/uapi/asm/signal.h +1 -1
index e5a2657477ac..8e4895c5ea5d 100644
@@ -67,7 +67,7 @@ struct siginfo;
 typedef struct sigaltstack {
 	void __user *ss_sp;
 	int ss_flags;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 #endif /* !__ASSEMBLY */
arch/powerpc/include/uapi/asm/signal.h +1 -1
index 04873dd311c2..37d41d87c45b 100644
@@ -86,7 +86,7 @@ struct sigaction {
 typedef struct sigaltstack {
 	void __user *ss_sp;
 	int ss_flags;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 
arch/s390/include/uapi/asm/signal.h +1 -1
index 0189f326aac5..e74d6ba1bd3b 100644
@@ -108,7 +108,7 @@ struct sigaction {
 typedef struct sigaltstack {
         void __user *ss_sp;
         int ss_flags;
-        size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 
arch/sparc/include/uapi/asm/signal.h +2 -1
index 53758d53ac0e..d395af9b46d2 100644
@@ -2,6 +2,7 @@
 #ifndef _UAPI__SPARC_SIGNAL_H
 #define _UAPI__SPARC_SIGNAL_H
 
+#include <asm/posix_types.h>
 #include <asm/sigcontext.h>
 #include <linux/compiler.h>
 
@@ -171,7 +172,7 @@ struct __old_sigaction {
 typedef struct sigaltstack {
 	void			__user *ss_sp;
 	int			ss_flags;
-	size_t			ss_size;
+	__kernel_size_t		ss_size;
 } stack_t;
 
 
arch/x86/include/uapi/asm/signal.h +1 -1
index 164a22a72984..777c3a0f4e23 100644
@@ -104,7 +104,7 @@ struct sigaction {
 typedef struct sigaltstack {
 	void __user *ss_sp;
 	int ss_flags;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 #endif /* __ASSEMBLY__ */
arch/xtensa/include/uapi/asm/signal.h +1 -1
index 79ddabaa4e5d..b8c824dd4b74 100644
@@ -103,7 +103,7 @@ struct sigaction {
 typedef struct sigaltstack {
 	void *ss_sp;
 	int ss_flags;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 #endif	/* __ASSEMBLY__ */
include/uapi/asm-generic/signal.h +1 -1
index f634822906e4..0eb69dc8e572 100644
@@ -85,7 +85,7 @@ struct sigaction {
 typedef struct sigaltstack {
 	void __user *ss_sp;
 	int ss_flags;
-	size_t ss_size;
+	__kernel_size_t ss_size;
 } stack_t;
 
 #endif /* __ASSEMBLY__ */
usr/include/Makefile +0 -2
index 8dbd1d8a245f..e7230a5a402a 100644
@@ -24,7 +24,6 @@ override c_flags = $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I$(objtree)/usr/include
 #
 # 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
 no-header-test += linux/am437x-vpfe.h
@@ -44,7 +43,6 @@ no-header-test += linux/patchkey.h
 no-header-test += linux/phonet.h
 no-header-test += linux/reiserfs_xattr.h
 no-header-test += linux/sctp.h
-no-header-test += linux/signal.h
 no-header-test += linux/sysctl.h
 no-header-test += linux/usb/audio.h
 no-header-test += linux/v4l2-mediabus.h
Signature · 1 line
2.32.0
maintainer Reviewed-by on v1 1/6
#2 lore raw

Re: [PATCH 1/6] signal.h: add linux/signal.h and asm/signal.h to UAPI compile-test coverage

Quoted 7 lines · Masahiro Yamada

linux/signal.h and asm/signal.h are currently excluded from the UAPI compile-test because of the errors like follows:

HDRTEST usr/include/asm/signal.h
In file included from <command-line>:
./usr/include/asm/signal.h:103:9: error: unknown type name ‘size_t’

Quoted 8 lines
    103 |         size_t ss_size;
        |         ^~~~~~

The errors can be fixed by replacing size_t with __kernel_size_t.

Then, remove the no-header-test entries from user/include/Makefile.

maintainer Reviewed-by Acked-by on v1 1/6
#3 lore raw

Re: [PATCH 1/6] signal.h: add linux/signal.h and asm/signal.h to UAPI compile-test coverage

In reply to Masahiro Yamada
Quoted 9 lines · Masahiro Yamada

linux/signal.h and asm/signal.h are currently excluded from the UAPI compile-test because of the errors like follows:

HDRTEST usr/include/asm/signal.h
In file included from <command-line>:
./usr/include/asm/signal.h:103:9: error: unknown type name ‘size_t’

    103 |         size_t ss_size;
        |         ^~~~~~
Quoted 7 lines

The errors can be fixed by replacing size_t with __kernel_size_t.

Then, remove the no-header-test entries from user/include/Makefile.

 arch/m68k/include/uapi/asm/signal.h    | 2 +-

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Reviewed-by on v1 1/6
#4 lore raw

Re: [PATCH 1/6] signal.h: add linux/signal.h and asm/signal.h to UAPI compile-test coverage

In reply to Masahiro Yamada
Quoted 6 lines · Masahiro Yamada

linux/signal.h and asm/signal.h are currently excluded from the UAPI compile-test because of the errors like follows:

HDRTEST usr/include/asm/signal.h
In file included from <command-line>:
./usr/include/asm/signal.h:103:9: error: unknown type name ‘size_t’

Quoted 8 lines
    103 |         size_t ss_size;
        |         ^~~~~~

The errors can be fixed by replacing size_t with __kernel_size_t.

Then, remove the no-header-test entries from user/include/Makefile.

This is essentially the same patch as
https://lore.kernel.org/lkml/[email protected]/

Apparently, some people are more lucky in getting their patches reviewed.

Anyway,

Signature · 1 line
ldv
#5 lore raw

PATCH 2/6 shmbuf.h: add asm/shmbuf.h to UAPI compile-test coverage

In reply to Masahiro Yamada

asm/shmbuf.h is currently excluded from the UAPI compile-test because of the errors like follows:

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 */
        |         ^~~~~~~~~~~~~~

The errors can be fixed by replacing size_t with __kernel_size_t and by including proper headers.

Then, remove the no-header-test entry from user/include/Makefile.

---

 arch/mips/include/uapi/asm/shmbuf.h    | 7 +++++--
 arch/parisc/include/uapi/asm/shmbuf.h  | 2 ++
 arch/powerpc/include/uapi/asm/shmbuf.h | 5 ++++-
 arch/sparc/include/uapi/asm/shmbuf.h   | 5 ++++-
 arch/x86/include/uapi/asm/shmbuf.h     | 6 +++++-
 arch/xtensa/include/uapi/asm/shmbuf.h  | 5 ++++-
 include/uapi/asm-generic/shmbuf.h      | 4 +++-
 usr/include/Makefile                   | 1 -
 8 files changed, 27 insertions(+), 8 deletions(-)
arch/mips/include/uapi/asm/shmbuf.h +5 -2
index 680bb95b2240..eb74d304b779 100644
@@ -2,6 +2,9 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>
+
 /*
  * The shmid64_ds structure for the MIPS architecture.
  * Note extra padding because this structure is passed back and forth
@@ -16,7 +19,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 +32,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 */
arch/parisc/include/uapi/asm/shmbuf.h +2 -0
index 5da3089be65e..532da742fb56 100644
@@ -3,6 +3,8 @@
 #define _PARISC_SHMBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>
 
 /* 
  * The shmid64_ds structure for parisc architecture.
arch/powerpc/include/uapi/asm/shmbuf.h +4 -1
index 00422b2f3c63..439a3a02ba64 100644
@@ -2,6 +2,9 @@
 #ifndef _ASM_POWERPC_SHMBUF_H
 #define _ASM_POWERPC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.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 +37,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 */
arch/sparc/include/uapi/asm/shmbuf.h +4 -1
index a5d7d8d681c4..ed4f061c7a15 100644
@@ -2,6 +2,9 @@
 #ifndef _SPARC_SHMBUF_H
 #define _SPARC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>
+
 /* 
  * The shmid64_ds structure for sparc architecture.
  * Note extra padding because this structure is passed back and forth
@@ -25,7 +28,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 */
arch/x86/include/uapi/asm/shmbuf.h +5 -1
index fce18eaa070c..13775bfdfee2 100644
@@ -5,6 +5,10 @@
 #if !defined(__x86_64__) || !defined(__ILP32__)
 #include <asm-generic/shmbuf.h>
 #else
+
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>
+
 /*
  * The shmid64_ds structure for x86 architecture with x32 ABI.
  *
@@ -15,7 +19,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_long_t		shm_atime;	/* last attach time */
 	__kernel_long_t		shm_dtime;	/* last detach time */
 	__kernel_long_t		shm_ctime;	/* last change time */
arch/xtensa/include/uapi/asm/shmbuf.h +4 -1
index 554a57a6a90f..bb8bdddae9b5 100644
@@ -20,9 +20,12 @@
 #ifndef _XTENSA_SHMBUF_H
 #define _XTENSA_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.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 */
include/uapi/asm-generic/shmbuf.h +3 -1
index 2bab955e0fed..2979b6dd2c56 100644
@@ -3,6 +3,8 @@
 #define __ASM_GENERIC_SHMBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>
 
 /*
  * The shmid64_ds structure for x86 architecture.
@@ -24,7 +26,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 */
usr/include/Makefile +0 -1
index e7230a5a402a..b0b6cc455930 100644
@@ -23,7 +23,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/ucontext.h
 no-header-test += drm/vmwgfx_drm.h
 no-header-test += linux/am437x-vpfe.h
Signature · 1 line
2.32.0
maintainer Reviewed-by on v1 2/6
#6 lore raw

Re: [PATCH 2/6] shmbuf.h: add asm/shmbuf.h to UAPI compile-test coverage

Quoted 20 lines · Masahiro Yamada

asm/shmbuf.h is currently excluded from the UAPI compile-test because of the errors like follows:

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 */
        |         ^~~~~~~~~~~~~~
Quoted 6 lines

The errors can be fixed by replacing size_t with __kernel_size_t and by including proper headers.

Then, remove the no-header-test entry from user/include/Makefile.

#7 lore raw

Re: [PATCH 2/6] shmbuf.h: add asm/shmbuf.h to UAPI compile-test coverage

In reply to Masahiro Yamada
Quoted 19 lines · Masahiro Yamada

asm/shmbuf.h is currently excluded from the UAPI compile-test because of the errors like follows:

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 */
        |         ^~~~~~~~~~~~~~
Quoted 6 lines

The errors can be fixed by replacing size_t with __kernel_size_t and by including proper headers.

Then, remove the no-header-test entry from user/include/Makefile.

This is essentially the same patch as
https://lore.kernel.org/lkml/[email protected]/

Apparently, some people are more lucky in getting their patches reviewed.

[...]

arch/mips/include/uapi/asm/shmbuf.h line 6

Quoted 10 lines
arch/mips/include/uapi/asm/shmbuf.h +2 -0
index 680bb95b2240..eb74d304b779 100644
@@ -2,6 +2,9 @@
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>

There is no need to include <asm/posix_types.h> since <asm/ipcbuf.h> already includes it, but there is no harm either.

[...]

arch/parisc/include/uapi/asm/shmbuf.h line 7

Quoted 10 lines
arch/parisc/include/uapi/asm/shmbuf.h +2 -0
index 5da3089be65e..532da742fb56 100644
@@ -3,6 +3,8 @@
 #define _PARISC_SHMBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>

Likewise.

[...]

arch/powerpc/include/uapi/asm/shmbuf.h line 6

Quoted 10 lines
arch/powerpc/include/uapi/asm/shmbuf.h +2 -0
index 00422b2f3c63..439a3a02ba64 100644
@@ -2,6 +2,9 @@
 #ifndef _ASM_POWERPC_SHMBUF_H
 #define _ASM_POWERPC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>

Likewise.

[...]

arch/sparc/include/uapi/asm/shmbuf.h line 6

Quoted 10 lines
arch/sparc/include/uapi/asm/shmbuf.h +2 -0
index a5d7d8d681c4..ed4f061c7a15 100644
@@ -2,6 +2,9 @@
 #ifndef _SPARC_SHMBUF_H
 #define _SPARC_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>

Likewise.

[...]

arch/x86/include/uapi/asm/shmbuf.h line 10

Quoted 11 lines
arch/x86/include/uapi/asm/shmbuf.h +3 -0
index fce18eaa070c..13775bfdfee2 100644
@@ -5,6 +5,10 @@
 #if !defined(__x86_64__) || !defined(__ILP32__)
 #include <asm-generic/shmbuf.h>
 #else
+
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>

Likewise.

[...]

arch/xtensa/include/uapi/asm/shmbuf.h line 24

Quoted 10 lines
arch/xtensa/include/uapi/asm/shmbuf.h +2 -0
index 554a57a6a90f..bb8bdddae9b5 100644
@@ -20,9 +20,12 @@
 #ifndef _XTENSA_SHMBUF_H
 #define _XTENSA_SHMBUF_H
 
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>

Likewise.

[...]

include/uapi/asm-generic/shmbuf.h line 7

Quoted 10 lines
include/uapi/asm-generic/shmbuf.h +2 -0
index 2bab955e0fed..2979b6dd2c56 100644
@@ -3,6 +3,8 @@
 #define __ASM_GENERIC_SHMBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
+#include <asm/posix_types.h>

Likewise.

Signature · 1 line
ldv
#8 lore raw

PATCH 3/6 android/binder.h: add linux/android/binder(fs).h to UAPI compile-test coverage

In reply to Masahiro Yamada

linux/android/binder.h and linux/android/binderfs.h are currently excluded from the UAPI compile-test because of the errors like follows:

HDRTEST usr/include/linux/android/binder.h
In file included from <command-line>:
./usr/include/linux/android/binder.h:291:9: error: unknown type name ‘pid_t’

    291 |         pid_t           sender_pid;
        |         ^~~~~
  ./usr/include/linux/android/binder.h:292:9: error: unknown type name ‘uid_t’
    292 |         uid_t           sender_euid;
        |         ^~~~~

The errors can be fixed by replacing {pid,uid}_t with __kernel_{pid,uid}_t.

Then, remove the no-header-test entries from user/include/Makefile.

---

 include/uapi/linux/android/binder.h | 4 ++--
 usr/include/Makefile                | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)
include/uapi/linux/android/binder.h +2 -2
index 3246f2c74696..11157fae8a8e 100644
@@ -288,8 +288,8 @@ struct binder_transaction_data {
 
 	/* General information about the transaction. */
 	__u32	        flags;
-	pid_t		sender_pid;
-	uid_t		sender_euid;
+	__kernel_pid_t	sender_pid;
+	__kernel_uid_t	sender_euid;
 	binder_size_t	data_size;	/* number of bytes of data */
 	binder_size_t	offsets_size;	/* number of bytes of offsets */
 
usr/include/Makefile +0 -2
index b0b6cc455930..717c7d4c89bb 100644
@@ -26,8 +26,6 @@ override c_flags = $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I$(objtree)/usr/include
 no-header-test += asm/ucontext.h
 no-header-test += drm/vmwgfx_drm.h
 no-header-test += linux/am437x-vpfe.h
-no-header-test += linux/android/binder.h
-no-header-test += linux/android/binderfs.h
 no-header-test += linux/coda.h
 no-header-test += linux/cyclades.h
 no-header-test += linux/errqueue.h
Signature · 1 line
2.32.0
maintainer Reviewed-by on v1 3/6
#9 lore raw

Re: [PATCH 3/6] android/binder.h: add linux/android/binder(fs).h to UAPI compile-test coverage

Quoted 13 lines · Masahiro Yamada

linux/android/binder.h and linux/android/binderfs.h are currently excluded from the UAPI compile-test because of the errors like follows:

HDRTEST usr/include/linux/android/binder.h
In file included from <command-line>:
./usr/include/linux/android/binder.h:291:9: error: unknown type name ‘pid_t’

    291 |         pid_t           sender_pid;
        |         ^~~~~
  ./usr/include/linux/android/binder.h:292:9: error: unknown type name ‘uid_t’
    292 |         uid_t           sender_euid;
        |         ^~~~~
Quoted 5 lines

The errors can be fixed by replacing {pid,uid}_t with __kernel_{pid,uid}_t.

Then, remove the no-header-test entries from user/include/Makefile.

#10 lore raw

PATCH 4/6 fsmap.h: add linux/fsmap.h to UAPI compile-test coverage

In reply to Masahiro Yamada

linux/fsmap.h is currently excluded from the UAPI compile-test because of the error like follows:

HDRTEST usr/include/linux/fsmap.h
In file included from <command-line>:
./usr/include/linux/fsmap.h:72:19: error: unknown type name ‘size_t’

     72 | static __inline__ size_t
        |                   ^~~~~~

The error can be fixed by replacing size_t with __kernel_size_t.

Then, remove the no-header-test entry from user/include/Makefile.

---

 include/uapi/linux/fsmap.h | 2 +-
 usr/include/Makefile       | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
include/uapi/linux/fsmap.h +1 -1
index 91fd519a3f7d..c690d17f1d07 100644
@@ -69,7 +69,7 @@ struct fsmap_head {
 };
 
 /* Size of an fsmap_head with room for nr records. */
-static inline size_t
+static inline __kernel_size_t
 fsmap_sizeof(
 	unsigned int	nr)
 {
usr/include/Makefile +0 -1
index 717c7d4c89bb..9e35d022fd88 100644
@@ -29,7 +29,6 @@ no-header-test += linux/am437x-vpfe.h
 no-header-test += linux/coda.h
 no-header-test += linux/cyclades.h
 no-header-test += linux/errqueue.h
-no-header-test += linux/fsmap.h
 no-header-test += linux/hdlc/ioctl.h
 no-header-test += linux/ivtv.h
 no-header-test += linux/kexec.h
Signature · 1 line
2.32.0
maintainer Reviewed-by on v1 4/6
#11 lore raw

Re: [PATCH 4/6] fsmap.h: add linux/fsmap.h to UAPI compile-test coverage

Quoted 7 lines · Masahiro Yamada

linux/fsmap.h is currently excluded from the UAPI compile-test because of the error like follows:

HDRTEST usr/include/linux/fsmap.h
In file included from <command-line>:
./usr/include/linux/fsmap.h:72:19: error: unknown type name ‘size_t’

Quoted 8 lines
     72 | static __inline__ size_t
        |                   ^~~~~~

The error can be fixed by replacing size_t with __kernel_size_t.

Then, remove the no-header-test entry from user/include/Makefile.

#12 lore raw

PATCH 5/6 kexec.h: add linux/kexec.h to UAPI compile-test coverage

In reply to Masahiro Yamada

linux/kexec.h is currently excluded from the UAPI compile-test because of the errors like follows:

HDRTEST usr/include/linux/kexec.h
In file included from <command-line>:
./usr/include/linux/kexec.h:56:9: error: unknown type name ‘size_t’

     56 |         size_t bufsz;
        |         ^~~~~~
  ./usr/include/linux/kexec.h:58:9: error: unknown type name ‘size_t’
     58 |         size_t memsz;
        |         ^~~~~~

The errors can be fixed by replacing size_t with __kernel_size_t.

Then, remove the no-header-test entry from user/include/Makefile.

---

 include/uapi/linux/kexec.h | 4 ++--
 usr/include/Makefile       | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
include/uapi/linux/kexec.h +2 -2
index 778dc191c265..fb7e2ef60825 100644
@@ -54,9 +54,9 @@
  */
 struct kexec_segment {
 	const void *buf;
-	size_t bufsz;
+	__kernel_size_t bufsz;
 	const void *mem;
-	size_t memsz;
+	__kernel_size_t memsz;
 };
 
 #endif /* __KERNEL__ */
usr/include/Makefile +0 -1
index 9e35d022fd88..48bb789099d5 100644
@@ -31,7 +31,6 @@ no-header-test += linux/cyclades.h
 no-header-test += linux/errqueue.h
 no-header-test += linux/hdlc/ioctl.h
 no-header-test += linux/ivtv.h
-no-header-test += linux/kexec.h
 no-header-test += linux/matroxfb.h
 no-header-test += linux/omap3isp.h
 no-header-test += linux/omapfb.h
Signature · 1 line
2.32.0
maintainer Reviewed-by on v1 5/6
#13 lore raw

Re: [PATCH 5/6] kexec.h: add linux/kexec.h to UAPI compile-test coverage

Quoted 13 lines · Masahiro Yamada

linux/kexec.h is currently excluded from the UAPI compile-test because of the errors like follows:

HDRTEST usr/include/linux/kexec.h
In file included from <command-line>:
./usr/include/linux/kexec.h:56:9: error: unknown type name ‘size_t’

     56 |         size_t bufsz;
        |         ^~~~~~
  ./usr/include/linux/kexec.h:58:9: error: unknown type name ‘size_t’
     58 |         size_t memsz;
        |         ^~~~~~
Quoted 5 lines

The errors can be fixed by replacing size_t with __kernel_size_t.

Then, remove the no-header-test entry from user/include/Makefile.

#14 lore raw

PATCH 6/6 reiserfs_xattr.h: add linux/reiserfs_xattr.h to UAPI compile-test coverage

In reply to Masahiro Yamada

linux/reiserfs_xattr.h is currently excluded from the UAPI compile-test because of the error like follows:

HDRTEST usr/include/linux/reiserfs_xattr.h
In file included from <command-line>:
./usr/include/linux/reiserfs_xattr.h:22:9: error: unknown type name ‘size_t’

     22 |         size_t length;
        |         ^~~~~~

The error can be fixed by replacing size_t with __kernel_size_t.

Then, remove the no-header-test entry from user/include/Makefile.

---

 include/uapi/linux/reiserfs_xattr.h | 2 +-
 usr/include/Makefile                | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
include/uapi/linux/reiserfs_xattr.h +1 -1
index 28f10842f047..503ad018ce5b 100644
@@ -19,7 +19,7 @@ struct reiserfs_xattr_header {
 struct reiserfs_security_handle {
 	const char *name;
 	void *value;
-	size_t length;
+	__kernel_size_t length;
 };
 
 #endif  /*  _LINUX_REISERFS_XATTR_H  */
usr/include/Makefile +0 -1
index 48bb789099d5..5e703af0f83c 100644
@@ -36,7 +36,6 @@ no-header-test += linux/omap3isp.h
 no-header-test += linux/omapfb.h
 no-header-test += linux/patchkey.h
 no-header-test += linux/phonet.h
-no-header-test += linux/reiserfs_xattr.h
 no-header-test += linux/sctp.h
 no-header-test += linux/sysctl.h
 no-header-test += linux/usb/audio.h
Signature · 1 line
2.32.0
maintainer Reviewed-by on v1 6/6
#15 lore raw

Re: [PATCH 6/6] reiserfs_xattr.h: add linux/reiserfs_xattr.h to UAPI compile-test coverage

Quoted 7 lines · Masahiro Yamada

linux/reiserfs_xattr.h is currently excluded from the UAPI compile-test because of the error like follows:

HDRTEST usr/include/linux/reiserfs_xattr.h
In file included from <command-line>:
./usr/include/linux/reiserfs_xattr.h:22:9: error: unknown type name ‘size_t’

Quoted 8 lines
     22 |         size_t length;
        |         ^~~~~~

The error can be fixed by replacing size_t with __kernel_size_t.

Then, remove the no-header-test entry from user/include/Makefile.

maintainer
#16 lore raw
In reply to Masahiro Yamada
Quoted 10 lines · Masahiro Yamada

Masahiro Yamada (6):
signal.h: add linux/signal.h and asm/signal.h to UAPI compile-test
coverage
shmbuf.h: add asm/shmbuf.h to UAPI compile-test coverage android/binder.h: add linux/android/binder(fs).h to UAPI compile-test
coverage
fsmap.h: add linux/fsmap.h to UAPI compile-test coverage kexec.h: add linux/kexec.h to UAPI compile-test coverage reiserfs_xattr.h: add linux/reiserfs_xattr.h to UAPI compile-test
coverage

Very nice! Should I pick these up into the asm-generic tree?

Arnd

#17 lore raw
Quoted 13 lines · Arnd Bergmann
Quoted 10 lines · Masahiro Yamada

Masahiro Yamada (6):
signal.h: add linux/signal.h and asm/signal.h to UAPI compile-test
coverage
shmbuf.h: add asm/shmbuf.h to UAPI compile-test coverage android/binder.h: add linux/android/binder(fs).h to UAPI compile-test
coverage
fsmap.h: add linux/fsmap.h to UAPI compile-test coverage kexec.h: add linux/kexec.h to UAPI compile-test coverage reiserfs_xattr.h: add linux/reiserfs_xattr.h to UAPI compile-test
coverage

Quoted 3 lines

Very nice! Should I pick these up into the asm-generic tree?

Arnd

Yes, please.

Signature · 2 lines
Best Regards
Masahiro Yamada
maintainer
#18 lore raw
Quoted 15 lines · Masahiro Yamada
Quoted 13 lines · Arnd Bergmann
Quoted 10 lines · Masahiro Yamada

Masahiro Yamada (6):
signal.h: add linux/signal.h and asm/signal.h to UAPI compile-test
coverage
shmbuf.h: add asm/shmbuf.h to UAPI compile-test coverage android/binder.h: add linux/android/binder(fs).h to UAPI compile-test
coverage
fsmap.h: add linux/fsmap.h to UAPI compile-test coverage kexec.h: add linux/kexec.h to UAPI compile-test coverage reiserfs_xattr.h: add linux/reiserfs_xattr.h to UAPI compile-test
coverage

Quoted 3 lines
Quoted 1 line

Very nice! Should I pick these up into the asm-generic tree?

Yes, please.

Done now.

Arnd