uprobes: encapsulate preparation of uprobe args buffer
authorAndrii Nakryiko <andrii@kernel.org>
Mon, 18 Mar 2024 18:17:26 +0000 (11:17 -0700)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Wed, 1 May 2024 14:18:46 +0000 (23:18 +0900)
commit3eaea21b4d27cff0017c20549aeb53034c58fc23
tree639da74dfad3aa4c8f519eca8233d72145f0b802
parente67572cd2204894179d89bd7b984072f19313b03
uprobes: encapsulate preparation of uprobe args buffer

Move the logic of fetching temporary per-CPU uprobe buffer and storing
uprobes args into it to a new helper function. Store data size as part
of this buffer, simplifying interfaces a bit, as now we only pass single
uprobe_cpu_buffer reference around, instead of pointer + dsize.

This logic was duplicated across uprobe_dispatcher and uretprobe_dispatcher,
and now will be centralized. All this is also in preparation to make
this uprobe_cpu_buffer handling logic optional in the next patch.

Link: https://lore.kernel.org/all/20240318181728.2795838-2-andrii@kernel.org/
[Masami: update for v6.9-rc3 kernel]

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
kernel/trace/trace_uprobe.c