OSDN Git Service

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)
commit6e07a6341277a1dbdf5ed0c41921033c234c1635
tree439779300ddbf6452ae0a9ca1e00e6e043d2ebfb
parent6ae08ae3dea2cfa03dd3665a3c8475c2d429ef47
bpf: Switch BPF probe insns to bpf_probe_read_kernel

Commit 2a02759ef5f8 ("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