History

Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf

Pull bpf fixes from Alexei Starovoitov: - Mark migrate_disable/enable() as always_inline to avoid issues with partial inlining (Yonghong Song) - Fix powerpc stack register definition in libbpf bpf_tracing.h (Andrii Nakryiko) - Reject negative head_room in __bpf_skb_change_head (Daniel Borkmann) - Conditionally include dynptr copy kfuncs (Malin Jonsson) - Sync pending IRQ work before freeing BPF ring buffer (Noorain Eqbal) - Do not audit capability check in x86 do_jit() (Ondrej Mosnacek) - Fix arm64 JIT of BPF_ST insn when it writes into arena memory (Puranjay Mohan) * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf/arm64: Fix BPF_ST into arena memory bpf: Make migrate_disable always inline to avoid partial inlining bpf: Reject negative head_room in __bpf_skb_change_head bpf: Conditionally include dynptr copy kfuncs libbpf: Fix powerpc's stack register definition in bpf_tracing.h bpf: Do not audit capability check in do_jit() bpf: Sync pending IRQ work before freeing ring buffer

Linus Torvalds committed 1 year ago

Commit ba36dd52 parents ec0b62c be708ed7 files · +13 −7Browse files

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

Unified · Split

2 files
  1. kernel/bpf/helpers.c +2 −0
  2. kernel/bpf/ringbuf.c +2 −0
kernel/bpf/helpers.c+2−0
@@ -4345,6 +4345,7 @@ BTF_ID_FLAGS(func, bpf_iter_kmem_cache_next, KF_ITER_NEXT | KF_RET_NULL | KF_SLE · 4344 unmodified lines
4345BTF_ID_FLAGS(func, bpf_iter_kmem_cache_destroy, KF_ITER_DESTROY | KF_SLEEPABLE)4345BTF_ID_FLAGS(func, bpf_iter_kmem_cache_destroy, KF_ITER_DESTROY | KF_SLEEPABLE)
4346BTF_ID_FLAGS(func, bpf_local_irq_save)4346BTF_ID_FLAGS(func, bpf_local_irq_save)
4347BTF_ID_FLAGS(func, bpf_local_irq_restore)4347BTF_ID_FLAGS(func, bpf_local_irq_restore)
4348#ifdef CONFIG_BPF_EVENTS
4348BTF_ID_FLAGS(func, bpf_probe_read_user_dynptr)4349BTF_ID_FLAGS(func, bpf_probe_read_user_dynptr)
4349BTF_ID_FLAGS(func, bpf_probe_read_kernel_dynptr)4350BTF_ID_FLAGS(func, bpf_probe_read_kernel_dynptr)
4350BTF_ID_FLAGS(func, bpf_probe_read_user_str_dynptr)4351BTF_ID_FLAGS(func, bpf_probe_read_user_str_dynptr)
@@ -4353,6 +4354,7 @@ BTF_ID_FLAGS(func, bpf_copy_from_user_dynptr, KF_SLEEPABLE) · 2 unmodified lines
4353BTF_ID_FLAGS(func, bpf_copy_from_user_str_dynptr, KF_SLEEPABLE)4354BTF_ID_FLAGS(func, bpf_copy_from_user_str_dynptr, KF_SLEEPABLE)
4354BTF_ID_FLAGS(func, bpf_copy_from_user_task_dynptr, KF_SLEEPABLE | KF_TRUSTED_ARGS)4355BTF_ID_FLAGS(func, bpf_copy_from_user_task_dynptr, KF_SLEEPABLE | KF_TRUSTED_ARGS)
4355BTF_ID_FLAGS(func, bpf_copy_from_user_task_str_dynptr, KF_SLEEPABLE | KF_TRUSTED_ARGS)4356BTF_ID_FLAGS(func, bpf_copy_from_user_task_str_dynptr, KF_SLEEPABLE | KF_TRUSTED_ARGS)
4357#endif
4356#ifdef CONFIG_DMA_SHARED_BUFFER4358#ifdef CONFIG_DMA_SHARED_BUFFER
4357BTF_ID_FLAGS(func, bpf_iter_dmabuf_new, KF_ITER_NEW | KF_SLEEPABLE)4359BTF_ID_FLAGS(func, bpf_iter_dmabuf_new, KF_ITER_NEW | KF_SLEEPABLE)
4358BTF_ID_FLAGS(func, bpf_iter_dmabuf_next, KF_ITER_NEXT | KF_RET_NULL | KF_SLEEPABLE)4360BTF_ID_FLAGS(func, bpf_iter_dmabuf_next, KF_ITER_NEXT | KF_RET_NULL | KF_SLEEPABLE)
kernel/bpf/ringbuf.c+2−0
@@ -216,6 +216,8 @@ static struct bpf_map *ringbuf_map_alloc(union bpf_attr *attr) · 215 unmodified lines
216 216
217static void bpf_ringbuf_free(struct bpf_ringbuf *rb)217static void bpf_ringbuf_free(struct bpf_ringbuf *rb)
218{218{
219 irq_work_sync(&rb->work);
220
219 /* copy pages pointer and nr_pages to local variable, as we are going221 /* copy pages pointer and nr_pages to local variable, as we are going
220 * to unmap rb itself with vunmap() below222 * to unmap rb itself with vunmap() below
221 */223 */