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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 15 Aug 2020 02:02:18 +0000
From:   linmiaohe <>
To:     Willem de Bruijn <>
CC:     David Miller <>,
        Alexey Kuznetsov <>,
        Hideaki YOSHIFUJI <>,
        "Jakub Kicinski" <>,
        Network Development <>,
        linux-kernel <>
Subject: Re: [PATCH] net: correct zerocopy refcnt with newly allocated UDP or
 RAW uarg

Willem de Bruijn <> wrote:
>On Fri, Aug 14, 2020 at 10:17 AM linmiaohe <> wrote:
>I don't think that can happen.
>The question is when this branch is false
>                next = (u32)atomic_read(&sk->sk_zckey);
>                if ((u32)(uarg->id + uarg->len) == next) {
>I cannot come up with a case. I think it might be vestigial. The goal is to ensure to append only a consecutive range of notification IDs.
>Each notification ID corresponds to a sendmsg invocation with MSG_ZEROCOPY. In both TCP and UDP with corking, data is ordered and access to changes to these fields happen together as a transaction:
>                /* realloc only when socket is locked (TCP, UDP cork),
>                 * so uarg->len and sk_zckey access is serialized
>                 */

So what I concerned is just a theoretically problems. If we can always guarantee sock_zerocopy_realloc only returns the existing uarg or NULL when on skb_zcopy(skb),
bad things won't happen.

Many thanks for your detailed explaination.

Powered by blists - more mailing lists