[PATCH net-next v6 3/7] rstreason: prepare for active reset

2024-04-18 Thread Jason Xing
From: Jason Xing Like what we did to passive reset: only passing possible reset reason in each active reset path. No functional changes. Signed-off-by: Jason Xing --- include/net/tcp.h | 3 ++- net/ipv4/tcp.c| 15 ++- net/ipv4/tcp_output.c | 3 ++-

[PATCH net-next v6 4/7] tcp: support rstreason for passive reset

2024-04-18 Thread Jason Xing
From: Jason Xing Reuse the dropreason logic to show the exact reason of tcp reset, so we don't need to implement those duplicated reset reasons. This patch replaces all the prior NOT_SPECIFIED reasons. Signed-off-by: Jason Xing --- net/ipv4/tcp_ipv4.c | 8 net/ipv6/tcp_ipv6.c | 8

[PATCH net-next v6 2/7] rstreason: prepare for passive reset

2024-04-18 Thread Jason Xing
From: Jason Xing Adjust the parameter and support passing reason of reset which is for now NOT_SPECIFIED. No functional changes. Signed-off-by: Jason Xing --- include/net/request_sock.h | 4 +++- net/dccp/ipv4.c| 10 ++ net/dccp/ipv6.c| 10 ++

[PATCH net-next v6 5/7] mptcp: support rstreason for passive reset

2024-04-18 Thread Jason Xing
From: Jason Xing It relys on what reset options in the skb are as rfc8684 says. Reusing this logic can save us much energy. This patch replaces most of the prior NOT_SPECIFIED reasons. Signed-off-by: Jason Xing --- net/mptcp/subflow.c | 22 +- 1 file changed, 17

[PATCH net-next v6 6/7] mptcp: introducing a helper into active reset logic

2024-04-18 Thread Jason Xing
From: Jason Xing Since we have mapped every mptcp reset reason definition in enum sk_rst_reason, introducing a new helper can cover some missing places where we have already set the subflow->reset_reason. Note: using SK_RST_REASON_NOT_SPECIFIED is the same as SK_RST_REASON_MPTCP_RST_EUNSPEC.

[PATCH net-next v6 1/7] net: introduce rstreason to detect why the RST is sent

2024-04-18 Thread Jason Xing
From: Jason Xing Add a new standalone file for the easy future extension to support both active reset and passive reset in the TCP/DCCP/MPTCP protocols. This patch only does the preparations for reset reason mechanism, nothing else changes. The reset reasons are divided into three parts: 1)

[PATCH net-next RESEND v6 0/7] Implement reset reason mechanism to detect

2024-04-18 Thread Jason Xing
From: Jason Xing In production, there are so many cases about why the RST skb is sent but we don't have a very convenient/fast method to detect the exact underlying reasons. RST is implemented in two kinds: passive kind (like tcp_v4_send_reset()) and active kind (like tcp_send_active_reset()).

[PATCH net-next v6 7/7] rstreason: make it work in trace world

2024-04-18 Thread Jason Xing
From: Jason Xing At last, we should let it work by introducing this reset reason in trace world. One of the possible expected outputs is: ... tcp_send_reset: skbaddr=xxx skaddr=xxx src=xxx dest=xxx state=TCP_ESTABLISHED reason=NOT_SPECIFIED Signed-off-by: Jason Xing Reviewed-by: Steven

Re: [PATCH net-next v6 0/7] Implement reset reason mechanism to detect

2024-04-18 Thread Jason Xing
On Thu, Apr 18, 2024 at 11:46 PM Jakub Kicinski wrote: > > On Thu, 18 Apr 2024 11:30:02 +0800 Jason Xing wrote: > > I'm not sure why the patch series has been changed to 'Changes > > Requested', until now I don't think I need to change something. > > > > Should I repost this series (keeping the

Re: [PATCH v3 2/2] rethook: honor CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING in rethook_try_get()

2024-04-18 Thread Andrii Nakryiko
On Tue, Apr 9, 2024 at 3:48 PM Masami Hiramatsu wrote: > > On Wed, 3 Apr 2024 15:03:28 -0700 > Andrii Nakryiko wrote: > > > Take into account CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING when validating > > that RCU is watching when trying to setup rethooko on a function entry. > > > > This further

[PATCH v4 2/2] rethook: honor CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING in rethook_try_get()

2024-04-18 Thread Andrii Nakryiko
Take into account CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING when validating that RCU is watching when trying to setup rethooko on a function entry. One notable exception when we force rcu_is_watching() check is CONFIG_KPROBE_EVENTS_ON_NOTRACE=y case, in which case kretprobes will use old-style

[PATCH v4 1/2] ftrace: make extra rcu_is_watching() validation check optional

2024-04-18 Thread Andrii Nakryiko
Introduce CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING config option to control whether ftrace low-level code performs additional rcu_is_watching()-based validation logic in an attempt to catch noinstr violations. This check is expected to never be true and is mostly useful for low-level validation of

Re: [PATCH net-next v6 0/7] Implement reset reason mechanism to detect

2024-04-18 Thread Jakub Kicinski
On Thu, 18 Apr 2024 11:30:02 +0800 Jason Xing wrote: > I'm not sure why the patch series has been changed to 'Changes > Requested', until now I don't think I need to change something. > > Should I repost this series (keeping the v6 tag) and then wait for > more comments? If Eric doesn't like it

Re: [PATCH net-next v6 0/7] Implement reset reason mechanism to detect

2024-04-18 Thread Eric Dumazet
On Thu, Apr 18, 2024 at 6:24 PM Jason Xing wrote: > > On Thu, Apr 18, 2024 at 11:46 PM Jakub Kicinski wrote: > > > > On Thu, 18 Apr 2024 11:30:02 +0800 Jason Xing wrote: > > > I'm not sure why the patch series has been changed to 'Changes > > > Requested', until now I don't think I need to

Re: [PATCH net-next v6 0/7] Implement reset reason mechanism to detect

2024-04-18 Thread Jason Xing
On Fri, Apr 19, 2024 at 2:51 AM Eric Dumazet wrote: > > On Thu, Apr 18, 2024 at 6:24 PM Jason Xing wrote: > > > > On Thu, Apr 18, 2024 at 11:46 PM Jakub Kicinski wrote: > > > > > > On Thu, 18 Apr 2024 11:30:02 +0800 Jason Xing wrote: > > > > I'm not sure why the patch series has been changed to

Re: [PATCH v4 2/2] rethook: honor CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING in rethook_try_get()

2024-04-18 Thread Google
On Thu, 18 Apr 2024 12:09:09 -0700 Andrii Nakryiko wrote: > Take into account CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING when validating > that RCU is watching when trying to setup rethooko on a function entry. > > One notable exception when we force rcu_is_watching() check is >

Re: [PATCH v4 2/2] rethook: honor CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING in rethook_try_get()

2024-04-18 Thread Paul E. McKenney
On Thu, Apr 18, 2024 at 12:09:09PM -0700, Andrii Nakryiko wrote: > Take into account CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING when validating > that RCU is watching when trying to setup rethooko on a function entry. > > One notable exception when we force rcu_is_watching() check is >

Re: [PATCH net-next v6 0/7] Implement reset reason mechanism to detect

2024-04-18 Thread Jason Xing
On Fri, Apr 19, 2024 at 6:29 AM Jason Xing wrote: > > On Fri, Apr 19, 2024 at 2:51 AM Eric Dumazet wrote: > > > > On Thu, Apr 18, 2024 at 6:24 PM Jason Xing > > wrote: > > > > > > On Thu, Apr 18, 2024 at 11:46 PM Jakub Kicinski wrote: > > > > > > > > On Thu, 18 Apr 2024 11:30:02 +0800 Jason

Re: [PATCH net-next v6 0/7] Implement reset reason mechanism to detect

2024-04-18 Thread Jason Xing
> When I said "If you feel the need to put them in a special group, this > is fine by me.", > this was really about partitioning the existing enum into groups, if > you prefer having a group of 'RES reasons' Are you suggesting copying what we need from enum skb_drop_reason{} to enum

Re: [PATCH net-next v6 0/7] Implement reset reason mechanism to detect

2024-04-18 Thread Jason Xing
On Fri, Apr 19, 2024 at 7:26 AM Jason Xing wrote: > > > When I said "If you feel the need to put them in a special group, this > > is fine by me.", > > this was really about partitioning the existing enum into groups, if > > you prefer having a group of 'RES reasons' > > Are you suggesting