Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4006pxb; Tue, 10 Nov 2020 17:47:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1+8K70lBOpP6hxAfpM5ChchdiyJoo3f7egWh/Fkk+vxVMfOSqTp30wYxH2PD7Tn1mtEG7 X-Received: by 2002:aa7:c34c:: with SMTP id j12mr2501763edr.17.1605059270678; Tue, 10 Nov 2020 17:47:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605059270; cv=none; d=google.com; s=arc-20160816; b=X6Pkzmeer458HgEL9tiWzjjQqBxJK0kxs7O/lSjMurKRTEv77CT8q5JBnLxsNituOx TSzMsXqsdsxSsJm1xHnbGHlGjY0kN774at5OHOT4gukORvHjVVjc00n14QFzbNRfddB4 yEqcBMAHQBQgsysgsfe/9rugcHP186hDCWjxkwHZ4/rpcboClUEHIzJAn+tUiu+wA8Ip rhBUzRC8klAMrrgGcF/XVQjlRpWrclF9Dj3RmAFWgFS1zYR7UbXfoIq2eZP+h7+3NZBt xV45HYLFEaBvjbLfSAAgRd84wlr1kL8x1FMi16J+TJ7oz2TlJMdFYlzclIYgAIlP1f5j ODkw== 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=P1uXR8d+d8xasP+C93g7LWuLSjSir3FW9Ucs1N6NLSI=; b=hdEnui/ZuwjVu8Z00ZSf+xa3QCleO7Wceyrr5jNGsDHANw4mTxUafxOxb0Ne8390lh otQkcBp4XK9QF8Q3UeaPTog6d7CT4LJZ4oaB3zjQWNtEr3N2zDwypc0CYzfZAl/8nwtc LJat0cBZZ9tBN2OGLqFFEMyIDOj2BJULolxRUYuHQKgXWX6EEaLegxK7rEh6EgEGODrV h7yYbybMf3c5M8mUAhoIOzUOGRCGPTaSo2uk7oYw+4PctbuQhseFYx0kTGmk/QXC8Shl PyMJoMWAM4IjRMlx3hfNe/82J1Y9extZ/Z8JjqoujRcluHyenRQIeUq5m4HQImBESR6j Pt/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ItIBu3Ke; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q5si383265edv.293.2020.11.10.17.47.16; Tue, 10 Nov 2020 17:47:50 -0800 (PST) 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=@kernel.org header.s=default header.b=ItIBu3Ke; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732421AbgKKBpF (ORCPT + 99 others); Tue, 10 Nov 2020 20:45:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:36550 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731610AbgKKBpD (ORCPT ); Tue, 10 Nov 2020 20:45:03 -0500 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A125721D91; Wed, 11 Nov 2020 01:45:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605059103; bh=ic/a7OlP7uVxoz0DZlnF8Ku42k4DL7dFKQ5vFbygi4c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ItIBu3KedxgUi3HQVDq2fRjNtZkawaNHGlgAf53SwhyxoEE6HXOa/RxwyrzzKHdhH 1wQkku5shQJFlvc9MjbI7FCR1xXCY2Kix90s+TciKjQG2r0xNYpur8w3SWRKK3wniU lQSstQx3kXgyPKqB0R5Nk4twvJO8masbKNKDBMW8= Date: Tue, 10 Nov 2020 17:45:01 -0800 From: Jakub Kicinski To: Eric Dumazet Cc: Mao Wenan , David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH net v5] net: Update window_clamp if SOCK_RCVBUF is set Message-ID: <20201110174501.703879e8@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <1604967391-123737-1-git-send-email-wenan.mao@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Nov 2020 08:32:52 +0100 Eric Dumazet wrote: > On Tue, Nov 10, 2020 at 1:16 AM Mao Wenan wrote: > > When net.ipv4.tcp_syncookies=1 and syn flood is happened, > > cookie_v4_check or cookie_v6_check tries to redo what > > tcp_v4_send_synack or tcp_v6_send_synack did, > > rsk_window_clamp will be changed if SOCK_RCVBUF is set, > > which will make rcv_wscale is different, the client > > still operates with initial window scale and can overshot > > granted window, the client use the initial scale but local > > server use new scale to advertise window value, and session > > work abnormally. > > > > Fixes: e88c64f0a425 ("tcp: allow effective reduction of TCP's rcv-buffer via setsockopt") > > Signed-off-by: Mao Wenan > > Signed-off-by: Eric Dumazet Applied, thanks!