mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Brian Gerst <brgerst@gmail.com>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Andy Lutomirski <luto@kernel.org>, Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] tracing/x86: fix trace event registration for syscalls without arguments
Date: Mon, 27 Apr 2020 15:13:48 -0400	[thread overview]
Message-ID: <20200427151348.6a55abd9@gandalf.local.home> (raw)
In-Reply-To: <adafb601-d1e7-b95b-ae31-fa3844a48851@yandex-team.ru>

On Mon, 27 Apr 2020 16:16:20 +0300
Konstantin Khlebnikov <khlebnikov@yandex-team.ru> wrote:

> Bump, bug still present in 5.7.0-rc3
> 
> root@kernel0:~# uname -r
> 5.7.0-rc3-test
> 
> root@kernel0:~# ls -d /sys/kernel/tracing/events/syscalls/sys_enter_{sync,fsync}
> ls: cannot access '/sys/kernel/tracing/events/syscalls/sys_enter_sync': No such file or directory
> /sys/kernel/tracing/events/syscalls/sys_enter_fsync
> 
> On 08/04/2020 21.13, Konstantin Khlebnikov wrote:
> > Syscalls without arguments now has no ABI subs, instead of that macro
> > SYSCALL_DEFINE0() defines __abi_sys_name as aliase to __do_sys_name.
> > 
> > As a result in find_syscall_meta() kallsyms_lookup() returns
> > "__do_sys_name" which does not match with declared trace event.
> > 
> > Also see commit 1c758a2202a6 ("tracing/x86: Update syscall trace events
> > to handle new prefixed syscall func names")

This is the first I've seen of this patch.

> > 
> > Fixes: d2b5de495ee9 ("x86/entry: Refactor SYSCALL_DEFINE0 macros")
> > Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> > ---
> >   arch/x86/include/asm/ftrace.h |    5 +++--
> >   1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h
> > index 85be2f506272..70b96cae5b42 100644
> > --- a/arch/x86/include/asm/ftrace.h
> > +++ b/arch/x86/include/asm/ftrace.h
> > @@ -61,11 +61,12 @@ static inline bool arch_syscall_match_sym_name(const char *sym, const char *name
> >   {
> >   	/*
> >   	 * Compare the symbol name with the system call name. Skip the
> > -	 * "__x64_sys", "__ia32_sys" or simple "sys" prefix.
> > +	 * "__x64_sys", "__ia32_sys", "__do_sys" or simple "sys" prefix.
> >   	 */
> >   	return !strcmp(sym + 3, name + 3) ||
> >   		(!strncmp(sym, "__x64_", 6) && !strcmp(sym + 9, name + 3)) ||
> > -		(!strncmp(sym, "__ia32_", 7) && !strcmp(sym + 10, name + 3));
> > +		(!strncmp(sym, "__ia32_", 7) && !strcmp(sym + 10, name + 3)) ||
> > +		(!strncmp(sym, "__do_sys", 8) && !strcmp(sym + 8, name + 3));
> >   }

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

> >   
> >   #ifndef COMPILE_OFFSETS
> >   


  reply	other threads:[~2020-04-27 19:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 18:13 Konstantin Khlebnikov
2020-04-27 13:16 ` Konstantin Khlebnikov
2020-04-27 19:13   ` Steven Rostedt [this message]
2020-04-27 14:44 ` Thomas Gleixner
2020-04-27 14:55   ` Konstantin Khlebnikov
2020-05-01 18:22 ` [tip: x86/urgent] ftrace/x86: Fix " tip-bot2 for Konstantin Khlebnikov

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=20200427151348.6a55abd9@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=brgerst@gmail.com \
    --cc=khlebnikov@yandex-team.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®