mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
bpf: Remove !func_info and !line_info check from test_btf and bpftool
kernel can provide the func_info and line_info even it fails the btf_dump_raw_ok() test because they don't contain kernel address. This patch removes the corresponding '== 0' test. Signed-off-by: Martin KaFai Lau <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
This commit is contained in:
parent
9e794163a6
commit
177e77169b
3 changed files with 1 additions and 19 deletions
|
|
@ -3948,12 +3948,6 @@ static int test_get_finfo(const struct prog_info_raw_test *test,
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (CHECK(!info.func_info,
|
||||
"info.func_info == 0. kernel.kptr_restrict is set?")) {
|
||||
err = -1;
|
||||
goto done;
|
||||
}
|
||||
|
||||
finfo = func_info;
|
||||
for (i = 0; i < test->func_info_cnt; i++) {
|
||||
if (CHECK(finfo->type_id != test->func_info[i][1],
|
||||
|
|
@ -4077,7 +4071,6 @@ static int test_get_linfo(const struct prog_info_raw_test *test,
|
|||
* Other fields are not the concern of this test.
|
||||
*/
|
||||
if (CHECK(err == -1 ||
|
||||
!info.line_info ||
|
||||
info.nr_line_info != cnt ||
|
||||
(jited_cnt && !info.jited_line_info) ||
|
||||
info.nr_jited_line_info != jited_cnt ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue