Thread (14 messages) flat view 14 messages, 2 authors, 2020-09-11

Re: [PATCH bpf-next v4 1/5] bpf: Mutex protect used_maps array and count

From: Andrii Nakryiko <hidden>
Date: 2020-09-10 19:26:58
Also in: bpf

On Wed, Sep 9, 2020 at 11:25 AM Stanislav Fomichev [off-list ref] wrote:
From: YiFei Zhu <redacted>

To support modifying the used_maps array, we use a mutex to protect
the use of the counter and the array. The mutex is initialized right
after the prog aux is allocated, and destroyed right before prog
aux is freed. This way we guarantee it's initialized for both cBPF
and eBPF.

Cc: YiFei Zhu <redacted>
Signed-off-by: YiFei Zhu <redacted>
Signed-off-by: Stanislav Fomichev <redacted>
---
 .../net/ethernet/netronome/nfp/bpf/offload.c   | 18 ++++++++++++------
 include/linux/bpf.h                            |  1 +
 kernel/bpf/core.c                              | 15 +++++++++++----
 kernel/bpf/syscall.c                           | 16 ++++++++++++----
 net/core/dev.c                                 | 11 ++++++++---
 5 files changed, 44 insertions(+), 17 deletions(-)
LGTM.

Acked-by: Andrii Nakryiko <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help