Re: [PATCH 3/6 v3] riscv: Fix syscall_get_arguments() and syscall_set_arguments()

2019-04-04 Thread Palmer Dabbelt
On Thu, 04 Apr 2019 07:26:53 PDT (-0700), rost...@goodmis.org wrote: On Thu, 4 Apr 2019 17:02:10 +0300 "Dmitry V. Levin" wrote: On Mon, Apr 01, 2019 at 09:41:07AM -0400, Steven Rostedt wrote: > From: "Dmitry V. Levin" > > RISC-V syscall arguments are located in orig_a0,a1..a5 fields > of

Re: [PATCH 3/6 v3] riscv: Fix syscall_get_arguments() and syscall_set_arguments()

2019-04-04 Thread Steven Rostedt
On Thu, 4 Apr 2019 17:02:10 +0300 "Dmitry V. Levin" wrote: > On Mon, Apr 01, 2019 at 09:41:07AM -0400, Steven Rostedt wrote: > > From: "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

Re: [PATCH 3/6 v3] riscv: Fix syscall_get_arguments() and syscall_set_arguments()

2019-04-04 Thread Dmitry V. Levin
On Mon, Apr 01, 2019 at 09:41:07AM -0400, Steven Rostedt wrote: > From: "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

[PATCH 3/6 v3] riscv: Fix syscall_get_arguments() and syscall_set_arguments()

2019-04-01 Thread Steven Rostedt
From: "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