<div dir="ltr">ping.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 14, 2018 at 12:37 PM Elazar Leibovich <<a href="mailto:elazarl@gmail.com">elazarl@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>When will this patch get reviewed?</div><div><br></div><div>I want to set a reminder to myself, to make sure it wouldn't be forgotten.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 5, 2018 at 9:35 PM, Elazar Leibovich <span dir="ltr"><<a href="mailto:elazarl@gmail.com" target="_blank">elazarl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">By defaut, none-abbreviated bpf program is printed as:<br>
<br>
<len>, <op> <jt> <jk> <k>, <op> <jt> <jk> <k>...<br>
<br>
A format consumable by the bpf_debug tool from the linux<br>
kernel.<br>
<br>
An example strace output when running strace -e seccomp:<br>
<br>
seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=9, filter=9,32 0 0 4,21 0<br>
6 3221225534,32 0 0 0,53 4 0 1073741824,21 2 0 2,21 1 0 60,21 0 1<br>
231,6 0 0 2147418112,6 0 0 0}) = 0<br>
<br>
Pasting the output in bpf_debug:<br>
<br>
$ ./bpf_debug<br>
> load bpf 9,32 0 0 4,21 0 6 3221225534,32 0 0 0,53 4 0<br>
1073741824,21 2 0 2,21 1 0 60,21 0 1 231,6 0 0 2147418112,6 0 0 0<br>
> disassemble<br>
l0: ld [4]<br>
l1: jeq #0xc000003e, l2, l8<br>
l2: ld [0]<br>
l3: jge #0x40000000, l8, l4<br>
l4: jeq #0x2, l7, l5<br>
l5: jeq #0x3c, l7, l6<br>
l6: jeq #0xe7, l7, l8<br>
l7: ret #0x7fff0000<br>
l8: ret #0<br>
<br>
Note that if the output is truncated, in case the user<br>
has submitted a bpf program > maximum BPF program size,<br>
the length prefix is adapted to the truncated size.<br>
<br>
Signed-off-by: Elazar Leibovich <<a href="mailto:elazarl@gmail.com" target="_blank">elazarl@gmail.com</a>><br>
---<br>
bpf_filter.c | 13 ++++++++++++-<br>
1 file changed, 12 insertions(+), 1 deletion(-)<br>
</blockquote></div><br></div>
</blockquote></div>