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]
Date:   Mon, 2 Oct 2017 18:35:09 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc:     netdev@...r.kernel.org, daniel@...earbox.net,
        oss-drivers@...ronome.com,
        David Beckett <david.beckett@...ronome.com>
Subject: Re: [PATCH net-next v2 3/3] tools: bpftool: add documentation

On Mon, 2 Oct 2017 17:55:02 -0700, Alexei Starovoitov wrote:
> > +EXAMPLES
> > +========
> > +**# bpftool prog show**
> > +::
> > +
> > +  10: xdp  name:some_prog  tag 00:5a:3d:21:23:62:0c:8b  
> 
> could you please remove ':' in the output to match what
> show_fdinfo and kallsyms do ?

Ack.

> > +	loaded_at:2024.771  uid:0  
> 
> may be translate that to something human readable?

Oh yes, the code will print a proper date/time, I forgot to
regenerate the doc :S

> > +	xlated:528B  jited:370B  memlock:4096B  map_ids:10
> > +
> > +| 
> > +| **# bpftool prog dump xlated id 10 file /tmp/t**
> > +| **# ls -l /tmp/t**
> > +|   -rw------- 1 root root 560 Jul 22 01:42 /tmp/t
> > +
> > +| 
> > +| **# mount -t bpf none /sys/fs/bpf/**
> > +| **# bpftool prog pin id 10 /sys/fs/bpf/prog**
> > +| **# bpftool prog dum jited pinned /sys/fs/bpf/prog**
> > +
> > +::
> > +
> > +    push   %rbp
> > +    mov    %rsp,%rbp
> > +    sub    $0x228,%rsp
> > +    sub    $0x28,%rbp
> > +    mov    %rbx,0x0(%rbp)  
> 
> imo too many steps to dump disasm output.
> Can it print it if we just say:
> bpftool prog dump jited id 10
> and
> dump xlated

Yes those will work.  This example kind of shows pinning and dumping at
the some time.  Perhaps that's ill advised.

> will pretty print them as verifier output as well?

We tried to use LLVM as a library for this but the interface is
painfully unstable and it's a heavy dependency.  The current thinking
is to try to put the instruction printing code in some higher level
library, but I would rather leave that as a follow up.

> All that can be changed later. Thanks for the doc.
> Acked-by: Alexei Starovoitov <ast@...nel.org>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ