Re: [PATCH 5.10 038/146] mptcp: do not warn on bad input from the network

From: Mat Martineau
Date: Wed Jun 23 2021 - 12:45:55 EST


On Wed, 23 Jun 2021, Paolo Abeni wrote:

Hello,

On Wed, 2021-06-23 at 16:22 +0200, Pavel Machek wrote:
Hi!

From: Paolo Abeni <pabeni@xxxxxxxxxx>

[ Upstream commit 61e710227e97172355d5f150d5c78c64175d9fb2 ]

warn_bad_map() produces a kernel WARN on bad input coming
from the network. Use pr_debug() to avoid spamming the system
log.

So... we switched from WARN _ONCE_ to pr_debug, as many times as we
detect the problem.

Should this be pr_debug_once?

Thank you for double checking this!

In the MPTCP code, we use pr_debug() statements as a debug tool, e.g.
when enabled, it could print per-packet info with no restriction.

There are (a few) similar use in the plain TCP code.

pr_debug() is not supposed to be enabled on any production system,
while the WARN_ONCE could trigger automated tools for irrelevant
network noise.

I thing pr_debug() is fine here.


Hi Pavel -

I agree with Paolo. This is not a frequently encountered condition, even when turning on this specific pr_debug(). I'd say the previous use of the _ONCE() variant was mostly because the effects were not optional (not because of frequency).

For protocol development, pr_debug() is both off by default and more
useful when it _is_ enabled. I'd prefer to keep this patch as-is.

Thanks,


--
Mat Martineau
Intel