Re: [PATCH net-next] net: Implement fault injection forcing skb reallocation

From: Kuniyuki Iwashima
Date: Wed Oct 02 2024 - 11:26:54 EST


From: Breno Leitao <leitao@xxxxxxxxxx>
Date: Wed, 2 Oct 2024 04:32:54 -0700
> diff --git a/net/Kconfig.debug b/net/Kconfig.debug
> index 5e3fffe707dd..f61935e028bd 100644
> --- a/net/Kconfig.debug
> +++ b/net/Kconfig.debug

This config is networking-specific, but I think lib/Kconfig.debug would be
a better fit as other fault injection configs are placed there together.

Now we need to enable fault injection first and go back to the net-specific
items in menuconfig.


> @@ -24,3 +24,14 @@ config DEBUG_NET
> help
> Enable extra sanity checks in networking.
> This is mostly used by fuzzers, but is safe to select.
> +
> +config FAIL_SKB_FORCE_REALLOC
> + bool "Fault-injection capability forcing skb to reallocate"
> + depends on FAULT_INJECTION && DEBUG_NET
> + default n
> + help
> + Provide fault-injection capability that forces the skb to be
> + reallocated, caughting possible invalid pointers to the skb.
> +
> + For more information, check
> + Documentation/dev-tools/fault-injection/fault-injection.rst