lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 3 Apr 2021 08:51:16 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Pedro Tammela <pctammela@...il.com>
Cc:     Pedro Tammela <pctammela@...atatu.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>, Shuah Khan <shuah@...nel.org>,
        Joe Stringer <joe@...ium.io>,
        Quentin Monnet <quentin@...valent.com>,
        Yang Li <yang.lee@...ux.alibaba.com>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH bpf-next] bpf: add 'BPF_RB_MAY_WAKEUP' flag

On Sat, Apr 3, 2021 at 6:34 AM Pedro Tammela <pctammela@...il.com> wrote:
>
> Em qua., 31 de mar. de 2021 às 03:54, Andrii Nakryiko
> <andrii.nakryiko@...il.com> escreveu:
> >
> > On Sun, Mar 28, 2021 at 9:11 AM Pedro Tammela <pctammela@...il.com> wrote:
> > >
> > > The current way to provide a no-op flag to 'bpf_ringbuf_submit()',
> > > 'bpf_ringbuf_discard()' and 'bpf_ringbuf_output()' is to provide a '0'
> > > value.
> > >
> > > A '0' value might notify the consumer if it already caught up in processing,
> > > so let's provide a more descriptive notation for this value.
> > >
> > > Signed-off-by: Pedro Tammela <pctammela@...atatu.com>
> > > ---
> >
> > flags == 0 means "no extra modifiers of behavior". That's default
> > adaptive notification. If you want to adjust default behavior, only
> > then you specify non-zero flags. I don't think anyone will bother
> > typing BPF_RB_MAY_WAKEUP for this, nor I think it's really needed. The
> > documentation update is nice (if no flags are specified notification
> > will be sent if needed), but the new "pseudo-flag" seems like an
> > overkill to me.
>
> My intention here is to make '0' more descriptive.
> But if you think just the documentation update is enough, then I will
> remove the flag.

flags == 0 means "default behavior", I don't think you have to
remember which verbose flag you need to specify for that, so I think
just expanding documentation is sufficient and better. Thanks!

>
> >
> > >  include/uapi/linux/bpf.h                               | 8 ++++++++
> > >  tools/include/uapi/linux/bpf.h                         | 8 ++++++++
> > >  tools/testing/selftests/bpf/progs/ima.c                | 2 +-
> > >  tools/testing/selftests/bpf/progs/ringbuf_bench.c      | 2 +-
> > >  tools/testing/selftests/bpf/progs/test_ringbuf.c       | 2 +-
> > >  tools/testing/selftests/bpf/progs/test_ringbuf_multi.c | 2 +-
> > >  6 files changed, 20 insertions(+), 4 deletions(-)
> > >
> >
> > [...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ