summaryrefslogtreecommitdiff
path: root/block/elevator.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2022-06-15 14:21:17 +0300
committerAlexei Starovoitov <ast@kernel.org>2022-06-17 05:42:21 +0300
commiteb5fb0325698d05f0bf78d322de82c451a3685a2 (patch)
treec0f26fc64a8678d3317c0d88c55f1aa1e746afcc /block/elevator.h
parenteb1b2985fe5c5f02e43e4c0d47bbe7ed835007f3 (diff)
downloadlinux-eb5fb0325698d05f0bf78d322de82c451a3685a2.tar.xz
bpf: Force cookies array to follow symbols sorting
When user specifies symbols and cookies for kprobe_multi link interface it's very likely the cookies will be misplaced and returned to wrong functions (via get_attach_cookie helper). The reason is that to resolve the provided functions we sort them before passing them to ftrace_lookup_symbols, but we do not do the same sort on the cookie values. Fixing this by using sort_r function with custom swap callback that swaps cookie values as well. Fixes: 0236fec57a15 ("bpf: Resolve symbols with ftrace_lookup_symbols for kprobe multi link") Signed-off-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20220615112118.497303-4-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'block/elevator.h')
0 files changed, 0 insertions, 0 deletions