Re: [PATCH RESEND net-next] tcp: socket-specific version of WARN_ON_ONCE()
From: Jakub Kicinski
Date: Tue Nov 29 2022 - 21:28:10 EST
On Tue, 29 Nov 2022 11:18:27 +0100 Paolo Abeni wrote:
> On Thu, 2022-11-24 at 03:22 -0800, Breno Leitao wrote:
> > There are cases where we need information about the socket during a
> > warning, so, it could help us to find bugs that happens and do not have
> > an easy repro.
> >
> > This diff creates a TCP socket-specific version of WARN_ON_ONCE(), which
> > dumps more information about the TCP socket.
> >
> > This new warning is not only useful to give more insight about kernel bugs, but,
> > it is also helpful to expose information that might be coming from buggy
> > BPF applications, such as BPF applications that sets invalid
> > tcp_sock->snd_cwnd values.
>
> I personally find this use-case a little too tight, you could likelly
> fetch the same information with a perf probe or something similar.
It's just the initial case, to keep the patch small.
The intent is to convert all TCP warnings to this helper.
As Breno says in the first sentence this is about having enough
relevant information to zero in on the cause of the rare crashes /
warnings (which are hit quite a lot on our "millions of machines").