public inbox for dwarves@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Ambardar <tony.ambardar@gmail.com>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: dwarves@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: BUG in pahole?: strange error in tests/flexible_arrays.sh
Date: Fri, 2 May 2025 13:39:07 -0700	[thread overview]
Message-ID: <aBUta5R8y+OX6sKB@kodidev-ubuntu> (raw)
In-Reply-To: <3b19f6a5-a5f5-4872-b38d-018165b5edd7@oracle.com>

On Fri, May 02, 2025 at 09:18:56AM +0100, Alan Maguire wrote:
> On 02/05/2025 03:39, Tony Ambardar wrote:
> > Hello all,
> > 
> > I ran into the following running the latest pahole tests:
> > 
> >   $ vmlinux=~/linux/vmlinux ./tests/tests
> >     1: Validation of BTF encoding of functions; this may take some time: Ok
> >     2: Default BTF on a system without BTF: Ok
> >     3: Flexible arrays accounting: pahole: type 'bpf_empty_prog_array' not found
> >   pahole: type 'kstatmount' not found
> >   pahole: type 'crypto_lskcipher' not found
> >   pahole: type 'crypto_sig' not found
> >   pahole: type 'hash_ctx' not found
> >   pahole: type 'scsi_stream_status_header' not found
> >   pahole: type 'virtnet_info' not found
> >   pahole: type 'geneve_dev' not found
> >   pahole: type 'geneve_config' not found
> >   pahole: type 'lirc_fh' not found
> >   pahole: type 'scmi_registered_events_desc' not found
> >   pahole: type 'events_queue' not found
> >   pahole: type 'hid_debug_list' not found
> >   pahole: type 'flow_offload_action' not found
> >   pahole: type 'nft_rule_dp_last' not found
> >   pahole: type 'nft_rhash_elem' not found
> >   pahole: type 'nft_hash_elem' not found
> >   pahole: type 'nft_bitmap_elem' not found
> >   pahole: type 'nft_rbtree_elem' not found
> >   pahole: type 'nft_pipapo_elem' not found
> >   pahole: type 'xt_standard_target' not found
> >   pahole: type 'xt_error_target' not found
> >   pahole: type 'ipt_standard' not found
> >   pahole: type 'ipt_error' not found
> >   pahole: type 'ip6t_standard' not found
> >   pahole: type 'ip6t_error' not found
> > 
> > This is simple to reproduce (e.g. code in flexible_arrays.sh):
> > 
> >   $ pahole kstatmount ~/linux/vmlinux
> >   pahole: type 'kstatmount' not found
> > 
> > But despite the above:
> > 
> >   $ bpftool btf dump file ~/linux/vmlinux format raw|grep kstatmount
> >   [13145] STRUCT 'kstatmount' size=624 vlen=8
> > 
> > And:
> >   
> >   $ pahole -C kstatmount ~/linux/vmlinux
> >   struct kstatmount {
> >           struct statmount *         buf;                  /*     0     4 */
> >   ...
> >   };
> > 
> > Has this been seen before? Am I missing something? Any insight folks have
> > would be appreciated.
> > 
> > The same behaviour is also seen with '.tmp_vmlinux1.btf.o', which I attach.
> > 
> > Many thanks,
> > Tony Ambardar
> 
> hi Tony, I've seen this too (with a slightly different cast of
> characters); I keep meaning to look into it but haven't had a chance yet
> so thanks for doing some investigation! Seems like it is a bug in type
> display rather than in BTF generation at least..
> 
> Alan

Thanks for confirming this -- I was worried it might be a side-effect of
my function-encoding patch. Out of curiosity, how does option "-C" affect
BTF parsing or pahole operation? It wasn't clear to me just what "Show
just this class" means/implies...

Cheers,
Tony

      reply	other threads:[~2025-05-02 20:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-02  2:39 BUG in pahole?: strange error in tests/flexible_arrays.sh Tony Ambardar
2025-05-02  8:18 ` Alan Maguire
2025-05-02 20:39   ` Tony Ambardar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aBUta5R8y+OX6sKB@kodidev-ubuntu \
    --to=tony.ambardar@gmail.com \
    --cc=alan.maguire@oracle.com \
    --cc=bpf@vger.kernel.org \
    --cc=dwarves@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox