From: "Arnd Bergmann" <arnd@arndb.de>
To: "Nadav Amit" <nadav.amit@gmail.com>,
"Thomas Gleixner" <tglx@linutronix.de>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
linux-um@lists.infradead.org,
Linux-Arch <linux-arch@vger.kernel.org>,
linux-mm@kvack.org, "Andy Lutomirski" <luto@kernel.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
x86@kernel.org, "Richard Weinberger" <richard@nod.at>,
"Anton Ivanov" <anton.ivanov@cambridgegreys.com>,
"Johannes Berg" <johannes@sipsolutions.net>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Nadav Amit" <namit@vmware.com>,
"Steven Rostedt" <rostedt@goodmis.org>
Subject: Re: [PATCH 3/3] compiler: inline does not imply notrace
Date: Tue, 22 Nov 2022 21:09:08 +0100 [thread overview]
Message-ID: <de999ab8-78ff-44f7-aacc-68561897c6e2@app.fastmail.com> (raw)
In-Reply-To: <20221122195329.252654-4-namit@vmware.com>
On Tue, Nov 22, 2022, at 20:53, Nadav Amit wrote:
> From: Nadav Amit <namit@vmware.com>
>
> Functions that are marked as "inline" are currently also not tracable.
> Apparently, this has been done to prevent differences between different
> configs that caused different functions to be tracable on different
> platforms.
>
> Anyhow, this consideration is not very strong, and tying "inline" and
> "notrace" does not seem very beneficial. The "inline" keyword is just a
> hint, and many functions are currently not tracable due to this reason.
The original reason was listed in 93b3cca1ccd3 ("ftrace: Make all
inline tags also include notrace"), which describes
Commit 5963e317b1e9d2a ("ftrace/x86: Do not change stacks in DEBUG when
calling lockdep") prevented lockdep calls from the int3 breakpoint handler
from reseting the stack if a function that was called was in the process
of being converted for tracing and had a breakpoint on it. The idea is,
before calling the lockdep code, do a load_idt() to the special IDT that
kept the breakpoint stack from reseting. This worked well as a quick fix
for this kernel release, until a certain config caused a lockup in the
function tracer start up tests.
Investigating it, I found that the load_idt that was used to prevent
the int3 from changing stacks was itself being traced!
and this sounds like a much stronger reason than what you describe,
and I would expect your change to cause regressions in similar places.
It's possible that the right answer is that the affected functions
should be marked as __always_inline.
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next parent reply other threads:[~2022-11-22 20:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221122195329.252654-1-namit@vmware.com>
[not found] ` <20221122195329.252654-4-namit@vmware.com>
2022-11-22 20:09 ` Arnd Bergmann [this message]
2022-11-22 20:28 ` [PATCH 3/3] compiler: inline does not imply notrace Steven Rostedt
2022-11-22 20:51 ` Nadav Amit
2022-11-29 2:36 ` Nadav Amit
2022-11-29 4:15 ` Steven Rostedt
2022-11-29 4:25 ` Nadav Amit
2022-11-29 15:06 ` Steven Rostedt
2022-11-29 18:02 ` Nadav Amit
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=de999ab8-78ff-44f7-aacc-68561897c6e2@app.fastmail.com \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=anton.ivanov@cambridgegreys.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-um@lists.infradead.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=nadav.amit@gmail.com \
--cc=namit@vmware.com \
--cc=richard@nod.at \
--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