[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241023-hasty-inescapable-tapir-a2f7d9@leitao>
Date: Wed, 23 Oct 2024 02:33:46 -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,
Pavel Begunkov <asml.silence@...il.com>,
Mina Almasry <almasrymina@...gle.com>,
Oleksij Rempel <o.rempel@...gutronix.de>,
Kuniyuki Iwashima <kuniyu@...zon.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 v3] net: Implement fault injection forcing skb
reallocation
On Thu, Oct 17, 2024 at 03:50:41PM +0200, Paolo Abeni wrote:
> On 10/14/24 15:50, Breno Leitao wrote:
> > Introduce a fault injection mechanism to force skb reallocation. The
> > primary goal is to catch bugs related to pointer invalidation after
> > potential skb reallocation.
> >
> > The fault injection mechanism aims to identify scenarios where callers
> > retain pointers to various headers in the skb but fail to reload these
> > pointers after calling a function that may reallocate the data. This
> > type of bug can lead to memory corruption or crashes if the old,
> > now-invalid pointers are used.
> >
> > By forcing reallocation through fault injection, we can stress-test code
> > paths and ensure proper pointer management after potential skb
> > reallocations.
> >
> > Add a hook for fault injection in the following functions:
> >
> > * pskb_trim_rcsum()
> > * pskb_may_pull_reason()
> > * pskb_trim()
> >
> > As the other fault injection mechanism, protect it under a debug Kconfig
> > called CONFIG_FAIL_SKB_FORCE_REALLOC.
> >
> > This patch was *heavily* inspired by Jakub's proposal from:
> > https://lore.kernel.org/all/20240719174140.47a868e6@kernel.org/
> >
> > CC: Akinobu Mita <akinobu.mita@...il.com>
> > Suggested-by: Jakub Kicinski <kuba@...nel.org>
> > Signed-off-by: Breno Leitao <leitao@...ian.org>
>
> I'm sorry to nit-pick, but checkpatch laments that the new command line
> argument lacks documentation in
> Documentation/admin-guide/kernel-parameters.txt, and I feel that could be
> actually useful.
>
> With that, feel free to include my ack in the next revision,
Thanks Paolo, I will send a new updated version soon.
Powered by blists - more mailing lists