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] [day] [month] [year] [list]
Date:   Fri, 14 May 2021 08:34:07 +0200
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Quentin Monnet <quentin@...valent.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc:     Ian Rogers <irogers@...gle.com>, Song Liu <songliubraving@...com>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        Zi Shen Lim <zlim.lnx@...il.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Paul Mackerras <paulus@...ba.org>,
        Sandipan Das <sandipan@...ux.ibm.com>,
        "H. Peter Anvin" <hpa@...or.com>, sparclinux@...r.kernel.org,
        Shubham Bansal <illusionist.neo@...il.com>,
        Mahesh Bandewar <maheshb@...gle.com>,
        Will Deacon <will@...nel.org>,
        Nicolas Dichtel <nicolas.dichtel@...nd.com>,
        linux-s390 <linux-s390@...r.kernel.org>,
        Ilya Leoshkevich <iii@...ux.ibm.com>, paulburton@...nel.org,
        Jonathan Corbet <corbet@....net>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        Masahiro Yamada <masahiroy@...nel.org>,
        X86 ML <x86@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        Russell King <linux@...linux.org.uk>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        Ingo Molnar <mingo@...hat.com>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Catalin Marinas <catalin.marinas@....com>,
        "Naveen N . Rao" <naveen.n.rao@...ux.ibm.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Tobias Klauser <tklauser@...tanz.ch>,
        linux-mips@...r.kernel.org, grantseltzer@...il.com,
        Xi Wang <xi.wang@...il.com>, Albert Ou <aou@...s.berkeley.edu>,
        Kees Cook <keescook@...omium.org>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Luke Nelson <luke.r.nels@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Heiko Carstens <hca@...ux.ibm.com>,
        ppc-dev <linuxppc-dev@...ts.ozlabs.org>,
        KP Singh <kpsingh@...nel.org>, iecedge@...il.com,
        Simon Horman <horms@...ge.net.au>,
        Borislav Petkov <bp@...en8.de>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Yonghong Song <yhs@...com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Dmitry Vyukov <dvyukov@...gle.com>, tsbogend@...ha.franken.de,
        Daniel Borkmann <daniel@...earbox.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Network Development <netdev@...r.kernel.org>,
        David Ahern <dsahern@...nel.org>,
        Wang YanQing <udknight@...il.com>,
        Martin KaFai Lau <kafai@...com>,
        Björn Töpel <bjorn@...nel.org>,
        Palmer Dabbelt <palmer@...belt.com>, bpf <bpf@...r.kernel.org>,
        Jianlin Lv <Jianlin.Lv@....com>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH bpf-next 1/2] bpf: Remove bpf_jit_enable=2 debugging mode



Le 23/04/2021 à 12:26, Quentin Monnet a écrit :
> 2021-04-23 09:19 UTC+0200 ~ Christophe Leroy <christophe.leroy@...roup.eu>
> 
> [...]
> 
>> I finally managed to cross compile bpftool with libbpf, libopcodes,
>> readline, ncurses, libcap, libz and all needed stuff. Was not easy but I
>> made it.
> 
> Libcap is optional and bpftool does not use readline or ncurses. May I
> ask how you tried to build it?
> 
>>
>> Now, how do I use it ?
>>
>> Let say I want to dump the jitted code generated from a call to
>> 'tcpdump'. How do I do that with 'bpftool prog dump jited' ?
>>
>> I thought by calling this line I would then get programs dumped in a way
>> or another just like when setting 'bpf_jit_enable=2', but calling that
>> line just provides me some bpftool help text.
> 
> Well the purpose of this text is to help you find the way to call
> bpftool to do what you want :). For dumping your programs' instructions,
> you need to tell bpftool what program to dump: Bpftool isn't waiting
> until you load a program to dump it, instead you need to load your
> program first and then tell bpftool to retrieve the instructions from
> the kernel. To reference your program you could use a pinned path, or
> first list the programs on your system with "bpftool prog show":
> 
> 
>      # bpftool prog show
>      138: tracing  name foo  tag e54c922dfa54f65f  gpl
>              loaded_at 2021-02-25T01:32:30+0000  uid 0
>              xlated 256B  jited 154B  memlock 4096B  map_ids 64
>              btf_id 235

Got the following error:

root@...ip:~# ./bpftool prog show
libbpf: elf: endianness mismatch in pid_iter_bpf.
libbpf: failed to initialize skeleton BPF object 'pid_iter_bpf': -4003
Error: failed to open PID iterator skeleton


Christophe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ