]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Switch BPF probe insns to bpf_probe_read_kernel
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 1 Nov 2019 23:18:00 +0000 (00:18 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 2 Nov 2019 19:39:12 +0000 (12:39 -0700)
commitab1fe8c30889375d55d31a0054540ca648d97e5a
tree439779300ddbf6452ae0a9ca1e00e6e043d2ebfb
parent43bfd5db4eb562569e15581b56d20db83a5c2c72
bpf: Switch BPF probe insns to bpf_probe_read_kernel

Commit 39f6a120e988 ("bpf: Add support for BTF pointers to interpreter")
explicitly states that the pointer to BTF object is a pointer to a kernel
object or NULL. Therefore we should also switch to using the strict kernel
probe helper which is restricted to kernel addresses only when architectures
have non-overlapping address spaces.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/d2b90827837685424a4b8008dfe0460558abfada.1572649915.git.daniel@iogearbox.net
kernel/bpf/core.c