Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1743744rwb; Tue, 29 Nov 2022 18:58:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Lb0L3HK1btDmW9/Z8Fvd11Wmix2+PV3vmKs7fJEwW8ntVObK/vUM7wHzVN/18HjqLGmUf X-Received: by 2002:a17:907:2a0a:b0:7bf:2ca8:3f22 with SMTP id fd10-20020a1709072a0a00b007bf2ca83f22mr12462794ejc.237.1669777101426; Tue, 29 Nov 2022 18:58:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669777101; cv=none; d=google.com; s=arc-20160816; b=p8J0Mc5aA2p5uaCPWU/tyn13tqALYk3X0GiBUI/LK2K6dJ3MpsWcwp/dsjEshN5vNW TK6clBE8tJt2rNx3asVnZkyZYlU5UYuBsfire/xLwcAO+LnUJ5XbDne0hIRkhTHdBWMV aBNxB+TowT+52Dhiyk6NIrdfxYF3OPwKYvyCo9LgkdpHVTEWwS5aWehfmL+aU/wpizte TijU2b+c+NSdV3tEf151pAQiQVfIe3GN8Q0PfRyZ2hMGpNYyqRPOGc0qyLrNx4XLdYbk CtgDkB6XA8tw7oRa5vblBnSb/2vqkpAmqDplJJ6p3SYNwIFmVL1uubZFgt1Y4anzWVEc WbVQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ZwdRSITvbdo/8qKxFuwdjVG/fwThySQ5mq6GmHUHtnk=; b=OR/JAzJYy6Ay0TLzwZ2PHowwPbIKZ1rYheTzcjotthFDR1Kl/JqxbeTDBNWpOtxrzE S57W9QALw/548bBozjE3lAGFlFnadCw+lhwQi+02wWQ4yNqlufOoSjABZVV60wafPb5V CcApKjSHb/k/zKBTuZx49xHlZc10MkO8yr+FwE3i1Vx3tOlabF964q3zz5/NXpla9Ayp HoxY+rgzFGoqXMPsddfUlZ5tdvbDXETxQLwMFeYmZDC9PeQsu5n2wz/u3Z9aAcpp81WU p+aqoBTJKPl97x3W64THSLEx1XRUWiylUa7aqk+zUcYXXzjuXxMCiurZjTsSWvt17khj fuOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kCoI84qX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g14-20020a1709065d0e00b007a4feae7ae7si323970ejt.575.2022.11.29.18.57.59; Tue, 29 Nov 2022 18:58:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kCoI84qX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232336AbiK3C2I (ORCPT + 86 others); Tue, 29 Nov 2022 21:28:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232322AbiK3C2F (ORCPT ); Tue, 29 Nov 2022 21:28:05 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94AE73122D; Tue, 29 Nov 2022 18:28:04 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 31391619B2; Wed, 30 Nov 2022 02:28:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D449C433C1; Wed, 30 Nov 2022 02:28:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669775283; bh=z1ceRsw0LGYg7P8Qs/EXJia9wlfAImMjepZt6gI/Eu8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kCoI84qXbTQAsCFmXCnPiEJDAT6YQ/BNru5kBqUhC8RH/JntcjD/+312R28W7+Bim WK8PqLi+/bFtC/HQkvVUtrROr1OIDrtSEETdKPYD4TRFIeGqh6Md3XbvvwjMN9TNTF SI+OVvLyQFHC4yZTqaYNFu9738ZlxZijXBAkDaMFv1xzZ20gQTi8H50aBoyjQlYG57 ZT6NNAElxbumiMJkz67/uDSK58SoH2JBhlo4YdWDYokgxvr6YtqURdu1LPGji5nbQ/ EEFucvF7PIa+dBn8wvRRAgm+6Vr5IKOOJva4xuJPL9ewSmy8sqYZXvFA3pdhQG26a3 30FIMmw1tQYdg== Date: Tue, 29 Nov 2022 18:28:02 -0800 From: Jakub Kicinski To: Paolo Abeni Cc: Breno Leitao , edumazet@google.com, davem@davemloft.net, netdev@vger.kernel.org, leit@fb.com, yoshfuji@linux-ipv6.org, dsahern@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND net-next] tcp: socket-specific version of WARN_ON_ONCE() Message-ID: <20221129182802.51de0774@kernel.org> In-Reply-To: References: <20221124112229.789975-1-leitao@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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").