From: Nadav Amit <nadav.amit@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Steven Rostedt (Google)" <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>, X86 ML <x86@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC PATCH] x86/syscalls: allow tracing of __do_sys_[syscall] functions
Date: Tue, 20 Sep 2022 18:31:24 -0700 [thread overview]
Message-ID: <72644F1F-7A13-4CC1-8C24-BE271323FE94@gmail.com> (raw)
In-Reply-To: <D0F82355-EB17-46A3-82AA-CC0B26344A08@gmail.com>
Just following my questions with the answers I figured out, just to save
others time.
On Sep 20, 2022, at 9:48 AM, Nadav Amit <nadav.amit@gmail.com> wrote:
> On Sep 20, 2022, at 4:02 AM, Peter Zijlstra <peterz@infradead.org> wrote:
>
>> On Mon, Sep 19, 2022 at 07:35:42PM -0700, Nadav Amit wrote:
>>
>>> 1. What is the reason that inline functions are marked with notrace?
>>
>> IIRC the concern is that a notrace function using an inline function;
>> GCC deciding to not inline and then still hitting tracing.
>>
>> For noinstr we've mandated __always_inline to avoid this problem. The
>> direct advantage is that those inlined into instrumented code get, well,
>> instrumented.
Commit 45959ee7aa645 (“ftrace: Do not function trace inlined functions”)
gives two reasons which correspond with what you were saying: (1)
consistency and (2) function that should not be traced are mostly marked as
inline.
I am not sure I fully agree with the arguments, specifically the consistency
(any function might be inlined and not traceable). But I am too afraid/lazy
to cause damage and fix it. I will remove the inline and play a bit with the
kernel to see how it behaves.
>>> 2. Is probing function that is called from do_idle() supposed to work, or
>>> should the kernel prevent it?
>>
>> Should work for some :-) Specifically it doesn't work for those that
>> disable RCU, and that's (largely) being fixed here:
>>
>> https://lore.kernel.org/all/20220919095939.761690562@infradead.org/T/#u
>>
>> Although looking at it just now, I think I missed a spot.. lemme go fix
>> ;-)
I did not try your patches, but I do think I figured out what’s wrong and
sent a patch.
https://lore.kernel.org/lkml/EECE6FD7-FC3D-40E2-A957-151A1BE2B2F9@vmware.com/T/#t
Thanks again,
Nadav
next prev parent reply other threads:[~2022-09-21 1:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 13:52 Nadav Amit
2022-09-20 2:35 ` Nadav Amit
2022-09-20 11:02 ` Peter Zijlstra
2022-09-20 16:48 ` Nadav Amit
2022-09-21 1:31 ` Nadav Amit [this message]
2022-09-26 16:34 ` Steven Rostedt
2022-09-20 9:47 ` Peter Zijlstra
2022-09-26 16:36 ` Steven Rostedt
2022-09-26 16:46 ` Steven Rostedt
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=72644F1F-7A13-4CC1-8C24-BE271323FE94@gmail.com \
--to=nadav.amit@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®