; behaviour
(run all tests) is unchanged and backwards-compatible. Updated examples:
$ test_verifier die die die # previously ran all tests
Usage: test_verifier -l | [-v|-vv] [ []]
$ test_verifier 700 # runs test subset from 700 to end
Signed-off-by: Tony Ambardar
p.bpf.o
GEN-SKEL [test_progs-cpuv4] access_map_in_map.skel.h
Fixes: a5d0c26a2784 ("selftests/bpf: Add a cpuv4 test runner for cpu=v4
testing")
Fixes: 89ad7420b25c ("selftests/bpf: Drop the need for LLVM's llc")
Signed-off-by: Tony Ambardar
---
tools/testing/selfte
On Fri, Jul 19, 2024 at 07:57:09PM -0700, Andrii Nakryiko wrote:
> On Fri, Jul 19, 2024 at 4:22 PM Tony Ambardar wrote:
> >
> > Make log output incorrectly shows 'test_maps' as the binary name for every
> > 'CLNG-BPF' build step, apparently
p.bpf.o
GEN-SKEL [test_progs-cpuv4] access_map_in_map.skel.h
Fixes: a5d0c26a2784 ("selftests/bpf: Add a cpuv4 test runner for cpu=v4
testing")
Fixes: 89ad7420b25c ("selftests/bpf: Drop the need for LLVM's llc")
Signed-off-by: Tony Ambardar
---
tools/testing/sel
s: 519dfeaf5119 ("selftests/bpf: Add uprobe_multi test program")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/Makefile | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/Makefile
b/tools/testing/selftests/bpf/Makefile
index a
fixes a MIPS GOT issue when linking uprobe_multi.
Feedback and suggestions for improvement are welcome!
Thanks,
Tony
Tony Ambardar (2):
selftests/bpf: Add missing system defines for mips
selftests/bpf: Fix error linking uprobe_multi on mips
tools/testing/selftests/bpf/Makefile | 8 ++--
1
_MIPS_SIM, _ABIO32, _ABIN32, _ABI64
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/Makefile
b/tools/testing/selftests/bpf/Makefile
index 05b234248b38..a9c447c63fee 100644
--- a
On Mon, Jul 22, 2024 at 02:22:53PM -0700, Andrii Nakryiko wrote:
> On Sun, Jul 21, 2024 at 12:51 AM Tony Ambardar
> wrote:
[...]
> > --- a/tools/testing/selftests/bpf/Makefile
> > +++ b/tools/testing/selftests/bpf/Makefile
> > @@ -784,9 +784,12 @@ $(OUTPUT)/verist
From: Tony Ambardar
Hello,
This series includes two fixes to support builds targeting MIPS systems.
The patches have been tested both with the kernel-patches/bpf CI and
locally using mips64el-gcc/musl-libc and QEMU with an OpenWrt rootfs.
Patch 1 adds support for MIPS system includes when
From: Tony Ambardar
Linking uprobe_multi.c on mips64el fails due to relocation overflows, when
the GOT entries required exceeds the default maximum. Add a specific CFLAGS
(-mxgot) for uprobe_multi.c on MIPS that allows using a larger GOT and
avoids errors such as:
/tmp/ccBTNQzv.o: in function
From: Tony Ambardar
Update get_sys_includes in Makefile with missing MIPS-related definitions
to fix many, many compilation errors building selftests/bpf. The following
added defines drive conditional logic in system headers for word-size and
endianness selection:
MIPSEL, MIPSEB
_MIPS_SZPTR
On Fri, Jul 19, 2024 at 10:23:33PM -0700, Tony Ambardar wrote:
> On Fri, Jul 19, 2024 at 07:57:09PM -0700, Andrii Nakryiko wrote:
> > On Fri, Jul 19, 2024 at 4:22 PM Tony Ambardar
> > wrote:
> > >
[...]
> > > --- a/tools/testing/selftests/bpf/Makefile
> &
are welcome!
Thanks,
Tony
Tony Ambardar (19):
selftests/bpf: Use pid_t consistently in test_progs.c
selftests/bpf: Fix compile error from rlim_t in sk_storage_map.c
selftests/bpf: Fix error compiling bpf_iter_setsockopt.c with musl
libc
selftests/bpf: Drop unneeded include in
eclared identifier is reported only once
for each function it appears in
Fixes: 91b2c0afd00c ("selftests/bpf: Add parallelism to test_progs")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/test_progs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
|
|
long unsigned int
| %llu
cc1: all warnings being treated as errors
Fixes: 51a0e301a563 ("bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps")
Signed-off-
quot;funky" transparent union which includes both types above. Explicitly cast
the argument to allow compiling for both musl and glibc.
Fixes: eed92afdd14c ("bpf: selftest: Test batching and bpf_(get|set)sockopt in
bpf tcp iter")
Signed-off-by: Tony Ambardar
---
tools/testing/
ore building.
Fixes: 1d56ade032a4 ("selftests/bpf: Unprivileged tests for test_loader.c")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/unpriv_helpers.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/unpriv_helpers.c
b/tools/testing/selfte
Test prog sk_lookup.c includes glibc extension '' and fails to
build for non-glibc (i.e. musl) systems. However, the header is actually
not needed, so remove it to allow more portable compilation.
Fixes: 0ab5539f8584 ("selftests/bpf: Tests for BPF_SK_LOOKUP attach point")
for (i = 0; i < ARRAY_SIZE(benchs); i++) {
| ^~
cc1: all warnings being treated as errors
Fixes: 8e7c2a023ac0 ("selftests/bpf: Add benchmark runner infrastructure")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/bench.c
quot;)
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/prog_tests/flow_dissector.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
index 9e5f38739104..9625e6d2179
de
+++ |+#include
11 |
seen with bench_local_storage.c, bench_local_storage_rcu_tasks_trace.c, and
bench_bpf_hashmap_lookup.c.
Fixes: 73087489250d ("selftests/bpf: Add benchmark for local_storage get")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/bench.h | 1 +
1 file
426 | BUILD_BUG_ON(total_samples <= c_max_entries);
| ^~~~
cc1: all warnings being treated as errors
Fixes: e5a9df51c746 ("selftests/bpf: Add selftests validating the user ringbuf")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/prog
edirecting incorrect #include to
| ^~~
cc1: all warnings being treated as errors
Fixes: 09c02d553c49 ("bpf, selftests: Fold test_current_pid_tgid_new_ns into
test_progs.")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c | 2 +
| ^~~~
Fixes: cfa7b011894d ("selftests/bpf: tests for using dynptrs to parse skb and
xdp buffers")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/prog_tests/parse_tcp_hdr_opt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selfte
7;:
kfree_skb.c:45:30: error: 'struct tcphdr' has no member named 'doff'
45 | if (CHECK(pkt_v6->tcp.doff != 5, "check_tcp",
| ^
Fixes: 580d656d80cf ("selftests/bpf: Add kfree_skb raw_tp test")
Signed-off-b
ce = 80,
| ^~
flow_dissector.c:120:30: error: 'struct tcphdr' has no member named 'dest'
120 | .tcp.dest = 8080,
| ^~~~
Fixes: ae173a915785 ("selftests/bpf: supp
age size of 'info' isn't known
24 | struct tcp_info info;
| ^~~~
tcp_rtt.c:24:25: error: unused variable 'info' [-Werror=unused-variable]
cc1: all warnings being treated as errors
Fixes: 1f4f80fed217 ("selftests/bpf: tes
Add CO-RE relocs selftest relying on
kernel module BTF")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/prog_tests/core_reloc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/core_reloc.c
b/tools/testing/selftests/bpf/prog_tests/co
n of 'struct ipv6_mreq'
42 | struct ipv6_mreq {
|^
.../linux/in6.h:60:8: note: originally defined here
60 | struct ipv6_mreq {
|^
Fixes: 70a00e2f1dba ("selftests/bpf: Test bpf_skb_adjust_room on
CHECKSUM_PARTIAL")
Si
;struct ipv6_mreq'
42 | struct ipv6_mreq {
|^
.../linux/in6.h:60:8: note: originally defined here
60 | struct ipv6_mreq {
|^
Fixes: 43a7c3ef8a15 ("selftests/bpf: Add lwt_xmit tests for BPF_REDIRECT")
Signed-off-by: Tony Ambardar
---
to
definition of 'struct ipv6_mreq'
42 | struct ipv6_mreq {
|^
.../linux/in6.h:60:8: note: originally defined here
60 | struct ipv6_mreq {
|^
Fixes: 91541ab192fc ("selftests: bpf: crypto skcipher algo selftests")
Signed-off-by
ixes: 9e5bd1f7633b ("selftests/bpf: Test CGROUP_STORAGE map can't be used by
multiple progs")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/progs/cg_storage_multi.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/progs/cg_storage_multi.h
b/too
On Tue, Jul 23, 2024 at 03:35:22PM -0700, YiFei Zhu wrote:
> On Mon, Jul 22, 2024 at 10:56 PM Tony Ambardar
> wrote:
> >
> > Remove a redundant include of '', whose needed definitions are
> > already included (via '') in cg_storage_multi_egress_
Hi Andrii,
On Wed, Jul 24, 2024 at 04:52:57PM -0700, Andrii Nakryiko wrote:
> On Mon, Jul 22, 2024 at 10:55 PM Tony Ambardar
> wrote:
[...]
> >
> > Tony Ambardar (19):
> > selftests/bpf: Use pid_t consistently in test_progs.c
> > selftests/bpf: Fi
On Wed, Jul 24, 2024 at 03:08:31PM +0800, Geliang Tang wrote:
> On Mon, 2024-07-22 at 22:54 -0700, Tony Ambardar wrote:
> > Add a "bpf_util.h" include to avoid the following error seen
> > compiling for
> > mips64el with musl libc:
> >
> > bench.c:
From: Tony Ambardar
Hello all,
This is part 2 of a series of fixes for libc-related issues encountered
building for musl-based systems. The series has been tested with the
kernel-patches/bpf CI and locally using mips64el-gcc/musl-libc and QEMU
with an OpenWrt rootfs.
The patches cover a few
From: Tony Ambardar
Use the POSIX version of basename() to allow compilation against non-gnu
libc (e.g. musl). Include ahead of to enable using
functions from the latter while preferring POSIX over GNU basename().
In veristat.c, rely on strdupa() to avoid basename() altering the passed
"
From: Tony Ambardar
Current code parses arguments with strtok_r() using a construct like
char *state = NULL;
while ((next = strtok_r(state ? NULL : input, ",", &state))) {
...
}
where logic assumes the 'state' var can distinguish between first
From: Tony Ambardar
Although the post-increment in macro 'CPU_SET(next++, &cpuset)' seems safe,
the sequencing can raise compile errors, so move the increment outside the
macro. This avoids an error seen using gcc 12.3.0 for mips64el/musl-libc:
In file included from tes
From: Tony Ambardar
While building, bpftool makes a skeleton from test_core_extern.c, which
itself includes and uses the 'bool' type. However, the skeleton
test_core_extern.skel.h generated *does not* include or use the
'bool' type, instead using the C-only '_Bool'
From: Tony Ambardar
Fix redefinition errors seen compiling lwt_reroute.c for mips64el/musl-libc
by adjusting the order of includes in lwt_helpers.h. The ordering required
is:
--> (from "test_progs.h") --> .
Because of the complexity and large number of includes, orderi
From: Tony Ambardar
Use backtrace functions only with glibc and otherwise provide stubs in
test_progs.c. This avoids compile errors (e.g. with musl libc) like:
test_progs.c:13:10: fatal error: execinfo.h: No such file or directory
13 | #include /* backtrace
From: Tony Ambardar
Typically stdin, stdout, stderr are treated as reserved identifiers under
ISO/ANSI C, and a libc implementation is free to define these as macros.
This is the case in musl libc and results in compile errors when these
names are reused as struct fields, as with 's
From: Tony Ambardar
Linux 5.1 implemented 64-bit time types and related syscalls to address the
Y2038 problem generally across archs. Userspace handling of Y2038 varies
with the libc however. While musl libc uses 64-bit time across all 32-bit
and 64-bit platforms, GNU glibc uses 64-bit time on
On Thu, Jul 25, 2024 at 01:09:24PM -0700, Andrii Nakryiko wrote:
> On Thu, Jul 25, 2024 at 3:39 AM Tony Ambardar wrote:
> >
...
> > --- a/tools/testing/selftests/bpf/testing_helpers.c
> > +++ b/tools/testing/selftests/bpf/testing_helpers.c
> > @@ -227,7 +227,7 @@ int
On Thu, Jul 25, 2024 at 01:22:37PM -0700, Andrii Nakryiko wrote:
> On Thu, Jul 25, 2024 at 3:39 AM Tony Ambardar wrote:
> >
> > From: Tony Ambardar
> >
> > Use backtrace functions only with glibc and otherwise provide stubs in
> > test_progs.c. This avoids co
On Thu, Jul 25, 2024 at 01:18:04PM -0700, Andrii Nakryiko wrote:
> On Thu, Jul 25, 2024 at 3:39 AM Tony Ambardar wrote:
> >
> > From: Tony Ambardar
> >
> > Fix redefinition errors seen compiling lwt_reroute.c for mips64el/musl-libc
> > by adjusting the order
On Thu, Jul 25, 2024 at 01:27:03PM -0700, Andrii Nakryiko wrote:
> On Thu, Jul 25, 2024 at 3:39 AM Tony Ambardar wrote:
> >
> > From: Tony Ambardar
> >
> > Typically stdin, stdout, stderr are treated as reserved identifiers under
> > ISO/ANSI C, and a libc imple
On Fri, Jul 26, 2024 at 09:22:38PM -0700, Tony Ambardar wrote:
> On Thu, Jul 25, 2024 at 01:27:03PM -0700, Andrii Nakryiko wrote:
> > On Thu, Jul 25, 2024 at 3:39 AM Tony Ambardar
> > wrote:
> > >
> > > From: Tony Ambardar
> > >
> > > Typi
appreciated!
Thanks,
Tony
Changelog:
--
v1->v2: (feedback from Andrii)
- P2: rewrite simpler code using counter
- P5: update description/fix after more research
- P6: use weak functions for backtrace stubs
- P7: use stdxxx_saved names, update desc
Tony Ambardar (8):
selftests/bpf:
ment. This is not needed in xskxceiver.c since the arg
is mutable and the program exits immediately after usage.
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/veristat.c | 8 +---
tools/testing/selftests/bpf/xskxceiver.c | 1 +
2 files changed, 6 insertions(+), 3 deletion
Rewrite code using a counter to distinguish between strtok_r() calls.
Fixes: 61ddff373ffa ("selftests/bpf: Improve by-name subtest selection logic in
prog_tests")
Fixes: 394169b079b5 ("selftests/bpf: add comparison mode to veristat")
Fixes: c8bc5e050976 ("selftests/bpf: Add
errors
Fixes: 3fbfadce6012 ("bpf: Fix test_lru_sanity5() in test_lru_map.c")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/test_lru_map.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_lru_map.c
b/tools/testing/selftests/bpf/test_l
rrect type/include supporting C++,
but in the meantime add a conditional define as above.
Fixes: 7c8dce4b1661 ("bpftool: Make skeleton C code compilable with C++
compiler")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/test_cpp.cpp | 4
1 file changed, 4 insertions(+)
back for unsupported
libcs")
[2]: https://git.musl-libc.org/cgit/musl/commit/?id=04983f227238
Fixes: 6c77997bc639 ("selftests/bpf: Add lwt_xmit tests for BPF_REROUTE")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/prog_tests/lwt_reroute.c | 1 +
1 file changed, 1
/bpf: Print backtrace on SIGSEGV in test_progs")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/test_progs.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_progs.c
b/tools/testing/selftests/bpf/test_progs.c
tion 'fprintf'
237 | fprintf(env.stdout, "#%-*d %s:", TEST_NUM_WIDTH,
test->test_num, test->test_name);
| ^~~
Link: https://lore.kernel.org/bpf/ZqR2DuHdBXPX%2Fyx8@kodidev-ubuntu/
Signed-off-by: Tony Ambardar
---
.../selftests/bpf/
e the Y2038
roll-over.
Fixes: ce6f6cffaeaa ("selftests/bpf: Wait for the netstamp_needed_key static
key to be turned on")
Fixes: c803475fd8dd ("bpf: selftests: test skb->tstamp in redirect_neigh")
Signed-off-by: Tony Ambardar
---
tools/testing/selftests/bpf/prog_tests/tc
thread includes some background regarding testing on QEMU/s390x and
the generally favourable results (3 failures running test_progs):
https://lore.kernel.org/bpf/ZsEcsaa3juxxQBUf@kodidev-ubuntu/
Feedback and suggestions are welcome!
Best regards,
Tony
Tony Ambardar (8):
libbpf: Improve log
Fix missing newlines and extraneous terminal spaces in messages.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/btf.c | 6 +++---
tools/lib/bpf/btf_dump.c | 2 +-
tools/lib/bpf/btf_relocate.c | 2 +-
tools/lib/bpf/libbpf.c | 4 ++--
tools/lib/bpf/relo_core.c| 2 +-
5
Mention struct btf_ext_info_sec rather than non-existent btf_sec_func_info
in BTF.ext struct documentation.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/libbpf_internal.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf
rectly translated.
Fixes: faf6ed321cf6 ("libbpf: Add BPF static linker APIs")
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/linker.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
index 9cd3d4109788..7489306cd6f7 100644
--- a/tools/l
exist for BTF data.
[1]:commit 3289959b97ca ("libbpf: Support BTF loading and raw data output in
both endianness")
[2]:commit 8fd27bf69b86 ("libbpf: Add BPF static linker BTF and BTF.ext
support")
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/btf
Allow bpf_object__open() to access files of either endianness, and convert
included BPF programs to native byte-order in-memory for introspection.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/libbpf.c | 21 +++--
tools/lib/bpf/libbpf_internal.h | 11 +++
2
. This
is enabled by built-in ELF translation and recent BTF/BTF.ext endianness
functions. Further add local functions for swapping byte-order of sections
containing BPF insns.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/linker.c | 106 ++---
1 file changed
to target byte-order on
finalization. Add support functions to convert data to target endianness
as it is added to the blob.
Also add additional debug logging for data blob structure details and
skeleton loading.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/bpf_gen_internal.h | 1 +
too
Update Makefile build rules to compile BPF programs with target endianness
rather than host byte-order. With recent changes, this allows building the
full selftests/bpf suite hosted on x86_64 and targeting s390x or mips64eb
for example.
Signed-off-by: Tony Ambardar
---
tools/testing/selftests
On Wed, Aug 21, 2024 at 06:55:58PM -0700, Alexei Starovoitov wrote:
> On Wed, Aug 21, 2024 at 2:10 AM Tony Ambardar wrote:
> >
> >
> > +static inline void bpf_insn_bswap(struct bpf_insn *insn)
> > +{
> > + /* dst_reg & src_reg nibbles */
> > +
From: Tony Ambardar
Fix missing newlines and extraneous terminal spaces in messages.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/btf.c | 7 ---
tools/lib/bpf/btf_dump.c | 2 +-
tools/lib/bpf/btf_relocate.c | 2 +-
tools/lib/bpf/libbpf.c | 4 ++--
tools/lib/bpf
From: Tony Ambardar
Hello all,
This patch series targets a long-standing BPF usability issue - the lack
of general cross-compilation support - by enabling cross-endian usage of
libbpf and bpftool, as well as supporting cross-endian build targets for
selftests/bpf.
Benefits include improved BPF
From: Tony Ambardar
Mention struct btf_ext_info_sec rather than non-existent btf_sec_func_info
in BTF.ext struct documentation.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/libbpf_internal.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf
From: Tony Ambardar
Object linking output data uses the default ELF_T_BYTE type for '.symtab'
section data, which disables any libelf-based translation. Explicitly set
the ELF_T_SYM type for output to restore libelf's byte-order conversion,
noting that input '.symtab'
From: Tony Ambardar
Allow bpf_object__open() to access files of either endianness, and convert
included BPF programs to native byte-order in-memory for introspection.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/libbpf.c | 21 +++--
tools/lib/bpf/libbpf_internal.h
From: Tony Ambardar
Allow static linking object files of either endianness, checking that input
files have consistent byte-order, and setting output endianness from input.
Linking requires in-memory processing of programs, relocations, sections,
etc. in native endianness, and output conversion
From: Tony Ambardar
Track target endianness in 'struct bpf_gen' and process in-memory data in
native byte-order, but on finalization convert the embedded loader BPF
insns to target endianness.
The light skeleton also includes a target-accessed data blob which is
heterogeneous and thus
From: Tony Ambardar
Support for handling BTF data of either endianness was added in [1], but
did not include BTF.ext data for lack of use cases. Later, support for
static linking [2] provided a use case, but this feature and later ones
were restricted to native-endian usage.
Add support for
From: Tony Ambardar
Update Makefile build rules to compile BPF programs with target endianness
rather than host byte-order. With recent changes, this allows building the
full selftests/bpf suite hosted on x86_64 and targeting s390x or mips64eb
for example.
Signed-off-by: Tony Ambardar
On Thu, Aug 22, 2024 at 04:36:13PM -0700, Andrii Nakryiko wrote:
> On Thu, Aug 22, 2024 at 2:24 AM Tony Ambardar wrote:
> >
> > From: Tony Ambardar
> >
> > Fix missing newlines and extraneous terminal spaces in messages.
> >
> > Signed-off-by: Tony Amb
On Fri, Aug 23, 2024 at 12:47:47PM -0700, Andrii Nakryiko wrote:
> On Thu, Aug 22, 2024 at 2:25 AM Tony Ambardar wrote:
> >
> > From: Tony Ambardar
> >
> > Allow bpf_object__open() to access files of either endianness, and convert
> > included BPF programs t
On Fri, Aug 23, 2024 at 12:47:52PM -0700, Andrii Nakryiko wrote:
> On Thu, Aug 22, 2024 at 2:25 AM Tony Ambardar wrote:
> >
> > From: Tony Ambardar
> >
> > Allow static linking object files of either endianness, checking that input
> > files have consiste
On Fri, Aug 23, 2024 at 12:47:56PM -0700, Andrii Nakryiko wrote:
> On Thu, Aug 22, 2024 at 2:25 AM Tony Ambardar wrote:
> >
> > From: Tony Ambardar
> >
> > Track target endianness in 'struct bpf_gen' and process in-memory data in
> > native byte-orde
On Mon, Aug 26, 2024 at 02:28:17PM -0700, Andrii Nakryiko wrote:
> On Mon, Aug 26, 2024 at 3:53 AM Tony Ambardar wrote:
> >
> > On Fri, Aug 23, 2024 at 12:47:47PM -0700, Andrii Nakryiko wrote:
> > > On Thu, Aug 22, 2024 at 2:25 AM Tony Ambardar
> > > wrote:
&g
On Mon, Aug 26, 2024 at 02:25:27PM -0700, Andrii Nakryiko wrote:
> On Mon, Aug 26, 2024 at 3:58 AM Tony Ambardar wrote:
> >
> > On Fri, Aug 23, 2024 at 12:47:56PM -0700, Andrii Nakryiko wrote:
> > > On Thu, Aug 22, 2024 at 2:25 AM Tony Ambardar
> > > wrote:
&g
formatting noted by checkpatch warnings
- unexpected 'test_progs' failures drop 3 -> 2 (x86_64 to s390x cross)
Tony Ambardar (8):
libbpf: Improve log message formatting
libbpf: Fix header comment typos for BTF.ext
libbpf: Fix output .symtab byte-order during linking
libbpf: Sup
Fix missing newlines and extraneous terminal spaces in messages.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/btf.c | 6 +++---
tools/lib/bpf/btf_dump.c | 2 +-
tools/lib/bpf/btf_relocate.c | 2 +-
tools/lib/bpf/libbpf.c | 4 ++--
tools/lib/bpf/relo_core.c| 2 +-
5
rectly translated.
Fixes: faf6ed321cf6 ("libbpf: Add BPF static linker APIs")
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/linker.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
index 9cd3d4109788..7489306cd6f7 100644
--- a/tools/l
Mention struct btf_ext_info_sec rather than non-existent btf_sec_func_info
in BTF.ext struct documentation.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/libbpf_internal.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf
exist for BTF data.
[1] 3289959b97ca ("libbpf: Support BTF loading and raw data output in both
endianness")
[2] 8fd27bf69b86 ("libbpf: Add BPF static linker BTF and BTF.ext support")
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/btf.c | 226 +++
Allow bpf_object__open() to access files of either endianness, and convert
included BPF programs to native byte-order in-memory for introspection.
Loading BPF objects of non-native byte-order is still disallowed however.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/libbpf.c | 34
. This
is enabled by built-in ELF translation and recent BTF/BTF.ext endianness
functions. Further add local functions for swapping byte-order of sections
containing BPF insns.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/linker.c | 90 ++
1 file changed
to target byte-order on
finalization. Add support functions to convert data to target endianness
as it is added to the blob.
Also add additional debug logging for data blob structure details and
skeleton loading.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/bpf_gen_internal.h | 1 +
too
Update Makefile build rules to compile BPF programs with target endianness
rather than host byte-order. With recent changes, this allows building the
full selftests/bpf suite hosted on x86_64 and targeting s390x or mips64eb
for example.
Signed-off-by: Tony Ambardar
---
tools/testing/selftests
On Wed, Aug 28, 2024 at 04:11:50AM -0700, Tony Ambardar wrote:
> Hello all,
[snip]
> Changelog:
> -
> v2 -> v3: (feedback from Andrii)
> - improve some log and commit message formatting
> - restructure BTF.ext endianness safety checks and byte-swapping
> -
Update Makefile build rules to compile BPF programs with target endianness
rather than host byte-order. With recent changes, this allows building the
full selftests/bpf suite hosted on x86_64 and targeting s390x or mips64eb
for example.
Signed-off-by: Tony Ambardar
---
tools/testing/selftests
. This
is enabled by built-in ELF translation and recent BTF/BTF.ext endianness
functions. Further add local functions for swapping byte-order of sections
containing BPF insns.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/linker.c | 90 ++
1 file changed
to target byte-order on
finalization. Add support functions to convert data to target endianness
as it is added to the blob.
Also add additional debug logging for data blob structure details and
skeleton loading.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/bpf_gen_internal.h | 1 +
too
rectly translated.
Fixes: faf6ed321cf6 ("libbpf: Add BPF static linker APIs")
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/linker.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
index 9cd3d4109788..7489306cd6f7 100644
--- a/tools/l
fixed a light skeleton bug causing test_progs 'map_ptr' failure
- simplified some BTF.ext related endianness logic
- remove an 'inline' usage related to CI checkpatch failure
- improve some formatting noted by checkpatch warnings
- unexpected 'test_progs' failures
Fix missing newlines and extraneous terminal spaces in messages.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/btf.c | 6 +++---
tools/lib/bpf/btf_dump.c | 2 +-
tools/lib/bpf/btf_relocate.c | 2 +-
tools/lib/bpf/libbpf.c | 4 ++--
tools/lib/bpf/relo_core.c| 2 +-
5
Mention struct btf_ext_info_sec rather than non-existent btf_sec_func_info
in BTF.ext struct documentation.
Signed-off-by: Tony Ambardar
---
tools/lib/bpf/libbpf_internal.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf
1 - 100 of 138 matches
Mail list logo