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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0c349cfa-909f-4c91-90df-8e56d93a7ce1@intel.com>
Date: Thu, 19 Dec 2024 15:20:06 +0100
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: Furong Xu <0x1207@...il.com>, <netdev@...r.kernel.org>,
	<linux-stm32@...md-mailman.stormreply.com>,
	<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
	"Simon Horman" <horms@...nel.org>, Alexandre Torgue
	<alexandre.torgue@...s.st.com>, Jose Abreu <joabreu@...opsys.com>, Andrew
 Lunn <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Maxime
 Coquelin <mcoquelin.stm32@...il.com>, <xfr@...look.com>
Subject: Re: [PATCH net-next v1] net: stmmac: Drop useless code related to
 ethtool rx-copybreak

From: Jakub Kicinski <kuba@...nel.org>
Date: Wed, 18 Dec 2024 16:42:06 -0800

> On Wed, 18 Dec 2024 16:48:38 +0100 Alexander Lobakin wrote:
>> If sizeof(dma_addr_t) == 8, you're clearly introducing a 4-byte hole
>> here. Perhaps you could reshuffle the struct a bit to avoid this.
>>
>> It's always good to inspect the .kos with pahole after modifying
>> structures to make sure there are no regressions.
> 
> Pretty off topic but I have a dumb question - how do you dump a struct
> with pahole using debug info or BTF from a random .ko?
> Ever since pahole got converted to BTF modules stopped working for me :S

Hmm...

I have this

CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_NONE is not set
# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set
# CONFIG_DEBUG_INFO_DWARF4 is not set
CONFIG_DEBUG_INFO_DWARF5=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_COMPRESSED_NONE is not set
# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
CONFIG_DEBUG_INFO_COMPRESSED_ZSTD=y
# CONFIG_DEBUG_INFO_SPLIT is not set
CONFIG_DEBUG_INFO_BTF=y
CONFIG_DEBUG_INFO_BTF_MODULES=y

CONFIG_PAHOLE_VERSION=127
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_PAHOLE_HAS_BTF_TAG=y
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y

enabled in .config, then I just do

$ pahole path/to/module.ko | less

and search for the struct :D

My pahole is korg Git HEAD.

> I never cared enough to check as most interesting stuff is built-in
> in Meta's kernels but it annoys me every now and then..

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ