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: <54ba38de-90e4-4444-8bb4-8b5f6bc11757@kernel.org>
Date: Tue, 20 Aug 2024 11:08:18 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>, masahiroy@...nel.org
Cc: linux-kernel@...r.kernel.org, Nathan Chancellor <nathan@...nel.org>,
 Nicolas Schier <nicolas@...sle.eu>, Alexei Starovoitov <ast@...nel.org>,
 Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
 Martin KaFai Lau <martin.lau@...ux.dev>, Eduard Zingerman
 <eddyz87@...il.com>, 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@...ichev.me>, Hao Luo <haoluo@...gle.com>,
 Jiri Olsa <jolsa@...nel.org>, linux-kbuild@...r.kernel.org,
 bpf@...r.kernel.org, shung-hsi.yu@...e.com, msuchanek@...e.com
Subject: Re: [RFC] kbuild: bpf: Do not run pahole with -j on 32bit userspace

On 20. 08. 24, 10:59, Jiri Slaby (SUSE) wrote:
> From: Jiri Slaby <jslaby@...e.cz>
> 
> == WARNING ==
> This is only a PoC. There are deficiencies like CROSS_COMPILE or LLVM
> are completely unhandled.
> 
> The simple version is just do there:
>    ifeq ($(CONFIG_64BIT,y)
> but it has its own deficiencies, of course.
> 
> So any ideas, inputs?

Also as Shung-Hsi Yu suggests, we can cap -j to 1 in pahole proper when 
sizeof(long) == 4.

> == WARNING ==
> 
> When pahole is run with -j on 32bit userspace (32bit pahole in
> particular), it randomly fails with OOM:
>> btf_encoder__tag_kfuncs: Failed to get ELF section(62) data: out of memory.
>> btf_encoder__encode: failed to tag kfuncs!
> 
> or simply SIGSEGV (failed to allocate the btf encoder).
> 
> It very depends on how many threads are created.

I forgot to add, that it depends on the kernel version too. It happens 
much often with 6.11-rc now (vmlinux got big enough, apparently).

thanks,
-- 
js
suse labs


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ