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: <CANn89iJQfmc_KeUr3TeXvsLQwo3ZymyoCr7Y6AnHrkWSuz0yAg@mail.gmail.com>
Date: Tue, 1 Aug 2023 20:21:47 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, Willem de Bruijn <willemb@...gle.com>, 
	Tahsin Erdogan <trdgn@...zon.com>, netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next 1/4] net: allow alloc_skb_with_frags() to
 allocate bigger packets

On Tue, Aug 1, 2023 at 8:10 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Tue, Aug 1, 2023 at 7:56 PM Willem de Bruijn
> <willemdebruijn.kernel@...il.com> wrote:
> >
>
> > Thanks for the explanation. For @data_len == 5000, you would want to
> > allocate an order-1?
>
> Presumably we could try a bit harder, I will send a V2.

I will squash the following part:

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 0ac70a0144a7c1f4e7824ddc19980aee73e4c121..c6f98245582cd4dd01a7c4f5708163122500a4f0
100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -6233,7 +6233,7 @@ struct sk_buff *alloc_skb_with_frags(unsigned
long header_len,
        while (data_len) {
                if (nr_frags == MAX_SKB_FRAGS - 1)
                        goto failure;
-               while (order && data_len < (PAGE_SIZE << order))
+               while (order && PAGE_ALIGN(data_len) < (PAGE_SIZE << order))
                        order--;

                if (order) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ