Skip to contentSkip to conversation

compat: move strut compat_iovec out of #ifdef CONFIG_COMPAT

PATCH In review Christoph Hellwig 2 participants 3 messages Sep 28, 2020 – Oct 3, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compat: move strut compat_iovec out of #ifdef CONFIG_COMPAT

This avoid annoying ifdefs in iov_iter.c

---

This fixes a build failure with the import_iovec / compat_import_iovec unification.

 include/linux/compat.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
include/linux/compat.h +5 -5
index 80b9b8cc1cd405..3e3d2beafed312 100644
@@ -91,6 +91,11 @@
 	static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
 #endif /* COMPAT_SYSCALL_DEFINEx */
 
+struct compat_iovec {
+	compat_uptr_t	iov_base;
+	compat_size_t	iov_len;
+};
+
 #ifdef CONFIG_COMPAT
 
 #ifndef compat_user_stack_pointer
@@ -248,11 +253,6 @@ typedef struct compat_siginfo {
 	} _sifields;
 } compat_siginfo_t;
 
-struct compat_iovec {
-	compat_uptr_t	iov_base;
-	compat_size_t	iov_len;
-};
-
 struct compat_rlimit {
 	compat_ulong_t	rlim_cur;
 	compat_ulong_t	rlim_max;
Signature · 1 line
2.28.0
#1 lore raw

ping? This is needed to unbreak the work.iov_iter branch that is in for-next.

Quoted 41 lines · Christoph Hellwig

This avoid annoying ifdefs in iov_iter.c

---

This fixes a build failure with the import_iovec / compat_import_iovec unification.

 include/linux/compat.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
include/linux/compat.h +5 -5
index 80b9b8cc1cd405..3e3d2beafed312 100644
@@ -91,6 +91,11 @@
 	static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
 #endif /* COMPAT_SYSCALL_DEFINEx */
 
+struct compat_iovec {
+	compat_uptr_t	iov_base;
+	compat_size_t	iov_len;
+};
+
 #ifdef CONFIG_COMPAT
 
 #ifndef compat_user_stack_pointer
@@ -248,11 +253,6 @@ typedef struct compat_siginfo {
 	} _sifields;
 } compat_siginfo_t;
 
-struct compat_iovec {
-	compat_uptr_t	iov_base;
-	compat_size_t	iov_len;
-};
-
 struct compat_rlimit {
 	compat_ulong_t	rlim_cur;
 	compat_ulong_t	rlim_max;
Signature · 1 line
2.28.0

---end quoted text---

#2 lore raw
Quoted 2 lines · Christoph Hellwig

ping? This is needed to unbreak the work.iov_iter branch that is in for-next.

Folded into "iov_iter: refactor rw_copy_check_uvector and import_iovec" and force-pushed...