Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5857055pxj; Wed, 23 Jun 2021 10:20:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlq7OLhRLTRCRrp+24R6niEgqMzz7HYqOANVOjmVqODK5bAI2cwRFsCB32z4ipXxZM4UrT X-Received: by 2002:a92:c690:: with SMTP id o16mr346684ilg.261.1624468831714; Wed, 23 Jun 2021 10:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624468831; cv=none; d=google.com; s=arc-20160816; b=FsKDUlLVg4KoNKKqmLak27+Pnz184ahrTAZ42Gaat5FPrLxj03Qw5bWSKjlW4E0fJW 3xGRqBW66p1/Lpsib2DLDj3YLfIlL4snlOAb2DfrQz0Oa7LnJXicUnm320zrfebCwy8o Ts/4+zP1XsLEizTDJqkZWsFuQWzjDYIH+jPM91XYzx6Tt59I3+KB9jmX6AcVfFCMI8dA 7D+QCJKRthBXrmeffhucGgYTzj+64wJmTZAd1tGYo6824yal/MpFjmpRm9jWMbwhbQs+ nKNWpgQA4uMD3VlVVwSnqpPurUnVxTGTD9tzQgvoRhmzPYKjSnRzaR0TEO+dKYJq/G9F KLKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=eafgGiX6GDLeKBcSkHNVWv30fndO9YqdjKRuqwRhCEI=; b=YviJ91oL3FqwUVY870+PN/MTHXK+hyhtymaf2n2/o/xCgokPrUYL7Ktp9f3Gj7xBo9 gq/YGS59hCZqnCSkDlT3jrsbPxSIiLlh4LtevJZ5ky7pkJVbw7B4CKWO4BbnNy8XMzou l4SMjzlWwacGo8Dd/ujxQk4yB+v60UdMBosXeeQoLa4iJO7ZV3qHeW4q9iIllNpFvRfV fyV6lF6QMKDT0Bdmblmc+1Zhh3pY8ERUOZMij72r1iqh4KznZMTxc4SKpJfgfdF8K40M F8kLZJy4Hr+RNwiWoD6FZkaNtvATP7bM9aMjo3GL5Ap1fpE3uJJlbjQ5BbtnzF2kviAe k36g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YUBPRDmi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d5si137335ilr.23.2021.06.23.10.20.19; Wed, 23 Jun 2021 10:20:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YUBPRDmi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229881AbhFWRVy (ORCPT + 99 others); Wed, 23 Jun 2021 13:21:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41111 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229831AbhFWRVv (ORCPT ); Wed, 23 Jun 2021 13:21:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624468773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eafgGiX6GDLeKBcSkHNVWv30fndO9YqdjKRuqwRhCEI=; b=YUBPRDmiHXnKrQMawNpBLM+UWHZv466SNn1NCTolgmPbsiijCTl+n2fZWPK3njLwo+uylG Tm7pB036tZgI7BLReP1nTrjMp5wEDg9TRTLxWQ1HX7Dgbvz2VVAbvu2rSRdUTfTQzPdLvN wpe4Kq9KVWJDcmbi5nOxMISrTYH19Ac= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-457-u4aFoMtNNOeM_oekqbXIhg-1; Wed, 23 Jun 2021 13:19:31 -0400 X-MC-Unique: u4aFoMtNNOeM_oekqbXIhg-1 Received: by mail-wm1-f70.google.com with SMTP id i82-20020a1c22550000b02901d64e84b3c9so850237wmi.5 for ; Wed, 23 Jun 2021 10:19:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=eafgGiX6GDLeKBcSkHNVWv30fndO9YqdjKRuqwRhCEI=; b=EjfYx1xrn8BYtp7aHttI6Ao3AlUaL5HXxhd9zstFyozqm2KY93Zr9apaTcYkfQu0pB yxA9GYIP9mmmEfOnON38y+kZLP7XULM1u2O2vtB74neaf5wZ4c0KmowrXGUeWDW96ARz utF8vvpFc1RQXHd5m0rW7H7mUYdu3bxqD2meikt8m3YlnR+pIPwAuoFeSH2BEBLnUZYK /m49DBaUOYZBlwi0rl5EkFBYo8z/Y9AA7LJu40AfZf+K5TiCavJUsL7JwEBUJW4cqKvt mn1ZezvK2jZCH5Ba3PCbXSsKHRMho2kd6VTVlrYvBG4m+Mheym3hoQJ71jn4n3uRSO49 eMTg== X-Gm-Message-State: AOAM533zZUZhJ19CleCHOUETFXnhvAegpf7wlK6xCHCp0ffKHuef3zKZ rynLkRC4j962VXlUByM0883bdQVCZteTiZrynLvfdmVA+gJSEOZsfTGH59N8QYTdMhUvttPxTRd mDRpjhXQu43OfISHaVhw5mhf5 X-Received: by 2002:a1c:98c9:: with SMTP id a192mr12303317wme.66.1624468769815; Wed, 23 Jun 2021 10:19:29 -0700 (PDT) X-Received: by 2002:a1c:98c9:: with SMTP id a192mr12303283wme.66.1624468769546; Wed, 23 Jun 2021 10:19:29 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-109-224.dyn.eolo.it. [146.241.109.224]) by smtp.gmail.com with ESMTPSA id z4sm633801wrs.56.2021.06.23.10.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 10:19:29 -0700 (PDT) Message-ID: <97fd842e75ef1dd7d78b99441d5654fb9a05e320.camel@redhat.com> Subject: Re: [PATCH 5.10 038/146] mptcp: do not warn on bad input from the network From: Paolo Abeni To: Pavel Machek Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Mat Martineau , "David S. Miller" , Sasha Levin Date: Wed, 23 Jun 2021 19:19:28 +0200 In-Reply-To: <20210623165327.GA4150@amd> References: <20210621154911.244649123@linuxfoundation.org> <20210621154912.589676201@linuxfoundation.org> <20210623142235.GA27348@amd> <254a0b83518083416abdae4cd27659bc10760773.camel@redhat.com> <20210623165327.GA4150@amd> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2021-06-23 at 18:53 +0200, Pavel Machek wrote: > Hi! > > > > > From: Paolo Abeni > > > > > > > > [ 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. > > Correct me if I'm wrong, but I believe pr_debug will result in > messages being stored in the dmesg buffer, even on production > systems. If DYNAMIC_DEBUG is enabled, and the system administator explicitly enables the relevant debug message writing suitable data in /sys/kernel/debug/dynamic_debug/control, yes, the message will be printed on dmsg. With DYNAMIC_DEBUG disabled, patching the kernel and defining the DEBUG macro in the net/mptcp/protocol.c file you will get again the debug message. Neither of the above fit productions systems IMHO, and I'm not aware of other options to trigger the relevant debug message. I personally have CONFIG_DYNAMIC_DEBUG=y in my kconfig and I enable the relevant debug message as needed in my devel activity. Cheers, Paolo