uapi: fix another asm/shmbuf.h userspace compilation error
PATCH 1/1 uapi: fix another asm/shmbuf.h userspace compilation error
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.
--- 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(-)
include/uapi/asm-generic/shmbuf.h +1 -1
@@ -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;
arch/alpha/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/avr32/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/frv/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/ia64/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/m32r/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/mips/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/mn10300/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/powerpc/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/s390/include/uapi/asm/shmbuf.h +1 -1
@@ -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;
arch/sparc/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/xtensa/include/uapi/asm/shmbuf.h +2 -2
@@ -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 */
Signature · 1 line
ldv
Quoted 6 lines · Dmitry V. Levin
Replace
size_twith__kernel_size_tto fixasm/shmbuf.huserspace compilation errors like this:
/usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t'
size_tshm_segsz; /* size of segment (bytes) */
Quoted 8 lines
x32 is the only architecture where
sizeof(size_t)is less thansizeof(__kernel_size_t), but as the kernel treatsshm_segszfield as__kernel_size_tanyway, UAPI should follow. Thanks to little-endiannes of x32 and 64-bit alignment of the field followingshm_segsz, this change doesn't break ABI, and the difference doesn't manifest itself easily.Signed-off-by Dmitry V. Levin <[email protected]>
cover uapi: fix userspace compilation of asm/ ipc headers
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(-)
Signature · 1 line
ldv
PATCH 1/5 uapi: fix asm/ipcbuf.h userspace compilation errors
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;
--- 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(+)
arch/s390/include/uapi/asm/ipcbuf.h +2 -0
@@ -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
arch/sparc/include/uapi/asm/ipcbuf.h +2 -0
@@ -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
arch/xtensa/include/uapi/asm/ipcbuf.h +2 -0
@@ -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
include/uapi/asm-generic/ipcbuf.h +2 -0
@@ -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
Signature · 1 line
ldv
PATCH 2/5 uapi: fix asm/msgbuf.h userspace compilation errors
In reply to Dmitry V. LevinDate: 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;
--- 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(+)
arch/alpha/include/uapi/asm/msgbuf.h +2 -0
@@ -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
arch/avr32/include/uapi/asm/msgbuf.h +2 -0
@@ -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
arch/frv/include/uapi/asm/msgbuf.h +2 -0
@@ -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
arch/ia64/include/uapi/asm/msgbuf.h +2 -0
@@ -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
arch/m32r/include/uapi/asm/msgbuf.h +2 -0
@@ -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
arch/mips/include/uapi/asm/msgbuf.h +1 -0
@@ -1,6 +1,7 @@#ifndef _ASM_MSGBUF_H#define _ASM_MSGBUF_H +#include <asm/ipcbuf.h> /* * The msqid64_ds structure for the MIPS architecture.
arch/mn10300/include/uapi/asm/msgbuf.h +2 -0
@@ -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
arch/parisc/include/uapi/asm/msgbuf.h +1 -0
@@ -1,6 +1,7 @@#ifndef _PARISC_MSGBUF_H#define _PARISC_MSGBUF_H +#include <asm/ipcbuf.h> #include <asm/bitsperlong.h> /*
arch/powerpc/include/uapi/asm/msgbuf.h +2 -0
@@ -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
arch/s390/include/uapi/asm/msgbuf.h +2 -0
@@ -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
arch/sparc/include/uapi/asm/msgbuf.h +2 -0
@@ -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
arch/xtensa/include/uapi/asm/msgbuf.h +2 -0
@@ -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__
include/uapi/asm-generic/msgbuf.h +1 -0
@@ -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.
Signature · 1 line
ldv
PATCH 3/5 uapi: fix asm/sembuf.h userspace compilation errors
In reply to Dmitry V. LevinDate: 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;
--- 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(+)
arch/alpha/include/uapi/asm/sembuf.h +2 -0
@@ -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
arch/avr32/include/uapi/asm/sembuf.h +2 -0
@@ -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
arch/frv/include/uapi/asm/sembuf.h +2 -0
@@ -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
arch/ia64/include/uapi/asm/sembuf.h +2 -0
@@ -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
arch/m32r/include/uapi/asm/sembuf.h +2 -0
@@ -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
arch/mips/include/uapi/asm/sembuf.h +2 -0
@@ -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
arch/mn10300/include/uapi/asm/sembuf.h +2 -0
@@ -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
arch/parisc/include/uapi/asm/sembuf.h +1 -0
@@ -1,6 +1,7 @@#ifndef _PARISC_SEMBUF_H#define _PARISC_SEMBUF_H +#include <asm/ipcbuf.h> #include <asm/bitsperlong.h> /*
arch/powerpc/include/uapi/asm/sembuf.h +2 -0
@@ -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
arch/s390/include/uapi/asm/sembuf.h +2 -0
@@ -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
arch/sparc/include/uapi/asm/sembuf.h +2 -0
@@ -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
arch/x86/include/uapi/asm/sembuf.h +2 -0
@@ -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
arch/xtensa/include/uapi/asm/sembuf.h +1 -0
@@ -21,6 +21,7 @@#ifndef _XTENSA_SEMBUF_H#define _XTENSA_SEMBUF_H +#include <asm/ipcbuf.h> #include <asm/byteorder.h> struct semid64_ds {
include/uapi/asm-generic/sembuf.h +1 -0
@@ -1,6 +1,7 @@#ifndef __ASM_GENERIC_SEMBUF_H#define __ASM_GENERIC_SEMBUF_H +#include <asm/ipcbuf.h> #include <asm/bitsperlong.h> /*
Signature · 1 line
ldv
PATCH 4/5 uapi: fix asm/shmbuf.h userspace compilation errors
In reply to Dmitry V. LevinDate: 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;
--- 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(+)
arch/alpha/include/uapi/asm/shmbuf.h +2 -0
@@ -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
arch/avr32/include/uapi/asm/shmbuf.h +2 -0
@@ -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
arch/frv/include/uapi/asm/shmbuf.h +2 -0
@@ -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
arch/ia64/include/uapi/asm/shmbuf.h +2 -0
@@ -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
arch/m32r/include/uapi/asm/shmbuf.h +2 -0
@@ -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
arch/mips/include/uapi/asm/shmbuf.h +2 -0
@@ -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
arch/mn10300/include/uapi/asm/shmbuf.h +2 -0
@@ -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
arch/parisc/include/uapi/asm/shmbuf.h +1 -0
@@ -1,6 +1,7 @@#ifndef _PARISC_SHMBUF_H#define _PARISC_SHMBUF_H +#include <asm/ipcbuf.h> #include <asm/bitsperlong.h> /*
arch/powerpc/include/uapi/asm/shmbuf.h +2 -0
@@ -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
arch/s390/include/uapi/asm/shmbuf.h +2 -0
@@ -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
arch/sparc/include/uapi/asm/shmbuf.h +2 -0
@@ -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
arch/xtensa/include/uapi/asm/shmbuf.h +2 -0
@@ -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 */
include/uapi/asm-generic/shmbuf.h +1 -0
@@ -1,6 +1,7 @@#ifndef __ASM_GENERIC_SHMBUF_H#define __ASM_GENERIC_SHMBUF_H +#include <asm/ipcbuf.h> #include <asm/bitsperlong.h> /*
Signature · 1 line
ldv
PATCH 5/5 uapi: fix another asm/shmbuf.h userspace compilation error
In reply to Dmitry V. LevinDate: 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.
--- 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(-)
arch/alpha/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/avr32/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/frv/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/ia64/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/m32r/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/mips/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/mn10300/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/powerpc/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/s390/include/uapi/asm/shmbuf.h +1 -1
@@ -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;
arch/sparc/include/uapi/asm/shmbuf.h +1 -1
@@ -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 */
arch/xtensa/include/uapi/asm/shmbuf.h +2 -2
@@ -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 */
include/uapi/asm-generic/shmbuf.h +1 -1
@@ -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;
Signature · 1 line
ldv
Quoted 14 lines · Arnd Bergmann
Quoted 13 lines · Dmitry V. Levin
Replace
size_twith__kernel_size_tto fixasm/shmbuf.huserspace compilation errors like this:
/usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t'
size_tshm_segsz; /* size of segment (bytes) */x32 is the only architecture where
sizeof(size_t)is less thansizeof(__kernel_size_t), but as the kernel treatsshm_segszfield as__kernel_size_tanyway, UAPI should follow. Thanks to little-endiannes of x32 and 64-bit alignment of the field followingshm_segsz, this change doesn't break ABI, and the difference doesn't manifest itself easily.
Quoted 3 lines
Quoted 1 line
Signed-off-by Dmitry V. Levin <[email protected]>Acked-by Arnd Bergmann <[email protected]>
Out of interest, is there a plan for merging these patches from Dmitry?
Cheers
James
PATCH v2 1/1 uapi: fix asm/shmbuf.h userspace compilation errors
In reply to Arnd BergmannUserspace 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.
---
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/[email protected]/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(-)
arch/mips/include/uapi/asm/shmbuf.h +4 -2
@@ -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 */
arch/parisc/include/uapi/asm/shmbuf.h +1 -0
@@ -3,6 +3,7 @@#define _PARISC_SHMBUF_H#include <asm/bitsperlong.h> +#include <asm/ipcbuf.h> /* * The shmid64_ds structure for parisc architecture.
arch/powerpc/include/uapi/asm/shmbuf.h +3 -1
@@ -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 */
arch/sparc/include/uapi/asm/shmbuf.h +3 -1
@@ -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 */
arch/x86/include/uapi/asm/shmbuf.h +3 -1
@@ -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 */
arch/xtensa/include/uapi/asm/shmbuf.h +3 -1
@@ -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 */
include/uapi/asm-generic/shmbuf.h +2 -1
@@ -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 */
usr/include/Makefile +0 -1
@@ -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
Signature · 1 line
ldv