-
由 Andrii Nakryiko 提交于
mainline inclusion from mainline-5.12-rc1 commit 792001f4 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=792001f4f7aa036b1f1c1ed7bce44bb49126208a ------------------------------------------------- Add BPF_CORE_READ_USER(), BPF_CORE_READ_USER_STR() and their _INTO() variations to allow reading CO-RE-relocatable kernel data structures from the user-space. One of such cases is reading input arguments of syscalls, while reaping the benefits of CO-RE relocations w.r.t. handling 32/64 bit conversions and handling missing/new fields in UAPI data structs. Suggested-by: NGilad Reti <gilad.reti@gmail.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20201218235614.2284956-2-andrii@kernel.orgSigned-off-by: NAlexei Starovoitov <ast@kernel.org> (cherry picked from commit 792001f4) Signed-off-by: NWang Yufen <wangyufen@huawei.com>
4c64672e