<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/bpf/bpftool/Makefile, branch linux-5.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-11-12T19:16:07Z</updated>
<entry>
<title>tools/bpf: Always run the *-clean recipes</title>
<updated>2020-11-12T19:16:07Z</updated>
<author>
<name>Jean-Philippe Brucker</name>
</author>
<published>2020-11-12T09:10:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c36538798fc6c80bd8bdaddad803b0c86dc13d7c'/>
<id>urn:sha1:c36538798fc6c80bd8bdaddad803b0c86dc13d7c</id>
<content type='text'>
Make $(LIBBPF)-clean and $(LIBBPF_BOOTSTRAP)-clean .PHONY targets, in
case those files exist. And keep consistency within the Makefile by
making the directory dependencies order-only.

Suggested-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Jean-Philippe Brucker &lt;jean-philippe@linaro.org&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20201112091049.3159055-2-jean-philippe@linaro.org
</content>
</entry>
<entry>
<title>tools/bpftool: Fix build slowdown</title>
<updated>2020-11-11T20:18:23Z</updated>
<author>
<name>Jean-Philippe Brucker</name>
</author>
<published>2020-11-10T16:43:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0639e5e97ad9c58dd15dcf6f6ccf677cfba39f98'/>
<id>urn:sha1:0639e5e97ad9c58dd15dcf6f6ccf677cfba39f98</id>
<content type='text'>
Commit ba2fd563b740 ("tools/bpftool: Support passing BPFTOOL_VERSION to
make") changed BPFTOOL_VERSION to a recursively expanded variable,
forcing it to be recomputed on every expansion of CFLAGS and
dramatically slowing down the bpftool build. Restore BPFTOOL_VERSION as
a simply expanded variable, guarded by an ifeq().

Fixes: ba2fd563b740 ("tools/bpftool: Support passing BPFTOOL_VERSION to make")
Signed-off-by: Jean-Philippe Brucker &lt;jean-philippe@linaro.org&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20201110164310.2600671-8-jean-philippe@linaro.org
</content>
</entry>
<entry>
<title>tools/bpftool: Fix cross-build</title>
<updated>2020-11-11T20:18:22Z</updated>
<author>
<name>Jean-Philippe Brucker</name>
</author>
<published>2020-11-10T16:43:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8859b0da5aac28e4e9651c8971e7af344f8ffec1'/>
<id>urn:sha1:8859b0da5aac28e4e9651c8971e7af344f8ffec1</id>
<content type='text'>
The bpftool build first creates an intermediate binary, executed on the
host, to generate skeletons required by the final build. When
cross-building bpftool for an architecture different from the host, the
intermediate binary should be built using the host compiler (gcc) and
the final bpftool using the cross compiler (e.g. aarch64-linux-gnu-gcc).

Generate the intermediate objects into the bootstrap/ directory using
the host toolchain.

Signed-off-by: Jean-Philippe Brucker &lt;jean-philippe@linaro.org&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20201110164310.2600671-4-jean-philippe@linaro.org
</content>
</entry>
<entry>
<title>tools/bpftool: Force clean of out-of-tree build</title>
<updated>2020-11-11T20:18:22Z</updated>
<author>
<name>Jean-Philippe Brucker</name>
</author>
<published>2020-11-10T16:43:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e8929fdbb9c9026bd3a732e9ac7dc9617c86309'/>
<id>urn:sha1:9e8929fdbb9c9026bd3a732e9ac7dc9617c86309</id>
<content type='text'>
Cleaning a partial build can fail if the output directory for libbpf
wasn't created:

$ make -C tools/bpf/bpftool O=/tmp/bpf clean
/bin/sh: line 0: cd: /tmp/bpf/libbpf/: No such file or directory
tools/scripts/Makefile.include:17: *** output directory "/tmp/bpf/libbpf/" does not exist.  Stop.
make: *** [Makefile:36: /tmp/bpf/libbpf/libbpf.a-clean] Error 2

As a result make never gets around to clearing the leftover objects. Add
the libbpf output directory as clean dependency to ensure clean always
succeeds (similarly to the "descend" macro). The directory is later
removed by the clean recipe.

Signed-off-by: Jean-Philippe Brucker &lt;jean-philippe@linaro.org&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20201110164310.2600671-3-jean-philippe@linaro.org
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2020-10-06T01:40:01Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2020-10-06T00:33:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b0308fe319b8002753ea66f8f940fb393792ddd'/>
<id>urn:sha1:8b0308fe319b8002753ea66f8f940fb393792ddd</id>
<content type='text'>
Rejecting non-native endian BTF overlapped with the addition
of support for it.

The rest were more simple overlapping changes, except the
renesas ravb binding update, which had to follow a file
move as well as a YAML conversion.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tools/bpftool: Support passing BPFTOOL_VERSION to make</title>
<updated>2020-09-18T23:06:05Z</updated>
<author>
<name>Tony Ambardar</name>
</author>
<published>2020-09-17T11:58:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ba2fd563b7408b8dd9bbd72fcae8bcb3c14e8ec8'/>
<id>urn:sha1:ba2fd563b7408b8dd9bbd72fcae8bcb3c14e8ec8</id>
<content type='text'>
This change facilitates out-of-tree builds, packaging, and versioning for
test and debug purposes. Defining BPFTOOL_VERSION allows self-contained
builds within the tools tree, since it avoids use of the 'kernelversion'
target in the top-level makefile, which would otherwise pull in several
other includes from outside the tools tree.

Signed-off-by: Tony Ambardar &lt;Tony.Ambardar@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Link: https://lore.kernel.org/bpf/20200917115833.1235518-1-Tony.Ambardar@gmail.com
</content>
</entry>
<entry>
<title>tools, bpf/build: Cleanup feature files on make clean</title>
<updated>2020-08-28T12:04:27Z</updated>
<author>
<name>Jesper Dangaard Brouer</name>
</author>
<published>2020-08-27T08:53:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=661b37cd437ef49cd28444f79b9b0c71ea76e8c8'/>
<id>urn:sha1:661b37cd437ef49cd28444f79b9b0c71ea76e8c8</id>
<content type='text'>
The system for "Auto-detecting system features" located under
tools/build/ are (currently) used by perf, libbpf and bpftool. It can
contain stalled feature detection files, which are not cleaned up by
libbpf and bpftool on make clean (side-note: perf tool is correct).

Fix this by making the users invoke the make clean target.

Some details about the changes. The libbpf Makefile already had a
clean-config target (which seems to be copy-pasted from perf), but this
target was not "connected" (a make dependency) to clean target. Choose
not to rename target as someone might be using it. Did change the output
from "CLEAN config" to "CLEAN feature-detect", to make it more clear
what happens.

This is related to the complaint and troubleshooting in the following
link: https://lore.kernel.org/lkml/20200818122007.2d1cfe2d@carbon/

Signed-off-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lore.kernel.org/lkml/20200818122007.2d1cfe2d@carbon/
Link: https://lore.kernel.org/bpf/159851841661.1072907.13770213104521805592.stgit@firesoul
</content>
</entry>
<entry>
<title>tools/bpftool: Strip BPF .o files before skeleton generation</title>
<updated>2020-07-26T03:15:32Z</updated>
<author>
<name>Andrii Nakryiko</name>
</author>
<published>2020-07-22T04:38:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f3c93a93b564d25cab715cd71a6c3417e77b19f3'/>
<id>urn:sha1:f3c93a93b564d25cab715cd71a6c3417e77b19f3</id>
<content type='text'>
Strip away DWARF info from .bpf.o files, before generating BPF skeletons.
This reduces bpftool binary size from 3.43MB to 2.58MB.

Signed-off-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/bpf/20200722043804.2373298-1-andriin@fb.com
</content>
</entry>
<entry>
<title>tools/bpftool: Turn off -Wnested-externs warning</title>
<updated>2020-07-01T22:18:28Z</updated>
<author>
<name>Andrii Nakryiko</name>
</author>
<published>2020-07-01T21:28:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17bbf925c6f86be8c08bc473cb5327c173154596'/>
<id>urn:sha1:17bbf925c6f86be8c08bc473cb5327c173154596</id>
<content type='text'>
Turn off -Wnested-externs to avoid annoying warnings in BUILD_BUG_ON macro when
compiling bpftool:

In file included from /data/users/andriin/linux/tools/include/linux/build_bug.h:5,
                 from /data/users/andriin/linux/tools/include/linux/kernel.h:8,
                 from /data/users/andriin/linux/kernel/bpf/disasm.h:10,
                 from /data/users/andriin/linux/kernel/bpf/disasm.c:8:
/data/users/andriin/linux/kernel/bpf/disasm.c: In function ‘__func_get_name’:
/data/users/andriin/linux/tools/include/linux/compiler.h:37:38: warning: nested extern declaration of ‘__compiletime_assert_0’ [-Wnested-externs]
  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
                                      ^~~~~~~~~~~~~~~~~~~~~
/data/users/andriin/linux/tools/include/linux/compiler.h:16:15: note: in definition of macro ‘__compiletime_assert’
   extern void prefix ## suffix(void) __compiletime_error(msg); \
               ^~~~~~
/data/users/andriin/linux/tools/include/linux/compiler.h:37:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
  ^~~~~~~~~~~~~~~~~~~
/data/users/andriin/linux/tools/include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
/data/users/andriin/linux/tools/include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
  ^~~~~~~~~~~~~~~~
/data/users/andriin/linux/kernel/bpf/disasm.c:20:2: note: in expansion of macro ‘BUILD_BUG_ON’
  BUILD_BUG_ON(ARRAY_SIZE(func_id_str) != __BPF_FUNC_MAX_ID);
  ^~~~~~~~~~~~

Signed-off-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20200701212816.2072340-1-andriin@fb.com
</content>
</entry>
<entry>
<title>tools/bpftool: Allow substituting custom vmlinux.h for the build</title>
<updated>2020-06-30T22:50:11Z</updated>
<author>
<name>Andrii Nakryiko</name>
</author>
<published>2020-06-30T00:47:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec23eb705620234421fd48fc2382490fcfbafc37'/>
<id>urn:sha1:ec23eb705620234421fd48fc2382490fcfbafc37</id>
<content type='text'>
In some build contexts (e.g., Travis CI build for outdated kernel), vmlinux.h,
generated from available kernel, doesn't contain all the types necessary for
BPF program compilation. For such set up, the most maintainable way to deal
with this problem is to keep pre-generated (almost up-to-date) vmlinux.h
checked in and use it for compilation purposes. bpftool after that can deal
with kernel missing some of the features in runtime with no problems.

To that effect, allow to specify path to custom vmlinux.h to bpftool's
Makefile with VMLINUX_H variable.

Signed-off-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/bpf/20200630004759.521530-1-andriin@fb.com
</content>
</entry>
</feed>
