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]
Message-ID: <20241011-elegant-cobalt-bonobo-ba5aa1@leitao>
Date: Fri, 11 Oct 2024 06:19:24 -0700
From: Breno Leitao <leitao@...ian.org>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Akinobu Mita <akinobu.mita@...il.com>, Jonathan Corbet <corbet@....net>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>, kernel-team@...a.com,
	kuniyu@...zon.com, asml.silence@...il.com,
	Willem de Bruijn <willemb@...gle.com>,
	Mina Almasry <almasrymina@...gle.com>,
	Alexander Lobakin <aleksander.lobakin@...el.com>,
	"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>,
	"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2] net: Implement fault injection forcing skb
 reallocation

Hello Paolo,

On Thu, Oct 10, 2024 at 11:20:05AM +0200, Paolo Abeni wrote:
> On 10/8/24 13:13, Breno Leitao wrote:
> > +void skb_might_realloc(struct sk_buff *skb)
> > +{
> > +	struct net_device *net = skb->dev;
> > +
> > +	if (skb_realloc.filtered &&
> > +	    strncmp(net->name, skb_realloc.devname, IFNAMSIZ))
> > +		/* device name filter set, but names do not match */
> > +		return;
> > +
> > +	if (!should_fail(&skb_realloc.attr, 1))
> > +		return;
> 
> if you wraps the above 2 statement in an helper() taking an skb argument,
> you could wrap it with the ALLOW_ERROR_INJECTION() macro, for added
> flexibility, i.e. look at the existing should_failslab().

I've looked deeper and your proposal, and I liked it. It makes sense to
have it as a helper.

I will send a new version with it included.

Thanks
--breno

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ