Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
329 commits
Select commit Hold shift + click to select a range
829e50f
sync: improve sync script to handle common issues
anakryiko Sep 4, 2020
a454a08
bpf: Make bpf_link_info.iter similar to bpf_iter_link_info
yonghong-song Aug 28, 2020
5bd7cae
bpf: Introduce sleepable BPF programs
Aug 27, 2020
b228eb8
bpf: Add bpf_copy_from_user() helper.
Aug 27, 2020
06ae1b0
libbpf: Support sleepable progs
Aug 27, 2020
a6e9cf1
libbpf: Support shared umems between queues and devices
magnus-karlsson Aug 28, 2020
994aae7
libbpf: Ensure ELF symbols table is found before further ELF processing
anakryiko Sep 3, 2020
bb5e707
libbpf: Parse multi-function sections into multiple BPF programs
anakryiko Sep 3, 2020
a3abae5
libbpf: Support CO-RE relocations for multi-prog sections
anakryiko Sep 3, 2020
448789b
libbpf: Make RELO_CALL work for multi-prog sections and sub-program c…
anakryiko Sep 3, 2020
2b28b4f
libbpf: Implement generalized .BTF.ext func/line info adjustment
anakryiko Sep 3, 2020
4b60f82
libbpf: Add multi-prog section support for struct_ops
anakryiko Sep 3, 2020
78cdb58
libbpf: Deprecate notion of BPF program "title" in favor of "section …
anakryiko Sep 3, 2020
3b80b6c
libbpf: Fix build failure from uninitialized variable warning
guidosarducci Aug 31, 2020
3f9447b
sync: auto-generate latest BPF helpers
anakryiko Sep 4, 2020
6384ee1
sync: latest libbpf changes from kernel
anakryiko Sep 4, 2020
91001a9
include: implement list_empty() and list_for_each_entry()
anakryiko Sep 4, 2020
3a2ebfc
libbpf: Fix another __u64 cast in printf
anakryiko Sep 4, 2020
106e7dc
libbpf: Fix potential multiplication overflow
anakryiko Sep 4, 2020
011700e
sync: latest libbpf changes from kernel
anakryiko Sep 4, 2020
8b14cb4
Makefile: link against zlib
vcunat Sep 8, 2020
8052936
tools, bpf: Synchronise BPF UAPI header with tools
qmonnet Sep 4, 2020
8333e57
sync: auto-generate latest BPF helpers
anakryiko Sep 10, 2020
820813b
sync: latest libbpf changes from kernel
anakryiko Sep 10, 2020
787abf7
vmtests: ensure rst2man is installed, needed for bpftool selftests
anakryiko Sep 11, 2020
5f50b4b
libbpf: Fix native endian assumption when parsing BTF
guidosarducci Sep 20, 2020
2200fef
libbpf: Fix XDP program load regression for old kernels
anakryiko Sep 24, 2020
37c5973
sync: latest libbpf changes from kernel
anakryiko Sep 24, 2020
9992124
vmtest: update root fs, whitelist sk_{assign|lookup} test
Apr 5, 2020
f700cf6
vmtests: unblacklist few tests
anakryiko Sep 28, 2020
0102f65
bpf: Fix comment for helper bpf_current_task_under_cgroup()
liu-song-6 Sep 10, 2020
08dc84e
libbpf: Fix a compilation error with xsk.c for ubuntu 16.04
yonghong-song Sep 14, 2020
f38fccf
bpf: Add BPF_PROG_BIND_MAP syscall
zhuyifei1999 Sep 15, 2020
3cf3c6c
libbpf: Add BPF_PROG_BIND_MAP syscall and use it on .rodata section
zhuyifei1999 Sep 15, 2020
120e99c
bpf: Change bpf_sk_release and bpf_sk_*cgroup_id to accept ARG_PTR_TO…
iamkafai Sep 25, 2020
32e5add
bpf: Change bpf_sk_storage_*() to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON
iamkafai Sep 25, 2020
76ee807
bpf: Change bpf_tcp_*_syncookie to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON
iamkafai Sep 25, 2020
146bdd7
bpf: Change bpf_sk_assign to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON
iamkafai Sep 25, 2020
b6f1385
bpf: Enable BPF_PROG_TEST_RUN for raw_tracepoint
liu-song-6 Sep 25, 2020
b2e50da
libbpf: Support test run of raw tracepoint programs
liu-song-6 Sep 25, 2020
4023fbd
libbpf: Refactor internals of BTF type index
anakryiko Sep 26, 2020
71e8af7
libbpf: Remove assumption of single contiguous memory for BTF data
anakryiko Sep 26, 2020
063eed6
libbpf: Generalize common logic for managing dynamically-sized arrays
anakryiko Sep 26, 2020
897a0e7
libbpf: Extract generic string hashing function for reuse
anakryiko Sep 26, 2020
7ac1547
libbpf: Allow modification of BTF and add btf__add_str API
anakryiko Sep 26, 2020
3cfff16
libbpf: Add btf__new_empty() to create an empty BTF object
anakryiko Sep 26, 2020
e764782
bpf: Add bpf_snprintf_btf helper
alan-maguire Sep 28, 2020
2654268
bpf: Add bpf_seq_printf_btf helper
alan-maguire Sep 28, 2020
a388fcb
libbpf: Add BTF writing APIs
anakryiko Sep 29, 2020
6f90197
libbpf: Add btf__str_by_offset() as a more generic variant of name_by…
anakryiko Sep 29, 2020
f007a6b
selftests/bpf: Test BTF writing APIs
anakryiko Sep 29, 2020
488110d
libbpf: Support BTF loading and raw data output in both endianness
anakryiko Sep 29, 2020
5e35921
bpf: Support attaching freplace programs to multiple attach points
tohojo Sep 29, 2020
e40af4d
libbpf: Add support for freplace attachment in bpf_link_create
tohojo Sep 29, 2020
91e666c
libbpf: Fix uninitialized variable in btf_parse_type_sec
anakryiko Sep 29, 2020
760f71e
sync: auto-generate latest BPF helpers
anakryiko Sep 30, 2020
21ea184
sync: latest libbpf changes from kernel
anakryiko Sep 30, 2020
ff797cc
vmtests: blacklist new tests for 5.5
anakryiko Sep 29, 2020
5a10cd2
remove internal reallocarray()
vcunat Sep 7, 2020
b5fd4c7
bpf: Add classid helper only based on skb->sk
borkmann Sep 30, 2020
750801a
bpf: Add redirect_neigh helper as redirect drop-in
borkmann Sep 30, 2020
80c7838
bpf, libbpf: Add bpf_tail_call_static helper for bpf programs
borkmann Sep 30, 2020
317ef1c
libbpf: Make btf_dump work with modifiable BTF
anakryiko Sep 29, 2020
2d0aa12
sync: auto-generate latest BPF helpers
anakryiko Sep 30, 2020
a132697
sync: latest libbpf changes from kernel
anakryiko Sep 30, 2020
b6dd2f2
vmtests: un-blacklist fixed selftests
anakryiko Sep 30, 2020
ecbd504
makefile: add quiet mode support
anakryiko Oct 11, 2020
8205f37
sync: ignore libc_compat.h
anakryiko Oct 12, 2020
09718f4
bpf: Introduce BPF_F_PRESERVE_ELEMS for perf event array
liu-song-6 Sep 30, 2020
3706bf7
bpf: Introduce pseudo_btf_id
haoluo1022 Sep 29, 2020
6d0fcc3
bpf/libbpf: BTF support for typed ksyms
haoluo1022 Sep 29, 2020
b3b297a
bpf: Introduce bpf_per_cpu_ptr()
haoluo1022 Sep 29, 2020
f908087
bpf: Introducte bpf_this_cpu_ptr()
haoluo1022 Sep 29, 2020
fd28e01
libbpf: Close map fd if init map slots failed
liuhangbin Oct 6, 2020
54fe2f1
libbpf: Check if pin_path was set even map fd exist
liuhangbin Oct 6, 2020
b9682e2
bpf, libbpf: Use valid btf in bpf_program__set_attach_target
Oct 5, 2020
1bc0814
bpf: Fix typo in uapi/linux/bpf.h
jwilk Oct 7, 2020
95848b5
libbpf: Fix compatibility problem in xsk_socket__create
magnus-karlsson Oct 7, 2020
44d5bc1
libbpf: Skip CO-RE relocations for not loaded BPF programs
anakryiko Oct 8, 2020
8ef6a6e
libbpf: Support safe subset of load/store instruction resizing with C…
anakryiko Oct 8, 2020
76764b8
libbpf: Allow specifying both ELF and raw BTF for CO-RE BTF override
anakryiko Oct 8, 2020
e3b9cf7
bpf: Add tcp_notsent_lowat bpf setsockopt
tehnerd Oct 9, 2020
a8a505a
bpf: Improve bpf_redirect_neigh helper description
borkmann Oct 10, 2020
4672fb6
bpf: Add redirect_peer helper
borkmann Oct 10, 2020
d47094a
bpf: Allow for map-in-map with dynamic inner array map entries
borkmann Oct 10, 2020
bc94c2b
sync: auto-generate latest BPF helpers
anakryiko Oct 12, 2020
6fa81d4
sync: latest libbpf changes from kernel
anakryiko Oct 12, 2020
de58d0c
sync: update 5.5.0 blacklist
anakryiko Oct 12, 2020
4928040
readme: add Ubuntu mentions
anakryiko Oct 27, 2020
78d6115
bpf: Fix bpf_redirect_neigh helper api to support supplying nexthop
tohojo Oct 20, 2020
f754860
bpf, libbpf: Guard bpf inline asm from bpf_tail_call_static
borkmann Oct 21, 2020
475ee87
sync: auto-generate latest BPF helpers
anakryiko Oct 28, 2020
f0c6b6b
sync: latest libbpf changes from kernel
anakryiko Oct 28, 2020
d1fd50d
helpers: add `struct bpf_redir_neigh` forward declaration
anakryiko Oct 28, 2020
4953827
libbpf: Factor out common operations in BTF writing APIs
anakryiko Nov 5, 2020
be2dc73
libbpf: Unify and speed up BTF string deduplication
anakryiko Nov 5, 2020
2811d54
libbpf: Implement basic split BTF support
anakryiko Nov 5, 2020
dd36215
libbpf: Fix BTF data layout checks and allow empty BTF
anakryiko Nov 5, 2020
658ac1e
libbpf: Support BTF dedup of split BTFs
anakryiko Nov 5, 2020
e6725d2
libbpf: Accomodate DWARF/compiler bug with duplicated identical arrays
anakryiko Nov 5, 2020
224db2d
libbpf, hashmap: Fix undefined behavior in hash_bits
captain5050 Oct 29, 2020
539aa6b
libbpf: Fix null dereference in xsk_socket__delete
magnus-karlsson Nov 3, 2020
8caff99
libbpf: Fix possible use after free in xsk_socket__delete
magnus-karlsson Nov 3, 2020
e30f758
sync: auto-generate latest BPF helpers
anakryiko Nov 6, 2020
c55abf0
sync: latest libbpf changes from kernel
anakryiko Nov 6, 2020
5af3d86
vmtests: blacklist two more tests on 5.5
anakryiko Nov 6, 2020
5ae2a26
readme: move gory sync details down and add libbpf-bootstrap references
anakryiko Nov 29, 2020
f99c252
vmtest: update Kconfig to accommodate IMA test config
anakryiko Dec 3, 2020
00ae5ba
bpf: Implement task local storage
sinkap Nov 6, 2020
83c2c20
libbpf: Add support for task local storage
sinkap Nov 6, 2020
eae38a7
bpf: Implement get_current_task_btf and RET_PTR_TO_BTF_ID
sinkap Nov 6, 2020
ef8820f
bpf: Assign ID to vmlinux BTF and return extra info for BTF in GET_OB…
anakryiko Nov 10, 2020
2dd5965
libbpf: Don't attempt to load unused subprog as an entry-point BPF pr…
anakryiko Nov 7, 2020
2ea4ba9
macvlan: Support for high multicast packet rate
tkarls Dec 2, 2020
de2edae
libbpf: bpf__find_by_name[_kind] should use btf__get_nr_types()
alan-maguire Nov 15, 2020
6969a44
bpf: Add bpf_bprm_opts_set helper
sinkap Nov 17, 2020
39f5b2e
bpf: Add bpf_ktime_get_coarse_ns helper
ubique Nov 17, 2020
dd2369d
libbpf: Add support for canceling cached_cons advance
lrq-max Nov 24, 2020
3a2739a
bpf: Add a BPF helper for getting the IMA hash of an inode
sinkap Nov 24, 2020
65e4be6
libbpf: Replace size_t with __u32 in xsk interfaces
magnus-karlsson Nov 26, 2020
a741bc6
libbpf: Add base BTF accessor
anakryiko Dec 2, 2020
78c76a1
libbpf: Separate XDP program load with xsk socket creation
Dec 3, 2020
5fe9c12
libbpf: Fail early when loading programs with unspecified type
andreimatei Dec 3, 2020
691c22d
libbpf: Sanitise map names before pinning
tohojo Dec 3, 2020
8051a53
libbpf: Cap retries in sys_bpf_prog_load
fomichev Dec 2, 2020
10e321f
libbpf: Add internal helper to load BTF data by FD
anakryiko Dec 3, 2020
aff8028
libbpf: Refactor CO-RE relocs to not assume a single BTF object
anakryiko Dec 3, 2020
6b08519
libbpf: Add kernel module BTF support for CO-RE relocations
anakryiko Dec 3, 2020
fde1be5
bpf: Allow to specify kernel module BTFs when attaching BPF programs
anakryiko Dec 3, 2020
a1fd6da
libbpf: Factor out low-level BPF program loading helper
anakryiko Dec 3, 2020
d95b12d
libbpf: Support attachment of BPF tracing programs to kernel modules
anakryiko Dec 3, 2020
b2a3478
libbpf: Use memcpy instead of strncpy to please GCC
anakryiko Dec 3, 2020
21ae7bb
libbpf: Fix ring_buffer__poll() to return number of consumed samples
anakryiko Nov 30, 2020
8c2c4c3
sync: auto-generate latest BPF helpers
anakryiko Dec 4, 2020
2042df2
sync: latest libbpf changes from kernel
anakryiko Dec 4, 2020
2981bb8
vmtests: update vmlinux.h to latest version
anakryiko Dec 3, 2020
46ecf7a
vmtest: omit building bpf_testmod.ko on non-latest kernels
anakryiko Dec 4, 2020
42baefb
vmtests: update blacklist for 5.5
anakryiko Dec 3, 2020
3e68c60
bpf: Fix enum names for bpf_this_cpu_ptr() and bpf_per_cpu_ptr() helpers
anakryiko Dec 11, 2020
252ad1f
bpf: Add a bpf_sock_from_file helper
FlorentRevest Dec 4, 2020
ebcae62
libbpf: Support modules in bpf_program__set_attach_target() API
anakryiko Dec 11, 2020
30e2c16
libbpf: Expose libbpf ring_buffer epoll_fd
bjackman Dec 14, 2020
182e9dd
sync: auto-generate latest BPF helpers
anakryiko Dec 17, 2020
8262be6
sync: latest libbpf changes from kernel
anakryiko Dec 17, 2020
c66a977
vmtests: fix up bpf_testmod.ko generation for 5.5 and 4.9
anakryiko Dec 18, 2020
4d3535f
vmtests: test_maps needs more memory, so bump to 4G
anakryiko Dec 18, 2020
e05f9be
vmtests: temporarily disable test_maps
anakryiko Dec 20, 2020
5569404
README: note that Debian 11 (will) ship LLVM 11
bluca Jan 2, 2021
a3a5e96
README: point to Debian source package rather than binary
bluca Jan 2, 2021
051a400
pkgconfig: use literal ${prefix} to allow override
bluca Jan 2, 2021
7c2a94f
README: mention that Debian 11 ships with BTF support
bluca Jan 22, 2021
c1d4bbb
libbpf: Add user-space variants of BPF_CORE_READ() family of macros
anakryiko Dec 18, 2020
a26ae1b
libbpf: Add non-CO-RE variants of BPF_CORE_READ() macro family
anakryiko Dec 18, 2020
d52e5f5
libbpf: Clarify kernel type use with USER variants of CORE reading ma…
anakryiko Jan 8, 2021
0de8b9a
bpf: Clarify return value of probe str helpers
bjackman Jan 12, 2021
0db7da9
libbpf: Support kernel module ksym externs
anakryiko Jan 12, 2021
f15814c
bpf, libbpf: Avoid unused function warning on bpf_tail_call_static
captain5050 Jan 13, 2021
03fbe22
bpf: Rename BPF_XADD and prepare to encode other atomics in .imm
bjackman Jan 14, 2021
ac86f42
bpf: Add BPF_FETCH field / create atomic_fetch_add instruction
bjackman Jan 14, 2021
d2b784d
bpf: Add instructions for atomic_[cmp]xchg
bjackman Jan 14, 2021
4adbb7b
GTP: add support for flow based tunneling API
pshelar Jan 10, 2021
f037b92
libbpf: Allow loading empty BTFs
anakryiko Jan 10, 2021
16d7f41
libbpf: Use string table index from index table if needed
olsajiri Jan 21, 2021
6e01a23
libbpf, xsk: Select AF_XDP BPF program based on kernel version
Jan 22, 2021
eb56f8f
sync: auto-generate latest BPF helpers
anakryiko Jan 26, 2021
649f9dc
sync: latest libbpf changes from kernel
anakryiko Jan 26, 2021
a199b85
vmtest: blacklist atomics selftest for 5.5
anakryiko Jan 27, 2021
767d82c
install: don't preserve file owner
teknoraver Jan 26, 2021
f35e87d
vmtest: switch to Clang/LLVM 13
anakryiko Feb 3, 2021
adaf538
vmtests: revert to Clang/LLVM 12 until Clang 13 regression is fixed
anakryiko Feb 9, 2021
b0b5ec0
fix typo in license name
teknoraver Feb 21, 2021
f2a926b
Revert "vmtests: revert to Clang/LLVM 12 until Clang 13 regression is…
anakryiko Feb 12, 2021
e1a90f3
travis-ci: switch from GCC8 to GCC10
anakryiko Feb 22, 2021
06ee116
Revert "GTP: add support for flow based tunneling API"
Feb 3, 2021
1015d47
bpf: Count the number of times recursion was prevented
Feb 10, 2021
99e6a46
bpf: Be less specific about socket cookies guarantees
FlorentRevest Feb 10, 2021
d142d4a
bpf: Expose bpf_get_socket_cookie to tracing programs
FlorentRevest Feb 10, 2021
14a61e8
libbpf: Use AF_LOCAL instead of AF_INET in xsk.c
fomichev Feb 9, 2021
6426556
libbpf: Ignore non function pointer member in struct_ops
iamkafai Feb 12, 2021
f0753b5
bpf: bpf_fib_lookup return MTU value as output when looked up
netoptimizer Feb 9, 2021
6cc16d6
bpf: Add BPF-helper for MTU checking
netoptimizer Feb 9, 2021
587d2ab
bpf: Remove blank line in bpf helper description comment
liuhangbin Feb 23, 2021
f3612e4
bpf: Add bpf_for_each_map_elem() helper
yonghong-song Feb 26, 2021
60aa32b
libbpf: Move function is_ldimm64() earlier in libbpf.c
yonghong-song Feb 26, 2021
712f658
libbpf: Support subprog address relocation
yonghong-song Feb 26, 2021
18b55bc
sync: auto-generate latest BPF helpers
anakryiko Mar 3, 2021
7065a80
sync: latest libbpf changes from kernel
anakryiko Mar 3, 2021
7e03685
vmtests: blacklist new tests on 5.5 kernel
anakryiko Mar 3, 2021
473899d
bpf: Add BTF_KIND_FLOAT to uapi
iii-i Feb 26, 2021
617f781
libbpf: Fix whitespace in btf_add_composite() comment
iii-i Feb 26, 2021
471e7c2
libbpf: Add BTF_KIND_FLOAT support
iii-i Feb 26, 2021
986962f
sync: latest libbpf changes from kernel
iii-i Mar 5, 2021
092a606
Makefile: fix install flags order
anakryiko Mar 6, 2021
8c2c7e5
sync: use bpf_doc.py
iii-i Mar 25, 2021
fade1c3
libbpf: Clear map_info before each bpf_obj_get_info_by_fd
mfijalko Mar 3, 2021
18c0f03
scripts/bpf: Abstract eBPF API target parameter
joestringer Mar 2, 2021
21f523f
tools: Sync uapi bpf.h header with latest changes
joestringer Mar 2, 2021
4f2e1ec
bpf: Add PROG_TEST_RUN support for sk_lookup programs
lmb Mar 3, 2021
d64f8d3
bpf: Add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH
Mar 4, 2021
1d483b4
libbpf, xsk: Add libbpf_smp_store_release libbpf_smp_load_acquire
Mar 5, 2021
186ffbe
libbpf: Fix arm64 build
Mar 8, 2021
c903b3a
libbpf: Fix error path in bpf_object__elf_init()
namhyung Mar 17, 2021
bbc6515
libbpf: Use SOCK_CLOEXEC when opening the netlink socket
kkdwvd Mar 17, 2021
c14f7e5
libbpf: Fix BTF dump of pointer-to-array-of-struct
Mar 19, 2021
27db710
libbpf: xsk: Remove linux/compiler.h header
Mar 10, 2021
b727e2d
libbpf: xsk: Move barriers from libbpf_util.h to xsk.h
Mar 10, 2021
a0ad81d
libbpf: Avoid inline hint definition from 'linux/stddef.h'
tammela Mar 14, 2021
c8bfeae
libbpf: Add explicit padding to bpf_xdp_set_link_opts
anakryiko Mar 13, 2021
75a2e3b
libbpf: provide NULL and KERNEL_VERSION macros in bpf_helpers.h
anakryiko Mar 17, 2021
082a5c6
libbpf: Expose btf_type_by_id() internally
anakryiko Mar 18, 2021
74e94c4
libbpf: Generalize BTF and BTF.ext type ID and strings iteration
anakryiko Mar 18, 2021
7fc514a
libbpf: Rename internal memory-management helpers
anakryiko Mar 18, 2021
861ad35
libbpf: Extract internal set-of-strings datastructure APIs
anakryiko Mar 18, 2021
4fdc364
libbpf: Add generic BTF type shallow copy API
anakryiko Mar 18, 2021
bd81770
libbpf: Add BPF static linker APIs
anakryiko Mar 18, 2021
b156979
libbpf: Add BPF static linker BTF and BTF.ext support
anakryiko Mar 18, 2021
7b1f3e3
libbpf: Add explicit padding to btf_dump_emit_type_decl_opts
sinkap Mar 19, 2021
d4d3a88
libbpf: Skip BTF fixup if object file has no BTF
anakryiko Mar 19, 2021
53f0e7d
libbpf: Constify few bpf_program getters
anakryiko Mar 24, 2021
b09a499
libbpf: Add bpf object kern_version attribute setter
Mar 23, 2021
3118d38
sync: auto-generate latest BPF helpers
anakryiko Mar 26, 2021
3ea10e4
sync: latest libbpf changes from kernel
anakryiko Mar 26, 2021
582b8fe
sync: remove libbpf_util.h from the list of headers
anakryiko Mar 26, 2021
1d2d2d0
vmtests: blacklist fexit_sleep on 5.5
anakryiko Mar 26, 2021
ea5752c
Makefile: add strset.o and linker.o to build
anakryiko Mar 26, 2021
99bc176
README: update links to more up-to-date CO-RE articles
anakryiko Mar 28, 2021
2bd682d
README: Mention Alpine in list of packaging distros
acj Apr 4, 2021
a18b72b
libbpf: Preserve empty DATASEC BTFs during static linking
anakryiko Mar 26, 2021
e35afcb
bpf: Support bpf program calling kernel function
iamkafai Mar 25, 2021
e5d7cbe
libbpf: Refactor bpf_object__resolve_ksyms_btf_id
iamkafai Mar 25, 2021
7036f33
libbpf: Refactor codes for finding btf id of a kernel symbol
iamkafai Mar 25, 2021
7ef7ed2
libbpf: Rename RELO_EXTERN to RELO_EXTERN_VAR
iamkafai Mar 25, 2021
90e052e
libbpf: Record extern sym relocation first
iamkafai Mar 25, 2021
1ccb9d9
libbpf: Support extern kernel function
iamkafai Mar 25, 2021
2e51adc
libbpf: Fix memory leak when emitting final btf_ext
anakryiko Mar 27, 2021
8628610
libbpf: xsk: Use bpf_link
mfijalko Mar 29, 2021
4e8d8d5
sock_map: Introduce BPF_SK_SKB_VERDICT
Mar 31, 2021
bea42d4
libbpf: Remove redundant semi-colon
Apr 2, 2021
d4beac5
libbpf: Fix KERNEL_VERSION macro
chenhengqi Apr 5, 2021
d98e968
libbpf: Fix bail out from 'ringbuf_process_ring()' on error
tammela Mar 25, 2021
37e838f
libbpf: Ensure umem pointer is non-NULL before dereferencing
cloftus Mar 31, 2021
4f932c1
libbpf: Restore umem state after socket create failure
cloftus Mar 31, 2021
416343d
libbpf: Only create rx and tx XDP rings when necessary
cloftus Mar 31, 2021
95f83b8
sync: latest libbpf changes from kernel
anakryiko Apr 5, 2021
174d0b7
vmtest: blacklist kfunc_call selftests
anakryiko Apr 5, 2021
9f0e42b
vmtest: blacklist stacktrace_build_id selftest
iii-i Apr 7, 2021
0c24814
travis-ci: disable GCC's -Wstringop-truncation noisy error on Ubuntu
iii-i Mar 30, 2021
915f3ab
travis-ci: prohibit uninitialized variables in managers/
iii-i Mar 30, 2021
bab780e
travis-ci: update to Ubuntu Focal
anakryiko Feb 2, 2021
a7502f2
vmtest: fix error reporting
iii-i Apr 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sudo: required
language: bash
dist: bionic
dist: focal
services:
- docker

Expand Down Expand Up @@ -35,7 +35,7 @@ stages:

jobs:
include:
- stage: Kernel Selftests
- stage: Builds & Tests
name: Kernel LATEST + selftests
language: bash
env: KERNEL=LATEST
Expand All @@ -51,8 +51,7 @@ jobs:
env: KERNEL=5.5.0
script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1

- stage: Builds
name: Debian Build
- name: Debian Build
language: bash
install: $CI_ROOT/managers/debian.sh SETUP
script: $CI_ROOT/managers/debian.sh RUN || travis_terminate 1
Expand All @@ -76,33 +75,33 @@ jobs:
script: $CI_ROOT/managers/debian.sh RUN_CLANG_ASAN || travis_terminate 1
after_script: $CI_ROOT/managers/debian.sh CLEANUP

- name: Debian Build (gcc-8)
- name: Debian Build (gcc-10)
language: bash
install: $CI_ROOT/managers/debian.sh SETUP
script: $CI_ROOT/managers/debian.sh RUN_GCC8 || travis_terminate 1
script: $CI_ROOT/managers/debian.sh RUN_GCC10 || travis_terminate 1
after_script: $CI_ROOT/managers/debian.sh CLEANUP

- name: Debian Build (gcc-8 ASan+UBSan)
- name: Debian Build (gcc-10 ASan+UBSan)
language: bash
install: $CI_ROOT/managers/debian.sh SETUP
script: $CI_ROOT/managers/debian.sh RUN_GCC8_ASAN || travis_terminate 1
script: $CI_ROOT/managers/debian.sh RUN_GCC10_ASAN || travis_terminate 1
after_script: $CI_ROOT/managers/debian.sh CLEANUP

- name: Ubuntu Bionic Build
- name: Ubuntu Focal Build
language: bash
script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1

- name: Ubuntu Bionic Build (arm)
- name: Ubuntu Focal Build (arm)
arch: arm64
language: bash
script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1

- name: Ubuntu Bionic Build (s390x)
- name: Ubuntu Focal Build (s390x)
arch: s390x
language: bash
script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1

- name: Ubuntu Bionic Build (ppc64le)
- name: Ubuntu Focal Build (ppc64le)
arch: ppc64le
language: bash
script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1
Expand All @@ -121,7 +120,7 @@ jobs:
- COVERITY_SCAN_BUILD_COMMAND_PREPEND="cd src/"
- COVERITY_SCAN_BUILD_COMMAND="make"
install:
- sudo echo 'deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse' >>/etc/apt/sources.list
- sudo echo 'deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse' >>/etc/apt/sources.list
- sudo apt-get update
- sudo apt-get -y build-dep libelf-dev
- sudo apt-get install -y libelf-dev pkg-config
Expand Down
2 changes: 1 addition & 1 deletion BPF-CHECKPOINT-COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5b801dfb7feb2738975d80223efc2fc193e55573
a14d273ba15968495896a38b7b3399dba66d0270
2 changes: 1 addition & 1 deletion CHECKPOINT-COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3c4f850e8441ac8b3b6dbaa6107604c4199ef01f
1e1032b0c4afaed7739a6681ff6b4cb120b82994
File renamed without changes.
50 changes: 33 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
This is a mirror of [bpf-next Linux source
tree](https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next)'s
`tools/lib/bpf` directory plus its supporting header files.
BPF/libbpf usage and questions
==============================

All the gory details of syncing can be found in `scripts/sync-kernel.sh`
script.

Some header files in this repo (`include/linux/*.h`) are reduced versions of
their counterpart files at
[bpf-next](https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/)'s
`tools/include/linux/*.h` to make compilation successful.

BPF questions
=============
Please check out [libbpf-bootstrap](https://github.com/libbpf/libbpf-bootstrap)
and [the companion blog post](https://nakryiko.com/posts/libbpf-bootstrap/) for
the examples of building BPF applications with libbpf.
[libbpf-tools](https://github.com/iovisor/bcc/tree/master/libbpf-tools) are also
a good source of the real-world libbpf-based tracing tools.

All general BPF questions, including kernel functionality, libbpf APIs and
their application, should be sent to bpf@vger.kernel.org mailing list. You can
Expand All @@ -26,7 +20,7 @@ should be opened only for dealing with issues pertaining to specific way this
libbpf mirror repo is set up and organized.

Build
[![Build Status](https://travis-ci.org/libbpf/libbpf.svg?branch=master)](https://travis-ci.org/libbpf/libbpf)
[![Build Status](https://travis-ci.com/libbpf/libbpf.svg?branch=master)](https://travis-ci.com/github/libbpf/libbpf)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/libbpf/libbpf.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/libbpf/libbpf/alerts/)
[![Coverity](https://img.shields.io/coverity/scan/18195.svg)](https://scan.coverity.com/projects/libbpf)
=====
Expand Down Expand Up @@ -67,7 +61,10 @@ Distributions
Distributions packaging libbpf from this mirror:
- [Fedora](https://src.fedoraproject.org/rpms/libbpf)
- [Gentoo](https://packages.gentoo.org/packages/dev-libs/libbpf)
- [Debian](https://packages.debian.org/sid/libbpf-dev)
- [Debian](https://packages.debian.org/source/sid/libbpf)
- [Arch](https://www.archlinux.org/packages/extra/x86_64/libbpf/)
- [Ubuntu](https://packages.ubuntu.com/source/groovy/libbpf)
- [Alpine](https://pkgs.alpinelinux.org/packages?name=libbpf)

Benefits of packaging from the mirror over packaging from kernel sources:
- Consistent versioning across distributions.
Expand Down Expand Up @@ -101,6 +98,8 @@ Some major Linux distributions come with kernel BTF already built in:
- RHEL 8.2+
- OpenSUSE Tumbleweed (in the next release, as of 2020-06-04)
- Arch Linux (from kernel 5.7.1.arch1-1)
- Ubuntu 20.10
- Debian 11 (amd64/arm64)

If your kernel doesn't come with BTF built-in, you'll need to build custom
kernel. You'll need:
Expand All @@ -120,17 +119,34 @@ distributions have Clang/LLVM 10+ packaged by default:
- Fedora 32+
- Ubuntu 20.04+
- Arch Linux
- Ubuntu 20.10 (LLVM 11)
- Debian 11 (LLVM 11)
- Alpine 3.13+

Otherwise, please make sure to update it on your system.

The following resources are useful to understand what BPF CO-RE is and how to
use it:
- [BPF Portability and CO-RE](https://facebookmicrosites.github.io/bpf/blog/2020/02/19/bpf-portability-and-co-re.html)
- [HOWTO: BCC to libbpf conversion](https://facebookmicrosites.github.io/bpf/blog/2020/02/20/bcc-to-libbpf-howto-guide.html)
- [BPF Portability and CO-RE](https://nakryiko.com/posts/bpf-portability-and-co-re/)
- [HOWTO: BCC to libbpf conversion](https://nakryiko.com/posts/bcc-to-libbpf-howto-guide/)
- [libbpf-tools in BCC repo](https://github.com/iovisor/bcc/tree/master/libbpf-tools)
contain lots of real-world tools converted from BCC to BPF CO-RE. Consider
converting some more to both contribute to the BPF community and gain some
more experience with it.

Details
=======
This is a mirror of [bpf-next Linux source
tree](https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next)'s
`tools/lib/bpf` directory plus its supporting header files.

All the gory details of syncing can be found in `scripts/sync-kernel.sh`
script.

Some header files in this repo (`include/linux/*.h`) are reduced versions of
their counterpart files at
[bpf-next](https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/)'s
`tools/include/linux/*.h` to make compilation successful.

License
=======
Expand Down
8 changes: 8 additions & 0 deletions include/linux/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@

#include <linux/bpf.h>

#define BPF_RAW_INSN(CODE, DST, SRC, OFF, IMM) \
((struct bpf_insn) { \
.code = CODE, \
.dst_reg = DST, \
.src_reg = SRC, \
.off = OFF, \
.imm = IMM })

#define BPF_ALU64_IMM(OP, DST, IMM) \
((struct bpf_insn) { \
.code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \
Expand Down
9 changes: 9 additions & 0 deletions include/linux/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,20 @@ static inline void list_del(struct list_head *entry)
entry->prev = LIST_POISON2;
}

static inline int list_empty(const struct list_head *head)
{
return head->next == head;
}

#define list_entry(ptr, type, member) \
container_of(ptr, type, member)
#define list_first_entry(ptr, type, member) \
list_entry((ptr)->next, type, member)
#define list_next_entry(pos, member) \
list_entry((pos)->member.next, typeof(*(pos)), member)
#define list_for_each_entry(pos, head, member) \
for (pos = list_first_entry(head, typeof(*pos), member); \
&pos->member != (head); \
pos = list_next_entry(pos, member))

#endif
20 changes: 0 additions & 20 deletions include/tools/libc_compat.h

This file was deleted.

Loading