[Xenomai-git] Jan Kiszka : cobalt/kernel: Fix mode of mayday syscall
Module: xenomai-3 Branch: master Commit: 9b68cbe2a7d3bbeb537184b8050dbd71365983be URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=9b68cbe2a7d3bbeb537184b8050dbd71365983be Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Jun 19 15:59:15 2015 +0200 cobalt/kernel: Fix mode of mayday syscall The oneway mode meant norestart, thus return -EINTR instead of retrying the syscall after signal processing. But this caused damaged to the register state of the mayday-interrupted thread, most visible on x86-64 where RAX is holding the RIP. Fix this by restarting the syscall on signals. The syscall is supposed to deliver the same result then, including a correct register state. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kernel/cobalt/posix/syscall.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c index 759e423..61f3008 100644 --- a/kernel/cobalt/posix/syscall.c +++ b/kernel/cobalt/posix/syscall.c @@ -71,8 +71,6 @@ #define __xn_exec_nonrestartable (__xn_exec_primary|__xn_exec_norestart) /* Shorthand for domain probing syscall */ #define __xn_exec_probing (__xn_exec_conforming|__xn_exec_adaptive) -/* Shorthand for oneway trap - does not return to call site. */ -#define __xn_exec_oneway__xn_exec_norestart typedef long (*cobalt_syshand)(unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, @@ -246,7 +244,7 @@ static COBALT_SYSCALL(serialdbg, current, return 0; } -static COBALT_SYSCALL(mayday, oneway, (void)) +static COBALT_SYSCALL(mayday, current, (void)) { struct pt_regs *regs = task_pt_regs(current); struct xnthread *cur; @@ -800,7 +798,7 @@ static const int cobalt_sysmodes[] = { __COBALT_MODE(extend, lostage), __COBALT_MODE(trace, current), __COBALT_MODE(get_current, current), - __COBALT_MODE(mayday, oneway), + __COBALT_MODE(mayday, current), __COBALT_MODE(backtrace, current), __COBALT_MODE(serialdbg, current), __COBALT_MODE(corectl, probing), ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : cobalt/kernel: Fix mode of mayday syscall
Module: xenomai-3 Branch: next Commit: 9b68cbe2a7d3bbeb537184b8050dbd71365983be URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=9b68cbe2a7d3bbeb537184b8050dbd71365983be Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Jun 19 15:59:15 2015 +0200 cobalt/kernel: Fix mode of mayday syscall The oneway mode meant norestart, thus return -EINTR instead of retrying the syscall after signal processing. But this caused damaged to the register state of the mayday-interrupted thread, most visible on x86-64 where RAX is holding the RIP. Fix this by restarting the syscall on signals. The syscall is supposed to deliver the same result then, including a correct register state. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kernel/cobalt/posix/syscall.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c index 759e423..61f3008 100644 --- a/kernel/cobalt/posix/syscall.c +++ b/kernel/cobalt/posix/syscall.c @@ -71,8 +71,6 @@ #define __xn_exec_nonrestartable (__xn_exec_primary|__xn_exec_norestart) /* Shorthand for domain probing syscall */ #define __xn_exec_probing (__xn_exec_conforming|__xn_exec_adaptive) -/* Shorthand for oneway trap - does not return to call site. */ -#define __xn_exec_oneway__xn_exec_norestart typedef long (*cobalt_syshand)(unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, @@ -246,7 +244,7 @@ static COBALT_SYSCALL(serialdbg, current, return 0; } -static COBALT_SYSCALL(mayday, oneway, (void)) +static COBALT_SYSCALL(mayday, current, (void)) { struct pt_regs *regs = task_pt_regs(current); struct xnthread *cur; @@ -800,7 +798,7 @@ static const int cobalt_sysmodes[] = { __COBALT_MODE(extend, lostage), __COBALT_MODE(trace, current), __COBALT_MODE(get_current, current), - __COBALT_MODE(mayday, oneway), + __COBALT_MODE(mayday, current), __COBALT_MODE(backtrace, current), __COBALT_MODE(serialdbg, current), __COBALT_MODE(corectl, probing), ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : cobalt/kernel: Fix mode of mayday syscall
Module: xenomai-jki Branch: for-forge Commit: dc5a0dfab1e8802c0686b340b57d6b0dbe200ac0 URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=dc5a0dfab1e8802c0686b340b57d6b0dbe200ac0 Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Jun 19 15:59:15 2015 +0200 cobalt/kernel: Fix mode of mayday syscall The oneway mode meant norestart, thus return -EINTR instead of retrying the syscall after signal processing. But this caused damaged to the register state of the mayday-interrupted thread, most visible on x86-64 where RAX is holding the RIP. Fix this by restarting the syscall on signals. The syscall is supposed to deliver the same result then, including a correct register state. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kernel/cobalt/posix/syscall.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c index 759e423..61f3008 100644 --- a/kernel/cobalt/posix/syscall.c +++ b/kernel/cobalt/posix/syscall.c @@ -71,8 +71,6 @@ #define __xn_exec_nonrestartable (__xn_exec_primary|__xn_exec_norestart) /* Shorthand for domain probing syscall */ #define __xn_exec_probing (__xn_exec_conforming|__xn_exec_adaptive) -/* Shorthand for oneway trap - does not return to call site. */ -#define __xn_exec_oneway__xn_exec_norestart typedef long (*cobalt_syshand)(unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, @@ -246,7 +244,7 @@ static COBALT_SYSCALL(serialdbg, current, return 0; } -static COBALT_SYSCALL(mayday, oneway, (void)) +static COBALT_SYSCALL(mayday, current, (void)) { struct pt_regs *regs = task_pt_regs(current); struct xnthread *cur; @@ -800,7 +798,7 @@ static const int cobalt_sysmodes[] = { __COBALT_MODE(extend, lostage), __COBALT_MODE(trace, current), __COBALT_MODE(get_current, current), - __COBALT_MODE(mayday, oneway), + __COBALT_MODE(mayday, current), __COBALT_MODE(backtrace, current), __COBALT_MODE(serialdbg, current), __COBALT_MODE(corectl, probing), ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : cobalt/kernel: Fix mode of mayday syscall
Module: xenomai-jki Branch: for-forge Commit: eb5da8c73df782c2766ee31dadff7f73f018a99d URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=eb5da8c73df782c2766ee31dadff7f73f018a99d Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Jun 19 15:59:15 2015 +0200 cobalt/kernel: Fix mode of mayday syscall The oneway mode meant norestart, thus return -EINTR instead of retrying the syscall after signal processing. But this caused damaged to the register state of the mayday-interrupted thread, most visible on x86-64 where RAX is holding the RIP. Fix this by restarting the syscall on signals. The syscall is supposed to deliver the same result then, including a correct register state. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kernel/cobalt/posix/syscall.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c index 759e423..61f3008 100644 --- a/kernel/cobalt/posix/syscall.c +++ b/kernel/cobalt/posix/syscall.c @@ -71,8 +71,6 @@ #define __xn_exec_nonrestartable (__xn_exec_primary|__xn_exec_norestart) /* Shorthand for domain probing syscall */ #define __xn_exec_probing (__xn_exec_conforming|__xn_exec_adaptive) -/* Shorthand for oneway trap - does not return to call site. */ -#define __xn_exec_oneway__xn_exec_norestart typedef long (*cobalt_syshand)(unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, @@ -246,7 +244,7 @@ static COBALT_SYSCALL(serialdbg, current, return 0; } -static COBALT_SYSCALL(mayday, oneway, (void)) +static COBALT_SYSCALL(mayday, current, (void)) { struct pt_regs *regs = task_pt_regs(current); struct xnthread *cur; @@ -800,7 +798,7 @@ static const int cobalt_sysmodes[] = { __COBALT_MODE(extend, lostage), __COBALT_MODE(trace, current), __COBALT_MODE(get_current, current), - __COBALT_MODE(mayday, oneway), + __COBALT_MODE(mayday, current), __COBALT_MODE(backtrace, current), __COBALT_MODE(serialdbg, current), __COBALT_MODE(corectl, probing), ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : cobalt/kernel: Fix mode of mayday syscall
Module: xenomai-jki Branch: for-forge Commit: a05bfee425cdb895e391f2c4f42460cffde31559 URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=a05bfee425cdb895e391f2c4f42460cffde31559 Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Jun 19 15:59:15 2015 +0200 cobalt/kernel: Fix mode of mayday syscall The oneway mode meant norestart, thus return -EINTR instead of retrying the syscall after signal processing. But this caused damaged to the register state of the mayday-interrupted thread, most visible on x86-64 where RAX is holding the RIP. Fix this by restarting the syscall on signals. The syscall is supposed to deliver the same result then, including a correct register state. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kernel/cobalt/posix/syscall.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c index e60cea8..c636c0f 100644 --- a/kernel/cobalt/posix/syscall.c +++ b/kernel/cobalt/posix/syscall.c @@ -71,8 +71,6 @@ #define __xn_exec_nonrestartable (__xn_exec_primary|__xn_exec_norestart) /* Shorthand for domain probing syscall */ #define __xn_exec_probing (__xn_exec_conforming|__xn_exec_adaptive) -/* Shorthand for oneway trap - does not return to call site. */ -#define __xn_exec_oneway__xn_exec_norestart typedef long (*cobalt_syshand)(unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, @@ -251,7 +249,7 @@ static COBALT_SYSCALL(serialdbg, current, return 0; } -static COBALT_SYSCALL(mayday, oneway, (void)) +static COBALT_SYSCALL(mayday, current, (void)) { struct pt_regs *regs = task_pt_regs(current); struct xnthread *cur; @@ -797,7 +795,7 @@ static const int cobalt_sysmodes[] = { __COBALT_MODE(extend, lostage), __COBALT_MODE(trace, current), __COBALT_MODE(get_current, current), - __COBALT_MODE(mayday, oneway), + __COBALT_MODE(mayday, current), __COBALT_MODE(backtrace, current), __COBALT_MODE(serialdbg, current), __COBALT_MODE(corectl, probing), ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : cobalt/kernel: Fix mode of mayday syscall
Module: xenomai-jki Branch: for-forge Commit: 3bde99bb7a84f819f06e3ee2bad219e1b9b1ab55 URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=3bde99bb7a84f819f06e3ee2bad219e1b9b1ab55 Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Jun 19 15:59:15 2015 +0200 cobalt/kernel: Fix mode of mayday syscall The oneway mode meant norestart, thus return -EINTR instead of retrying the syscall after signal processing. But this caused damaged to the register state of the mayday-interrupted thread, most visible on x86-64 where RAX is holding the RIP. Fix this by restarting the syscall on signals. The syscall is supposed to deliver the same result then, including a correct register state. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kernel/cobalt/posix/syscall.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c index e60cea8..c636c0f 100644 --- a/kernel/cobalt/posix/syscall.c +++ b/kernel/cobalt/posix/syscall.c @@ -71,8 +71,6 @@ #define __xn_exec_nonrestartable (__xn_exec_primary|__xn_exec_norestart) /* Shorthand for domain probing syscall */ #define __xn_exec_probing (__xn_exec_conforming|__xn_exec_adaptive) -/* Shorthand for oneway trap - does not return to call site. */ -#define __xn_exec_oneway__xn_exec_norestart typedef long (*cobalt_syshand)(unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, @@ -251,7 +249,7 @@ static COBALT_SYSCALL(serialdbg, current, return 0; } -static COBALT_SYSCALL(mayday, oneway, (void)) +static COBALT_SYSCALL(mayday, current, (void)) { struct pt_regs *regs = task_pt_regs(current); struct xnthread *cur; @@ -797,7 +795,7 @@ static const int cobalt_sysmodes[] = { __COBALT_MODE(extend, lostage), __COBALT_MODE(trace, current), __COBALT_MODE(get_current, current), - __COBALT_MODE(mayday, oneway), + __COBALT_MODE(mayday, current), __COBALT_MODE(backtrace, current), __COBALT_MODE(serialdbg, current), __COBALT_MODE(corectl, probing), ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : cobalt/kernel: Fix mode of mayday syscall
Module: xenomai-jki Branch: for-forge Commit: c806b60eaf505aafd4dbeeaf59cd3fc6d68703fa URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=c806b60eaf505aafd4dbeeaf59cd3fc6d68703fa Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Jun 19 15:59:15 2015 +0200 cobalt/kernel: Fix mode of mayday syscall The oneway mode meant norestart, thus return -EINTR instead of retrying the syscall after signal processing. But this caused damaged to the register state of the mayday-interrupted thread, most visible on x86-64 where RAX is holding the RIP. Fix this by restarting the syscall on signals. The syscall is supposed to deliver the same result then, including a correct register state. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kernel/cobalt/posix/syscall.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c index cf93f07..7e2d434 100644 --- a/kernel/cobalt/posix/syscall.c +++ b/kernel/cobalt/posix/syscall.c @@ -71,8 +71,6 @@ #define __xn_exec_nonrestartable (__xn_exec_primary|__xn_exec_norestart) /* Shorthand for domain probing syscall */ #define __xn_exec_probing (__xn_exec_conforming|__xn_exec_adaptive) -/* Shorthand for oneway trap - does not return to call site. */ -#define __xn_exec_oneway__xn_exec_norestart typedef long (*cobalt_syshand)(unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, @@ -246,7 +244,7 @@ static COBALT_SYSCALL(serialdbg, current, return 0; } -static COBALT_SYSCALL(mayday, oneway, (void)) +static COBALT_SYSCALL(mayday, current, (void)) { struct pt_regs *regs = task_pt_regs(current); struct xnthread *cur; @@ -792,7 +790,7 @@ static const int cobalt_sysmodes[] = { __COBALT_MODE(extend, lostage), __COBALT_MODE(trace, current), __COBALT_MODE(get_current, current), - __COBALT_MODE(mayday, oneway), + __COBALT_MODE(mayday, current), __COBALT_MODE(backtrace, current), __COBALT_MODE(serialdbg, current), __COBALT_MODE(corectl, probing), ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git