diff options
author | Alexei Starovoitov <ast@kernel.org> | 2020-09-28 16:40:47 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-09-28 16:48:02 -0700 |
commit | 84a20d8e8795b45e3f1673648d43b4cf0f594359 (patch) | |
tree | ae664a475c782e9d22991f2672eef4b56e4fd72f /kernel/bpf/verifier.c | |
parent | efa90b50934c93647e41da23d87e5d8b670014d4 (diff) | |
parent | 5b87adc3ceee3c3131e24e9bc9ef92dd41db089f (diff) | |
download | linux-84a20d8e8795b45e3f1673648d43b4cf0f594359.tar.bz2 |
Merge branch 'Sockmap copying'
Lorenz Bauer says:
====================
Changes in v2:
- Check sk_fullsock in map_update_elem (Martin)
Enable calling map_update_elem on sockmaps from bpf_iter context. This
in turn allows us to copy a sockmap by iterating its elements.
The change itself is tiny, all thanks to the ground work from Martin,
whose series [1] this patch is based on. I updated the tests to do some
copying, and also included two cleanups.
I'm sending this out now rather than when Martin's series has landed
because I hope this can get in before the merge window (potentially)
closes this weekend.
1: https://lore.kernel.org/bpf/20200925000337.3853598-1-kafai@fb.com/
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/verifier.c')
-rw-r--r-- | kernel/bpf/verifier.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index b25ba989c2dc..cc9c90d74dc1 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -3943,7 +3943,7 @@ static int resolve_map_arg_type(struct bpf_verifier_env *env, case BPF_MAP_TYPE_SOCKMAP: case BPF_MAP_TYPE_SOCKHASH: if (*arg_type == ARG_PTR_TO_MAP_VALUE) { - *arg_type = ARG_PTR_TO_SOCKET; + *arg_type = ARG_PTR_TO_BTF_ID_SOCK_COMMON; } else { verbose(env, "invalid arg_type for sockmap/sockhash\n"); return -EINVAL; |