Re: [PATCH v3 bpf-next 03/10] bpf: introduce per-cpu cgroup local storage

From: Alexei Starovoitov
Date: Fri Sep 28 2018 - 06:25:12 EST


On Fri, Sep 28, 2018 at 11:03:03AM +0100, Roman Gushchin wrote:
> > > +
> > > + if (unlikely(map_flags & BPF_EXIST))
> > > + return -EINVAL;
> >
> > that should have been BPF_NOEXIST ?
>
> Yeah, or maybe even better s/&/!= ?
> It's probably better to require BPF_EXIST flag to update a cgroup storage?
> Agree? If so, let me fix this for both shared and per-cpu versions in
> a follow-up patch.

I think BPF_ANY is technically valid too.
If we were to require strict BPF_EXIST only, we'd need to fix stable too.
I'm fine with both (BPF_EXIST only and BPF_ANY|BPF_EXIST).
Daniel, what do you think?