Re: [PATCH] riscv: fix syscall_get_arguments() and syscall_set_arguments()

2019-03-29 Thread Guo Ren
Thx Dmitry & Steve, On Fri, Mar 29, 2019 at 04:33:37PM -0400, Steven Rostedt wrote: > On Fri, 29 Mar 2019 21:16:19 +0300 > "Dmitry V. Levin" wrote: > > > This is fine with me. If you are adding the fix for riscv, > > please consider adding the fix for csky, too. > > Yes of course. I mentioned

Re: [PATCH] riscv: fix syscall_get_arguments() and syscall_set_arguments()

2019-03-29 Thread Steven Rostedt
On Fri, 29 Mar 2019 21:16:19 +0300 "Dmitry V. Levin" wrote: > This is fine with me. If you are adding the fix for riscv, > please consider adding the fix for csky, too. Yes of course. I mentioned both of these fixes in my reply to Linus. -- Steve

Re: [PATCH] riscv: fix syscall_get_arguments() and syscall_set_arguments()

2019-03-29 Thread Steven Rostedt
On Fri, 29 Mar 2019 21:11:09 +0300 "Dmitry V. Levin" wrote: > On Fri, Mar 29, 2019 at 01:56:35PM -0400, Steven Rostedt wrote: > > On Fri, 29 Mar 2019 18:52:18 +0100 > > David Abdurachmanov wrote: > > > > > I have alternative version posted in December part of SECCOMP > > > patchset which is

Re: [PATCH] riscv: fix syscall_get_arguments() and syscall_set_arguments()

2019-03-29 Thread Dmitry V. Levin
On Fri, Mar 29, 2019 at 01:15:14PM -0400, Steven Rostedt wrote: > On Fri, 29 Mar 2019 20:12:21 +0300 > "Dmitry V. Levin" wrote: > > > RISC-V syscall arguments are located in orig_a0,a1..a5 fields > > of struct pt_regs. > > > > Due to an off-by-one bug and a bug in pointer arithmetic > >

Re: [PATCH] riscv: fix syscall_get_arguments() and syscall_set_arguments()

2019-03-29 Thread Dmitry V. Levin
On Fri, Mar 29, 2019 at 01:56:35PM -0400, Steven Rostedt wrote: > On Fri, 29 Mar 2019 18:52:18 +0100 > David Abdurachmanov wrote: > > > I have alternative version posted in December part of SECCOMP > > patchset which is based on arm64 implementation. > > > >

Re: [PATCH] riscv: fix syscall_get_arguments() and syscall_set_arguments()

2019-03-29 Thread David Abdurachmanov
On Fri, Mar 29, 2019 at 6:15 PM Steven Rostedt wrote: > > On Fri, 29 Mar 2019 20:12:21 +0300 > "Dmitry V. Levin" wrote: > > > RISC-V syscall arguments are located in orig_a0,a1..a5 fields > > of struct pt_regs. > > > > Due to an off-by-one bug and a bug in pointer arithmetic > >

Re: [PATCH] riscv: fix syscall_get_arguments() and syscall_set_arguments()

2019-03-29 Thread Steven Rostedt
On Fri, 29 Mar 2019 18:52:18 +0100 David Abdurachmanov wrote: > I have alternative version posted in December part of SECCOMP > patchset which is based on arm64 implementation. > > http://lists.infradead.org/pipermail/linux-riscv/2018-December/002450.html > > I noticed that SECCOMP wasn't

Re: [PATCH] riscv: fix syscall_get_arguments() and syscall_set_arguments()

2019-03-29 Thread Steven Rostedt
On Fri, 29 Mar 2019 20:12:21 +0300 "Dmitry V. Levin" wrote: > RISC-V syscall arguments are located in orig_a0,a1..a5 fields > of struct pt_regs. > > Due to an off-by-one bug and a bug in pointer arithmetic > syscall_get_arguments() was reading s3..s7 fields instead of a1..a5. > Likewise,

[PATCH] riscv: fix syscall_get_arguments() and syscall_set_arguments()

2019-03-29 Thread Dmitry V. Levin
RISC-V syscall arguments are located in orig_a0,a1..a5 fields of struct pt_regs. Due to an off-by-one bug and a bug in pointer arithmetic syscall_get_arguments() was reading s3..s7 fields instead of a1..a5. Likewise, syscall_set_arguments() was writing s3..s7 fields instead of a1..a5. Fixes: