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]
Date:   Tue, 22 Jun 2021 11:09:35 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Eric Dumazet <eric.dumazet@...il.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, willemb@...gle.com,
        dsahern@...il.com, yoshfuji@...ux-ipv6.org, Dave Jones <dsj@...com>
Subject: Re: [PATCH net-next] ip: avoid OOM kills with large UDP sends over
 loopback

On Tue, 22 Jun 2021 19:48:43 +0200 Eric Dumazet wrote:
> >> What about using 	sock_alloc_send_pskb(... PAGE_ALLOC_COSTLY_ORDER)
> >> (as we did in unix_dgram_sendmsg() for large packets), for SG enabled interfaces ?  
> > 
> > PAGE_ALLOC_COSTLY_ORDER in itself is more of a problem than a solution.
> > AFAIU the app sends messages primarily above the ~60kB mark, which is
> > above COSTLY, and those do not trigger OOM kills. All OOM kills we see
> > have order=3. Checking with Rik and Johannes W that's expected, OOM
> > killer is only invoked for allocations <= COSTLY, larger ones will just
> > return NULL and let us deal with it (e.g. by falling back).  
> 
> I  really thought alloc_skb_with_frags() was already handling low-memory-conditions.
> 
> (alloc_skb_with_frags() is called from sock_alloc_send_pskb())
> 
> If it is not, lets fix it, because af_unix sockets will have the same issue ?

af_unix seems to cap at SKB_MAX_ALLOC which is order 2, AFAICT.

Perhaps that's a good enough fix in practice given we see OOMs with
order=3 only?

I'll review callers of alloc_skb_with_frags() and see if they depend 
on the explicit geometry of the skb or we can safely fallback to pages.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ