All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cobalt: x86: Use ipipe_root_nr_syscalls
@ 2019-01-31 17:09 Jan Kiszka
  2019-02-14 15:12 ` Richard Weinberger
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2019-01-31 17:09 UTC (permalink / raw)
  To: Xenomai

From: Jan Kiszka <jan.kiszka@siemens.com>

Required to handle compat syscalls correctly.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

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(-)

diff --git a/kernel/cobalt/arch/x86/include/asm/xenomai/syscall.h b/kernel/cobalt/arch/x86/include/asm/xenomai/syscall.h
index 992f1cd9c4..ea0e6fcb16 100644
--- a/kernel/cobalt/arch/x86/include/asm/xenomai/syscall.h
+++ b/kernel/cobalt/arch/x86/include/asm/xenomai/syscall.h
@@ -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)
diff --git a/kernel/cobalt/include/linux/xenomai/wrappers.h b/kernel/cobalt/include/linux/xenomai/wrappers.h
index 1d16db4218..7d00aa9d40 100644
--- a/kernel/cobalt/include/linux/xenomai/wrappers.h
+++ b/kernel/cobalt/include/linux/xenomai/wrappers.h
@@ -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 */
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] cobalt: x86: Use ipipe_root_nr_syscalls
  2019-01-31 17:09 [PATCH] cobalt: x86: Use ipipe_root_nr_syscalls Jan Kiszka
@ 2019-02-14 15:12 ` Richard Weinberger
  2019-02-15 14:21   ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2019-02-14 15:12 UTC (permalink / raw)
  To: Jan Kiszka, Philippe Gerum; +Cc: Xenomai

Am Donnerstag, 31. Januar 2019, 18:09:53 CET schrieb Jan Kiszka:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Required to handle compat syscalls correctly.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> 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:
Reviewed-by: Richard Weinberger <richard@nod.at>
Tested-by: Richard Weinberger <richard@nod.at>

Thanks,
//richard




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cobalt: x86: Use ipipe_root_nr_syscalls
  2019-02-14 15:12 ` Richard Weinberger
@ 2019-02-15 14:21   ` Jan Kiszka
  2019-02-15 14:38     ` Philippe Gerum
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2019-02-15 14:21 UTC (permalink / raw)
  To: Richard Weinberger, Philippe Gerum; +Cc: Xenomai

On 14.02.19 16:12, Richard Weinberger wrote:
> Am Donnerstag, 31. Januar 2019, 18:09:53 CET schrieb Jan Kiszka:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Required to handle compat syscalls correctly.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>
>> 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:
> Reviewed-by: Richard Weinberger <richard@nod.at>
> Tested-by: Richard Weinberger <richard@nod.at>
> 

Thanks for testing!

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

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cobalt: x86: Use ipipe_root_nr_syscalls
  2019-02-15 14:21   ` Jan Kiszka
@ 2019-02-15 14:38     ` Philippe Gerum
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2019-02-15 14:38 UTC (permalink / raw)
  To: Jan Kiszka, Richard Weinberger; +Cc: Xenomai

On 2/15/19 3:21 PM, Jan Kiszka wrote:
> On 14.02.19 16:12, Richard Weinberger wrote:
>> Am Donnerstag, 31. Januar 2019, 18:09:53 CET schrieb Jan Kiszka:
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> Required to handle compat syscalls correctly.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>> ---
>>>
>>> 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:
>> Reviewed-by: Richard Weinberger <richard@nod.at>
>> Tested-by: Richard Weinberger <richard@nod.at>
>>
> 
> Thanks for testing!
> 
> Philippe, could you pick up the generic ipipe patch? I'll take care of
> the rest.
> 

It's already there.

-- 
Philippe.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-15 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-31 17:09 [PATCH] cobalt: x86: Use ipipe_root_nr_syscalls Jan Kiszka
2019-02-14 15:12 ` Richard Weinberger
2019-02-15 14:21   ` Jan Kiszka
2019-02-15 14:38     ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.