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: <CANn89i+rT0=9vVOH7dVqm4aFHjwEf0JEw4bF1PgH+FwtJNAt2g@mail.gmail.com>
Date: Mon, 22 Sep 2025 12:57:19 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Jason Baron <jbaron@...mai.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com, 
	netdev@...r.kernel.org
Subject: Re: [PATCH v2 net] net: allow alloc_skb_with_frags() to use MAX_SKB_FRAGS

On Mon, Sep 22, 2025 at 12:20 PM Jason Baron <jbaron@...mai.com> wrote:
>
> Currently, alloc_skb_with_frags() will only fill (MAX_SKB_FRAGS - 1)
> slots. I think it should use all MAX_SKB_FRAGS slots, as callers of
> alloc_skb_with_frags() will size their allocation of frags based
> on MAX_SKB_FRAGS.
>
> This issue was discovered via a test patch that sets 'order' to 0
> in alloc_skb_with_frags(), which effectively tests/simulates high
> fragmentation. In this case sendmsg() on unix sockets will fail every
> time for large allocations. If the PAGE_SIZE is 4K, then data_len will
> request 68K or 17 pages, but alloc_skb_with_frags() can only allocate
> 64K in this case or 16 pages.
>
> Fixes: 09c2c90705bb ("net: allow alloc_skb_with_frags() to allocate bigger packets")
> Signed-off-by: Jason Baron <jbaron@...mai.com>
> ---
> Changes:
> v2: Add Fixes: tag

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

Thanks Jason !

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ