From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Breno Leitao <leitao@debian.org>,
Jonathan Corbet <corbet@lwn.net>,
Akinobu Mita <akinobu.mita@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: kernel-team@meta.com, Thomas Huth <thuth@redhat.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
Steven Rostedt <rostedt@goodmis.org>,
Xiongwei Song <xiongwei.song@windriver.com>,
Mina Almasry <almasrymina@google.com>,
Kuniyuki Iwashima <kuniyu@amazon.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
Oleksij Rempel <o.rempel@pengutronix.de>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:NETWORKING [GENERAL]" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v4] net: Implement fault injection forcing skb reallocation
Date: Thu, 24 Oct 2024 17:01:38 +0700 [thread overview]
Message-ID: <ZxobAhwYt5I3rgNW@archie.me> (raw)
In-Reply-To: <20241023113819.3395078-1-leitao@debian.org>
[-- Attachment #1: Type: text/plain, Size: 2152 bytes --]
On Wed, Oct 23, 2024 at 04:38:01AM -0700, Breno Leitao wrote:
> +- fail_skb_realloc
> +
> + inject skb (socket buffer) reallocation events into the network path. The
> + primary goal is to identify and prevent issues related to pointer
> + mismanagement in the network subsystem. By forcing skb reallocation at
> + strategic points, this feature creates scenarios where existing pointers to
> + skb headers become invalid.
> +
> + When the fault is injected and the reallocation is triggered, these pointers
> + no longer reference valid memory locations. This deliberate invalidation
> + helps expose code paths where proper pointer updating is neglected after a
> + reallocation event.
> +
> + By creating these controlled fault scenarios, the system can catch instances
> + where stale pointers are used, potentially leading to memory corruption or
> + system instability.
> +
> + To select the interface to act on, write the network name to the following file:
> + `/sys/kernel/debug/fail_skb_realloc/devname`
> + If this field is left empty (which is the default value), skb reallocation
> + will be forced on all network interfaces.
> +
> - NVMe fault injection
>
> inject NVMe status code and retry flag on devices permitted by setting
> @@ -216,6 +238,19 @@ configuration of fault-injection capabilities.
> use a negative errno, you better use 'printf' instead of 'echo', e.g.:
> $ printf %#x -12 > retval
>
> +- /sys/kernel/debug/fail_skb_realloc/devname:
> +
> + Specifies the network interface on which to force SKB reallocation. If
> + left empty, SKB reallocation will be applied to all network interfaces.
> +
> + Example usage::
> +
> + # Force skb reallocation on eth0
> + echo "eth0" > /sys/kernel/debug/fail_skb_realloc/devname
> +
> + # Clear the selection and force skb reallocation on all interfaces
> + echo "" > /sys/kernel/debug/fail_skb_realloc/devname
> +
The doc LGTM, thanks!
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-10-24 10:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 11:38 [PATCH net-next v4] net: Implement fault injection forcing skb reallocation Breno Leitao
2024-10-24 10:01 ` Bagas Sanjaya [this message]
2024-10-31 0:31 ` Jakub Kicinski
2024-10-31 9:41 ` Breno Leitao
2024-11-01 0:04 ` Jakub Kicinski
2024-11-01 9:55 ` Breno Leitao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZxobAhwYt5I3rgNW@archie.me \
--to=bagasdotme@gmail.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=aleksander.lobakin@intel.com \
--cc=almasrymina@google.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=leitao@debian.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=paulmck@kernel.org \
--cc=rostedt@goodmis.org \
--cc=thuth@redhat.com \
--cc=xiongwei.song@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).