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
63466346
63476347 /* BTF ID set registration API for modules */
63486348
6349−struct kfunc_btf_id_list {
6350− struct list_head list;
6351− struct mutex mutex;
6352−};
6353−
63546349 #ifdef CONFIG_DEBUG_INFO_BTF_MODULES
63556350
63566351 void 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
63766371 {
63776372 struct kfunc_btf_id_set *s;
63786373
6379− if (!owner)
6380− return false;
63816374 mutex_lock(&klist->mutex);
63826375 list_for_each_entry(s, &klist->list, list) {
63836376 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
63896382 return false;
63906383 }
63916384
6392−#endif
6393−
63946385 #define DEFINE_KFUNC_BTF_ID_LIST(name) \
63956386 struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list), \
63966387 __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
63986389
63996390 DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
64006391 DEFINE_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
84228422
84238423 new_range = dst_reg->off;
84248424 if (range_right_open)
8425− new_range--;
8425+ new_range++;
84268426
84278427 /* Examples for register markings:
84288428 *