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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzY44erYhkUAv9dCogj54qkQHyHdNViTUK7xm-y6WObE2g@mail.gmail.com>
Date:   Thu, 4 Feb 2021 15:45:45 -0800
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Song Liu <song@...nel.org>
Cc:     Tiezhu Yang <yangtiezhu@...ngson.cn>,
        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>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Xuefeng Li <lixuefeng@...ngson.cn>
Subject: Re: [PATCH bpf-next] samples/bpf: Add hello world sample for newbies

On Thu, Feb 4, 2021 at 11:27 AM Song Liu <song@...nel.org> wrote:
>
> On Thu, Feb 4, 2021 at 3:42 AM Tiezhu Yang <yangtiezhu@...ngson.cn> wrote:
> >
> > The program is made in a way that everytime an execve syscall
> > is executed it prints Hello, BPF World!
> >
> > This is inspired and based on the code example for the book
> > Linux Observability with BPF [1], load_bpf_file() has been
> > removed after commit ceb5dea56543 ("samples: bpf: Remove
> > bpf_load loader completely"), so the old version can not
> > work in the latest mainline kernel.
> >
> > Since it is very simple and useful for newbies, I think it is
> > necessary to be upstreamed.
>
> I wonder how much value we will get from this sample. If the user is
> able to compile and try the hello world, they are sure able to compile
> other code in samples/bpf. Also, this code doesn't use BPF skeleton,
> which is the recommended way to write BPF programs. Maybe an
> minimal example with BPF skeleton will add more value here?
>

I agree with Song. Plus, we already have similar simple examples that
are set up outside of kernel build infrastructure, which is simpler
for newbies to pick up. Please check [0]:

  [0] https://github.com/libbpf/libbpf-bootstrap/tree/master/src


> Thanks,
> Song
>
>
>
> >
> > [1] https://github.com/bpftools/linux-observability-with-bpf/tree/master/code/chapter-2/hello_world
> >
> > Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
> > ---
> >  samples/bpf/Makefile     |  3 +++
> >  samples/bpf/hello_kern.c | 14 ++++++++++++++
> >  samples/bpf/hello_user.c | 42 ++++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 59 insertions(+)
> >  create mode 100644 samples/bpf/hello_kern.c
> >  create mode 100644 samples/bpf/hello_user.c
> >

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ