Supporting bpf_asm syntax in strace

Elazar Leibovich elazarl at
Tue Jun 5 16:13:45 UTC 2018


Currently the format in which BPF programs are printed, is an strace
specific format.

It's a fine format, but, except of being verbose, it's incompatible with
kernel's tooling.

Currently abbreviated format, and none-verbose format are identical.

I therefor suggest the following:

None-verbose format would remain as it is today. That is, printout of the
BPF program address only without traversing it, like the man page says.

Verbose and abbreviated format, would be the bpf_asm format of <len>,<op>
<jt> <jf>  <k>,.... which is indeed shorter.

Verbose and none-abbreviated format would be the current format.

The main advantage of my proposal is that in bpf_asm compatible mode, you
can dump it to  bpf_debug, run it, dump it etc. I'm not aware of tooling
that supports the current format.

I have a patch to submit, if you think this is a good solution.

What do you think?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Strace-devel mailing list