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]
Message-ID: <CAEf4BzYhCmahyXbG3mXgfGuSD8T3gvkXXYToTwAuG17MDZwwKQ@mail.gmail.com>
Date:   Tue, 8 Dec 2020 10:31:35 -0800
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Brendan Jackman <jackmanb@...gle.com>
Cc:     bpf <bpf@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>,
        Yonghong Song <yhs@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        KP Singh <kpsingh@...omium.org>,
        Florent Revest <revest@...omium.org>,
        open list <linux-kernel@...r.kernel.org>,
        Jann Horn <jannh@...gle.com>
Subject: Re: [PATCH bpf-next v3 12/14] bpf: Pull tools/build/feature biz into
 selftests Makefile

On Tue, Dec 8, 2020 at 9:04 AM Brendan Jackman <jackmanb@...gle.com> wrote:
>
> On Mon, Dec 07, 2020 at 06:19:12PM -0800, Andrii Nakryiko wrote:
> > On Mon, Dec 7, 2020 at 3:00 AM Brendan Jackman <jackmanb@...gle.com> wrote:
> > >
> > > On Fri, Dec 04, 2020 at 11:00:24AM -0800, Andrii Nakryiko wrote:
> > > > On Fri, Dec 4, 2020 at 1:41 AM Brendan Jackman <jackmanb@...gle.com> wrote:
> > > > >
> > > > > On Thu, Dec 03, 2020 at 01:01:27PM -0800, Andrii Nakryiko wrote:
> > > > > > On Thu, Dec 3, 2020 at 8:07 AM Brendan Jackman <jackmanb@...gle.com> wrote:
> > > > > > >
> [...]
> > >
> > > Ah right gotcha. Then yeah I think we can do this:
> > >
> > >  BPF_ATOMICS_SUPPORTED = $(shell \
> > >         echo "int x = 0; int foo(void) { return __sync_val_compare_and_swap(&x, 1, 2); }" \
> > >         | $(CLANG) -x cpp-output -S -target bpf -mcpu=v3 - -o /dev/null && echo 1 || echo 0)
> >
> > Looks like it would work, yes.
> /
> > Curious what "-x cpp-output" does?
>
> That's just to tell Clang what language to expect, since it can't infer
> it from a file extension:
>
>   $ echo foo | clang -S -
>   clang-10: error: -E or -x required when input is from standard input
>
> Yonghong pointed out that we can actually just use `-x c`.

yeah, that's what confused me, as we don't really write C++ for BPF
code :) All good.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ