History

Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Daniel Borkmann says: ==================== pull-request: bpf-next 2022-04-27 We've added 85 non-merge commits during the last 18 day(s) which contain a total of 163 files changed, 4499 insertions(+), 1521 deletions(-). The main changes are: 1) Teach libbpf to enhance BPF verifier log with human-readable and relevant information about failed CO-RE relocations, from Andrii Nakryiko. 2) Add typed pointer support in BPF maps and enable it for unreferenced pointers (via probe read) and referenced ones that can be passed to in-kernel helpers, from Kumar Kartikeya Dwivedi. 3) Improve xsk to break NAPI loop when rx queue gets full to allow for forward progress to consume descriptors, from Maciej Fijalkowski & Björn Töpel. 4) Fix a small RCU read-side race in BPF_PROG_RUN routines which dereferenced the effective prog array before the rcu_read_lock, from Stanislav Fomichev. 5) Implement BPF atomic operations for RV64 JIT, and add libbpf parsing logic for USDT arguments under riscv{32,64}, from Pu Lehui. 6) Implement libbpf parsing of USDT arguments under aarch64, from Alan Maguire. 7) Enable bpftool build for musl and remove nftw with FTW_ACTIONRETVAL usage so it can be shipped under Alpine which is musl-based, from Dominique Martinet. 8) Clean up {sk,task,inode} local storage trace RCU handling as they do not need to use call_rcu_tasks_trace() barrier, from KP Singh. 9) Improve libbpf API documentation and fix error return handling of various API functions, from Grant Seltzer. 10) Enlarge offset check for bpf_skb_{load,store}_bytes() helpers given data length of frags + frag_list may surpass old offset limit, from Liu Jian. 11) Various improvements to prog_tests in area of logging, test execution and by-name subtest selection, from Mykola Lysenko. 12) Simplify map_btf_id generation for all map types by moving this process to build time with help of resolve_btfids infra, from Menglong Dong. 13) Fix a libbpf bug in probing when falling back to legacy bpf_probe_read*() helpers; the probing caused always to use old helpers, from Runqing Yang. 14) Add support for ARCompact and ARCv2 platforms for libbpf's PT_REGS tracing macros, from Vladimir Isaev. 15) Cleanup BPF selftests to remove old & unneeded rlimit code given kernel switched to memcg-based memory accouting a while ago, from Yafang Shao. 16) Refactor of BPF sysctl handlers to move them to BPF core, from Yan Zhu. 17) Fix BPF selftests in two occasions to work around regressions caused by latest LLVM to unblock CI until their fixes are worked out, from Yonghong Song. 18) Misc cleanups all over the place, from various others. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (85 commits) selftests/bpf: Add libbpf's log fixup logic selftests libbpf: Fix up verifier log for unguarded failed CO-RE relos libbpf: Simplify bpf_core_parse_spec() signature libbpf: Refactor CO-RE relo human description formatting routine libbpf: Record subprog-resolved CO-RE relocations unconditionally selftests/bpf: Add CO-RE relos and SEC("?...") to linked_funcs selftests libbpf: Avoid joining .BTF.ext data with BPF programs by section name libbpf: Fix logic for finding matching program for CO-RE relocation libbpf: Drop unhelpful "program too large" guess libbpf: Fix anonymous type check in CO-RE logic bpf: Compute map_btf_id during build time selftests/bpf: Add test for strict BTF type check selftests/bpf: Add verifier tests for kptr selftests/bpf: Add C tests for kptr libbpf: Add kptr type tag macros to bpf_helpers.h bpf: Make BTF type match stricter for release arguments bpf: Teach verifier about kptr_get kfunc helpers bpf: Wire up freeing of referenced kptr bpf: Populate pairs of btf_id and destructor kfunc in btf bpf: Adapt copy_map_value for multiple offset case ... ====================

Jakub Kicinski committed 4 years ago

Commit 50c6afa2 parents c6101dd d54d06a163 files · +4499 −1521Browse files

Showing the changes to include/uapi (1 of 163 files). Show all

Unified · Split

include/uapi/linux/bpf.h+12−0
@@ -5143,6 +5143,17 @@ union bpf_attr { · 5142 unmodified lines
5143 * The **hash_algo** is returned on success,5143 * The **hash_algo** is returned on success,
5144 * **-EOPNOTSUP** if the hash calculation failed or **-EINVAL** if5144 * **-EOPNOTSUP** if the hash calculation failed or **-EINVAL** if
5145 * invalid arguments are passed.5145 * invalid arguments are passed.
5146 *
5147 * void *bpf_kptr_xchg(void *map_value, void *ptr)
5148 * Description
5149 * Exchange kptr at pointer *map_value* with *ptr*, and return the
5150 * old value. *ptr* can be NULL, otherwise it must be a referenced
5151 * pointer which will be released when this helper is called.
5152 * Return
5153 * The old value of kptr (which can be NULL). The returned pointer
5154 * if not NULL, is a reference which must be released using its
5155 * corresponding release function, or moved into a BPF map before
5156 * program exit.
5146 */5157 */
5147#define __BPF_FUNC_MAPPER(FN) \5158#define __BPF_FUNC_MAPPER(FN) \
5148 FN(unspec), \5159 FN(unspec), \
@@ -5339,6 +5350,7 @@ union bpf_attr { · 190 unmodified lines
5339 FN(copy_from_user_task), \5350 FN(copy_from_user_task), \
5340 FN(skb_set_tstamp), \5351 FN(skb_set_tstamp), \
5341 FN(ima_file_hash), \5352 FN(ima_file_hash), \
5353 FN(kptr_xchg), \
5342 /* */5354 /* */
5343 5355
5344/* integer value in 'imm' field of BPF_CALL instruction selects which helper5356/* integer value in 'imm' field of BPF_CALL instruction selects which helper