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: <822f5875-5ec0-46e1-83f8-66ec1e31f0f2@redhat.com>
Date: Thu, 10 Oct 2024 11:20:05 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Breno Leitao <leitao@...ian.org>, 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>
Cc: 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

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().

Cheers,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ