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]
Message-ID: <acfff73b4a0b6d325f749b580ee593ce8d0187f6.camel@gmail.com>
Date:   Sat, 09 Dec 2023 00:00:32 +0200
From:   Eduard Zingerman <eddyz87@...il.com>
To:     Sergei Trofimovich <slyich@...il.com>, bpf@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        Song Liu <song@...nel.org>,
        Yonghong Song <yonghong.song@...ux.dev>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH v2] libbpf: add pr_warn() for EINVAL cases in
 linker_sanity_check_elf

On Fri, 2023-12-08 at 21:51 +0000, Sergei Trofimovich wrote:
> Before the change on `i686-linux` `systemd` build failed as:
> 
>     $ bpftool gen object src/core/bpf/socket_bind/socket-bind.bpf.o src/core/bpf/socket_bind/socket-bind.bpf.unstripped.o
>     Error: failed to link 'src/core/bpf/socket_bind/socket-bind.bpf.unstripped.o': Invalid argument (22)
> 
> After the change it fails as:
> 
>     $ bpftool gen object src/core/bpf/socket_bind/socket-bind.bpf.o src/core/bpf/socket_bind/socket-bind.bpf.unstripped.o
>     libbpf: ELF section #9 has inconsistent alignment addr=8 != d=4 in src/core/bpf/socket_bind/socket-bind.bpf.unstripped.o
>     Error: failed to link 'src/core/bpf/socket_bind/socket-bind.bpf.unstripped.o': Invalid argument (22)
> 
> Now it's slightly easier to figure out what is wrong with an ELF file.
> 
> CC: Alexei Starovoitov <ast@...nel.org>
> CC: Daniel Borkmann <daniel@...earbox.net>
> CC: Andrii Nakryiko <andrii@...nel.org>
> CC: Martin KaFai Lau <martin.lau@...ux.dev>
> CC: Song Liu <song@...nel.org>
> CC: Yonghong Song <yonghong.song@...ux.dev>
> CC: John Fastabend <john.fastabend@...il.com>
> CC: KP Singh <kpsingh@...nel.org>
> CC: Stanislav Fomichev <sdf@...gle.com>
> CC: Hao Luo <haoluo@...gle.com>
> CC: Jiri Olsa <jolsa@...nel.org>
> CC: Eduard Zingerman <eddyz87@...il.com>
> CC: bpf@...r.kernel.org
> Signed-off-by: Sergei Trofimovich <slyich@...il.com>
> ---
>  tools/lib/bpf/linker.c | 24 ++++++++++++++++++++----
>  1 file changed, 20 insertions(+), 4 deletions(-)
> Change since v1:
> Following Eduard's suggestion added one extra pr_warn() call around
> section alignment and added compared values into warning messages.

Thank you for doing adjustments.
(Note: when I apply this patch locally full CC block is a part of the
       commit message, this is usually omitted from commit messages).

Acked-by: Eduard Zingerman <eddyz87@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ