Issue still exist in 5.6.0-1011.11
Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h' progs/test_xdp_bpf2bpf.c:11:18: warning: unknown attribute 'preserve_access_index' ignored [-Wunknown-attributes] } __attribute__((preserve_access_index)); ^ progs/test_xdp_bpf2bpf.c:19:18: warning: unknown attribute 'preserve_access_index' ignored [-Wunknown-attributes] } __attribute__((preserve_access_index)); ^ progs/test_xdp_bpf2bpf.c:28:18: warning: unknown attribute 'preserve_access_index' ignored [-Wunknown-attributes] } __attribute__((preserve_access_index)); ^ 3 warnings generated. progs/test_core_reloc_bitfields_direct.c:53:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->ub1 = BPF_CORE_READ_BITFIELD(in, ub1); ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:68:36: note: expanded from macro 'BPF_CORE_READ_BITFIELD' const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \ ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_direct.c:54:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->ub2 = BPF_CORE_READ_BITFIELD(in, ub2); ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:68:36: note: expanded from macro 'BPF_CORE_READ_BITFIELD' const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \ ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_direct.c:55:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->ub7 = BPF_CORE_READ_BITFIELD(in, ub7); ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:68:36: note: expanded from macro 'BPF_CORE_READ_BITFIELD' const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \ ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_direct.c:56:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->sb4 = BPF_CORE_READ_BITFIELD(in, sb4); ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:68:36: note: expanded from macro 'BPF_CORE_READ_BITFIELD' const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \ ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_direct.c:57:14: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->sb20 = BPF_CORE_READ_BITFIELD(in, sb20); ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:68:36: note: expanded from macro 'BPF_CORE_READ_BITFIELD' const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \ ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_direct.c:58:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->u32 = BPF_CORE_READ_BITFIELD(in, u32); ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:68:36: note: expanded from macro 'BPF_CORE_READ_BITFIELD' const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \ ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_direct.c:59:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->s32 = BPF_CORE_READ_BITFIELD(in, s32); ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:68:36: note: expanded from macro 'BPF_CORE_READ_BITFIELD' const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \ ^ /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ 7 errors generated. llc-9: error: llc-9: :1:1: error: expected top-level entity BPF obj compilation failed ^
Issue still exist in 5.6.0-1011.11
Warning: Kernel ABI header at 'tools/ include/ uapi/linux/ if_link. h' differs from latest version at 'include/ uapi/linux/ if_link. h' test_xdp_ bpf2bpf. c:11:18: warning: unknown attribute 'preserve_ access_ index' ignored [-Wunknown- attributes] _((preserve_ access_ index)) ; test_xdp_ bpf2bpf. c:19:18: warning: unknown attribute 'preserve_ access_ index' ignored [-Wunknown- attributes] _((preserve_ access_ index)) ; test_xdp_ bpf2bpf. c:28:18: warning: unknown attribute 'preserve_ access_ index' ignored [-Wunknown- attributes] _((preserve_ access_ index)) ; test_core_ reloc_bitfields _direct. c:53:13: error: use of unknown builtin '__builtin_ preserve_ field_info' [-Wimplicit- function- declaration] READ_BITFIELD( in, ub1); ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:68:36: note: expanded from macro 'BPF_CORE_ READ_BITFIELD' ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:23:2: note: expanded from macro '__CORE_RELO' preserve_ field_info( (src)-> field, BPF_FIELD_##info) test_core_ reloc_bitfields _direct. c:54:13: error: use of unknown builtin '__builtin_ preserve_ field_info' [-Wimplicit- function- declaration] READ_BITFIELD( in, ub2); ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:68:36: note: expanded from macro 'BPF_CORE_ READ_BITFIELD' ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:23:2: note: expanded from macro '__CORE_RELO' preserve_ field_info( (src)-> field, BPF_FIELD_##info) test_core_ reloc_bitfields _direct. c:55:13: error: use of unknown builtin '__builtin_ preserve_ field_info' [-Wimplicit- function- declaration] READ_BITFIELD( in, ub7); ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:68:36: note: expanded from macro 'BPF_CORE_ READ_BITFIELD' ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:23:2: note: expanded from macro '__CORE_RELO' preserve_ field_info( (src)-> field, BPF_FIELD_##info) test_core_ reloc_bitfields _direct. c:56:13: error: use of unknown builtin '__builtin_ preserve_ field_info' [-Wimplicit- function- declaration] READ_BITFIELD( in, sb4); ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:68:36: note: expanded from macro 'BPF_CORE_ READ_BITFIELD' ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:23:2: note: expanded from macro '__CORE_RELO' preserve_ field_info( (src)-> field, BPF_FIELD_##info) test_core_ reloc_bitfields _direct. c:57:14: error: use of unknown builtin '__builtin_ preserve_ field_info' [-Wimplicit- function- declaration] READ_BITFIELD( in, sb20); ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:68:36: note: expanded from macro 'BPF_CORE_ READ_BITFIELD' ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:23:2: note: expanded from macro '__CORE_RELO' preserve_ field_info( (src)-> field, BPF_FIELD_##info) test_core_ reloc_bitfields _direct. c:58:13: error: use of unknown builtin '__builtin_ preserve_ field_info' [-Wimplicit- function- declaration] READ_BITFIELD( in, u32); ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:68:36: note: expanded from macro 'BPF_CORE_ READ_BITFIELD' ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:23:2: note: expanded from macro '__CORE_RELO' preserve_ field_info( (src)-> field, BPF_FIELD_##info) test_core_ reloc_bitfields _direct. c:59:13: error: use of unknown builtin '__builtin_ preserve_ field_info' [-Wimplicit- function- declaration] READ_BITFIELD( in, s32); ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:68:36: note: expanded from macro 'BPF_CORE_ READ_BITFIELD' ubuntu/ autotest/ client/ tmp/ubuntu_ bpf/src/ linux/tools/ testing/ selftests/ bpf/tools/ include/ bpf/bpf_ core_read. h:23:2: note: expanded from macro '__CORE_RELO' preserve_ field_info( (src)-> field, BPF_FIELD_##info)
progs/
} __attribute_
^
progs/
} __attribute_
^
progs/
} __attribute_
^
3 warnings generated.
progs/
out->ub1 = BPF_CORE_
^
/home/
const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \
^
/home/
__builtin_
^
progs/
out->ub2 = BPF_CORE_
^
/home/
const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \
^
/home/
__builtin_
^
progs/
out->ub7 = BPF_CORE_
^
/home/
const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \
^
/home/
__builtin_
^
progs/
out->sb4 = BPF_CORE_
^
/home/
const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \
^
/home/
__builtin_
^
progs/
out->sb20 = BPF_CORE_
^
/home/
const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \
^
/home/
__builtin_
^
progs/
out->u32 = BPF_CORE_
^
/home/
const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \
^
/home/
__builtin_
^
progs/
out->s32 = BPF_CORE_
^
/home/
const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \
^
/home/
__builtin_
^
7 errors generated.
llc-9: error: llc-9: :1:1: error: expected top-level entity
BPF obj compilation failed
^