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] [day] [month] [year] [list]
Date:   Fri, 15 Jan 2021 14:34:56 +0000
From:   Alexander Lobakin <alobakin@...me>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     Alexander Lobakin <alobakin@...me>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Willem de Bruijn <willemb@...gle.com>,
        Miaohe Lin <linmiaohe@...wei.com>,
        Guillaume Nault <gnault@...hat.com>,
        Yunsheng Lin <linyunsheng@...wei.com>,
        Florian Westphal <fw@...len.de>,
        Steffen Klassert <steffen.klassert@...unet.com>,
        Dongseok Yi <dseok.yi@...sung.com>,
        Yadu Kishore <kyk.segfault@...il.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        Marco Elver <elver@...gle.com>,
        Alexander Duyck <alexanderduyck@...com>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        netdev <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too

From: Eric Dumazet <edumazet@...gle.com>
Date: Fri, 15 Jan 2021 15:28:37 +0100

> On Fri, Jan 15, 2021 at 12:55 AM Alexander Lobakin <alobakin@...me> wrote:
>>
>> Commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for
>> tiny skbs") ensured that skbs with data size lower than 1025 bytes
>> will be kmalloc'ed to avoid excessive page cache fragmentation and
>> memory consumption.
>> However, the same issue can still be achieved manually via
>> __netdev_alloc_skb(), where the check for size hasn't been changed.
>> Mirror the condition from __napi_alloc_skb() to prevent from that.
>>
>> Fixes: 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny skbs")
>
> No, this tag is wrong, if you fix a bug, bug is much older than linux-5.11
>
> My fix was about GRO head and virtio_net heads, both using pre-sized
> small buffers.
>
> You want to fix something else, and this is fine, because some drivers
> are unfortunately
> doing copy break ( at the cost of additional copy, even for packets
> that might be consumed right away)

You're right, it's about copybreak. I thought about wrong "Fixes"
right after sending, but... Sorry.
Will send v2 soon.

Thanks,
Al

Powered by blists - more mailing lists