Skip to contentSkip to conversation

sched: Add __ASSEMBLY__ guards around struct clone_args

PATCH In review Seth Forshee 3 participants 3 messages Sep 17, 2019 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: Add __ASSEMBLY__ guards around struct clone_args

The addition of struct clone_args to uapi/linux/sched.h is not protected by __ASSEMBLY__ guards, causing a FTBFS for glibc on RISC-V. Add the guards to fix this.

Fixes 7f192e3cd316 ("fork: add clone3")
---
 include/uapi/linux/sched.h | 2 ++
 1 file changed, 2 insertions(+)
include/uapi/linux/sched.h +2 -0
index b3105ac1381a..851ff1feadd5 100644
@@ -33,6 +33,7 @@
 #define CLONE_NEWNET		0x40000000	/* New network namespace */
 #define CLONE_IO		0x80000000	/* Clone io context */
 
+#ifndef __ASSEMBLY__
 /*
  * Arguments for the clone3 syscall
  */
@@ -46,6 +47,7 @@ struct clone_args {
 	__aligned_u64 stack_size;
 	__aligned_u64 tls;
 };
+#endif
 
 /*
  * Scheduling policies
Signature · 1 line
2.20.1
#1 lore raw
Quoted 6 lines · Seth Forshee

The addition of struct clone_args to uapi/linux/sched.h is not protected by __ASSEMBLY__ guards, causing a FTBFS for glibc on RISC-V. Add the guards to fix this.

Fixes 7f192e3cd316 ("fork: add clone3")

Applied to:
https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/log/?h=fixes

Just replaced FTBS with "failure to build from source" since I had to search for this and also added Cc: <[email protected]> for 5.3.

Thanks!
Christian

Acked-by on v1 1/1
#2 lore raw
In reply to Seth Forshee
Quoted 23 lines · Seth Forshee

The addition of struct clone_args to uapi/linux/sched.h is not protected by __ASSEMBLY__ guards, causing a FTBFS for glibc on RISC-V. Add the guards to fix this.

Fixes 7f192e3cd316 ("fork: add clone3")
---
 include/uapi/linux/sched.h | 2 ++
 1 file changed, 2 insertions(+)
include/uapi/linux/sched.h +1 -0
index b3105ac1381a..851ff1feadd5 100644
@@ -33,6 +33,7 @@
 #define CLONE_NEWNET		0x40000000	/* New network namespace */
 #define CLONE_IO		0x80000000	/* Clone io context */
 
+#ifndef __ASSEMBLY__
 /*
  * Arguments for the clone3 syscall
  */

include/uapi/linux/sched.h struct clone_args { · line 50

Quoted 4 lines
include/uapi/linux/sched.h +1 -0
@@ -46,6 +47,7 @@ struct clone_args {
 	__aligned_u64 stack_size;
 	__aligned_u64 tls;
 };
+#endif

Thanks,

Ingo