* [PATCH v06 06/36] uapi asm-generic/ipcbuf.h: include linux/posix_types.h
[not found] <20170806164428.2273-1-mikko.rapeli@iki.fi>
@ 2017-08-06 16:43 ` Mikko Rapeli
2017-08-06 16:43 ` Mikko Rapeli
2017-08-06 16:43 ` [PATCH v06 07/36] uapi asm-generic/msgbuf.h: include asm/ipcbuf.h Mikko Rapeli
` (4 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-06 16:43 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, H. Peter Anvin, H . J . Lu, Arnd Bergmann,
linux-arch
Fixes userspace compilation error:
error: unknown type name ‘__kernel_key_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: H.J. Lu <hjl.tools@gmail.com>
---
include/uapi/asm-generic/ipcbuf.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h
index 3dbcc1e771c0..909f825096f4 100644
--- a/include/uapi/asm-generic/ipcbuf.h
+++ b/include/uapi/asm-generic/ipcbuf.h
@@ -1,6 +1,8 @@
#ifndef __ASM_GENERIC_IPCBUF_H
#define __ASM_GENERIC_IPCBUF_H
+#include <linux/posix_types.h>
+
/*
* The generic ipc64_perm structure:
* Note extra padding because this structure is passed back and forth
--
2.13.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v06 06/36] uapi asm-generic/ipcbuf.h: include linux/posix_types.h
2017-08-06 16:43 ` [PATCH v06 06/36] uapi asm-generic/ipcbuf.h: include linux/posix_types.h Mikko Rapeli
@ 2017-08-06 16:43 ` Mikko Rapeli
0 siblings, 0 replies; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-06 16:43 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, H. Peter Anvin, H . J . Lu, Arnd Bergmann,
linux-arch
Fixes userspace compilation error:
error: unknown type name ‘__kernel_key_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: H.J. Lu <hjl.tools@gmail.com>
---
include/uapi/asm-generic/ipcbuf.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h
index 3dbcc1e771c0..909f825096f4 100644
--- a/include/uapi/asm-generic/ipcbuf.h
+++ b/include/uapi/asm-generic/ipcbuf.h
@@ -1,6 +1,8 @@
#ifndef __ASM_GENERIC_IPCBUF_H
#define __ASM_GENERIC_IPCBUF_H
+#include <linux/posix_types.h>
+
/*
* The generic ipc64_perm structure:
* Note extra padding because this structure is passed back and forth
--
2.13.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v06 07/36] uapi asm-generic/msgbuf.h: include asm/ipcbuf.h
[not found] <20170806164428.2273-1-mikko.rapeli@iki.fi>
2017-08-06 16:43 ` [PATCH v06 06/36] uapi asm-generic/ipcbuf.h: include linux/posix_types.h Mikko Rapeli
@ 2017-08-06 16:43 ` Mikko Rapeli
2017-08-06 16:43 ` Mikko Rapeli
2017-08-06 16:43 ` [PATCH v06 08/36] uapi asm-generic/shmbuf.h: include fixes Mikko Rapeli
` (3 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-06 16:43 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, H . J . Lu, H . Peter Anvin, Arnd Bergmann,
linux-arch
Fixes userspace compilation errors like:
error: field ‘msg_perm’ has incomplete type
struct ipc64_perm msg_perm
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: H.J. Lu <hjl.tools@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
---
include/uapi/asm-generic/msgbuf.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h
index f55ecc43c60f..f5fbd8e8ab05 100644
--- a/include/uapi/asm-generic/msgbuf.h
+++ b/include/uapi/asm-generic/msgbuf.h
@@ -2,6 +2,8 @@
#define __ASM_GENERIC_MSGBUF_H
#include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
+
/*
* generic msqid64_ds structure.
*
--
2.13.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v06 07/36] uapi asm-generic/msgbuf.h: include asm/ipcbuf.h
2017-08-06 16:43 ` [PATCH v06 07/36] uapi asm-generic/msgbuf.h: include asm/ipcbuf.h Mikko Rapeli
@ 2017-08-06 16:43 ` Mikko Rapeli
0 siblings, 0 replies; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-06 16:43 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, H . J . Lu, H . Peter Anvin, Arnd Bergmann,
linux-arch
Fixes userspace compilation errors like:
error: field ‘msg_perm’ has incomplete type
struct ipc64_perm msg_perm
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: H.J. Lu <hjl.tools@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
---
include/uapi/asm-generic/msgbuf.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h
index f55ecc43c60f..f5fbd8e8ab05 100644
--- a/include/uapi/asm-generic/msgbuf.h
+++ b/include/uapi/asm-generic/msgbuf.h
@@ -2,6 +2,8 @@
#define __ASM_GENERIC_MSGBUF_H
#include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
+
/*
* generic msqid64_ds structure.
*
--
2.13.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v06 08/36] uapi asm-generic/shmbuf.h: include fixes
[not found] <20170806164428.2273-1-mikko.rapeli@iki.fi>
2017-08-06 16:43 ` [PATCH v06 06/36] uapi asm-generic/ipcbuf.h: include linux/posix_types.h Mikko Rapeli
2017-08-06 16:43 ` [PATCH v06 07/36] uapi asm-generic/msgbuf.h: include asm/ipcbuf.h Mikko Rapeli
@ 2017-08-06 16:43 ` Mikko Rapeli
2017-08-06 16:43 ` Mikko Rapeli
2017-08-08 22:42 ` Dmitry V. Levin
2017-08-06 16:44 ` [PATCH v06 09/36] uapi asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
` (2 subsequent siblings)
5 siblings, 2 replies; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-06 16:43 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, H . J . Lu, H . Peter Anvin, Arnd Bergmann,
linux-arch
Include linux/types.h and asm/msgbuf.h and use __kernel_size_t instead
of size_t.
Fixes userspace compilation errors like:
error: field ‘shm_perm’ has incomplete type
struct ipc64_perm shm_perm; /* operation perms */
error: unknown type name ‘size_t’
error: unknown type name ‘__kernel_time_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: H.J. Lu <hjl.tools@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
---
include/uapi/asm-generic/shmbuf.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 7e9fb2f0853b..ae867ad1e5e4 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -1,7 +1,9 @@
#ifndef __ASM_GENERIC_SHMBUF_H
#define __ASM_GENERIC_SHMBUF_H
+#include <linux/types.h>
#include <asm/bitsperlong.h>
+#include <asm/msgbuf.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) */
__kernel_time_t shm_atime; /* last attach time */
#if __BITS_PER_LONG != 64
unsigned long __unused1;
--
2.13.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v06 08/36] uapi asm-generic/shmbuf.h: include fixes
2017-08-06 16:43 ` [PATCH v06 08/36] uapi asm-generic/shmbuf.h: include fixes Mikko Rapeli
@ 2017-08-06 16:43 ` Mikko Rapeli
2017-08-08 22:42 ` Dmitry V. Levin
1 sibling, 0 replies; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-06 16:43 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, H . J . Lu, H . Peter Anvin, Arnd Bergmann,
linux-arch
Include linux/types.h and asm/msgbuf.h and use __kernel_size_t instead
of size_t.
Fixes userspace compilation errors like:
error: field ‘shm_perm’ has incomplete type
struct ipc64_perm shm_perm; /* operation perms */
error: unknown type name ‘size_t’
error: unknown type name ‘__kernel_time_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: H.J. Lu <hjl.tools@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
---
include/uapi/asm-generic/shmbuf.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 7e9fb2f0853b..ae867ad1e5e4 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -1,7 +1,9 @@
#ifndef __ASM_GENERIC_SHMBUF_H
#define __ASM_GENERIC_SHMBUF_H
+#include <linux/types.h>
#include <asm/bitsperlong.h>
+#include <asm/msgbuf.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) */
__kernel_time_t shm_atime; /* last attach time */
#if __BITS_PER_LONG != 64
unsigned long __unused1;
--
2.13.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v06 09/36] uapi asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h
[not found] <20170806164428.2273-1-mikko.rapeli@iki.fi>
` (2 preceding siblings ...)
2017-08-06 16:43 ` [PATCH v06 08/36] uapi asm-generic/shmbuf.h: include fixes Mikko Rapeli
@ 2017-08-06 16:44 ` Mikko Rapeli
2017-08-06 16:44 ` Mikko Rapeli
2017-08-08 22:45 ` Dmitry V. Levin
2017-08-06 16:44 ` [PATCH v06 10/36] uapi asm-generic/signal.h: use __kernel_size_t instead of size_t Mikko Rapeli
2017-08-06 16:44 ` [PATCH v06 11/36] uapi asm-generic/ucontext.h: include asm/signal.h and asm/sigcontext.h Mikko Rapeli
5 siblings, 2 replies; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-06 16:44 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, H . J . Lu, H . Peter Anvin, Arnd Bergmann,
linux-arch
Fixes userspace compilation errors like:
error: field ‘msg_perm’ has incomplete type
struct ipc64_perm msg_perm;
error: unknown type name ‘__kernel_ulong_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: H.J. Lu <hjl.tools@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
---
include/uapi/asm-generic/sembuf.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h
index 4cb2c13e5090..17d523f86923 100644
--- a/include/uapi/asm-generic/sembuf.h
+++ b/include/uapi/asm-generic/sembuf.h
@@ -2,6 +2,8 @@
#define __ASM_GENERIC_SEMBUF_H
#include <asm/bitsperlong.h>
+#include <asm/posix_types.h>
+#include <asm/ipcbuf.h>
/*
* The semid64_ds structure for x86 architecture.
--
2.13.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v06 09/36] uapi asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h
2017-08-06 16:44 ` [PATCH v06 09/36] uapi asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
@ 2017-08-06 16:44 ` Mikko Rapeli
2017-08-08 22:45 ` Dmitry V. Levin
1 sibling, 0 replies; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-06 16:44 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, H . J . Lu, H . Peter Anvin, Arnd Bergmann,
linux-arch
Fixes userspace compilation errors like:
error: field ‘msg_perm’ has incomplete type
struct ipc64_perm msg_perm;
error: unknown type name ‘__kernel_ulong_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: H.J. Lu <hjl.tools@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
---
include/uapi/asm-generic/sembuf.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h
index 4cb2c13e5090..17d523f86923 100644
--- a/include/uapi/asm-generic/sembuf.h
+++ b/include/uapi/asm-generic/sembuf.h
@@ -2,6 +2,8 @@
#define __ASM_GENERIC_SEMBUF_H
#include <asm/bitsperlong.h>
+#include <asm/posix_types.h>
+#include <asm/ipcbuf.h>
/*
* The semid64_ds structure for x86 architecture.
--
2.13.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v06 10/36] uapi asm-generic/signal.h: use __kernel_size_t instead of size_t
[not found] <20170806164428.2273-1-mikko.rapeli@iki.fi>
` (3 preceding siblings ...)
2017-08-06 16:44 ` [PATCH v06 09/36] uapi asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
@ 2017-08-06 16:44 ` Mikko Rapeli
2017-08-06 16:44 ` Mikko Rapeli
2017-08-06 16:44 ` [PATCH v06 11/36] uapi asm-generic/ucontext.h: include asm/signal.h and asm/sigcontext.h Mikko Rapeli
5 siblings, 1 reply; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-06 16:44 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, Al Viro, H . Peter Anvin, Arnd Bergmann, linux-arch
Fixes userspace compiler error:
error: unknown type name ‘size_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
---
include/uapi/asm-generic/signal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index 3094618d382f..6bbcdfa5db89 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -113,7 +113,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__ */
--
2.13.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v06 10/36] uapi asm-generic/signal.h: use __kernel_size_t instead of size_t
2017-08-06 16:44 ` [PATCH v06 10/36] uapi asm-generic/signal.h: use __kernel_size_t instead of size_t Mikko Rapeli
@ 2017-08-06 16:44 ` Mikko Rapeli
0 siblings, 0 replies; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-06 16:44 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, Al Viro, H . Peter Anvin, Arnd Bergmann, linux-arch
Fixes userspace compiler error:
error: unknown type name ‘size_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
---
include/uapi/asm-generic/signal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index 3094618d382f..6bbcdfa5db89 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -113,7 +113,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__ */
--
2.13.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v06 11/36] uapi asm-generic/ucontext.h: include asm/signal.h and asm/sigcontext.h
[not found] <20170806164428.2273-1-mikko.rapeli@iki.fi>
` (4 preceding siblings ...)
2017-08-06 16:44 ` [PATCH v06 10/36] uapi asm-generic/signal.h: use __kernel_size_t instead of size_t Mikko Rapeli
@ 2017-08-06 16:44 ` Mikko Rapeli
5 siblings, 0 replies; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-06 16:44 UTC (permalink / raw)
To: linux-kernel, linux-api
Cc: Mikko Rapeli, H . Peter Anvin, Arnd Bergmann, Al Viro, linux-arch
Fixes userspace compiler errors:
error: unknown type name ‘stack_t’
error: field ‘uc_mcontext’ has incomplete type
struct sigcontext uc_mcontext;
error: unknown type name ‘sigset_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
---
include/uapi/asm-generic/ucontext.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/uapi/asm-generic/ucontext.h b/include/uapi/asm-generic/ucontext.h
index ad77343e8a9a..448152801c4f 100644
--- a/include/uapi/asm-generic/ucontext.h
+++ b/include/uapi/asm-generic/ucontext.h
@@ -1,6 +1,9 @@
#ifndef __ASM_GENERIC_UCONTEXT_H
#define __ASM_GENERIC_UCONTEXT_H
+#include <asm/signal.h>
+#include <asm/sigcontext.h>
+
struct ucontext {
unsigned long uc_flags;
struct ucontext *uc_link;
--
2.13.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v06 08/36] uapi asm-generic/shmbuf.h: include fixes
2017-08-06 16:43 ` [PATCH v06 08/36] uapi asm-generic/shmbuf.h: include fixes Mikko Rapeli
2017-08-06 16:43 ` Mikko Rapeli
@ 2017-08-08 22:42 ` Dmitry V. Levin
2017-08-08 22:42 ` Dmitry V. Levin
[not found] ` <20170808223420.GA10552@altlinux.org>
1 sibling, 2 replies; 16+ messages in thread
From: Dmitry V. Levin @ 2017-08-08 22:42 UTC (permalink / raw)
To: Mikko Rapeli
Cc: linux-kernel, linux-api, H . J . Lu, H . Peter Anvin,
Arnd Bergmann, linux-arch
[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]
On Sun, Aug 06, 2017 at 06:43:59PM +0200, Mikko Rapeli wrote:
> Include linux/types.h and asm/msgbuf.h and use __kernel_size_t instead
> of size_t.
>
> Fixes userspace compilation errors like:
>
> error: field ‘shm_perm’ has incomplete type
> struct ipc64_perm shm_perm; /* operation perms */
> error: unknown type name ‘size_t’
> error: unknown type name ‘__kernel_time_t’
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> Cc: H.J. Lu <hjl.tools@gmail.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> ---
> include/uapi/asm-generic/shmbuf.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
> index 7e9fb2f0853b..ae867ad1e5e4 100644
> --- a/include/uapi/asm-generic/shmbuf.h
> +++ b/include/uapi/asm-generic/shmbuf.h
> @@ -1,7 +1,9 @@
> #ifndef __ASM_GENERIC_SHMBUF_H
> #define __ASM_GENERIC_SHMBUF_H
>
> +#include <linux/types.h>
> #include <asm/bitsperlong.h>
> +#include <asm/msgbuf.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) */
> __kernel_time_t shm_atime; /* last attach time */
> #if __BITS_PER_LONG != 64
> unsigned long __unused1;
Surprisingly enough, this replacement of size_t with __kernel_size_t
is not just correct, it's a fix for a more subtle bug on x32, see
http://lkml.kernel.org/r/20170302004607.GE27132@altlinux.org
I recommend splitting the change into "include" fix and "size_t" fix
like I did some time ago, see
http://lkml.kernel.org/r/20170302002253.GC27132@altlinux.org
--
ldv
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v06 08/36] uapi asm-generic/shmbuf.h: include fixes
2017-08-08 22:42 ` Dmitry V. Levin
@ 2017-08-08 22:42 ` Dmitry V. Levin
[not found] ` <20170808223420.GA10552@altlinux.org>
1 sibling, 0 replies; 16+ messages in thread
From: Dmitry V. Levin @ 2017-08-08 22:42 UTC (permalink / raw)
To: Mikko Rapeli
Cc: linux-kernel, linux-api, H . J . Lu, H . Peter Anvin,
Arnd Bergmann, linux-arch
[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]
On Sun, Aug 06, 2017 at 06:43:59PM +0200, Mikko Rapeli wrote:
> Include linux/types.h and asm/msgbuf.h and use __kernel_size_t instead
> of size_t.
>
> Fixes userspace compilation errors like:
>
> error: field ‘shm_perm’ has incomplete type
> struct ipc64_perm shm_perm; /* operation perms */
> error: unknown type name ‘size_t’
> error: unknown type name ‘__kernel_time_t’
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> Cc: H.J. Lu <hjl.tools@gmail.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> ---
> include/uapi/asm-generic/shmbuf.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
> index 7e9fb2f0853b..ae867ad1e5e4 100644
> --- a/include/uapi/asm-generic/shmbuf.h
> +++ b/include/uapi/asm-generic/shmbuf.h
> @@ -1,7 +1,9 @@
> #ifndef __ASM_GENERIC_SHMBUF_H
> #define __ASM_GENERIC_SHMBUF_H
>
> +#include <linux/types.h>
> #include <asm/bitsperlong.h>
> +#include <asm/msgbuf.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) */
> __kernel_time_t shm_atime; /* last attach time */
> #if __BITS_PER_LONG != 64
> unsigned long __unused1;
Surprisingly enough, this replacement of size_t with __kernel_size_t
is not just correct, it's a fix for a more subtle bug on x32, see
http://lkml.kernel.org/r/20170302004607.GE27132@altlinux.org
I recommend splitting the change into "include" fix and "size_t" fix
like I did some time ago, see
http://lkml.kernel.org/r/20170302002253.GC27132@altlinux.org
--
ldv
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v06 09/36] uapi asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h
2017-08-06 16:44 ` [PATCH v06 09/36] uapi asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
2017-08-06 16:44 ` Mikko Rapeli
@ 2017-08-08 22:45 ` Dmitry V. Levin
1 sibling, 0 replies; 16+ messages in thread
From: Dmitry V. Levin @ 2017-08-08 22:45 UTC (permalink / raw)
To: Mikko Rapeli
Cc: linux-kernel, linux-api, H . J . Lu, H . Peter Anvin,
Arnd Bergmann, linux-arch
[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]
On Sun, Aug 06, 2017 at 06:44:00PM +0200, Mikko Rapeli wrote:
> Fixes userspace compilation errors like:
>
> error: field ‘msg_perm’ has incomplete type
> struct ipc64_perm msg_perm;
> error: unknown type name ‘__kernel_ulong_t’
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> Cc: H.J. Lu <hjl.tools@gmail.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> ---
> include/uapi/asm-generic/sembuf.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h
> index 4cb2c13e5090..17d523f86923 100644
> --- a/include/uapi/asm-generic/sembuf.h
> +++ b/include/uapi/asm-generic/sembuf.h
> @@ -2,6 +2,8 @@
> #define __ASM_GENERIC_SEMBUF_H
>
> #include <asm/bitsperlong.h>
> +#include <asm/posix_types.h>
> +#include <asm/ipcbuf.h>
I don't think you need to include <asm/posix_types.h> here,
<asm/ipcbuf.h> is necessary and enough, see
http://lkml.kernel.org/r/20170302002228.GB27132@altlinux.org
--
ldv
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v06 05/36] uapi linux/sysctl.h: use __kernel_size_t instead of size_t
[not found] ` <20170808223420.GA10552@altlinux.org>
@ 2017-08-09 7:18 ` Mikko Rapeli
2017-08-09 7:18 ` Mikko Rapeli
0 siblings, 1 reply; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-09 7:18 UTC (permalink / raw)
To: Dmitry V. Levin, linux-kernel, linux-api, Al Viro, Arnd Bergmann,
H . Peter Anvin, Thomas Gleixner, Ingo Molnar, x86,
reiserfs-devel
Cc: David S . Miller, Matthew Whitehead, Joel Scherpelz,
Lorenzo Colitti, H . J . Lu, linux-arch, Russell King,
linux-arm-kernel, kexec, Eric Biederman
Hi Dmitry and thanks for the comments.
I have only one question: why haven't your patches been applied yet?
-Mikko
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v06 05/36] uapi linux/sysctl.h: use __kernel_size_t instead of size_t
2017-08-09 7:18 ` [PATCH v06 05/36] uapi linux/sysctl.h: use __kernel_size_t instead of size_t Mikko Rapeli
@ 2017-08-09 7:18 ` Mikko Rapeli
0 siblings, 0 replies; 16+ messages in thread
From: Mikko Rapeli @ 2017-08-09 7:18 UTC (permalink / raw)
To: Dmitry V. Levin, linux-kernel, linux-api, Al Viro, Arnd Bergmann,
H . Peter Anvin, Thomas Gleixner, Ingo Molnar, x86,
reiserfs-devel
Cc: David S . Miller, Matthew Whitehead, Joel Scherpelz,
Lorenzo Colitti, H . J . Lu, linux-arch, Russell King,
linux-arm-kernel, kexec, Eric Biederman
Hi Dmitry and thanks for the comments.
I have only one question: why haven't your patches been applied yet?
-Mikko
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2017-08-09 7:21 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170806164428.2273-1-mikko.rapeli@iki.fi>
2017-08-06 16:43 ` [PATCH v06 06/36] uapi asm-generic/ipcbuf.h: include linux/posix_types.h Mikko Rapeli
2017-08-06 16:43 ` Mikko Rapeli
2017-08-06 16:43 ` [PATCH v06 07/36] uapi asm-generic/msgbuf.h: include asm/ipcbuf.h Mikko Rapeli
2017-08-06 16:43 ` Mikko Rapeli
2017-08-06 16:43 ` [PATCH v06 08/36] uapi asm-generic/shmbuf.h: include fixes Mikko Rapeli
2017-08-06 16:43 ` Mikko Rapeli
2017-08-08 22:42 ` Dmitry V. Levin
2017-08-08 22:42 ` Dmitry V. Levin
[not found] ` <20170808223420.GA10552@altlinux.org>
2017-08-09 7:18 ` [PATCH v06 05/36] uapi linux/sysctl.h: use __kernel_size_t instead of size_t Mikko Rapeli
2017-08-09 7:18 ` Mikko Rapeli
2017-08-06 16:44 ` [PATCH v06 09/36] uapi asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
2017-08-06 16:44 ` Mikko Rapeli
2017-08-08 22:45 ` Dmitry V. Levin
2017-08-06 16:44 ` [PATCH v06 10/36] uapi asm-generic/signal.h: use __kernel_size_t instead of size_t Mikko Rapeli
2017-08-06 16:44 ` Mikko Rapeli
2017-08-06 16:44 ` [PATCH v06 11/36] uapi asm-generic/ucontext.h: include asm/signal.h and asm/sigcontext.h Mikko Rapeli
[not found] <20170808231711.GJ10552@altlinux.org>
[not found] ` <20170808231543.GI10552@altlinux.org>
[not found] ` <20170808225739.GF10552@altlinux.org>
[not found] ` <20170808225417.GE10552@altlinux.org>
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).