]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add bpf_probe_read_{user, kernel}_str() to do_refine_retval_range
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 15 May 2020 10:11:17 +0000 (12:11 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 15 May 2020 15:10:36 +0000 (08:10 -0700)
commit438e3658d1ea753a160c7feb746a79ee8c7d4145
treeb8872b7cca31323beb60b824bbd073bd5b34197c
parent42d31d665587706b4d1fd871ddd4d6946d1e4729
bpf: Add bpf_probe_read_{user, kernel}_str() to do_refine_retval_range

Given bpf_probe_read{,str}() BPF helpers are now only available under
CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE, we need to add the drop-in
replacements of bpf_probe_read_{kernel,user}_str() to do_refine_retval_range()
as well to avoid hitting the same issue as in d055298bb70d9 ("bpf/verifier:
refine retval R0 state for bpf_get_stack helper").

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20200515101118.6508-3-daniel@iogearbox.net
kernel/bpf/verifier.c