From: Naresh Kamboju <naresh.kamboju@linaro.org>
To: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Cc: open list <linux-kernel@vger.kernel.org>,
rostedt@goodmis.org, mingo@redhat.com, mhiramat@kernel.org
Subject: Re: File not found: /sys/kernel/debug/tracing/events/syscalls
Date: Wed, 28 Nov 2018 07:49:13 +0530 [thread overview]
Message-ID: <CA+G9fYtS+0xNvjov+o8kh-Fp2O7u5ChUd2ystc6PYxVo4n=Yfg@mail.gmail.com> (raw)
In-Reply-To: <CAA93ih1-xpm1P0suT6SNCc_ARvAfyBEwb0-uKFikM5k4CvG8jg@mail.gmail.com>
Hi Masami San,
Thanks for the patch it solved the problem.
On Tue, 27 Nov 2018 at 21:41, Masami Hiramatsu
<masami.hiramatsu@linaro.org> wrote:
>
> Hi,
>
> I found that the commit 4378a7d4be30 ("arm64: implement syscall
> wrappers") changed
> the syscall wrapper function names by adding __arm64_ prefix. So arm64
> kernel should
> have its own arch_syscall_match_sym_name().
arm64: ftrace: Fix to enable syscall events on arm64
From: Masami Hiramatsu <mhiramat@kernel.org>
Since commit 4378a7d4be30 ("arm64: implement syscall wrappers")
introduced "__arm64_" prefix to all syscall wrapper symbols in
sys_call_table, syscall tracer can not find corresponding
metadata from syscall name. In the result, we have no syscall
ftrace events on arm64 kernel, and some bpf testcases are failed
on arm64.
To fix this issue, this introduces custom
arch_syscall_match_sym_name() which skips first 8 bytes when
comparing the syscall and symbol names.
Fixes: 4378a7d4be30 ("arm64: implement syscall wrappers")
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
---
arch/arm64/include/asm/ftrace.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/include/asm/ftrace.h b/arch/arm64/include/asm/ftrace.h
index caa955f10e19..a710f79db442 100644
--- a/arch/arm64/include/asm/ftrace.h
+++ b/arch/arm64/include/asm/ftrace.h
@@ -56,6 +56,15 @@ static inline bool
arch_trace_is_compat_syscall(struct pt_regs *regs)
{
return is_compat_task();
}
+
+#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
+
+static inline bool arch_syscall_match_sym_name(const char *sym,
+ const char *name)
+{
+ /* Since all syscall functions have __arm64_ prefix, we must skip it */
+ return !strcmp(sym + 8, name);
+}
#endif /* ifndef __ASSEMBLY__ */
#endif /* __ASM_FTRACE_H */
>
> Thank you,
>
> 2018年11月28日(水) 0:22 Naresh Kamboju <naresh.kamboju@linaro.org>:
> >
> > While debugging the selftests/bpf: get_cgroup_id_user test failure on arm64
> > where the test is expecting trace file
> > /sys/kernel/debug/tracing/events/syscalls/sys_enter_nanosleep/id
> > but this path not enabled after enabling required kernel configuration also.
> > CONFIG_FTRACE_SYSCALLS=y
> >
> > strace output:
> > open(\"/sys/kernel/debug/tracing/events/syscalls/sys_enter_nanosleep/id\",
> > O_RDONLY) = -1 ENOENT (No such file or directory)
> >
> > This problem noticed on Linux mainline kernel version 4.20.0-rc3.
> >
> > Best regards
> > Naresh Kamboju
>
>
>
> --
> Masami Hiramatsu
prev parent reply other threads:[~2018-11-28 2:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-27 15:22 File not found: /sys/kernel/debug/tracing/events/syscalls Naresh Kamboju
2018-11-27 16:11 ` Masami Hiramatsu
2018-11-27 16:29 ` [PATCH] arm64: ftrace: Fix to enable syscall events on arm64 Masami Hiramatsu
2018-11-27 16:32 ` Steven Rostedt
2018-11-27 16:58 ` Will Deacon
2018-11-27 18:18 ` Steven Rostedt
2018-11-27 23:55 ` Masami Hiramatsu
2018-11-28 12:05 ` Will Deacon
2018-11-28 14:22 ` Steven Rostedt
2018-11-28 19:59 ` Will Deacon
2018-11-29 5:38 ` Masami Hiramatsu
2018-11-29 5:39 ` [PATCH v2] " Masami Hiramatsu
2018-11-29 16:53 ` Catalin Marinas
2018-11-29 22:13 ` Masami Hiramatsu
2018-11-28 2:19 ` Naresh Kamboju [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+G9fYtS+0xNvjov+o8kh-Fp2O7u5ChUd2ystc6PYxVo4n=Yfg@mail.gmail.com' \
--to=naresh.kamboju@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu@linaro.org \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).