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>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 11 Jan 2021 07:55:16 -0800
From:   Yonghong Song <yhs@...com>
To:     Tiezhu Yang <yangtiezhu@...ngson.cn>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>
CC:     <netdev@...r.kernel.org>, <bpf@...r.kernel.org>,
        Xuefeng Li <lixuefeng@...ngson.cn>
Subject: Re: [QUESTION] build errors and warnings when make M=samples/bpf



On 1/11/21 12:17 AM, Tiezhu Yang wrote:
> Hi all,
> 
> I found the following build errors and warnings when make M=samples/bpf
> on the Loongson 3A3000 platform which belongs to MIPS arch.
> 
> Are theseknown issues? Should I submit patches to fix them? (1) fatal 
> error: 'asm/rwonce.h' file not found

These issues may be mips specific. Sure you can submit patches to fix
these issues.

> 
> CLANG-bpf samples/bpf/xdpsock_kern.o In file included from 
> samples/bpf/xdpsock_kern.c:2: In file included from 
> ./include/linux/bpf.h:9: In file included from 
> ./include/linux/workqueue.h:9: In file included from 
> ./include/linux/timer.h:5: In file included from 
> ./include/linux/list.h:9: In file included from 
> ./include/linux/kernel.h:10: ./include/linux/compiler.h:246:10: fatal 
> error: 'asm/rwonce.h' file not found #include <asm/rwonce.h> 
> ^~~~~~~~~~~~~~ 1 error generated. HEAD is now at 7c53f6b... Linux 
> 5.11-rc3 [yangtiezhu@...ux linux.git]$ find . -name rwonce.h 
> ./include/asm-generic/rwonce.h ./arch/arm64/include/asm/rwonce.h 
> ./arch/alpha/include/asm/rwonce.h The following changes can fix the 
> above errors, is it right? [yangtiezhu@...ux linux.git]$ vim 
> include/linux/compiler.h [yangtiezhu@...ux linux.git]$ git diff diff 
> --git a/include/linux/compiler.h b/include/linux/compiler.h index 
> b8fe0c2..b73b18c 100644 --- a/include/linux/compiler.h +++ 
> b/include/linux/compiler.h @@ -243,6 +243,8 @@ static inline void 
> *offset_to_ptr(const int *off) */ #define 
> prevent_tail_call_optimization() mb() +#ifdef CONFIG_ARM64 || 
> CONFIG_ALPHA #include <asm/rwonce.h> +#endif #endif /* 
> __LINUX_COMPILER_H */ (2) printf format warnings
> 
>    CC  samples/bpf/ibumad_user.o
> samples/bpf/ibumad_user.c: In function ‘dump_counts’:
> samples/bpf/ibumad_user.c:46:24: warning: format ‘%llu’ expects argument 
> of type ‘long long unsigned int’, but argument 3 has type ‘__u64’ {aka 
> ‘long unsigned int’} [-Wformat=]
>      printf("0x%02x : %llu\n", key, value);
>                       ~~~^          ~~~~~
>                       %lu

For these issues, __u64 defined as "unsigned long long" on x64 so we
do not have issues. On your system, it is defined as "unsigned long",
hence the warning. When you try to fix the issue, please make x64 works
fine. The same for above "rwonce.h" issue.

>    CC  samples/bpf/lathist_user.o
>    CC  samples/bpf/lwt_len_hist_user.o
>    CC  samples/bpf/map_perf_test_user.o
>    CC  samples/bpf/offwaketime_user.o
> samples/bpf/offwaketime_user.c: In function ‘print_ksym’:
> samples/bpf/offwaketime_user.c:34:17: warning: format ‘%llx’ expects 
> argument of type ‘long long unsigned int’, but argument 3 has type 
> ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
>     printf("%s/%llx;", sym->name, addr);
>                ~~~^               ~~~~
>                %lx
[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ