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: <CAPhsuW5cXxf8E-QR4k7tXJXqfgBRapBEvvWMUCLSDrU-0MU5dw@mail.gmail.com>
Date:   Mon, 27 Jul 2020 22:42:32 -0700
From:   Song Liu <song@...nel.org>
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 26/35] bpf: eliminate rlimit-based memory
 accounting for xskmap maps

On Mon, Jul 27, 2020 at 12:21 PM Roman Gushchin <guro@...com> wrote:
>
> Do not use rlimit-based memory accounting for xskmap maps.
> It has been replaced with the memcg-based memory accounting.
>
> Signed-off-by: Roman Gushchin <guro@...com>

Acked-by: Song Liu <songliubraving@...com>


> ---
>  net/xdp/xskmap.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/net/xdp/xskmap.c b/net/xdp/xskmap.c
> index e574b22defe5..0366013f13c6 100644
> --- a/net/xdp/xskmap.c
> +++ b/net/xdp/xskmap.c
> @@ -74,7 +74,6 @@ static void xsk_map_sock_delete(struct xdp_sock *xs,
>
>  static struct bpf_map *xsk_map_alloc(union bpf_attr *attr)
>  {
> -       struct bpf_map_memory mem;
>         int err, numa_node;
>         struct xsk_map *m;
>         u64 size;
> @@ -90,18 +89,11 @@ static struct bpf_map *xsk_map_alloc(union bpf_attr *attr)
>         numa_node = bpf_map_attr_numa_node(attr);
>         size = struct_size(m, xsk_map, attr->max_entries);
>
> -       err = bpf_map_charge_init(&mem, size);
> -       if (err < 0)
> -               return ERR_PTR(err);
> -
>         m = bpf_map_area_alloc(size, numa_node);
> -       if (!m) {
> -               bpf_map_charge_finish(&mem);
> +       if (!m)
>                 return ERR_PTR(-ENOMEM);
> -       }
>
>         bpf_map_init_from_attr(&m->map, attr);
> -       bpf_map_charge_move(&m->map.memory, &mem);
>         spin_lock_init(&m->lock);
>
>         return &m->map;
> --
> 2.26.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ