From nobody Sun Feb 20 18:15:31 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B8EDC19CE7E7; Sun, 20 Feb 2022 18:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K1ts012vFz4XZJ; Sun, 20 Feb 2022 18:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645380932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Dao+Tsjq6oFtTMev43WZByvOemXoiTU3qlv7GwonAo=; b=CDhbRPN/cBMqoW93NxZD21Kn1mzd7RF+njAd1bZawOZJBq6VMf6i6mV3JOOfHNC8AnujnJ 4q05CjeYBry00xb+wypNjLafE88XAscSpVQKo9INu9QDCZyN4t5cFVAxsqqMaLGrJ9GczG pN03sSoOyDxLEnG53n8jfCantRHtdgib2C6tmrTh38MDIajEm08Y1/5JrH1upbnzYzC7Gx m2wM7rezK2YPzK+YIPb+fEWs3DUg/1lTjbi+x6KrnC2vSdEvocKa5Pv64crOGYVrcA2kMU Tts9ck0fFdl2yfNuZBFrPflbMPmWABhmdv7Dxjsl9DCHVSv2DaGTCqTQrkQEHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7F8721058; Sun, 20 Feb 2022 18:15:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21KIFVk4022800; Sun, 20 Feb 2022 18:15:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21KIFVkb022799; Sun, 20 Feb 2022 18:15:31 GMT (envelope-from git) Date: Sun, 20 Feb 2022 18:15:31 GMT Message-Id: <202202201815.21KIFVkb022799@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 61c7534e5b15 - stable/13 - TCP syncache: enhance KASSERT output List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 61c7534e5b1560d7fb08a3f080b8af8301216469 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645380932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Dao+Tsjq6oFtTMev43WZByvOemXoiTU3qlv7GwonAo=; b=EEn6CUtlL9Cr0dTZjTLRu3AITntEYWoM4n0wCmvwJ9QxXQB5hFt7Ns9JckNPFXUPrHer/1 7ktnhatkANog4eMA8kLrGWChod6R7XnUMADf76NQpxgmA/sygEUagpAs2wtdO6tVzhw43I /kL3tD6virc/M+iKWjs4D9Qr2PvwryMIy6nspnhba7UPnwOyvobZ7aDki6KbUKo8E3+x9M grbsSBzPYe3cW8noPgdx6UxaHd61RfLHjcoik31p5e39c8wp6eIH+a0PVk8t238DdHJOnT qHnyEY7t+GDEPel6hyXHyDV/lCuFm8rSjPtJ10gJgUXwOzGTek5WO5AhTzvqTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645380932; a=rsa-sha256; cv=none; b=YysJQ5XdkotMLBgoLoxjBPfHgtN45bSdkUCEgk1czUiRHDiqK1+6vnjcHuHFWa6BoKtkWa k3YillPRDw9hDNhmhOEmk/cUSA8reKKhDHvApOSmTWSy9HQjT+RXoAPb7s4x4DIe9lxcGb oC24UTq4AmURbclbCnzK/Mrmz79UBAtw5JqNPXvgRMMIHTpkVS/phqd86+YNBe4BNvb5ng o7tLIduFcu+JIGVg5jdXsAyaSqB+hADl9Bs3cHKweam1tXcGJ12YRlqxPDDVMwfUdw6ZTU C1Yyo1UYodZ24LIjw0Hq/cNfQeAdBPhU3MgisnPlxFImS/RIwGmKiFsrU2T97w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=61c7534e5b1560d7fb08a3f080b8af8301216469 commit 61c7534e5b1560d7fb08a3f080b8af8301216469 Author: Bjoern A. Zeeb AuthorDate: 2022-02-08 23:47:15 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-02-20 16:23:21 +0000 TCP syncache: enhance KASSERT output Improve the "syncache: mbuf too small" assertion message with various variables (some not actually needed) but enough that it will be obvious if (a) we use IPv4 or IPv6, (b) if UDP tunneling is on, (c) what max_linkhdr is, and (d) what MHLEN is. This should help diagnostics in the future. The case was hit with wireless drivers setting a large ic_headroom and using IPv6. Reviewed by: gallatin, tuexen, rscheff Differential Revision: https://reviews.freebsd.org/D34217 (cherry picked from commit 232d323ef227109acce37f5a0d62492673666ee2) --- sys/netinet/tcp_syncache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index e7fb8da52216..54bcf8173c86 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1850,7 +1850,9 @@ syncache_respond(struct syncache *sc, const struct mbuf *m0, int flags) /* XXX: Assume that the entire packet will fit in a header mbuf. */ KASSERT(max_linkhdr + tlen + TCP_MAXOLEN <= MHLEN, - ("syncache: mbuf too small")); + ("syncache: mbuf too small: hlen %u, sc_port %u, max_linkhdr %d + " + "tlen %d + TCP_MAXOLEN %ju <= MHLEN %d", hlen, sc->sc_port, + max_linkhdr, tlen, (uintmax_t)TCP_MAXOLEN, MHLEN)); /* Create the IP+TCP header from scratch. */ m = m_gethdr(M_NOWAIT, MT_DATA);