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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 1 Aug 2020 20:33:00 -0700 From: Alexei Starovoitov <alexei.starovoitov@...il.com> To: Andrii Nakryiko <andriin@...com> Cc: bpf <bpf@...r.kernel.org>, Network Development <netdev@...r.kernel.org>, Alexei Starovoitov <ast@...com>, Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii.nakryiko@...il.com>, Kernel Team <kernel-team@...com>, Jiri Olsa <jolsa@...nel.org>, Arnaldo Carvalho de Melo <acme@...hat.com>, Masahiro Yamada <masahiroy@...nel.org> Subject: Re: [PATCH bpf-next] tools build: propagate build failures from tools/build/Makefile.build On Thu, Jul 30, 2020 at 7:44 PM Andrii Nakryiko <andriin@...com> wrote: > > The '&&' command seems to have a bad effect when $(cmd_$(1)) exits with > non-zero effect: the command failure is masked (despite `set -e`) and all but > the first command of $(dep-cmd) is executed (successfully, as they are mostly > printfs), thus overall returning 0 in the end. > > This means in practice that despite compilation errors, tools's build Makefile > will return success. We see this very reliably with libbpf's Makefile, which > doesn't get compilation error propagated properly. This in turns causes issues > with selftests build, as well as bpftool and other projects that rely on > building libbpf. > > The fix is simple: don't use &&. Given `set -e`, we don't need to chain > commands with &&. The shell will exit on first failure, giving desired > behavior and propagating error properly. > > Cc: Jiri Olsa <jolsa@...nel.org> > Cc: Arnaldo Carvalho de Melo <acme@...hat.com> > Fixes: 275e2d95591e ("tools build: Move dependency copy into function") > Signed-off-by: Andrii Nakryiko <andriin@...com> Jiri, Arnaldo, could you please review and ack?
Powered by blists - more mailing lists