]> 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)
commit84c61461d1b7dcfbfb91c733f230a48f03d016d5
tree439779300ddbf6452ae0a9ca1e00e6e043d2ebfb
parent6cff04cfa39c425903b30dba51df950ac4095f35
bpf: Switch BPF probe insns to bpf_probe_read_kernel

Commit cf537e6867cf ("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