Messages in this thread | | | Date | Mon, 28 Sep 2020 22:35:25 -0700 | From | Martin KaFai Lau <> | Subject | Re: [PATCH bpf-next v2 1/4] bpf: sockmap: enable map_update_elem from bpf_iter |
| |
On Mon, Sep 28, 2020 at 10:08:02AM +0100, Lorenz Bauer wrote: > Allow passing a pointer to a BTF struct sock_common* when updating > a sockmap or sockhash. Since BTF pointers can fault and therefore be > NULL at runtime we need to add an additional !sk check to > sock_map_update_elem. Since we may be passed a request or timewait > socket we also need to check sk_fullsock. Doing this allows calling > map_update_elem on sockmap from bpf_iter context, which uses > BTF pointers. Acked-by: Martin KaFai Lau <kafai@fb.com>
| |