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: <7ebee21d-058f-4f83-8959-bd7aaa4e7719@kernel.org>
Date: Wed, 21 Aug 2024 09:29:57 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Jiri Olsa <olsajiri@...il.com>
Cc: masahiroy@...nel.org, 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>,
 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 21. 08. 24, 8:40, Jiri Slaby wrote:
>  From https://bugzilla.suse.com/show_bug.cgi?id=1229450#c20:
> Run on 64bit:
> pahole -j32 -> 4.102 GB
> pahole -j16 -> 3.895 GB
> pahole -j1 -> 3.706 GB
> 
> On 32bit (the same vmlinux):
> pahole -j32 -> 2.870 GB (crash)
> pahole -j16 -> 2.810 GB
> pahole -j1 -> 2.444 GB
> 
> Look there for full massif report.

 From https://bugzilla.suse.com/show_bug.cgi?id=1229450#c21:
(In reply to Jiri Slaby from comment #20)
 > | |   |   ->24.01% (954,816,480B) 0x489B4AB: UnknownInlinedFun 
(dwarf_loader.c:959)

So given this struct class_member is the largest consumer, running 
pahole on pahole. The below results in 4.102 GB -> 3.585 GB savings.

--- a/dwarves.h
+++ b/dwarves.h
@@ -487,14 +487,14 @@ int cu__for_all_tags(struct cu *cu,
   */
  struct tag {
         struct list_head node;
+       const char       *attribute;
+       void             *priv;
         type_id_t        type;
         uint16_t         tag;
+       uint16_t         recursivity_level;
         bool             visited;
         bool             top_level;
         bool             has_btf_type_tag;
-       uint16_t         recursivity_level;
-       const char       *attribute;
-       void             *priv;
  };

  // To use with things like type->type_enum == 
perf_event_type+perf_user_event_type
@@ -1086,17 +1086,17 @@ static inline int function__inlined(const struct 
function *func)
  struct class_member {
         struct tag       tag;
         const char       *name;
+       uint64_t         const_value;
         uint32_t         bit_offset;
         uint32_t         bit_size;
         uint32_t         byte_offset;
         int              hole;
         size_t           byte_size;
+       uint32_t         alignment;
         int8_t           bitfield_offset;
         uint8_t          bitfield_size;
         uint8_t          bit_hole;
         uint8_t          bitfield_end:1;
-       uint64_t         const_value;
-       uint32_t         alignment;
         uint8_t          visited:1;
         uint8_t          is_static:1;
         uint8_t          has_bit_offset:1;

-- 
js
suse labs


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ