Re: [PATCH 4/5] RISC-V: Protect .init.text & .init.data

2020-10-14 Thread Jim Wilson
On Tue, Oct 13, 2020 at 3:25 PM Atish Patra wrote: > This happens only when copy_from_user is called from function that is > annotated with __init. > Adding Kito & Jim for their input > > @kito, @Jim: Please let me know if I should create a issue in > riscv-gnu-toolchain repo or somewhere else.

[PATCH] RISC-V: Don't increment sepc after breakpoint.

2018-07-14 Thread Jim Wilson
Adding 4 to sepc is pointless, and is wrong if we executed a 2-byte compressed breakpoint. This plus a corresponding gdb patch allows compressed breakpoints to work in gdb. Gdb maintainers have already agreed that this is the right approach. Signed-off-by: Jim Wilson --- arch/riscv/kernel

[PATCH] RISC-V: Don't increment sepc after breakpoint.

2018-07-14 Thread Jim Wilson
Adding 4 to sepc is pointless, and is wrong if we executed a 2-byte compressed breakpoint. This plus a corresponding gdb patch allows compressed breakpoints to work in gdb. Gdb maintainers have already agreed that this is the right approach. Signed-off-by: Jim Wilson --- arch/riscv/kernel

Re: [PATCH] RISC-V: Fix PTRACE_SETREGSET bug.

2018-06-11 Thread Jim Wilson
On Mon, Jun 11, 2018 at 5:46 PM, Palmer Dabbelt wrote: > Whoops, that's embarassing :). I poked around and didn't see this anywhere > else, so I'm not sure where we managed to obtain this particular pathology. Comment say it was copied from tile which I think was just recently removed. But

Re: [PATCH] RISC-V: Fix PTRACE_SETREGSET bug.

2018-06-11 Thread Jim Wilson
On Mon, Jun 11, 2018 at 5:46 PM, Palmer Dabbelt wrote: > Whoops, that's embarassing :). I poked around and didn't see this anywhere > else, so I'm not sure where we managed to obtain this particular pathology. Comment say it was copied from tile which I think was just recently removed. But

[PATCH] RISC-V: Fix PTRACE_SETREGSET bug.

2018-06-11 Thread Jim Wilson
In riscv_gpr_set, pass regs instead of to user_regset_copyin to fix gdb segfault. Signed-off-by: Jim Wilson --- arch/riscv/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c index ba3e80712797

[PATCH] RISC-V: Fix PTRACE_SETREGSET bug.

2018-06-11 Thread Jim Wilson
In riscv_gpr_set, pass regs instead of to user_regset_copyin to fix gdb segfault. Signed-off-by: Jim Wilson --- arch/riscv/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c index ba3e80712797

Re: [PATCH v2] riscv/ftrace: Add basic support

2017-12-12 Thread Jim Wilson
On Mon, Dec 11, 2017 at 11:08 PM, Alan Kao wrote: > On Mon, Dec 11, 2017 at 10:15:58AM -0800, Palmer Dabbelt wrote: >> It's not a big deal, though -- we can fix these later. The more interesting >> thing here is that this code means our `-pg` stuff is now part of the GCC >>

Re: [PATCH v2] riscv/ftrace: Add basic support

2017-12-12 Thread Jim Wilson
On Mon, Dec 11, 2017 at 11:08 PM, Alan Kao wrote: > On Mon, Dec 11, 2017 at 10:15:58AM -0800, Palmer Dabbelt wrote: >> It's not a big deal, though -- we can fix these later. The more interesting >> thing here is that this code means our `-pg` stuff is now part of the GCC >> ABI, which is