archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <>
To: Miroslav Benes <>
	Masami Hiramatsu <>,
	Andrew Morton <>,
	Josh Poimboeuf <>,
	Jiri Kosina <>, Petr Mladek <>,
	Joe Lawrence <>,
Subject: Re: [PATCH 6/9] livepatch/ftrace: Add recursion protection to the ftrace callback
Date: Fri, 30 Oct 2020 08:28:31 -0400	[thread overview]
Message-ID: <20201030082831.5142be16@oasis.local.home> (raw)
In-Reply-To: <20201029103744.0f7f52dc@gandalf.local.home>

On Thu, 29 Oct 2020 10:37:44 -0400
Steven Rostedt <> wrote:

> I also plan on adding code that reports when recursion has happened,
> because even if it's not a problem, recursion adds extra overhead.

I did the above (will be posting that later, maybe next week), and
found two bugs with the recursion code. :-/

One was in the nmi handling, where it never cleared the nmi bit
(because it was zero, and thus ignored), and that caused all functions
in NMI handlers to not be traced (because it thought it was a

The second was the recursion algorithm depends on the preempt_count()
being accurate, but when it transitions between context, and there's
tracing in that transition, it could falsely record it as a recursion.

I have a fix for both of these bugs and will be sending them up marked
for stable after I finish testing them.

This goes to show that the recursion reported should be implemented
(but that will be for the next merge window).

-- Steve

  reply	other threads:[~2020-10-30 12:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2020-10-28 11:52 ` [PATCH 6/9] livepatch/ftrace: Add recursion protection to the ftrace callback Steven Rostedt
2020-10-29 13:51   ` Miroslav Benes
2020-10-29 14:37     ` Steven Rostedt
2020-10-30 12:28       ` Steven Rostedt [this message]
2020-10-29 14:57     ` Petr Mladek
2020-10-29 15:03       ` Miroslav Benes
2020-10-29 18:24       ` Steven Rostedt
2020-10-30  9:48         ` Miroslav Benes
2020-10-30 10:41           ` Petr Mladek

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201030082831.5142be16@oasis.local.home \ \ \ \ \ \ \ \ \ \ \

* 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).