diff options
author | Yafang Shao <laoar.shao@gmail.com> | 2023-07-09 05:56:25 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-09-19 13:20:07 +0300 |
commit | b275f0ae3598936e37b2cd3b0e862dc40e27be00 (patch) | |
tree | 52e2365280515cf9ebcd242a16e7a2eed71ef50a /include/linux | |
parent | 514116de91c447b3cfe755cd62ab49d88d391774 (diff) | |
download | linux-b275f0ae3598936e37b2cd3b0e862dc40e27be00.tar.xz |
bpf: Clear the probe_addr for uprobe
[ Upstream commit 5125e757e62f6c1d5478db4c2b61a744060ddf3f ]
To avoid returning uninitialized or random values when querying the file
descriptor (fd) and accessing probe_addr, it is necessary to clear the
variable prior to its use.
Fixes: 41bdc4b40ed6 ("bpf: introduce bpf subcommand BPF_TASK_FD_QUERY")
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Acked-by: Yonghong Song <yhs@fb.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20230709025630.3735-6-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/trace_events.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index e418065c2c90..6fb20722f49b 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -745,7 +745,8 @@ extern int perf_uprobe_init(struct perf_event *event, extern void perf_uprobe_destroy(struct perf_event *event); extern int bpf_get_uprobe_info(const struct perf_event *event, u32 *fd_type, const char **filename, - u64 *probe_offset, bool perf_type_tracepoint); + u64 *probe_offset, u64 *probe_addr, + bool perf_type_tracepoint); #endif extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, char *filter_str); |