lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221115101837.37da9d1e@gandalf.local.home>
Date:   Tue, 15 Nov 2022 10:18:37 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc:     Jianlin Lv <iecedge@...il.com>, alison.schofield@...el.com,
        davidgow@...gle.com, thunder.leizhen@...wei.com, jianlv@...y.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tracepoint: Allow livepatch module add trace event

On Wed, 16 Nov 2022 00:07:07 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:

> BTW, now the kprobe_ftrace_handler() uses ftrace_test_recursion_trylock()
> to avoid ftrace recursion, is that OK for this case?

Note, the ftrace_test_recursion_trylock() only prevents "same context"
recursion. That is, it will not let normal context recurse into normal
context, or interrupt context recurse into interrupt context.

It has the logic of breaking up into 4 levels:

 1. normal
 2. softirq
 3. irq
 4. NMI

It allows the high levels to recurse into lower levels
 (e.g. irq context into normal context)

Thus, the code within the ftrace_test_recursion_trylock() must itself be
re-entrant to handle being called from different contexts.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ