Message ID | 20231208102355.2628918-1-houtao@huaweicloud.com (mailing list archive) |
---|---|
Headers | show |
Series | bpf: Fixes for maybe_wait_bpf_programs() | expand |
Hello: This series was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <ast@kernel.org>: On Fri, 8 Dec 2023 18:23:48 +0800 you wrote: > From: Hou Tao <houtao1@huawei.com> > > Hi, > > The patch set aims to fix the problems found when inspecting the code > related with maybe_wait_bpf_programs(). > > [...] Here is the summary with links: - [bpf-next,1/7] bpf: Remove unnecessary wait from bpf_map_copy_value() https://git.kernel.org/bpf/bpf-next/c/c26f2a890139 - [bpf-next,2/7] bpf: Call maybe_wait_bpf_programs() only once for generic_map_update_batch() https://git.kernel.org/bpf/bpf-next/c/37ba5b59d6ad - [bpf-next,3/7] bpf: Add missed maybe_wait_bpf_programs() for htab of maps https://git.kernel.org/bpf/bpf-next/c/012772581d04 - [bpf-next,4/7] bpf: Only call maybe_wait_bpf_programs() when map operation succeeds https://git.kernel.org/bpf/bpf-next/c/67ad2c73ff29 - [bpf-next,5/7] bpf: Set uattr->batch.count as zero before batched update or deletion https://git.kernel.org/bpf/bpf-next/c/06e5c999f102 - [bpf-next,6/7] bpf: Only call maybe_wait_bpf_programs() when at least one map operation succeeds (no matching commit) - [bpf-next,7/7] bpf: Wait for sleepable BPF program in maybe_wait_bpf_programs() (no matching commit) You are awesome, thank you!
From: Hou Tao <houtao1@huawei.com> Hi, The patch set aims to fix the problems found when inspecting the code related with maybe_wait_bpf_programs(). Patch #1 removes unnecessary invocation of maybe_wait_bpf_programs(). Patch #2 calls maybe_wait_bpf_programs() only once for batched update. Patch #3 adds the missed waiting when doing batched lookup_deletion on htab of maps. Patch #4 does wait only if the update or deletion operation succeeds. Patch #5 fixes the value of batch.count when memory allocation fails. Patch #6 does the similar thing as patch #4, except it fixes the problem for batched map operations. Patch #7 handles sleepable BPF program in maybe_wait_bpf_programs(), but it doesn't handle the bpf syscall from syscall program. Please see individual patches for more details. Comments are always welcome. Hou Tao (7): bpf: Remove unnecessary wait from bpf_map_copy_value() bpf: Call maybe_wait_bpf_programs() only once for generic_map_update_batch() bpf: Add missed maybe_wait_bpf_programs() for htab of maps bpf: Only call maybe_wait_bpf_programs() when map operation succeeds bpf: Set uattr->batch.count as zero before batched update or deletion bpf: Only call maybe_wait_bpf_programs() when at least one map operation succeeds bpf: Wait for sleepable BPF program in maybe_wait_bpf_programs() include/linux/bpf.h | 14 +++++------ kernel/bpf/hashtab.c | 20 ++++++++------- kernel/bpf/syscall.c | 60 +++++++++++++++++++++++++++++++------------- 3 files changed, 61 insertions(+), 33 deletions(-)