History

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

Daniel Borkmann says: ==================== bpf 2021-12-08 We've added 12 non-merge commits during the last 22 day(s) which contain a total of 29 files changed, 659 insertions(+), 80 deletions(-). The main changes are: 1) Fix an off-by-two error in packet range markings and also add a batch of new tests for coverage of these corner cases, from Maxim Mikityanskiy. 2) Fix a compilation issue on MIPS JIT for R10000 CPUs, from Johan Almbladh. 3) Fix two functional regressions and a build warning related to BTF kfunc for modules, from Kumar Kartikeya Dwivedi. 4) Fix outdated code and docs regarding BPF's migrate_disable() use on non- PREEMPT_RT kernels, from Sebastian Andrzej Siewior. 5) Add missing includes in order to be able to detangle cgroup vs bpf header dependencies, from Jakub Kicinski. 6) Fix regression in BPF sockmap tests caused by missing detachment of progs from sockets when they are removed from the map, from John Fastabend. 7) Fix a missing "no previous prototype" warning in x86 JIT caused by BPF dispatcher, from Björn Töpel. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Add selftests to cover packet access corner cases bpf: Fix the off-by-two error in range markings treewide: Add missing includes masked by cgroup -> bpf dependency tools/resolve_btfids: Skip unresolved symbol warning for empty BTF sets bpf: Fix bpf_check_mod_kfunc_call for built-in modules bpf: Make CONFIG_DEBUG_INFO_BTF depend upon CONFIG_BPF_SYSCALL mips, bpf: Fix reference to non-existing Kconfig symbol bpf: Make sure bpf_disable_instrumentation() is safe vs preemption. Documentation/locking/locktypes: Update migrate_disable() bits. bpf, sockmap: Re-evaluate proto ops when psock is removed from sockmap bpf, sockmap: Attach map progs to psock early for feature probes bpf, x86: Fix "no previous prototype" warning ====================

Jakub Kicinski committed 4 years ago

Commit 6efcdad2 parents 2b29cb9 b560b2129 files · +659 −80Browse files

Showing the changes to kernel (2 of 29 files). Show all

Unified · Split

2 files
  1. kernel/bpf/btf.c +2 −9
  2. kernel/bpf/verifier.c +1 −1
kernel/bpf/btf.c+2−9
@@ -6346,11 +6346,6 @@ BTF_ID_LIST_GLOBAL_SINGLE(btf_task_struct_ids, struct, task_struct) · 6345 unmodified lines
6346 6346
6347/* BTF ID set registration API for modules */6347/* BTF ID set registration API for modules */
6348 6348
6349struct kfunc_btf_id_list {
6350 struct list_head list;
6351 struct mutex mutex;
6352};
6353
6354#ifdef CONFIG_DEBUG_INFO_BTF_MODULES6349#ifdef CONFIG_DEBUG_INFO_BTF_MODULES
6355 6350
6356void register_kfunc_btf_id_set(struct kfunc_btf_id_list *l,6351void register_kfunc_btf_id_set(struct kfunc_btf_id_list *l,
@@ -6376,8 +6371,6 @@ bool bpf_check_mod_kfunc_call(struct kfunc_btf_id_list *klist, u32 kfunc_id, · 19 unmodified lines
6376{6371{
6377 struct kfunc_btf_id_set *s;6372 struct kfunc_btf_id_set *s;
6378 6373
6379 if (!owner)
6380 return false;
6381 mutex_lock(&klist->mutex);6374 mutex_lock(&klist->mutex);
6382 list_for_each_entry(s, &klist->list, list) {6375 list_for_each_entry(s, &klist->list, list) {
6383 if (s->owner == owner && btf_id_set_contains(s->set, kfunc_id)) {6376 if (s->owner == owner && btf_id_set_contains(s->set, kfunc_id)) {
@@ -6389,8 +6382,6 @@ bool bpf_check_mod_kfunc_call(struct kfunc_btf_id_list *klist, u32 kfunc_id, · 5 unmodified lines
6389 return false;6382 return false;
6390}6383}
6391 6384
6392#endif
6393
6394#define DEFINE_KFUNC_BTF_ID_LIST(name) \6385#define DEFINE_KFUNC_BTF_ID_LIST(name) \
6395 struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list), \6386 struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list), \
6396 __MUTEX_INITIALIZER(name.mutex) }; \6387 __MUTEX_INITIALIZER(name.mutex) }; \
@@ -6398,3 +6389,5 @@ bool bpf_check_mod_kfunc_call(struct kfunc_btf_id_list *klist, u32 kfunc_id, · 1 unmodified line
6398 6389
6399DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);6390DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
6400DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);6391DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
6392
6393#endif
kernel/bpf/verifier.c+1−1
@@ -8422,7 +8422,7 @@ static void find_good_pkt_pointers(struct bpf_verifier_state *vstate, · 8421 unmodified lines
8422 8422
8423 new_range = dst_reg->off;8423 new_range = dst_reg->off;
8424 if (range_right_open)8424 if (range_right_open)
8425 new_range--;8425 new_range++;
8426 8426
8427 /* Examples for register markings:8427 /* Examples for register markings:
8428 *8428 *