All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nguyen Dinh Phi <phind.uet@gmail.com>
To: Neal Cardwell <ncardwell@google.com>
Cc: Eric Dumazet <edumazet@google.com>,
	David Miller <davem@davemloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	David Ahern <dsahern@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	kpsingh@kernel.org, netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	linux-kernel-mentees@lists.linuxfoundation.org,
	syzbot+f1e24a0594d4e3a895d3@syzkaller.appspotmail.com,
	Yuchung Cheng <ycheng@google.com>
Subject: Re: [PATCH] tcp: Do not reset the icsk_ca_initialized in tcp_init_transfer.
Date: Tue, 29 Jun 2021 15:17:20 +0800	[thread overview]
Message-ID: <205F52AB-4A5B-4953-B97E-17E7CACBBCD8@gmail.com> (raw)
In-Reply-To: <CADVnQynqMQhO4cBON=xUCkne9-E1hze3naMZZ8tQ-a0k71kh8g@mail.gmail.com>

On June 29, 2021 1:20:19 AM GMT+08:00, Neal Cardwell <ncardwell@google.com> wrote:
>)
>
>On Mon, Jun 28, 2021 at 1:15 PM Phi Nguyen <phind.uet@gmail.com> wrote:
>>
>> On 6/29/2021 12:24 AM, Neal Cardwell wrote:
>>
>> > 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
>> >
>>
>> Hi Neal,
>>
>> The gdb stack trace that lead to init_transfer_input() is as bellow,
>the
>> current sock state is TCP_SYN_RECV.
>
>Thanks. That makes sense as a snapshot of time for
>tcp_init_transfer(), but I think what would be more useful would be a
>description of the sequence of events, including when the CC was
>initialized previous to that point (as noted above, was it that the
>setsockopt(TCP_CONGESTION) completed before that point?).
>
>thanks,
>neal

I resend my message because I accidently used html format in last one. I am very sorry for the inconvenience caused.
---
Yes, the CC had been initialized by the setsockopt, after that, it was initialized again in function tcp_init_transfer() because of setting isck_ca_initialized to 0.
Regards, 
Phi.

WARNING: multiple messages have this Message-ID (diff)
From: Nguyen Dinh Phi <phind.uet@gmail.com>
To: Neal Cardwell <ncardwell@google.com>
Cc: Song Liu <songliubraving@fb.com>, Martin KaFai Lau <kafai@fb.com>,
	syzbot+f1e24a0594d4e3a895d3@syzkaller.appspotmail.com,
	Daniel Borkmann <daniel@iogearbox.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	netdev <netdev@vger.kernel.org>, David Ahern <dsahern@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Yuchung Cheng <ycheng@google.com>,
	kpsingh@kernel.org, Jakub Kicinski <kuba@kernel.org>,
	bpf <bpf@vger.kernel.org>,
	linux-kernel-mentees@lists.linuxfoundation.org,
	David Miller <davem@davemloft.net>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tcp: Do not reset the icsk_ca_initialized in tcp_init_transfer.
Date: Tue, 29 Jun 2021 15:17:20 +0800	[thread overview]
Message-ID: <205F52AB-4A5B-4953-B97E-17E7CACBBCD8@gmail.com> (raw)
In-Reply-To: <CADVnQynqMQhO4cBON=xUCkne9-E1hze3naMZZ8tQ-a0k71kh8g@mail.gmail.com>

On June 29, 2021 1:20:19 AM GMT+08:00, Neal Cardwell <ncardwell@google.com> wrote:
>)
>
>On Mon, Jun 28, 2021 at 1:15 PM Phi Nguyen <phind.uet@gmail.com> wrote:
>>
>> On 6/29/2021 12:24 AM, Neal Cardwell wrote:
>>
>> > 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
>> >
>>
>> Hi Neal,
>>
>> The gdb stack trace that lead to init_transfer_input() is as bellow,
>the
>> current sock state is TCP_SYN_RECV.
>
>Thanks. That makes sense as a snapshot of time for
>tcp_init_transfer(), but I think what would be more useful would be a
>description of the sequence of events, including when the CC was
>initialized previous to that point (as noted above, was it that the
>setsockopt(TCP_CONGESTION) completed before that point?).
>
>thanks,
>neal

I resend my message because I accidently used html format in last one. I am very sorry for the inconvenience caused.
---
Yes, the CC had been initialized by the setsockopt, after that, it was initialized again in function tcp_init_transfer() because of setting isck_ca_initialized to 0.
Regards, 
Phi.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  parent reply	other threads:[~2021-06-29  7:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 14:49 [PATCH] tcp: Do not reset the icsk_ca_initialized in tcp_init_transfer Nguyen Dinh Phi
2021-06-28 14:49 ` Nguyen Dinh Phi
2021-06-28 14:52 ` Eric Dumazet
2021-06-28 14:52   ` Eric Dumazet via Linux-kernel-mentees
2021-06-28 16:18   ` Phi Nguyen
2021-06-28 16:18     ` Phi Nguyen
2021-06-28 16:24     ` Neal Cardwell
2021-06-28 16:24       ` Neal Cardwell via Linux-kernel-mentees
2021-06-28 17:15       ` Phi Nguyen
2021-06-28 17:15         ` Phi Nguyen
2021-06-28 17:20         ` Neal Cardwell
2021-06-28 17:20           ` Neal Cardwell via Linux-kernel-mentees
2021-06-28 23:41           ` Martin KaFai Lau
2021-06-28 23:41             ` Martin KaFai Lau via Linux-kernel-mentees
2021-06-29  6:03           ` Phi Nguyen Dinh
2021-06-29  7:17           ` Nguyen Dinh Phi [this message]
2021-06-29  7:17             ` Nguyen Dinh Phi
2021-06-29  8:21             ` Eric Dumazet
2021-06-29  8:21               ` Eric Dumazet via Linux-kernel-mentees
2021-06-29 12:28               ` Nguyen Dinh Phi
2021-06-29 12:28                 ` Nguyen Dinh Phi
2021-06-29 12:58                 ` Eric Dumazet
2021-06-29 12:58                   ` Eric Dumazet via Linux-kernel-mentees
2021-06-29 15:59                   ` Neal Cardwell
2021-06-29 15:59                     ` Neal Cardwell via Linux-kernel-mentees
2021-06-30 18:25                     ` Phi Nguyen
2021-06-30 18:25                       ` Phi Nguyen
2021-07-01 14:23                       ` Neal Cardwell
2021-07-01 14:23                         ` Neal Cardwell via Linux-kernel-mentees
2021-06-28 17:09 ` Neal Cardwell
2021-06-28 17:09   ` Neal Cardwell via Linux-kernel-mentees

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=205F52AB-4A5B-4953-B97E-17E7CACBBCD8@gmail.com \
    --to=phind.uet@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=syzbot+f1e24a0594d4e3a895d3@syzkaller.appspotmail.com \
    --cc=ycheng@google.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.