selftests/bpf: Pass page size from userspace in sockopt_sk
mainline inclusion from mainline-5.13-rc1 commit 361d3202 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=361d32028c7d52d28d7f0562193a2f4a41d10351 ------------------------------------------------- Since there is no convenient way for bpf program to get PAGE_SIZE from inside of the kernel, pass the value from userspace. Zero-initialize the variable in bpf prog, otherwise it will cause problems on some versions of Clang. Signed-off-by: NYauheni Kaliuta <yauheni.kaliuta@redhat.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210408061310.95877-3-yauheni.kaliuta@redhat.com (cherry picked from commit 361d3202) Signed-off-by: NWang Yufen <wangyufen@huawei.com>
Showing
想要评论请 注册 或 登录