Skip to contentSkip to conversation

cobalt: x86: Use ipipe_root_nr_syscalls

PATCH In review Jan Kiszka 3 participants 4 messages Jan 31, 2019 – Feb 15, 2019

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 cobalt: x86: Use ipipe_root_nr_syscalls

From: Jan Kiszka <[email protected]>

Required to handle compat syscalls correctly.

---

This is against next. The stable patch needs to touch kernel/cobalt /posix/syscall.c instead.

Testing all these would be very appreciated!

 kernel/cobalt/arch/x86/include/asm/xenomai/syscall.h | 2 +-
 kernel/cobalt/include/linux/xenomai/wrappers.h       | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
kernel/cobalt/arch/x86/include/asm/xenomai/syscall.h +1 -1
index 992f1cd9c4..ea0e6fcb16 100644
@@ -62,7 +62,7 @@
 #define __xn_rootcall_p(__regs, __code)			\
 	({						\
 		*(__code) = __xn_reg_sys(__regs);	\
-		*(__code) < NR_syscalls;		\
+		*(__code) < ipipe_root_nr_syscalls(current_thread_info()); \
 	})
 
 static inline void __xn_error_return(struct pt_regs *regs, int v)
kernel/cobalt/include/linux/xenomai/wrappers.h +6 -0
index 1d16db4218..7d00aa9d40 100644
@@ -43,4 +43,10 @@
 		smp_store_mb((tsk)->state, (state_value))
 #endif
 
+#include <linux/ipipe.h>
+
+#ifndef ipipe_root_nr_syscalls
+#define ipipe_root_nr_syscalls(ti)	NR_syscalls
+#endif
+
 #endif /* !_COBALT_LINUX_WRAPPERS_H */
Signature · 1 line
2.16.4
Reviewed-by Tested-by on v1 1/1
#1 lore raw

Am Donnerstag, 31. Januar 2019, 18:09:53 CET schrieb Jan Kiszka:

Quoted 11 lines

From: Jan Kiszka <[email protected]>

Required to handle compat syscalls correctly.

---

This is against next. The stable patch needs to touch kernel/cobalt /posix/syscall.c instead.

Testing all these would be very appreciated!

Finally had time to test and review the patches.
The Problem I saw is gone. :-)

For all three patches:

Thanks,
//richard

author
#2 lore raw
Quoted 11 lines · Richard Weinberger

Am Donnerstag, 31. Januar 2019, 18:09:53 CET schrieb Jan Kiszka:

Quoted 10 lines

From: Jan Kiszka <[email protected]>

Required to handle compat syscalls correctly.

---

This is against next. The stable patch needs to touch kernel/cobalt /posix/syscall.c instead.

Quoted 9 lines
Quoted 1 line

Testing all these would be very appreciated!

Finally had time to test and review the patches.
The Problem I saw is gone. :-)

For all three patches:

Thanks for testing!

Philippe, could you pick up the generic ipipe patch? I'll take care of the rest.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
#3 lore raw
Quoted 22 lines · Jan Kiszka
Quoted 11 lines · Richard Weinberger

Am Donnerstag, 31. Januar 2019, 18:09:53 CET schrieb Jan Kiszka:

Quoted 10 lines

From: Jan Kiszka <[email protected]>

Required to handle compat syscalls correctly.

---

This is against next. The stable patch needs to touch kernel/cobalt /posix/syscall.c instead.

Quoted 9 lines
Quoted 1 line

Testing all these would be very appreciated!

Finally had time to test and review the patches.
The Problem I saw is gone. :-)

For all three patches:

Quoted 5 lines

Thanks for testing!

Philippe, could you pick up the generic ipipe patch? I'll take care of the rest.

It's already there.

Signature · 1 line
Philippe.