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: <CANn89iKQb11YuKYJT8krDgUZFVFJf4VdFi9fJkCaF60p52u+VQ@mail.gmail.com>
Date:   Wed, 15 Feb 2023 10:08:05 +0100
From:   Eric Dumazet <edumazet@...gle.com>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
        pabeni@...hat.com, Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH net-next] net: msg_zerocopy: elide page accounting if RLIM_INFINITY

On Tue, Feb 14, 2023 at 4:57 PM Willem de Bruijn
<willemdebruijn.kernel@...il.com> wrote:
>
> From: Willem de Bruijn <willemb@...gle.com>
>
> MSG_ZEROCOPY ensures that pinned user pages do not exceed the limit.
> If no limit is set, skip this accounting as otherwise expensive
> atomic_long operations are called for no reason.
>
> This accounting is already skipped for privileged users.

 (privileged as in CAP_IPC_LOCK)

Rely on the
> same mechanism: if no mmp->user is set, mm_unaccount_pinned_pages does
> not decrement either.
>
> Tested by running tools/testing/selftests/net/msg_zerocopy.sh with
> an unprivileged user for the TXMODE binary:
>
>     ip netns exec "${NS1}" sudo -u "{$USER}" "${BIN}" "-${IP}" ...
>
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>
> ---

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ