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:   Mon, 7 Oct 2019 18:12:37 +0100
From:   Lorenz Bauer <lmb@...udflare.com>
To:     Edward Cree <ecree@...arflare.com>
Cc:     Toke Høiland-Jørgensen <toke@...hat.com>,
        John Fastabend <john.fastabend@...il.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Song Liu <songliubraving@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>, Martin Lau <kafai@...com>,
        Yonghong Song <yhs@...com>,
        Marek Majkowski <marek@...udflare.com>,
        David Miller <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        kernel-team <kernel-team@...udflare.com>
Subject: Re: [PATCH bpf-next 0/9] xdp: Support multiple programs on a single
 interface through chain calls

On Mon, 7 Oct 2019 at 17:43, Edward Cree <ecree@...arflare.com> wrote:
>
> I might be being naïve, but it doesn't sound more painful than is normal
>  for userland.  I mean, what operations have you got-
> * create/destroy map (maybe, see above)
> * load prog (pass it an fd from which it can read an ELF, and more fds
>   for the maps it uses.  Everything else, e.g. BTFs, can just live in the
>   ELF.)
> * destroy prog
> * bind prog to hook (admittedly there's a long list of hooks, but this is
>   only to cover the XDP ones, so basically we just have to specify
>   interface and generic/driver/hw)
> -that doesn't seem like it presents great difficulties?

Sure, but this is the simplest, not necessarily realistic use case. There
is a reason that libbpf has the API it has. For example, we patch our
eBPF before loading it. I'm sure there are other complications, which is
why I prefer to keep loading my own programs.

> No, I'm talking about doing a linker step (using the 'full-blown calls'
>  _within_ an eBPF program that Alexei added a few months back) before the
>  program is submitted to the kernel.  So the BPF_CALL|BPF_PSEUDO_CALL insn
>  gets JITed to a direct call.

Ah, I see. I'm not sure whether this restriction has been lifted, but those
calls are incompatible with tail calls. So we wouldn't be able to use this.

> OK, but in that case xdpd isn't evidence that the "loader" approach doesn't
>  work, so I still think it should be tried before we go to the lengths of
>  pushing something into the kernel (that we then have to maintain forever).

Maybe this came across the wrong way, I never said it is. Merely that it's
the status quo we'd like to move away from. If we can achieve that in
userspace, great.

Lorenz

-- 
Lorenz Bauer  |  Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK

www.cloudflare.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ