Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3652797pxv; Mon, 28 Jun 2021 09:26:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnIXsguz7p10t0nBHBNsVjSrSo63Rc2vnOoqO/MasAg+7KuJmw9qYSMEHyexciGV+qH3Ee X-Received: by 2002:aa7:c618:: with SMTP id h24mr26697108edq.89.1624897617249; Mon, 28 Jun 2021 09:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624897617; cv=none; d=google.com; s=arc-20160816; b=nzm5sb7cMFkBmMXM9CVH2LgOSYoXoueOpatNRW6Hlt04bpdRb9KJ6aK6s5PkPAN90Q g3ZRPU3NYSGf1Yg8oERMFU7Iu0DQFSDYe0Y8SKBN7tcgYXZAqecpXbmqcok+s/tjQ9cy dOaTnudSpcB5eYJ2vLgrM3BfPzytTTzm7yWv84zj8Iwgi/U7+TDtAbLf9ZsBU5f3Gzym 376KpR4PmqKYek1Xt0jUc/VqGULw/H+idYUJelhWoBfiKU7FtKjhxCLaWL+3agVAqYaQ w4T0BBGcds74aGKjVWQBjX47bKRrkUP0pzCGe0WQ0mHl+qei3PtOWEDvrM1HWJjuloH2 0EMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RpJ7w32iGqwOk/oM/d0ecaefQixseDwgEeakcU32Bpk=; b=JwcXj0lqa+cjbLTu8EnMNUsw9LHJ20844XgJjh+/+Xo9CTifeK4fct2jCFT3mdjSCk i0WyHOvk7+VjEO1+X16+Jof2jkWdXEma3pOjRxgnbPM7ZJEYNvPROMuYpIX1byZF5AmF sICswVYZ/TD6tqpiIHuB38A7fX/DeEkFWQ4wR983xCFdWG0vttR4raxmDVbxi4B4LGmx oftPUzfSGxT54LjoQu+vu+cYny6z+w8H/W8U0eHsgiabID9l3bstomSjeWbnXI2jZi4u uGoBAKAgFWWzpL3AMgbg/GiITMIeUloW5jOQ1vUA5Fiz5/JWFoTCeU7LwHk7x63BEKmQ Q5Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=J5VVzZnC; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si3662586edd.286.2021.06.28.09.26.33; Mon, 28 Jun 2021 09:26:57 -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=@google.com header.s=20161025 header.b=J5VVzZnC; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233697AbhF1Q1J (ORCPT + 99 others); Mon, 28 Jun 2021 12:27:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233189AbhF1Q1H (ORCPT ); Mon, 28 Jun 2021 12:27:07 -0400 Received: from mail-vk1-xa35.google.com (mail-vk1-xa35.google.com [IPv6:2607:f8b0:4864:20::a35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E1B2C061760 for ; Mon, 28 Jun 2021 09:24:41 -0700 (PDT) Received: by mail-vk1-xa35.google.com with SMTP id d7so4074735vkf.2 for ; Mon, 28 Jun 2021 09:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RpJ7w32iGqwOk/oM/d0ecaefQixseDwgEeakcU32Bpk=; b=J5VVzZnCPxO4E4iVGvXs0S0FNIqPMIYqCPljwFsfMFBLSG5Xf/XsoDBBgz7XgOAHmm vj7AoYTLWtcJtxnNJHMOS4ONGe4/xLbiLzUhOqtIS+2VZ8TjR/p4Jp/sjGyshvcYALQV jiVsg2puI6vff5H82ZCHshluIz/QfrLLq8Q1ODcK2NxRkPvQDq4NlK8sQLRWj/URdKEZ ZLO4SE0JpCoP3lPkkachFV5wjB0I/V2WtBgJTHN8spUvLb5bKq89e41L9bsmNvmMK9vp dTyECvKDxu/nb0CWQCyyvTe4MPcCoERzBGkhHsCI7FYD+dGi9i2beYvViJ6+e6YeCT47 NvBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RpJ7w32iGqwOk/oM/d0ecaefQixseDwgEeakcU32Bpk=; b=gd69woBSosbnR65OkOoXJt+MfANW4kmVc9HvmS4lxJZQ0WK2CgbABagGS0dhsyy5O5 0MmoCC/WFJshPeh/uRPOWMXRQVQO+wanbnHveD4Y7kbYwC/4l7zTEZH8F2E1Kr5OGWIH jc0jf0dvqXrxQNRAecva5Gxv+HOsTQezrQ0O/ljUHDJFD6CK9vZLxk2FJADf5U3JwSlE 6uDFPfq7szf5iww+5U82gD0vr86L8wuwwOlXhgq7KoyMQbhe9tHByd8un4ic+0QyrHiN 05v5Da/MGJKi2YBBrMhzZOtf7O/6nqM2YfsReg81ym0M3MPfeqIz1Mwl3kYF/dmSHreo VZeQ== X-Gm-Message-State: AOAM533Vj+XymO5wiR8yeOaHAyppqvw89uhDFccjqW6xvtO2rbsfTbRb wPu7oBvGxxX1ANjRburyp7+wvF65qitLTH2ddAv7Ew== X-Received: by 2002:a1f:280e:: with SMTP id o14mr17539002vko.19.1624897480401; Mon, 28 Jun 2021 09:24:40 -0700 (PDT) MIME-Version: 1.0 References: <20210628144908.881499-1-phind.uet@gmail.com> <79490158-e6d1-aabf-64aa-154b71205c74@gmail.com> In-Reply-To: <79490158-e6d1-aabf-64aa-154b71205c74@gmail.com> From: Neal Cardwell Date: Mon, 28 Jun 2021 12:24:19 -0400 Message-ID: Subject: Re: [PATCH] tcp: Do not reset the icsk_ca_initialized in tcp_init_transfer. To: Phi Nguyen Cc: Eric Dumazet , David Miller , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , John Fastabend , kpsingh@kernel.org, netdev , LKML , bpf , linux-kernel-mentees@lists.linuxfoundation.org, syzbot+f1e24a0594d4e3a895d3@syzkaller.appspotmail.com, Yuchung Cheng Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 28, 2021 at 12:18 PM Phi Nguyen wrote: > > On 6/28/2021 10:52 PM, Eric Dumazet wrote: > > > Unfortunately this patch might break things. > > > > We keep changing this CC switching, with eBPF being mixed in the equation. > > > > I would suggest you find a Fixes: tag first, so that we can continue > > the discussion. > > > > Thank you. > > Thank for your feedback. I will resubmit it with a Fixes tag. > > Regard. Thanks. Can you also please provide a summary of the event sequence that triggers the bug? Based on your Reported-by tag, I guess this is based on the syzbot reproducer: https://groups.google.com/g/syzkaller-bugs/c/VbHoSsBz0hk/m/cOxOoTgPCAAJ but perhaps you can give a summary of the event sequence that causes the bug? Is it that the call: setsockopt$inet_tcp_TCP_CONGESTION(r0, 0x6, 0xd, &(0x7f0000000000)='cdg\x00', 0x4) initializes the CC and happens before the connection is established, and then when the connection is established, the line that sets: icsk->icsk_ca_initialized = 0; is incorrect, causing the CC to be initialized again without first calling the cleanup code that deallocates the CDG-allocated memory? thanks, neal