ubuntu_bpf:setup - error: incomplete definition of type 'struct kallsym_iter' with L/kvm

Bug #2023769 reported by Kuba Pawlak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
New
Undecided
Unassigned

Bug Description

BPF tests need an update for kernel 6.x

progs/bpf_iter_ksym.c:46:37: error: incomplete definition of type 'struct kallsym_iter'
                BPF_SEQ_PRINTF(seq, "0x%x\n", iter->value - last_sym_value);
                                              ~~~~^
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:221:24: note: expanded from macro 'BPF_SEQ_PRINTF'
        ___bpf_fill(___param, args); \
                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:208:55: note: expanded from macro '___bpf_fill'
        ___bpf_apply(___bpf_fill, ___bpf_narg(args))(arr, 0, args)
                                                             ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:195:42: note: expanded from macro '___bpf_fill1'
#define ___bpf_fill1(arr, p, x) arr[p] = x
                                         ^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:50:14: error: incomplete definition of type 'struct kallsym_iter'
        value = iter->show_value ? iter->value : 0;
                ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:50:33: error: incomplete definition of type 'struct kallsym_iter'
        value = iter->show_value ? iter->value : 0;
                                   ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:54:13: error: incomplete definition of type 'struct kallsym_iter'
        type = iter->type;
               ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:56:10: error: incomplete definition of type 'struct kallsym_iter'
        if (iter->module_name[0]) {
            ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:57:14: error: incomplete definition of type 'struct kallsym_iter'
                type = iter->exported ? to_upper(type) : to_lower(type);
                       ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:59:28: error: incomplete definition of type 'struct kallsym_iter'
                               value, type, iter->name, iter->module_name);
                                            ~~~~^
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:221:24: note: expanded from macro 'BPF_SEQ_PRINTF'
        ___bpf_fill(___param, args); \
                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:208:55: note: expanded from macro '___bpf_fill'
        ___bpf_apply(___bpf_fill, ___bpf_narg(args))(arr, 0, args)
                                                             ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:198:79: note: expanded from macro '___bpf_fill4'
#define ___bpf_fill4(arr, p, x, args...) arr[p] = x; ___bpf_fill3(arr, p + 1, args)
                                                                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:197:79: note: expanded from macro '___bpf_fill3'
#define ___bpf_fill3(arr, p, x, args...) arr[p] = x; ___bpf_fill2(arr, p + 1, args)
                                                                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:196:51: note: expanded from macro '___bpf_fill2'
#define ___bpf_fill2(arr, p, x, args...) arr[p] = x; ___bpf_fill1(arr, p + 1, args)
                                                  ^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:59:28: error: incomplete definition of type 'struct kallsym_iter'
                               value, type, iter->name, iter->module_name);
                                            ~~~~^
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:221:24: note: expanded from macro 'BPF_SEQ_PRINTF'
        ___bpf_fill(___param, args); \
                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:208:55: note: expanded from macro '___bpf_fill'
        ___bpf_apply(___bpf_fill, ___bpf_narg(args))(arr, 0, args)
                                                             ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:198:79: note: expanded from macro '___bpf_fill4'
#define ___bpf_fill4(arr, p, x, args...) arr[p] = x; ___bpf_fill3(arr, p + 1, args)
                                                                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:197:79: note: expanded from macro '___bpf_fill3'
#define ___bpf_fill3(arr, p, x, args...) arr[p] = x; ___bpf_fill2(arr, p + 1, args)
                                                                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:196:51: note: expanded from macro '___bpf_fill2'
#define ___bpf_fill2(arr, p, x, args...) arr[p] = x; ___bpf_fill1(arr, p + 1, args)
                                                  ^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:59:40: error: incomplete definition of type 'struct kallsym_iter'
                               value, type, iter->name, iter->module_name);
                                                        ~~~~^
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:221:24: note: expanded from macro 'BPF_SEQ_PRINTF'
        ___bpf_fill(___param, args); \
                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:208:55: note: expanded from macro '___bpf_fill'
        ___bpf_apply(___bpf_fill, ___bpf_narg(args))(arr, 0, args)
                                                             ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:198:79: note: expanded from macro '___bpf_fill4'
#define ___bpf_fill4(arr, p, x, args...) arr[p] = x; ___bpf_fill3(arr, p + 1, args)
                                                                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:197:79: note: expanded from macro '___bpf_fill3'
#define ___bpf_fill3(arr, p, x, args...) arr[p] = x; ___bpf_fill2(arr, p + 1, args)
                                                                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:196:79: note: expanded from macro '___bpf_fill2'
#define ___bpf_fill2(arr, p, x, args...) arr[p] = x; ___bpf_fill1(arr, p + 1, args)
                                                                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:195:42: note: expanded from macro '___bpf_fill1'
#define ___bpf_fill1(arr, p, x) arr[p] = x
                                         ^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:61:57: error: incomplete definition of type 'struct kallsym_iter'
                BPF_SEQ_PRINTF(seq, "0x%llx %c %s ", value, type, iter->name);
                                                                  ~~~~^
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:221:24: note: expanded from macro 'BPF_SEQ_PRINTF'
        ___bpf_fill(___param, args); \
                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:208:55: note: expanded from macro '___bpf_fill'
        ___bpf_apply(___bpf_fill, ___bpf_narg(args))(arr, 0, args)
                                                             ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:197:79: note: expanded from macro '___bpf_fill3'
#define ___bpf_fill3(arr, p, x, args...) arr[p] = x; ___bpf_fill2(arr, p + 1, args)
                                                                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:196:79: note: expanded from macro '___bpf_fill2'
#define ___bpf_fill2(arr, p, x, args...) arr[p] = x; ___bpf_fill1(arr, p + 1, args)
                                                                              ^~~~
/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:195:42: note: expanded from macro '___bpf_fill1'
#define ___bpf_fill1(arr, p, x) arr[p] = x
                                         ^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:63:11: error: incomplete definition of type 'struct kallsym_iter'
        if (!iter->pos_arch_end || iter->pos_arch_end > iter->pos)
             ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:63:33: error: incomplete definition of type 'struct kallsym_iter'
        if (!iter->pos_arch_end || iter->pos_arch_end > iter->pos)
                                   ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:63:54: error: incomplete definition of type 'struct kallsym_iter'
        if (!iter->pos_arch_end || iter->pos_arch_end > iter->pos)
                                                        ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:65:16: error: incomplete definition of type 'struct kallsym_iter'
        else if (!iter->pos_mod_end || iter->pos_mod_end > iter->pos)
                  ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:65:37: error: incomplete definition of type 'struct kallsym_iter'
        else if (!iter->pos_mod_end || iter->pos_mod_end > iter->pos)
                                       ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:65:57: error: incomplete definition of type 'struct kallsym_iter'
        else if (!iter->pos_mod_end || iter->pos_mod_end > iter->pos)
                                                           ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:67:16: error: incomplete definition of type 'struct kallsym_iter'
        else if (!iter->pos_ftrace_mod_end || iter->pos_ftrace_mod_end > iter->pos)
                  ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:67:44: error: incomplete definition of type 'struct kallsym_iter'
        else if (!iter->pos_ftrace_mod_end || iter->pos_ftrace_mod_end > iter->pos)
                                              ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:67:71: error: incomplete definition of type 'struct kallsym_iter'
        else if (!iter->pos_ftrace_mod_end || iter->pos_ftrace_mod_end > iter->pos)
                                                                         ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
progs/bpf_iter_ksym.c:69:16: error: incomplete definition of type 'struct kallsym_iter'
        else if (!iter->pos_bpf_end || iter->pos_bpf_end > iter->pos)
                  ~~~~^
progs/bpf_iter.h:166:9: note: forward declaration of 'struct kallsym_iter'
        struct kallsym_iter *ksym;
               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [Makefile:541: /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/bpf_iter_ksym.bpf.o] Error 1
make: *** [Makefile:162: all] Error 2

Po-Hsu Lin (cypressyew)
tags: added: 6.2 lunar sru-20230515 ubuntu-bpf
summary: ubuntu_bpf:setup - error: incomplete definition of type 'struct
- kallsym_iter'
+ kallsym_iter' with L/kvm
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.