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: <1452089115.8255.171.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Wed, 06 Jan 2016 06:05:15 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Hans Westgaard Ry <hans.westgaard.ry@...cle.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Alexey Kuznetsov <kuznet@....inr.ac.ru>,
	James Morris <jmorris@...ei.org>,
	Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
	Patrick McHardy <kaber@...sh.net>,
	Alexei Starovoitov <ast@...mgrid.com>,
	Jiri Pirko <jiri@...lanox.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Daniel Borkmann <daniel@...earbox.net>,
	Nicolas Dichtel <nicolas.dichtel@...nd.com>,
	"\"\"Eric W. Biederman\"\"" <ebiederm@...ssion.com>,
	Salam Noureddine <noureddine@...sta.com>,
	Jarod Wilson <jarod@...hat.com>,
	Toshiaki Makita <makita.toshiaki@....ntt.co.jp>,
	Julian Anastasov <ja@....bg>,
	Ying Xue <ying.xue@...driver.com>,
	Craig Gallek <kraig@...gle.com>,
	Mel Gorman <mgorman@...hsingularity.net>,
	"\"\"hannes@...essinduktion.org\"\"" <hannes@...essinduktion.org>,
	Edward Jee <edjee@...gle.com>,
	Julia Lawall <julia.lawall@...6.fr>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Haakon Bugge <haakon.bugge@...cle.com>,
	Knut Omang <knut.omang@...cle.com>,
	Wei Lin Guay <wei.lin.guay@...cle.com>,
	Santosh Shilimkar <santosh.shilimkar@...cle.com>,
	Yuval Shaia <yuval.shaia@...cle.com>
Subject: Re: [PATCH] net: add per device sg_max_frags for skb

On Wed, 2016-01-06 at 14:16 +0100, Hans Westgaard Ry wrote:
> Devices may have limits on the number of fragments in an skb they
> support. Current codebase uses a constant as maximum for number of
> fragments (MAX_SKB_FRAGS) one skb can hold and use.
> 
> When enabling scatter/gather and running traffic with many small
> messages the codebase uses the maximum number of fragments and thereby
> violates the max for certain devices.
> 
> An example of such a violation is when running IPoIB on a HCA
> supporting 16 SGE on an architecture with 4K pagesize. The
> MAX_SKB_FRAGS will be 17 (64K/4K+1) and because IPoIB adds yet another
> segment we end up with send_requests with 18 SGE resulting in
> kernel-panic.
> 
> The patch allows the device to limit the maximum number fragments used
> in one skb.
> 
> The functionality corresponds to gso_max_size/gso_max_segs for gso.

Unfortunately this is not the right place to fix this issue.

Think about forwarding workloads, where the SKB is cooked by GRO engine.

Anyway, local TCP stack uses 32KB page fragments, so typical skb has no
more than 3 frags.

Look at ndo_features_check(), where the problematic device driver can
add its logic.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ