lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20191027050216.GF29418@shao2-debian>
Date:   Sun, 27 Oct 2019 13:02:16 +0800
From:   kernel test robot <rong.a.chen@...el.com>
To:     Andrii Nakryiko <andriin@...com>
Cc:     Daniel Borkmann <daniel@...earbox.net>,
        John Fastabend <john.fastabend@...il.com>,
        Song Liu <songliubraving@...com>,
        LKML <linux-kernel@...r.kernel.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>, lkp@...ts.01.org
Subject: [selftests/bpf]  694731e8ea:
 stderr.progs/test_core_reloc_ints.c:#:#:note:expanded_from_macro'CORE_READ'

FYI, we noticed the following commit (built with gcc-7):

commit: 694731e8ea7f6bbcf0c57763ed4f24faa14bf056 ("selftests/bpf: Adjust CO-RE reloc tests for new bpf_core_read() macro")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master

in testcase: bpf_offload
with following parameters:


on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 8G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):




If you fix the issue, kindly add following tag
Reported-by: kernel test robot <rong.a.chen@...el.com>


[   67.448792] make -C ../../../lib/bpf OUTPUT=/usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/
[   67.448797] 
[   67.463459] make[1]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/lib/bpf'
[   67.463464] 
[   67.471973] 
[   67.476035] Auto-detecting system features:
[   67.476038] 
[   67.483470] 
[   67.491351] 
[   67.497070] 
[   67.506199]   HOSTCC   /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/fixdep.o
[   67.506204] 
[   67.521185]   HOSTLD   /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/fixdep-in.o
[   67.521189] 
[   67.536974]   LINK     /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/fixdep
[   67.536979] 
[   67.551358]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/libbpf.o
[   67.551363] 
[   67.565995]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/bpf.o
[   67.566001] 
[   67.580663]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/nlattr.o
[   67.580667] 
[   67.595085]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/btf.o
[   67.595089] 
[   67.608038]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/libbpf_errno.o
[   67.608043] 
[   67.623205]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/str_error.o
[   67.623209] 
[   67.637249]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/netlink.o
[   67.637254] 
[   67.652189]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/bpf_prog_linfo.o
[   67.652194] 
[   67.667901]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/libbpf_probes.o
[   67.667906] 
[   67.682606]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/xsk.o
[   67.682610] 
[   67.697350]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/hashmap.o
[   67.697355] 
[   67.712629]   CC       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/btf_dump.o
[   67.712634] 
[   67.728221]   LD       /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/libbpf-in.o
[   67.728225] 
[   67.743689]   LINK     /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/libbpf.a
[   67.743693] 
[   67.759243]   LINK     /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/libbpf.so.0.0.6
[   67.759248] 
[   67.774673]   GEN      /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/libbpf.pc
[   67.774678] 
[   67.790446] make[1]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/lib/bpf'
[   67.790450] 
[   82.243805] gcc -g -Wall -O2 -I../../../include/uapi -I../../../lib -I../../../lib/bpf -I../../../../include/generated  -I../../../include -Dbpf_prog_load=bpf_prog_test_load -Dbpf_load_program=bpf_test_load_program -I. -I/usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf -Iverifier    test_verifier.c /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/test_stub.o /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/libbpf.a -lcap -lelf -lrt -lpthread -o /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/test_verifier
[   82.243811] 
[  105.633262] gcc -g -Wall -O2 -I../../../include/uapi -I../../../lib -I../../../lib/bpf -I../../../../include/generated  -I../../../include -Dbpf_prog_load=bpf_prog_test_load -Dbpf_load_program=bpf_test_load_program    test_tag.c /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/test_stub.o /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/libbpf.a -lcap -lelf -lrt -lpthread -o /usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/test_tag
[  105.633269] 
[  117.666606] progs/test_core_reloc_ints.c:34:6: error: use of unknown builtin '__builtin_preserve_access_index' [-Wimplicit-function-declaration]
[  117.666611] 
[  117.682466]         if (CORE_READ(&out->u8_field, &in->u8_field) ||
[  117.682470] 
[  117.691483]             ^
[  117.691487] 
[  117.702036] progs/test_core_reloc_ints.c:26:29: note: expanded from macro 'CORE_READ'
[  117.702041] 
[  117.714239] #define CORE_READ(dst, src) bpf_core_read(dst, sizeof(*(dst)), src)
[  117.714244] 
[  117.723313]                             ^
[  117.723317] 
[  117.733896] ./bpf_helpers.h:243:24: note: expanded from macro 'bpf_core_read'
[  117.733901] 
[  117.746256]                        (const void *)__builtin_preserve_access_index(src))
[  117.746261] 
[  117.757313]                                      ^
[  117.757317] 
[  117.771338] progs/test_core_reloc_ints.c:34:6: warning: cast to 'const void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
[  117.771344] 
[  117.787642] progs/test_core_reloc_ints.c:26:29: note: expanded from macro 'CORE_READ'
[  117.787648] 
[  117.799907] #define CORE_READ(dst, src) bpf_core_read(dst, sizeof(*(dst)), src)
[  117.799912] 
[  117.810141]                             ^
[  117.810145] 
[  117.820566] ./bpf_helpers.h:243:10: note: expanded from macro 'bpf_core_read'
[  117.820570] 
[  117.832673]                        (const void *)__builtin_preserve_access_index(src))
[  117.832678] 
[  117.842880]                        ^
[  117.842884] 
[  117.855934] progs/test_core_reloc_ints.c:35:6: warning: cast to 'const void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
[  117.855939] 
[  117.870335]             CORE_READ(&out->s8_field, &in->s8_field) ||
[  117.870339] 
[  117.878518]             ^
[  117.878522] 
[  117.888039] progs/test_core_reloc_ints.c:26:29: note: expanded from macro 'CORE_READ'
[  117.888044] 
[  117.899103] #define CORE_READ(dst, src) bpf_core_read(dst, sizeof(*(dst)), src)
[  117.899108] 
[  117.908059]                             ^
[  117.908063] 
[  117.917471] ./bpf_helpers.h:243:10: note: expanded from macro 'bpf_core_read'
[  117.917476] 
[  117.928239]                        (const void *)__builtin_preserve_access_index(src))
[  117.928243] 
[  117.939224]                        ^
[  117.939227] 
[  117.951306] progs/test_core_reloc_ints.c:36:6: warning: cast to 'const void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
[  117.951311] 
[  117.964240]             CORE_READ(&out->u16_field, &in->u16_field) ||
[  117.964244] 
[  117.971759]             ^
[  117.971763] 
[  117.979391] progs/test_core_reloc_ints.c:26:29: note: expanded from macro 'CORE_READ'
[  117.979396] 
[  117.988116] #define CORE_READ(dst, src) bpf_core_read(dst, sizeof(*(dst)), src)
[  117.988120] 
[  117.994922]                             ^
[  117.994926] 
[  118.002818] ./bpf_helpers.h:243:10: note: expanded from macro 'bpf_core_read'
[  118.002822] 
[  118.011712]                        (const void *)__builtin_preserve_access_index(src))
[  118.011716] 
[  118.018233]                        ^
[  118.018237] 
[  118.028781] progs/test_core_reloc_ints.c:37:6: warning: cast to 'const void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
[  118.028787] 
[  118.039137]             CORE_READ(&out->s16_field, &in->s16_field) ||
[  118.039142] 
[  118.044901]             ^
[  118.044905] 
[  118.056866] progs/test_core_reloc_ints.c:26:29: note: expanded from macro 'CORE_READ'
[  118.056870] 
[  118.065590] #define CORE_READ(dst, src) bpf_core_read(dst, sizeof(*(dst)), src)
[  118.065594] 
[  118.072238]                             ^
[  118.072242] 
[  118.081104] ./bpf_helpers.h:243:10: note: expanded from macro 'bpf_core_read'
[  118.081108] 
[  118.090205]                        (const void *)__builtin_preserve_access_index(src))
[  118.090210] 
[  118.096922]                        ^
[  118.096926] 
[  118.107843] progs/test_core_reloc_ints.c:38:6: warning: cast to 'const void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
[  118.107849] 
[  118.118208]             CORE_READ(&out->u32_field, &in->u32_field) ||
[  118.118212] 
[  118.123995]             ^
[  118.123999] 
[  118.132805] progs/test_core_reloc_ints.c:26:29: note: expanded from macro 'CORE_READ'
[  118.132810] 
[  118.141650] #define CORE_READ(dst, src) bpf_core_read(dst, sizeof(*(dst)), src)
[  118.141654] 
[  118.148373]                             ^
[  118.148377] 
[  118.156332] ./bpf_helpers.h:243:10: note: expanded from macro 'bpf_core_read'
[  118.156338] 
[  118.165100]                        (const void *)__builtin_preserve_access_index(src))
[  118.165104] 
[  118.171809]                        ^
[  118.171813] 
[  118.183640] progs/test_core_reloc_ints.c:39:6: warning: cast to 'const void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
[  118.183646] 
[  118.194170]             CORE_READ(&out->s32_field, &in->s32_field) ||
[  118.194175] 
[  118.200068]             ^
[  118.200072] 
[  118.208967] progs/test_core_reloc_ints.c:26:29: note: expanded from macro 'CORE_READ'
[  118.208972] 
[  118.217565] #define CORE_READ(dst, src) bpf_core_read(dst, sizeof(*(dst)), src)
[  118.217569] 
[  118.223887]                             ^
[  118.223891] 
[  118.230716] ./bpf_helpers.h:243:10: note: expanded from macro 'bpf_core_read'
[  118.230719] 
[  118.238696]                        (const void *)__builtin_preserve_access_index(src))
[  118.238709] 
[  118.244546]                        ^
[  118.244549] 
[  118.254482] progs/test_core_reloc_ints.c:40:6: warning: cast to 'const void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
[  118.254487] 
[  118.263901]             CORE_READ(&out->u64_field, &in->u64_field) ||
[  118.263904] 
[  118.268177]             ^
[  118.268181] 
[  118.276019] progs/test_core_reloc_ints.c:26:29: note: expanded from macro 'CORE_READ'
[  118.276024] 
[  118.282918] #define CORE_READ(dst, src) bpf_core_read(dst, sizeof(*(dst)), src)
[  118.282922] 
[  118.288547]                             ^
[  118.288550] 
[  118.296281] ./bpf_helpers.h:243:10: note: expanded from macro 'bpf_core_read'
[  118.296285] 
[  118.304349]                        (const void *)__builtin_preserve_access_index(src))
[  118.304352] 
[  118.309122]                        ^
[  118.309125] 
[  118.315724] progs/test_core_reloc_ints.c:41:6: warning: cast to 'const void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
[  118.315728] 
[  118.326106]             CORE_READ(&out->s64_field, &in->s64_field))
[  118.326110] 
[  118.331787]             ^
[  118.331790] 
[  118.339530] progs/test_core_reloc_ints.c:26:29: note: expanded from macro 'CORE_READ'
[  118.339535] 
[  118.347278] #define CORE_READ(dst, src) bpf_core_read(dst, sizeof(*(dst)), src)
[  118.347281] 
[  118.353597]                             ^
[  118.353600] 
[  118.360269] ./bpf_helpers.h:243:10: note: expanded from macro 'bpf_core_read'
[  118.360274] 
[  118.368665]                        (const void *)__builtin_preserve_access_index(src))
[  118.368668] 
[  118.375195]                        ^
[  118.375199] 
[  118.381323] 8 warnings and 1 error generated.
[  118.381327] 
[  118.387627] llc: <stdin>:1:1: error: expected top-level entity
[  118.387631] 
[  118.392955] clang failed
[  118.392959] 
[  118.397801] ^
[  118.397804] 
[  119.542331] make: *** [/usr/src/perf_selftests-x86_64-rhel-7.6-694731e8ea7f6bbcf0c57763ed4f24faa14bf056/tools/testing/selftests/bpf/test_core_reloc_ints.o] Error 1
[  119.542336] 


To reproduce:

        # build kernel
	cd linux
	cp config-5.3.0-13226-g694731e8ea7f6 .config
	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage

        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email



Thanks,
Rong Chen


View attachment "config-5.3.0-13226-g694731e8ea7f6" of type "text/plain" (200584 bytes)

View attachment "job-script" of type "text/plain" (5116 bytes)

Download attachment "dmesg.xz" of type "application/x-xz" (19084 bytes)

View attachment "bpf_offload" of type "text/plain" (53507 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ