]> git.ipfire.org Git - thirdparty/linux.git/commit
ftrace: Add update_ftrace_direct_add function
authorJiri Olsa <jolsa@kernel.org>
Tue, 30 Dec 2025 14:50:05 +0000 (15:50 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 28 Jan 2026 19:44:48 +0000 (11:44 -0800)
commit05dc5e9c1fe156fd9dddc4c2f81e8fc6c7e50eb5
treeee389576f04b6382c2d1b42c755020d2d4f81c1e
parent0e860d07c29d70205d5ad48456ac7a133ccfb293
ftrace: Add update_ftrace_direct_add function

Adding update_ftrace_direct_add function that adds all entries
(ip -> addr) provided in hash argument to direct ftrace ops
and updates its attachments.

The difference to current register_ftrace_direct is
 - hash argument that allows to register multiple ip -> direct
   entries at once
 - we can call update_ftrace_direct_add multiple times on the
   same ftrace_ops object, becase after first registration with
   register_ftrace_function_nolock, it uses ftrace_update_ops to
   update the ftrace_ops object

This change will allow us to have simple ftrace_ops for all bpf
direct interface users in following changes.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Link: https://lore.kernel.org/bpf/20251230145010.103439-5-jolsa@kernel.org
include/linux/ftrace.h
kernel/trace/ftrace.c