diff options
author | Pu Lehui <pulehui@huawei.com> | 2025-01-04 01:39:46 +0000 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2025-01-08 09:38:41 -0800 |
commit | ca3c4f646a9fc7d23b30c70e6663eaa38ac746af (patch) | |
tree | b17d99a7aa753ecc31f50627e48dcfbc09206de4 /kernel/bpf/arraymap.c | |
parent | b8b1e30016260aba338a65fdcc2bfd50933c6f0a (diff) |
bpf: Move out synchronize_rcu_tasks_trace from mutex CS
Commit ef1b808e3b7c ("bpf: Fix UAF via mismatching bpf_prog/attachment
RCU flavors") resolved a possible UAF issue in uprobes that attach
non-sleepable bpf prog by explicitly waiting for a tasks-trace-RCU grace
period. But, in the current implementation, synchronize_rcu_tasks_trace
is included within the mutex critical section, which increases the
length of the critical section and may affect performance. So let's move
out synchronize_rcu_tasks_trace from mutex CS.
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20250104013946.1111785-1-pulehui@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions