<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/tools/net, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/tools/net?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/tools/net?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2017-10-05T04:45:05Z</updated>
<entry>
<title>tools: rename tools/net directory to tools/bpf</title>
<updated>2017-10-05T04:45:05Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>jakub.kicinski@netronome.com</email>
</author>
<published>2017-10-05T03:10:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a92bb546cff0b31d96d5919ebfeda9c678756b42'/>
<id>urn:sha1:a92bb546cff0b31d96d5919ebfeda9c678756b42</id>
<content type='text'>
We currently only have BPF tools in the tools/net directory.
We are about to add more BPF tools there, not necessarily
networking related, rename the directory and related Makefile
targets to bpf.

Suggested-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@netronome.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tools: bpf_jit_disasm: Handle large images.</title>
<updated>2017-06-14T19:03:22Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2017-06-13T23:49:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e274da1a50f6f3c8216e5bb22e1b0964ab993f13'/>
<id>urn:sha1:e274da1a50f6f3c8216e5bb22e1b0964ab993f13</id>
<content type='text'>
Dynamically allocate memory so that JIT images larger than the size of
the statically allocated array can be handled.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tools: bpf_jit_disasm: Add option to dump JIT image to a file.</title>
<updated>2017-04-13T17:04:03Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2017-04-11T21:30:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b6518e6a0086fc152f9a35ac5062930788f8b4bc'/>
<id>urn:sha1:b6518e6a0086fc152f9a35ac5062930788f8b4bc</id>
<content type='text'>
When debugging the JIT on an embedded platform or cross build
environment, libbfd may not be available, making it impossible to run
bpf_jit_disasm natively.

Add an option to emit a binary image of the JIT code to a file.  This
file can then be disassembled off line.  Typical usage in this case
might be (pasting mips64 dmesg output to cat command):

   $ cat &gt; jit.raw
   $ bpf_jit_disasm -f jit.raw -O jit.bin
   $ mips64-linux-gnu-objdump -D -b binary -m mips:isa64r2 -EB jit.bin

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tools: bpf_jit_disasm: check for klogctl failure</title>
<updated>2016-05-09T03:32:59Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2016-05-05T22:39:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=25a54342fde903b6abc2680594cf3e4864686339'/>
<id>urn:sha1:25a54342fde903b6abc2680594cf3e4864686339</id>
<content type='text'>
klogctl can fail and return -ve len, so check for this and
return NULL to avoid passing a (size_t)-1 to malloc.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tools, bpf_asm: simplify parser rule for BPF extensions</title>
<updated>2016-02-22T18:29:42Z</updated>
<author>
<name>Ray Bellis</name>
<email>ray@isc.org</email>
</author>
<published>2016-02-22T10:02:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b1d95ae5c5bd3deba84d00c4f83d7d0836b5936f'/>
<id>urn:sha1:b1d95ae5c5bd3deba84d00c4f83d7d0836b5936f</id>
<content type='text'>
We can already use yylval in the lexer for encoding the BPF extension
number, so that the parser rules can be further reduced to a single one
for each B/H/W case.

Signed-off-by: Ray Bellis &lt;ray@isc.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bpf_dbg: do not initialise statics to 0</title>
<updated>2016-02-11T09:24:45Z</updated>
<author>
<name>Wei Tang</name>
<email>tangwei@cmss.chinamobile.com</email>
</author>
<published>2016-02-04T09:36:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1490d2bd1bbcf9ad127f7764b7f28b26a55e011b'/>
<id>urn:sha1:1490d2bd1bbcf9ad127f7764b7f28b26a55e011b</id>
<content type='text'>
This patch fixes the checkpatch.pl error to bpf_dbg.c:

ERROR: do not initialise statics to 0

Signed-off-by: Wei Tang &lt;tangwei@cmss.chinamobile.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tools/net: Use include/uapi with __EXPORTED_HEADERS__</title>
<updated>2015-11-15T22:24:33Z</updated>
<author>
<name>Kamal Mostafa</name>
<email>kamal@canonical.com</email>
</author>
<published>2015-11-11T22:24:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d7475de58575c904818efa369c82e88c6648ce2e'/>
<id>urn:sha1:d7475de58575c904818efa369c82e88c6648ce2e</id>
<content type='text'>
Use the local uapi headers to keep in sync with "recently" added #define's
(e.g. SKF_AD_VLAN_TPID).  Refactored CFLAGS, and bpf_asm doesn't need -I.

Fixes: 3f356385e8a4 ("filter: bpf_asm: add minimal bpf asm tool")
Signed-off-by: Kamal Mostafa &lt;kamal@canonical.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tools: bpf_jit_disasm: make get_last_jit_image return unsigned</title>
<updated>2015-09-29T05:18:01Z</updated>
<author>
<name>Andrzej Hajda</name>
<email>a.hajda@samsung.com</email>
</author>
<published>2015-09-25T06:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4de61ba234c0d5834bfec1cbe180008b9d2e1827'/>
<id>urn:sha1:4de61ba234c0d5834bfec1cbe180008b9d2e1827</id>
<content type='text'>
The function returns always non-negative values.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107

Signed-off-by: Andrzej Hajda &lt;a.hajda@samsung.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bpf_jit_disasm: also support reading jit dump from file</title>
<updated>2015-07-31T22:13:14Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>daniel@iogearbox.net</email>
</author>
<published>2015-07-30T14:04:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a6ed38361b1e0f08d630bd491051c254d1fc71b9'/>
<id>urn:sha1:a6ed38361b1e0f08d630bd491051c254d1fc71b9</id>
<content type='text'>
This patch adds support to read the dmesg BPF JIT dump also from a
file instead of the klog buffer. I found this quite useful when going
through some 'before/after patch' logs. It also fixes a regex leak
found by valgrind when no image dump was found.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tools: bpf_jit_disasm: fix segfault on disabled debugging log output</title>
<updated>2015-05-27T04:24:10Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>daniel@iogearbox.net</email>
</author>
<published>2015-05-25T12:08:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=082739aa458a74add9a2362988e5aca0367bfa53'/>
<id>urn:sha1:082739aa458a74add9a2362988e5aca0367bfa53</id>
<content type='text'>
With recent debugging, I noticed that bpf_jit_disasm segfaults when
there's no debugging output from the JIT compiler to the kernel log.

Reason is that when regexec(3) doesn't match on anything, start/end
offsets are not being filled out and contain some uninitialized garbage
from stack. Thus, we need zero out offsets first.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
