Linux-RISC-V Archive on lore.kernel.org
 help / Atom feed
* [PATCH] riscv: fix trace_sys_exit hook
@ 2018-10-29 12:15 david.abdurachmanov
  2018-10-29 12:15 ` David Abdurachmanov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: david.abdurachmanov @ 2018-10-29 12:15 UTC (permalink / raw)
  To: linux-riscv

Depends on:
http://lists.infradead.org/pipermail/linux-riscv/2018-October/001931.html

Why we don't have HAVE_SYSCALL_TRACEPOINTS in arch/riscv/Kconfig?

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
---
 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 9f82a7e34c64..9db7d0076375 100644
--- a/arch/riscv/kernel/ptrace.c
+++ b/arch/riscv/kernel/ptrace.c
@@ -120,6 +120,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.17.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] riscv: fix trace_sys_exit hook
  2018-10-29 12:15 [PATCH] riscv: fix trace_sys_exit hook david.abdurachmanov
@ 2018-10-29 12:15 ` David Abdurachmanov
  2018-10-30  7:23 ` david.abdurachmanov
  2018-11-13  1:52 ` palmer
  2 siblings, 0 replies; 6+ messages in thread
From: David Abdurachmanov @ 2018-10-29 12:15 UTC (permalink / raw)
  To: palmer, aou, linux-riscv, linux-kernel; +Cc: David Abdurachmanov

Depends on:
http://lists.infradead.org/pipermail/linux-riscv/2018-October/001931.html

Why we don't have HAVE_SYSCALL_TRACEPOINTS in arch/riscv/Kconfig?

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
---
 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 9f82a7e34c64..9db7d0076375 100644
--- a/arch/riscv/kernel/ptrace.c
+++ b/arch/riscv/kernel/ptrace.c
@@ -120,6 +120,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.17.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] riscv: fix trace_sys_exit hook
  2018-10-29 12:15 [PATCH] riscv: fix trace_sys_exit hook david.abdurachmanov
  2018-10-29 12:15 ` David Abdurachmanov
@ 2018-10-30  7:23 ` david.abdurachmanov
  2018-10-30  7:23   ` David Abdurachmanov
  2018-11-13  1:52 ` palmer
  2 siblings, 1 reply; 6+ messages in thread
From: david.abdurachmanov @ 2018-10-30  7:23 UTC (permalink / raw)
  To: linux-riscv

On Mon, Oct 29, 2018 at 1:15 PM David Abdurachmanov
<david.abdurachmanov@gmail.com> wrote:
>
> Depends on:
> http://lists.infradead.org/pipermail/linux-riscv/2018-October/001931.html
>
> Why we don't have HAVE_SYSCALL_TRACEPOINTS in arch/riscv/Kconfig?
>

I looked this morning into Documentation/trace/ftrace-design.rst again.

Of all the things the document describes we are only missing
HAVE_SYSCALL_TRACEPOINTS in Kconfig, yet we already have it
implemented in ptrace.c (+ this minor fix). Reading document, I think,
we check all the boxes needed for HAVE_SYSCALL_TRACEPOINTS.

I assume it was just missed (?) and will do v2 later on.

david

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] riscv: fix trace_sys_exit hook
  2018-10-30  7:23 ` david.abdurachmanov
@ 2018-10-30  7:23   ` David Abdurachmanov
  0 siblings, 0 replies; 6+ messages in thread
From: David Abdurachmanov @ 2018-10-30  7:23 UTC (permalink / raw)
  To: Palmer Dabbelt, aou, linux-riscv, linux-kernel

On Mon, Oct 29, 2018 at 1:15 PM David Abdurachmanov
<david.abdurachmanov@gmail.com> wrote:
>
> Depends on:
> http://lists.infradead.org/pipermail/linux-riscv/2018-October/001931.html
>
> Why we don't have HAVE_SYSCALL_TRACEPOINTS in arch/riscv/Kconfig?
>

I looked this morning into Documentation/trace/ftrace-design.rst again.

Of all the things the document describes we are only missing
HAVE_SYSCALL_TRACEPOINTS in Kconfig, yet we already have it
implemented in ptrace.c (+ this minor fix). Reading document, I think,
we check all the boxes needed for HAVE_SYSCALL_TRACEPOINTS.

I assume it was just missed (?) and will do v2 later on.

david

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] riscv: fix trace_sys_exit hook
  2018-10-29 12:15 [PATCH] riscv: fix trace_sys_exit hook david.abdurachmanov
  2018-10-29 12:15 ` David Abdurachmanov
  2018-10-30  7:23 ` david.abdurachmanov
@ 2018-11-13  1:52 ` palmer
  2018-11-13  1:52   ` Palmer Dabbelt
  2 siblings, 1 reply; 6+ messages in thread
From: palmer @ 2018-11-13  1:52 UTC (permalink / raw)
  To: linux-riscv

On Mon, 29 Oct 2018 05:15:16 PDT (-0700), david.abdurachmanov at gmail.com wrote:
> Depends on:
> http://lists.infradead.org/pipermail/linux-riscv/2018-October/001931.html
>
> Why we don't have HAVE_SYSCALL_TRACEPOINTS in arch/riscv/Kconfig?
>
> Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
> ---
>  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 9f82a7e34c64..9db7d0076375 100644
> --- a/arch/riscv/kernel/ptrace.c
> +++ b/arch/riscv/kernel/ptrace.c
> @@ -120,6 +120,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
>  }

I'm dropping this onto next-audit on top of the other two.

Thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] riscv: fix trace_sys_exit hook
  2018-11-13  1:52 ` palmer
@ 2018-11-13  1:52   ` Palmer Dabbelt
  0 siblings, 0 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2018-11-13  1:52 UTC (permalink / raw)
  To: david.abdurachmanov; +Cc: linux-riscv, aou, linux-kernel, david.abdurachmanov

On Mon, 29 Oct 2018 05:15:16 PDT (-0700), david.abdurachmanov@gmail.com wrote:
> Depends on:
> http://lists.infradead.org/pipermail/linux-riscv/2018-October/001931.html
>
> Why we don't have HAVE_SYSCALL_TRACEPOINTS in arch/riscv/Kconfig?
>
> Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
> ---
>  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 9f82a7e34c64..9db7d0076375 100644
> --- a/arch/riscv/kernel/ptrace.c
> +++ b/arch/riscv/kernel/ptrace.c
> @@ -120,6 +120,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
>  }

I'm dropping this onto next-audit on top of the other two.

Thanks!

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29 12:15 [PATCH] riscv: fix trace_sys_exit hook david.abdurachmanov
2018-10-29 12:15 ` David Abdurachmanov
2018-10-30  7:23 ` david.abdurachmanov
2018-10-30  7:23   ` David Abdurachmanov
2018-11-13  1:52 ` palmer
2018-11-13  1:52   ` Palmer Dabbelt

Linux-RISC-V Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-riscv/0 linux-riscv/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-riscv linux-riscv/ https://lore.kernel.org/linux-riscv \
		linux-riscv@lists.infradead.org infradead-linux-riscv@archiver.kernel.org
	public-inbox-index linux-riscv


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-riscv


AGPL code for this site: git clone https://public-inbox.org/ public-inbox