selftests/bpf: Add checks for X__elf_bytes() skeleton helper
mainline inclusion from mainline-5.16-rc1 commit 980a1a4c 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=980a1a4c342f353a62d64174d0a6a9466a741273 ------------------------------------------------- This patch adds two checks for the X__elf_bytes BPF skeleton helper method. The first asserts that the pointer returned from the helper method is valid, the second asserts that the provided size pointer is set. Signed-off-by: NMatt Smith <alastorze@fb.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210901194439.3853238-4-alastorze@fb.com (cherry picked from commit 980a1a4c) Signed-off-by: NWang Yufen <wangyufen@huawei.com>
Showing
想要评论请 注册 或 登录