* [PATCH 28/45] include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h
[not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
@ 2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
[not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
` (5 subsequent siblings)
6 siblings, 1 reply; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
Fixes userspace compilation error:
error: unknown type name ‘__kernel_key_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
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 3dbcc1e..909f825 100644
--- a/include/uapi/asm-generic/ipcbuf.h
+++ b/include/uapi/asm-generic/ipcbuf.h
@@ -1,6 +1,8 @@
#ifndef __ASM_GENERIC_IPCBUF_H
#define __ASM_GENERIC_IPCBUF_H
+#include <linux/posix_types.h>
+
/*
* The generic ipc64_perm structure:
* Note extra padding because this structure is passed back and forth
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 28/45] include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h
2015-02-16 23:05 ` [PATCH 28/45] include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
0 siblings, 0 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
Fixes userspace compilation error:
error: unknown type name ‘__kernel_key_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
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 3dbcc1e..909f825 100644
--- a/include/uapi/asm-generic/ipcbuf.h
+++ b/include/uapi/asm-generic/ipcbuf.h
@@ -1,6 +1,8 @@
#ifndef __ASM_GENERIC_IPCBUF_H
#define __ASM_GENERIC_IPCBUF_H
+#include <linux/posix_types.h>
+
/*
* The generic ipc64_perm structure:
* Note extra padding because this structure is passed back and forth
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 29/45] include/uapi/asm-generic/msgbuf.h: include asm/ipcbuf.h
[not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
0 siblings, 1 reply; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: Mikko Rapeli, Arnd Bergmann, linux-arch-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA
Fixes userspace compilation errors like:
error: field ‘msg_perm’ has incomplete type
struct ipc64_perm msg_perm
Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
---
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 f55ecc4..f5fbd8e 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.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 29/45] include/uapi/asm-generic/msgbuf.h: include asm/ipcbuf.h
2015-02-16 23:05 ` [PATCH 29/45] include/uapi/asm-generic/msgbuf.h: include asm/ipcbuf.h Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
0 siblings, 0 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
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>
---
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 f55ecc4..f5fbd8e 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.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 30/45] include/uapi/asm-generic/shmbuf.h: include fixes
[not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
2015-02-16 23:05 ` [PATCH 28/45] include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h Mikko Rapeli
[not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 31/45] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
` (3 subsequent siblings)
6 siblings, 1 reply; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
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>
---
include/uapi/asm-generic/shmbuf.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 7e9fb2f..24ef152 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -1,7 +1,13 @@
#ifndef __ASM_GENERIC_SHMBUF_H
#define __ASM_GENERIC_SHMBUF_H
+#include <linux/types.h>
#include <asm/bitsperlong.h>
+#include <asm/msgbuf.h>
+
+#ifndef __KERNEL__
+#include <stdlib.h>
+#endif
/*
* The shmid64_ds structure for x86 architecture.
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 30/45] include/uapi/asm-generic/shmbuf.h: include fixes
2015-02-16 23:05 ` [PATCH 30/45] include/uapi/asm-generic/shmbuf.h: include fixes Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
0 siblings, 0 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
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>
---
include/uapi/asm-generic/shmbuf.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 7e9fb2f..24ef152 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -1,7 +1,13 @@
#ifndef __ASM_GENERIC_SHMBUF_H
#define __ASM_GENERIC_SHMBUF_H
+#include <linux/types.h>
#include <asm/bitsperlong.h>
+#include <asm/msgbuf.h>
+
+#ifndef __KERNEL__
+#include <stdlib.h>
+#endif
/*
* The shmid64_ds structure for x86 architecture.
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 31/45] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h
[not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
` (2 preceding siblings ...)
2015-02-16 23:05 ` [PATCH 30/45] include/uapi/asm-generic/shmbuf.h: include fixes Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace Mikko Rapeli
` (2 subsequent siblings)
6 siblings, 1 reply; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
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>
---
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 4cb2c13..17d523f 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.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 31/45] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h
2015-02-16 23:05 ` [PATCH 31/45] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
0 siblings, 0 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
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>
---
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 4cb2c13..17d523f 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.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
[not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
` (3 preceding siblings ...)
2015-02-16 23:05 ` [PATCH 31/45] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
[not found] ` <1424127948-22484-34-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-16 23:05 ` [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h Mikko Rapeli
6 siblings, 2 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
Fixes compiler warning:
error: unknown type name ‘size_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
include/uapi/asm-generic/signal.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index 9df61f1..8a341a2 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -3,6 +3,10 @@
#include <linux/types.h>
+#ifndef __KERNEL__
+#include <stdlib.h>
+#endif
+
#define _NSIG 64
#define _NSIG_BPW __BITS_PER_LONG
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
2015-02-16 23:05 ` [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
[not found] ` <1424127948-22484-34-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
1 sibling, 0 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
Fixes compiler warning:
error: unknown type name ‘size_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
include/uapi/asm-generic/signal.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index 9df61f1..8a341a2 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -3,6 +3,10 @@
#include <linux/types.h>
+#ifndef __KERNEL__
+#include <stdlib.h>
+#endif
+
#define _NSIG 64
#define _NSIG_BPW __BITS_PER_LONG
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition in userspace
[not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
` (4 preceding siblings ...)
2015-02-16 23:05 ` [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
[not found] ` <1424127948-22484-35-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-16 23:05 ` [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h Mikko Rapeli
6 siblings, 2 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
It is already defined by libc headers in
/usr/include/i386-linux-gnu/sys/select.h
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
include/uapi/asm-generic/signal.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index 8a341a2..af4d83a 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -88,9 +88,12 @@
#define SIGSTKSZ 8192
#ifndef __ASSEMBLY__
+#ifdef __KERNEL__
+/* already defined in userspace via stdlib.h */
typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;
+#endif /* __KERNEL__ */
/* not actually used, but required for linux/syscalls.h */
typedef unsigned long old_sigset_t;
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition in userspace
2015-02-16 23:05 ` [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
[not found] ` <1424127948-22484-35-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
1 sibling, 0 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
It is already defined by libc headers in
/usr/include/i386-linux-gnu/sys/select.h
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
include/uapi/asm-generic/signal.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index 8a341a2..af4d83a 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -88,9 +88,12 @@
#define SIGSTKSZ 8192
#ifndef __ASSEMBLY__
+#ifdef __KERNEL__
+/* already defined in userspace via stdlib.h */
typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;
+#endif /* __KERNEL__ */
/* not actually used, but required for linux/syscalls.h */
typedef unsigned long old_sigset_t;
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h
[not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
` (5 preceding siblings ...)
2015-02-16 23:05 ` [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
2015-02-17 9:10 ` Arnd Bergmann
6 siblings, 2 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
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>
---
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 ad77343..31ece341 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-generic/signal.h>
+#include <asm/sigcontext.h>
+
struct ucontext {
unsigned long uc_flags;
struct ucontext *uc_link;
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h
2015-02-16 23:05 ` [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
2015-02-17 9:10 ` Arnd Bergmann
1 sibling, 0 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api
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>
---
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 ad77343..31ece341 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-generic/signal.h>
+#include <asm/sigcontext.h>
+
struct ucontext {
unsigned long uc_flags;
struct ucontext *uc_link;
--
2.1.4
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h
2015-02-16 23:05 ` [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
@ 2015-02-17 9:10 ` Arnd Bergmann
2015-03-11 1:59 ` Mikko Rapeli
1 sibling, 1 reply; 24+ messages in thread
From: Arnd Bergmann @ 2015-02-17 9:10 UTC (permalink / raw)
To: Mikko Rapeli; +Cc: linux-kernel, linux-arch, linux-api
On Tuesday 17 February 2015 00:05:48 Mikko Rapeli wrote:
> #ifndef __ASM_GENERIC_UCONTEXT_H
> #define __ASM_GENERIC_UCONTEXT_H
>
> +#include <asm-generic/signal.h>
> +#include <asm/sigcontext.h>
> +
> struct ucontext {
>
Including another asm-generic header here is a bad idea: it breaks
if an architecture overrides asm/signal.h with its own version
but wants to use the asm-generic/ucontext.h file.
It would be best to just use linux/signal.h here, which includes
the correct architecture specific files.
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition in userspace
[not found] ` <1424127948-22484-35-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-17 9:16 ` Arnd Bergmann
2015-02-17 9:16 ` Arnd Bergmann
2015-03-11 0:05 ` Mikko Rapeli
0 siblings, 2 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-02-17 9:16 UTC (permalink / raw)
To: Mikko Rapeli
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arch-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA
On Tuesday 17 February 2015 00:05:37 Mikko Rapeli wrote:
> +#ifdef __KERNEL__
> +/* already defined in userspace via stdlib.h */
> typedef struct {
> unsigned long sig[_NSIG_WORDS];
> } sigset_t;
> +#endif /* __KERNEL__ */
I'm not sure here: Is this structure always identical to the one
we see in user space?
If not, we might want to rename the typedef to __kernel_sigset_t
instead and use that inside of the uapi headers.
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition in userspace
2015-02-17 9:16 ` Arnd Bergmann
@ 2015-02-17 9:16 ` Arnd Bergmann
2015-03-11 0:05 ` Mikko Rapeli
1 sibling, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-02-17 9:16 UTC (permalink / raw)
To: Mikko Rapeli; +Cc: linux-kernel, linux-arch, linux-api
On Tuesday 17 February 2015 00:05:37 Mikko Rapeli wrote:
> +#ifdef __KERNEL__
> +/* already defined in userspace via stdlib.h */
> typedef struct {
> unsigned long sig[_NSIG_WORDS];
> } sigset_t;
> +#endif /* __KERNEL__ */
I'm not sure here: Is this structure always identical to the one
we see in user space?
If not, we might want to rename the typedef to __kernel_sigset_t
instead and use that inside of the uapi headers.
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
[not found] ` <1424127948-22484-34-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-17 9:44 ` Arnd Bergmann
2015-02-17 9:44 ` Arnd Bergmann
2015-03-10 22:58 ` Mikko Rapeli
0 siblings, 2 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-02-17 9:44 UTC (permalink / raw)
To: Mikko Rapeli
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arch-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA
On Tuesday 17 February 2015 00:05:36 Mikko Rapeli wrote:
> Fixes compiler warning:
> error: unknown type name ‘size_t’
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> ---
> include/uapi/asm-generic/signal.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
> index 9df61f1..8a341a2 100644
> --- a/include/uapi/asm-generic/signal.h
> +++ b/include/uapi/asm-generic/signal.h
> @@ -3,6 +3,10 @@
>
> #include <linux/types.h>
>
> +#ifndef __KERNEL__
> +#include <stdlib.h>
> +#endif
> +
Hmm, maybe we should use __kernel_size_t instead?
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
2015-02-17 9:44 ` Arnd Bergmann
@ 2015-02-17 9:44 ` Arnd Bergmann
2015-03-10 22:58 ` Mikko Rapeli
1 sibling, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-02-17 9:44 UTC (permalink / raw)
To: Mikko Rapeli; +Cc: linux-kernel, linux-arch, linux-api
On Tuesday 17 February 2015 00:05:36 Mikko Rapeli wrote:
> Fixes compiler warning:
> error: unknown type name ‘size_t’
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
> include/uapi/asm-generic/signal.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
> index 9df61f1..8a341a2 100644
> --- a/include/uapi/asm-generic/signal.h
> +++ b/include/uapi/asm-generic/signal.h
> @@ -3,6 +3,10 @@
>
> #include <linux/types.h>
>
> +#ifndef __KERNEL__
> +#include <stdlib.h>
> +#endif
> +
Hmm, maybe we should use __kernel_size_t instead?
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
2015-02-17 9:44 ` Arnd Bergmann
2015-02-17 9:44 ` Arnd Bergmann
@ 2015-03-10 22:58 ` Mikko Rapeli
[not found] ` <20150310225828.GZ12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
1 sibling, 1 reply; 24+ messages in thread
From: Mikko Rapeli @ 2015-03-10 22:58 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, linux-arch, linux-api
On Tue, Feb 17, 2015 at 10:44:48AM +0100, Arnd Bergmann wrote:
> On Tuesday 17 February 2015 00:05:36 Mikko Rapeli wrote:
> > Fixes compiler warning:
> > error: unknown type name ‘size_t’
> >
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > ---
> > include/uapi/asm-generic/signal.h | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
> > index 9df61f1..8a341a2 100644
> > --- a/include/uapi/asm-generic/signal.h
> > +++ b/include/uapi/asm-generic/signal.h
> > @@ -3,6 +3,10 @@
> >
> > #include <linux/types.h>
> >
> > +#ifndef __KERNEL__
> > +#include <stdlib.h>
> > +#endif
> > +
>
> Hmm, maybe we should use __kernel_size_t instead?
This problem is in several uapi header files on x86:
asm-generic/shmbuf.h
asm-generic/signal.h
asm/signal.h
drm/drm.h
linux/agpgart.h
linux/kexec.h
linux/ncp_fs.h
linux/nfc.h
linux/omapfb.h
linux/reiserfs_xattr.h
linux/sysctl.h
sound/asound.h
so I guess using __kernel_size_t is the correct approach for all of them,
right?
linux/kexec.h seems suspicious though:
#ifndef __KERNEL__
/*
* This structure is used to hold the arguments that are used when
* loading kernel binaries.
*/
struct kexec_segment {
const void *buf;
size_t bufsz;
const void *mem;
size_t memsz;
};
#endif /* __KERNEL__ */
-Mikko
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition in userspace
2015-02-17 9:16 ` Arnd Bergmann
2015-02-17 9:16 ` Arnd Bergmann
@ 2015-03-11 0:05 ` Mikko Rapeli
1 sibling, 0 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-03-11 0:05 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, linux-arch, linux-api
On Tue, Feb 17, 2015 at 10:16:09AM +0100, Arnd Bergmann wrote:
> On Tuesday 17 February 2015 00:05:37 Mikko Rapeli wrote:
> > +#ifdef __KERNEL__
> > +/* already defined in userspace via stdlib.h */
> > typedef struct {
> > unsigned long sig[_NSIG_WORDS];
> > } sigset_t;
> > +#endif /* __KERNEL__ */
>
> I'm not sure here: Is this structure always identical to the one
> we see in user space?
>
> If not, we might want to rename the typedef to __kernel_sigset_t
> instead and use that inside of the uapi headers.
I was copying this ifdef from the struct sigaction part in the same file:
#ifndef __KERNEL__
struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
#ifdef SA_RESTORER
__sigrestore_t sa_restorer;
#endif
sigset_t sa_mask; /* mask last for extensibility */
};
#endif
I assumed it had the same problems at some point.
-Mikko
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h
2015-02-17 9:10 ` Arnd Bergmann
@ 2015-03-11 1:59 ` Mikko Rapeli
0 siblings, 0 replies; 24+ messages in thread
From: Mikko Rapeli @ 2015-03-11 1:59 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, linux-arch, linux-api
On Tue, Feb 17, 2015 at 10:10:42AM +0100, Arnd Bergmann wrote:
> On Tuesday 17 February 2015 00:05:48 Mikko Rapeli wrote:
> > #ifndef __ASM_GENERIC_UCONTEXT_H
> > #define __ASM_GENERIC_UCONTEXT_H
> >
> > +#include <asm-generic/signal.h>
> > +#include <asm/sigcontext.h>
> > +
> > struct ucontext {
> >
>
> Including another asm-generic header here is a bad idea: it breaks
> if an architecture overrides asm/signal.h with its own version
> but wants to use the asm-generic/ucontext.h file.
>
> It would be best to just use linux/signal.h here, which includes
> the correct architecture specific files.
Thanks, I will use asm/signal.h instead.
-Mikko
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
[not found] ` <20150310225828.GZ12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
@ 2015-03-11 10:02 ` Arnd Bergmann
2015-03-11 10:02 ` Arnd Bergmann
0 siblings, 1 reply; 24+ messages in thread
From: Arnd Bergmann @ 2015-03-11 10:02 UTC (permalink / raw)
To: Mikko Rapeli
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arch-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA, Geoff Levand, Paul Bolle
On Wednesday 11 March 2015 00:58:28 Mikko Rapeli wrote:
> linux/kexec.h seems suspicious though:
>
> #ifndef __KERNEL__
> /*
> * This structure is used to hold the arguments that are used when
> * loading kernel binaries.
> */
> struct kexec_segment {
> const void *buf;
> size_t bufsz;
> const void *mem;
> size_t memsz;
> };
>
> #endif /* __KERNEL__ */
>
Hmm, maybe that just needs to be removed as well, after we
have removed the function declaration that used to follow it
as part of this commit:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9dc5c05f45ca8101025046cd
Using __kernel_size_t would work here as well, but I suspect that
the entire structure is useless as it is not used by kernel or
user space, and kexec_tools has its own copy of the structure.
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
2015-03-11 10:02 ` Arnd Bergmann
@ 2015-03-11 10:02 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-03-11 10:02 UTC (permalink / raw)
To: Mikko Rapeli
Cc: linux-kernel, linux-arch, linux-api, Geoff Levand, Paul Bolle
On Wednesday 11 March 2015 00:58:28 Mikko Rapeli wrote:
> linux/kexec.h seems suspicious though:
>
> #ifndef __KERNEL__
> /*
> * This structure is used to hold the arguments that are used when
> * loading kernel binaries.
> */
> struct kexec_segment {
> const void *buf;
> size_t bufsz;
> const void *mem;
> size_t memsz;
> };
>
> #endif /* __KERNEL__ */
>
Hmm, maybe that just needs to be removed as well, after we
have removed the function declaration that used to follow it
as part of this commit:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9dc5c05f45ca8101025046cd
Using __kernel_size_t would work here as well, but I suspect that
the entire structure is useless as it is not used by kernel or
user space, and kexec_tools has its own copy of the structure.
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2015-03-11 10:02 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
2015-02-16 23:05 ` [PATCH 28/45] include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
[not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-16 23:05 ` [PATCH 29/45] include/uapi/asm-generic/msgbuf.h: include asm/ipcbuf.h Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 30/45] include/uapi/asm-generic/shmbuf.h: include fixes Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 31/45] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
[not found] ` <1424127948-22484-34-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-17 9:44 ` Arnd Bergmann
2015-02-17 9:44 ` Arnd Bergmann
2015-03-10 22:58 ` Mikko Rapeli
[not found] ` <20150310225828.GZ12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
2015-03-11 10:02 ` Arnd Bergmann
2015-03-11 10:02 ` Arnd Bergmann
2015-02-16 23:05 ` [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition " Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
[not found] ` <1424127948-22484-35-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-17 9:16 ` Arnd Bergmann
2015-02-17 9:16 ` Arnd Bergmann
2015-03-11 0:05 ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
2015-02-17 9:10 ` Arnd Bergmann
2015-03-11 1:59 ` Mikko Rapeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox