Re: [PATCH v2 bpf-next 6/9] bpf: introduce BPF_F_LOCK flag

2019-01-19 Thread Alexei Starovoitov
On 1/19/19 10:56 AM, Jakub Kicinski wrote: > On Thu, 17 Jan 2019 22:50:53 -0800, Alexei Starovoitov wrote: >> Introduce BPF_F_LOCK flag for map_lookup and map_update syscall commands >> and for map_update() helper function. >> In all these cases take a lock of existing element (which was provided >

Re: [PATCH v2 bpf-next 6/9] bpf: introduce BPF_F_LOCK flag

2019-01-19 Thread Jakub Kicinski
On Thu, 17 Jan 2019 22:50:53 -0800, Alexei Starovoitov wrote: > Introduce BPF_F_LOCK flag for map_lookup and map_update syscall commands > and for map_update() helper function. > In all these cases take a lock of existing element (which was provided > in BTF description) before copying (in or out)

[PATCH v2 bpf-next 6/9] bpf: introduce BPF_F_LOCK flag

2019-01-17 Thread Alexei Starovoitov
Introduce BPF_F_LOCK flag for map_lookup and map_update syscall commands and for map_update() helper function. In all these cases take a lock of existing element (which was provided in BTF description) before copying (in or out) the rest of map value. Implementation details that are part of uapi: