From patchwork Tue Nov 22 20:39:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1708019 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=tYHr4fSx; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NGx3739Bmz23nw for ; Wed, 23 Nov 2022 07:40:18 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1oxa3r-00068q-CI; Tue, 22 Nov 2022 20:40:07 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1oxa3p-00068U-Cn for kernel-team@lists.ubuntu.com; Tue, 22 Nov 2022 20:40:05 +0000 Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 222D03F367 for ; Tue, 22 Nov 2022 20:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1669149605; bh=+JyFy0GoHMUoQBaUtsmB5yDt3dzwGIKyIb7STqkDhfQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=tYHr4fSxP/XyrmcJxKy8GwD8Zo/njEOayHFvIsPCr8qMLtWeDs9mNTkwdDFmUXDEV DGhm3X1apTi37emniut8Az5nnxJ0yvgvUaPi2c0xvIx1wYV368unLaR9k8WVijb3PA KgMPKg4uM7gKYH0zrlYZte4jsyu3yCowGzfVPiLrI22+LkfCcFoerynEAiM6uKWsJ6 ZTjekUFRElNA9pykrQI2TJIC5B7Kl8qHwNcZzvS4/d89GW92LS6NY8+CCd8ty9IXBd 0S3xS8497Z9FzUYRFu/J9f/50XiRQm4T59AVw5BAGXg9KJJfn/r++xyIDrKfR8O7Zo NO3aDMCWNVlFQ== Received: by mail-pf1-f198.google.com with SMTP id x11-20020a056a000bcb00b0056c6ec11eefso9979342pfu.14 for ; Tue, 22 Nov 2022 12:40:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+JyFy0GoHMUoQBaUtsmB5yDt3dzwGIKyIb7STqkDhfQ=; b=EIbRiqIOXjEQHVx8Z2Fbh8/OCG6g7RSUgKuC81kBseIOR9tmXOOQDOVh3loKLIQtmj G/9vRe9GWN3RHxx8Siu7c4gZZEe/zcWt0bIZMfYfwwrmtrXOO3QZBTiGKxpz8tqzBBsq 7B1O7E8qqQFPYTUsj7OzZHAVujO6XMtN6MY6FiXiGxpsIOx1eJ1MlbbHzhVBFeu4szIE 27W97dQyEaSXbPJJZ+UXRHlm0VN4mMCWP/SNuxnwZGhYVC+yZoKQ8FSVsC4AZrerkVjE eEKPvjsP0a2/wekwZW3LExYp1klgnmWJyKdpLxksfHJq0q2q9QNh2EI3Bt4EmvW3tWn6 4kxQ== X-Gm-Message-State: ANoB5pkKWyDJHgAiJx1n/t+HIhSv6Jbw5Oww/Nlhb0nrzO/XK+7jsOBS 7V/kJwtRYquKDKD8Io5OE8indmFZaxo8P/LJyES/aj8hNjm+PkBZUWzbWnrjV8E745rcl2Ykq9m 6FOcARdY3qBxi4lsT6RmLPv1TA3hQgNL2p/M/8LyOrg== X-Received: by 2002:a05:6a00:27a3:b0:56d:6450:9e49 with SMTP id bd35-20020a056a0027a300b0056d64509e49mr5899802pfb.54.1669149603434; Tue, 22 Nov 2022 12:40:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf4hDGc6S+6zqr8xR2XTdPeYLXJrxeVtiFhyVkOM9M/Uuvm1+Ut4Em+O57as5zUAi3Az8w/ecA== X-Received: by 2002:a05:6a00:27a3:b0:56d:6450:9e49 with SMTP id bd35-20020a056a0027a300b0056d64509e49mr5899779pfb.54.1669149603062; Tue, 22 Nov 2022 12:40:03 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id d16-20020a170903231000b0017f73caf588sm12502525plh.218.2022.11.22.12.40.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 12:40:02 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/4][SRU][focal:linux] NFSv4.1: Don't rebind to the same source port when reconnecting to the server Date: Tue, 22 Nov 2022 13:39:10 -0700 Message-Id: <20221122203914.344894-1-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1997488 SRU Justification Microsoft asked for this backport complaining that, "NFS 4.1 mounts on AKS are reusing the same source port when a reconnect needs to happen". Patches 1-3 are scaffolding in order to provide a clean cherrypick for patch 4. This issue looks applicable to the generic kernel. [Impact] NFSv2, v3 and NFSv4 servers often have duplicate replay caches that look at the source port when deciding whether or not an RPC call is a replay of a previous call. This requires clients to perform strange TCP gymnastics in order to ensure that when they reconnect to the server, they bind to the same source port. NFSv4.1 and NFSv4.2 have sessions that provide proper replay semantics, that do not look at the source port of the connection. This patch therefore ensures they can ignore the rebind requirement. [Where things could go wrong] NFS reconnects may erroneously fail. [Other Info] SF: #00345839