Depends on audit patch:
http://lists.infradead.org/pipermail/linux-riscv/2018-October/001931.html
audit patch is already merged into linux-next.
This simply fixes compilation error in do_syscall_trace_exit() and
enables syscalls tracepoints.
David Abdurachmanov (2):
riscv: fix trace_sys_exit hook
riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig
arch/riscv/Kconfig | 1 +
arch/riscv/kernel/ptrace.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
--
2.19.2
Fix compilation error.
Signed-off-by: David Abdurachmanov <[email protected]>
---
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 c1b51539c3e2..2fd9ec48106b 100644
--- a/arch/riscv/kernel/ptrace.c
+++ b/arch/riscv/kernel/ptrace.c
@@ -177,6 +177,6 @@ void do_syscall_trace_exit(struct pt_regs *regs)
#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
- trace_sys_exit(regs, regs->regs[0]);
+ trace_sys_exit(regs, regs_return_value(regs));
#endif
}
--
2.19.2
I looked into Documentation/trace/ftrace-design.rst and, I think,
we check all the boxes needed for HAVE_SYSCALL_TRACEPOINTS.
Signed-off-by: David Abdurachmanov <[email protected]>
---
arch/riscv/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index a4f48f757204..6749c22ee656 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -34,6 +34,7 @@ config RISCV
select HAVE_FUTEX_CMPXCHG if FUTEX
select HAVE_GENERIC_DMA_COHERENT
select HAVE_PERF_EVENTS
+ select HAVE_SYSCALL_TRACEPOINTS
select IRQ_DOMAIN
select RISCV_ISA_A if SMP
select SPARSE_IRQ
--
2.19.2
On Thu, 06 Dec 2018 07:26:33 PST (-0800), [email protected] wrote:
> Depends on audit patch:
> http://lists.infradead.org/pipermail/linux-riscv/2018-October/001931.html
>
> audit patch is already merged into linux-next.
>
> This simply fixes compilation error in do_syscall_trace_exit() and
> enables syscalls tracepoints.
>
> David Abdurachmanov (2):
> riscv: fix trace_sys_exit hook
> riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig
>
> arch/riscv/Kconfig | 1 +
> arch/riscv/kernel/ptrace.c | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
I've attempted to add this on top of next-audit, which I've merged into
for-next. Let me know if something went wrong.
On Fri, Dec 7, 2018 at 9:32 PM Palmer Dabbelt <[email protected]> wrote:
>
> On Thu, 06 Dec 2018 07:26:33 PST (-0800), [email protected] wrote:
> > Depends on audit patch:
> > http://lists.infradead.org/pipermail/linux-riscv/2018-October/001931.html
> >
> > audit patch is already merged into linux-next.
> >
> > This simply fixes compilation error in do_syscall_trace_exit() and
> > enables syscalls tracepoints.
> >
> > David Abdurachmanov (2):
> > riscv: fix trace_sys_exit hook
> > riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig
> >
> > arch/riscv/Kconfig | 1 +
> > arch/riscv/kernel/ptrace.c | 2 +-
> > 2 files changed, 2 insertions(+), 1 deletion(-)
>
> I've attempted to add this on top of next-audit, which I've merged into
> for-next. Let me know if something went wrong.
Two things:
- The order of commits are wrong. Right now the commits are in
reverse order, i.e. audit patches are on top.
- Intel kbuild test bot found compilation errors with riscv-allmodconfig
config. I fixed those and posted two patches:
http://lists.infradead.org/pipermail/linux-riscv/2018-December/002508.html