linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix next-audit branch
@ 2018-12-10 20:43 David Abdurachmanov
  2018-12-10 20:43 ` [PATCH 1/2] riscv: define NR_syscalls in unistd.h David Abdurachmanov
  2018-12-10 20:43 ` [PATCH 2/2] riscv: define CREATE_TRACE_POINTS in ptrace.c David Abdurachmanov
  0 siblings, 2 replies; 4+ messages in thread
From: David Abdurachmanov @ 2018-12-10 20:43 UTC (permalink / raw)
  To: palmer, aou, linux-kernel, linux-riscv; +Cc: David Abdurachmanov

Intel kbuild test robot reported on Dec 8th, 2018 that next-audit is
broken. This was with riscv-allmodconfig config.

There were two issues found:
- We don't generate functions needed for trace events;
- We are missing NR_syscalls macro used by kernel/trace.

David Abdurachmanov (2):
  riscv: define NR_syscalls in unistd.h
  riscv: define CREATE_TRACE_POINTS in ptrace.c

 arch/riscv/include/asm/unistd.h | 2 ++
 arch/riscv/kernel/ptrace.c      | 2 ++
 2 files changed, 4 insertions(+)

-- 
2.19.2


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

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

* [PATCH 1/2] riscv: define NR_syscalls in unistd.h
  2018-12-10 20:43 [PATCH 0/2] Fix next-audit branch David Abdurachmanov
@ 2018-12-10 20:43 ` David Abdurachmanov
  2018-12-14  1:57   ` Olof Johansson
  2018-12-10 20:43 ` [PATCH 2/2] riscv: define CREATE_TRACE_POINTS in ptrace.c David Abdurachmanov
  1 sibling, 1 reply; 4+ messages in thread
From: David Abdurachmanov @ 2018-12-10 20:43 UTC (permalink / raw)
  To: palmer, aou, linux-kernel, linux-riscv; +Cc: David Abdurachmanov

This macro is used by kernel/trace/{trace.h,trace_syscalls.c} if we
have CONFIG_FTRACE_SYSCALLS enabled.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
Fixes: b78002b395b4 ("riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig")
---
 arch/riscv/include/asm/unistd.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
index fef96f117b4d..073ee80fdf74 100644
--- a/arch/riscv/include/asm/unistd.h
+++ b/arch/riscv/include/asm/unistd.h
@@ -19,3 +19,5 @@
 #define __ARCH_WANT_SYS_CLONE
 
 #include <uapi/asm/unistd.h>
+
+#define NR_syscalls (__NR_syscalls)
-- 
2.19.2


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

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

* [PATCH 2/2] riscv: define CREATE_TRACE_POINTS in ptrace.c
  2018-12-10 20:43 [PATCH 0/2] Fix next-audit branch David Abdurachmanov
  2018-12-10 20:43 ` [PATCH 1/2] riscv: define NR_syscalls in unistd.h David Abdurachmanov
@ 2018-12-10 20:43 ` David Abdurachmanov
  1 sibling, 0 replies; 4+ messages in thread
From: David Abdurachmanov @ 2018-12-10 20:43 UTC (permalink / raw)
  To: palmer, aou, linux-kernel, linux-riscv; +Cc: David Abdurachmanov

Define CREATE_TRACE_POINTS in order to create functions and structures
for the trace events. This is needed if HAVE_SYSCALL_TRACEPOINTS and
CONFIG_FTRACE_SYSCALLS are enabled, otherwise we get linking errors:

[..]
  MODPOST vmlinux.o
kernel/trace/trace_syscalls.o: In function `.L0 ':
trace_syscalls.c:(.text+0x1152): undefined reference to `__tracepoint_sys_enter'
trace_syscalls.c:(.text+0x126c): undefined reference to `__tracepoint_sys_enter'
trace_syscalls.c:(.text+0x1328): undefined reference to `__tracepoint_sys_enter'
trace_syscalls.c:(.text+0x14aa): undefined reference to `__tracepoint_sys_enter'
trace_syscalls.c:(.text+0x1684): undefined reference to `__tracepoint_sys_exit'
trace_syscalls.c:(.text+0x17a0): undefined reference to `__tracepoint_sys_exit'
trace_syscalls.c:(.text+0x185c): undefined reference to `__tracepoint_sys_exit'
trace_syscalls.c:(.text+0x19de): undefined reference to `__tracepoint_sys_exit'
arch/riscv/kernel/ptrace.o: In function `.L0 ':
ptrace.c:(.text+0x4dc): undefined reference to `__tracepoint_sys_enter'
ptrace.c:(.text+0x632): undefined reference to `__tracepoint_sys_exit'
make: *** [Makefile:1036: vmlinux] Error 1

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
Fixes: b78002b395b4 ("riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig")
---
 arch/riscv/kernel/ptrace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
index 60f1e02eed36..32a374a1b31a 100644
--- a/arch/riscv/kernel/ptrace.c
+++ b/arch/riscv/kernel/ptrace.c
@@ -24,6 +24,8 @@
 #include <linux/sched.h>
 #include <linux/sched/task_stack.h>
 #include <linux/tracehook.h>
+
+#define CREATE_TRACE_POINTS
 #include <trace/events/syscalls.h>
 
 enum riscv_regset {
-- 
2.19.2


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

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

* Re: [PATCH 1/2] riscv: define NR_syscalls in unistd.h
  2018-12-10 20:43 ` [PATCH 1/2] riscv: define NR_syscalls in unistd.h David Abdurachmanov
@ 2018-12-14  1:57   ` Olof Johansson
  0 siblings, 0 replies; 4+ messages in thread
From: Olof Johansson @ 2018-12-14  1:57 UTC (permalink / raw)
  To: David Abdurachmanov
  Cc: linux-riscv, Palmer Dabbelt, Linux Kernel Mailing List, Albert Ou

On Tue, Dec 11, 2018 at 4:44 AM David Abdurachmanov
<david.abdurachmanov@gmail.com> wrote:
>
> This macro is used by kernel/trace/{trace.h,trace_syscalls.c} if we
> have CONFIG_FTRACE_SYSCALLS enabled.
>
> Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
> Fixes: b78002b395b4 ("riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig")

Reviewed-by: Olof Johansson <olof@lixom.net>


-Olof

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

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

end of thread, other threads:[~2018-12-14  1:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 20:43 [PATCH 0/2] Fix next-audit branch David Abdurachmanov
2018-12-10 20:43 ` [PATCH 1/2] riscv: define NR_syscalls in unistd.h David Abdurachmanov
2018-12-14  1:57   ` Olof Johansson
2018-12-10 20:43 ` [PATCH 2/2] riscv: define CREATE_TRACE_POINTS in ptrace.c David Abdurachmanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).