Skip to content
Commit dfd6e04d authored by Daniel Borkmann's avatar Daniel Borkmann Committed by Paul Gortmaker
Browse files

bpf: Make use of probe_user_write in probe write helper

commit eb1b6688 upstream.

Convert the bpf_probe_write_user() helper to probe_user_write() such that
writes are not attempted under KERNEL_DS anymore which is buggy as kernel
and user space pointers can have overlapping addresses. Also, given we have
the access_ok() check inside probe_user_write(), the helper doesn't need
to do it twice.

Fixes: 96ae5227

 ("bpf: Add bpf_probe_write_user BPF helper to be called in tracers")
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/841c461781874c07a0ee404a454c3bc0459eed30.1572649915.git.daniel@iogearbox.net
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 88a5a815
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment