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]
Message-ID: <CAEf4BzYoxGqU=qnXz68F+vasgdr9Xj1CPtjMVDkwNbxnymGDZA@mail.gmail.com>
Date:   Mon, 27 Jul 2020 23:08:32 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Roman Gushchin <guro@...com>
Cc:     bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH bpf-next v2 33/35] bpf: selftests: don't touch RLIMIT_MEMLOCK

On Mon, Jul 27, 2020 at 12:21 PM Roman Gushchin <guro@...com> wrote:
>
> Since bpf is not using memlock rlimit for memory accounting,
> there are no more reasons to bump the limit.
>
> Signed-off-by: Roman Gushchin <guro@...com>
> ---

Similarly for bench, it's a tool that's not coupled with the latest
kernel version, it will be a big step down if the tool doesn't bump
rlimit on its own on slightly older kernels. Let's just keep it for
now.

>  tools/testing/selftests/bpf/bench.c           | 16 ---------------
>  .../selftests/bpf/progs/bpf_iter_bpf_map.c    |  5 ++---
>  tools/testing/selftests/bpf/xdping.c          |  6 ------
>  tools/testing/selftests/net/reuseport_bpf.c   | 20 -------------------
>  4 files changed, 2 insertions(+), 45 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/bench.c b/tools/testing/selftests/bpf/bench.c
> index 944ad4721c83..f66610541c8a 100644
> --- a/tools/testing/selftests/bpf/bench.c
> +++ b/tools/testing/selftests/bpf/bench.c
> @@ -29,25 +29,9 @@ static int libbpf_print_fn(enum libbpf_print_level level,
>         return vfprintf(stderr, format, args);
>  }
>
> -static int bump_memlock_rlimit(void)
> -{
> -       struct rlimit rlim_new = {
> -               .rlim_cur       = RLIM_INFINITY,
> -               .rlim_max       = RLIM_INFINITY,
> -       };
> -
> -       return setrlimit(RLIMIT_MEMLOCK, &rlim_new);
> -}
> -
>  void setup_libbpf()
>  {
> -       int err;
> -
>         libbpf_set_print(libbpf_print_fn);
> -
> -       err = bump_memlock_rlimit();
> -       if (err)
> -               fprintf(stderr, "failed to increase RLIMIT_MEMLOCK: %d", err);
>  }
>

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ