public inbox for dwarves@vger.kernel.org
 help / color / mirror / Atom feed
* BUG in pahole?: strange error in tests/flexible_arrays.sh
@ 2025-05-02  2:39 Tony Ambardar
  2025-05-02  8:18 ` Alan Maguire
  0 siblings, 1 reply; 3+ messages in thread
From: Tony Ambardar @ 2025-05-02  2:39 UTC (permalink / raw)
  To: dwarves, bpf

[-- Attachment #1: Type: text/plain, Size: 2008 bytes --]

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

[-- Attachment #2: .tmp_vmlinux1.btf.o.gz --]
[-- Type: application/gzip, Size: 1394693 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BUG in pahole?: strange error in tests/flexible_arrays.sh
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Maguire @ 2025-05-02  8:18 UTC (permalink / raw)
  To: Tony Ambardar, dwarves, bpf

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BUG in pahole?: strange error in tests/flexible_arrays.sh
  2025-05-02  8:18 ` Alan Maguire
@ 2025-05-02 20:39   ` Tony Ambardar
  0 siblings, 0 replies; 3+ messages in thread
From: Tony Ambardar @ 2025-05-02 20:39 UTC (permalink / raw)
  To: Alan Maguire; +Cc: dwarves, bpf

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-02 20:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox