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: <CAABZP2wBSjevevALA_VF-fTirp-bB42XouKRTuq=RR=60xL=EQ@mail.gmail.com>
Date:   Sat, 27 May 2023 07:10:42 +0800
From:   Zhouyi Zhou <zhouzhouyi@...il.com>
To:     Martin KaFai Lau <martin.lau@...ux.dev>
Cc:     bpf@...r.kernel.org, linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: a small question about bpftool struct_ops

Hi

On Sun, May 21, 2023 at 4:27 PM Zhouyi Zhou <zhouzhouyi@...il.com> wrote:
>
> Hi
>
> On Sat, May 20, 2023 at 7:37 AM Zhouyi Zhou <zhouzhouyi@...il.com> wrote:
> >
> > Thank you for responding so quickly ;-)
> >
> > On Sat, May 20, 2023 at 3:01 AM Martin KaFai Lau <martin.lau@...ux.dev> wrote:
> > >
> > > On 5/19/23 5:07 AM, Zhouyi Zhou wrote:
> > > > Dear developers:
> > > > I compiled bpftool and bpf tests in mainline (2d1bcbc6cd70),
> > > > but when I invoke:
> > > > bpftool struct_ops register bpf_cubic.bpf.o
> > > >
> > > > the command line fail with:
> > > > libbpf: struct_ops init_kern: struct tcp_congestion_ops data is not
> > > > found in struct bpf_struct_ops_tcp_congestion_ops
> > >
> > > At the machine trying to register the bpf_cubic, please dump the vmlinux btf and
> > > search for bpf_struct_ops_tcp_congestion_ops and paste it here:
> > >
> > > For example:
> > > #> bpftool btf dump file /sys/kernel/btf/vmlinux
> > >
> > > ...
> > >
> > > [74578] STRUCT 'bpf_struct_ops_tcp_congestion_ops' size=256 vlen=3
> > >          'refcnt' type_id=145 bits_offset=0
> > >          'state' type_id=74569 bits_offset=32
> > >          'data' type_id=6241 bits_offset=512
> > OK
> > [214398] STRUCT 'bpf_struct_ops_tcp_congestion_ops' size=256 vlen=3
> >         'refcnt' type_id=298 bits_offset=0
> >         'state' type_id=214224 bits_offset=32
> >         'data' type_id=213704 bits_offset=512
> >
> > Please tell me if I could provide any further information.
> >
> > You are of great help
> >
> > Thank you very much
> > Zhouyi
> Thanks for your help
>
> Or, can you teach me how to prepare an environment that can run
> "bpftool struct_ops register xxx.o" ;-)
> (A few words of description of OS version (Ubuntu/CentOS/Suse for etc)
> and example kernel .config is enough)
I invoke following commands, and it works:
cd tools/testing/selftests/bpf
find . -name vmlinux.h|xargs rm
make -j 20

put bpf_cubic.bpf.o to my virtual machine, and it works!
I don't know why

Thank you all!
Best Regards
Zhouyi
>
> I am an enthusiastic learner ;-)
>
> Thanks in advance
> Zhouyi
> > >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ