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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Jan 2021 20:57:28 +0100
From:   Lukas Bulwahn <lukas.bulwahn@...il.com>
To:     Brendan Jackman <jackmanb@...gle.com>
Cc:     bpf@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii.nakryiko@...il.com>,
        KP Singh <kpsingh@...omium.org>,
        Florent Revest <revest@...omium.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        Jonathan Corbet <corbet@....net>
Subject: Re: [PATCH bpf-next v3 2/2] docs: bpf: Clarify -mcpu=v3 requirement
 for atomic ops

On Wed, Jan 20, 2021 at 2:39 PM Brendan Jackman <jackmanb@...gle.com> wrote:
>
> Alexei pointed out [1] that this wording is pretty confusing. Here's
> an attempt to be more explicit and clear.
>
> [1] https://lore.kernel.org/bpf/CAADnVQJVvwoZsE1K+6qRxzF7+6CvZNzygnoBW9tZNWJELk5c=Q@mail.gmail.com/T/#m07264fc18fdc43af02fc1320968afefcc73d96f4
>

It is common practice to use "Link: URL" to refer to other mail
threads; and to use the "permalink":

https://lore.kernel.org/bpf/CAADnVQJVvwoZsE1K+6qRxzF7+6CvZNzygnoBW9tZNWJELk5c=Q@mail.gmail.com/

which is a bit shorter than the link you provided.

If you follow that convention with "Link: URL", checkpatch.pl will not
complain about this long line :)


Lukas

> Signed-off-by: Brendan Jackman <jackmanb@...gle.com>
> ---
>  Documentation/networking/filter.rst | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/networking/filter.rst b/Documentation/networking/filter.rst
> index 4c2bb4c6364d..b3f457802836 100644
> --- a/Documentation/networking/filter.rst
> +++ b/Documentation/networking/filter.rst
> @@ -1081,9 +1081,10 @@ before is loaded back to ``R0``.
>
>  Note that 1 and 2 byte atomic operations are not supported.
>
> -Except ``BPF_ADD`` *without* ``BPF_FETCH`` (for legacy reasons), all 4 byte
> -atomic operations require alu32 mode. Clang enables this mode by default in
> -architecture v3 (``-mcpu=v3``). For older versions it can be enabled with
> +Clang can generate atomic instructions by default when ``-mcpu=v3`` is
> +enabled. If a lower version for ``-mcpu`` is set, the only atomic instruction
> +Clang can generate is ``BPF_ADD`` *without* ``BPF_FETCH``. If you need to enable
> +the atomics features, while keeping a lower ``-mcpu`` version, you can use
>  ``-Xclang -target-feature -Xclang +alu32``.
>
>  You may encounter ``BPF_XADD`` - this is a legacy name for ``BPF_ATOMIC``,
> --
> 2.30.0.284.gd98b1dd5eaa7-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ