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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 30 Jul 2018 12:35:09 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Thomas Richter <tmricht@...ux.ibm.com>
Cc:     daniel@...earbox.net, ast@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, heiko.carstens@...ibm.com,
        brueckner@...ux.vnet.ibm.com, schwidefsky@...ibm.com
Subject: Re: [PATCH v3] perf build: Build error in libbpf with
 EXTRA_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -O2"

On Mon, 30 Jul 2018 10:53:23 +0200, Thomas Richter wrote:
> commit 531b014e7a2f ("tools: bpf: make use of reallocarray")
> causes a compiler error when building the perf tool in the linux-next
> tree.  Compile file tools/lib/bpf/libbpf.c on a FEDORA 28
> installation with gcc compiler
> version: gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20)
> shows this error message:
> 
> [root@...lp27] # make V=1 EXTRA_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -O2"
> [...]
> make -f /home6/tmricht/linux-next/tools/build/Makefile.build
> 	dir=./util/scripting-engines obj=libperf
> libbpf.c: In function ‘bpf_object__elf_collect’:
> libbpf.c:811:15: error: ignoring return value of ‘strerror_r’,
> 		declared with attribute warn_unused_result [-Werror=unused-result]
>      strerror_r(-err, errmsg, sizeof(errmsg));
>                ^
> cc1: all warnings being treated as errors
> mv: cannot stat './.libbpf.o.tmp': No such file or directory
> /home6/tmricht/linux-next/tools/build/Makefile.build:96: recipe for target 'libbpf.o' failed
> 
> Replace all occurrences of strerror() by calls to strerror_r().
> To keep the compiler quiet also use the return value from strerror_r()
> otherwise a 'variable set but not use' warning which is treated as error
> terminates the compile.
> 
> Cc: Alexei Starovoitov <ast@...nel.org>
> Cc: Daniel Borkmann <daniel@...earbox.net>
> Cc: Jakub Kicinski <jakub.kicinski@...ronome.com>
> Suggested-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
> Suggested-by: Daniel Borkmann <daniel@...earbox.net>
> Reviewed-by: Hendrik Brueckner <brueckner@...ux.ibm.com>
> Signed-off-by: Thomas Richter <tmricht@...ux.ibm.com>

Conversion looks correct, thank you!

Reviewed-by: Jakub Kicinski <jakub.kicinski@...ronome.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ