Re: [PATCH net-next v4 0/2] tcp: make trace of reset logic complete

2024-04-03 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 1 Apr 2024 15:36:03 +0800 you wrote: > From: Jason Xing > > Before this, we miss some cases where the TCP layer could send RST but > we cannot trace it. So I decided to complete it :) > > v4 > Link: >

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

2024-04-03 Thread Jason Xing
On Thu, Apr 4, 2024 at 9:50 AM Jakub Kicinski wrote: > > On Wed, 3 Apr 2024 15:31:38 +0800 Jason Xing wrote: > > It's based on top of > > https://patchwork.kernel.org/project/netdevbpf/list/?series=840182 > > Please post as RFC if there's a dependency. > We don't maintain patch queues for

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

2024-04-03 Thread Jakub Kicinski
On Wed, 3 Apr 2024 15:31:38 +0800 Jason Xing wrote: > It's based on top of > https://patchwork.kernel.org/project/netdevbpf/list/?series=840182 Please post as RFC if there's a dependency. We don't maintain patch queues for people. -- pw-bot: cr

RE: [PATCH bpf-next] rethook: Remove warning messages printed for finding return address of a frame.

2024-04-03 Thread John Fastabend
Kui-Feng Lee wrote: > rethook_find_ret_addr() prints a warning message and returns 0 when the > target task is running and not the "current" task to prevent returning an > incorrect return address. However, this check is incomplete as the target > task can still transition to the running state

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

2024-04-03 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. This further (in addition to improvements in the previous patch) improves BPF multi-kretprobe (which rely on rethook) runtime throughput by 2.3%,

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

2024-04-03 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 bpf-next] rethook: Remove warning messages printed for finding return address of a frame.

2024-04-03 Thread Daniel Borkmann
On 4/2/24 6:58 PM, Andrii Nakryiko wrote: On Mon, Apr 1, 2024 at 12:16 PM Kui-Feng Lee wrote: rethook_find_ret_addr() prints a warning message and returns 0 when the target task is running and not the "current" task to prevent returning an incorrect return address. However, this check is

Re: [PATCH] ftrace: make extra rcu_is_watching() validation check optional

2024-04-03 Thread Steven Rostedt
On Tue, 2 Apr 2024 22:21:00 -0700 Andrii Nakryiko wrote: > > I just checked our fleet-wide production data for the last 24 hours. > > Within the kprobe/kretprobe code path (ftrace_trampoline and > > everything called from it), rcu_is_watching (both calls, see below) > > cause 0.484% CPU cycles

Re: [PATCH] ftrace: make extra rcu_is_watching() validation check optional

2024-04-03 Thread Steven Rostedt
On Tue, 2 Apr 2024 21:00:19 -0700 Andrii Nakryiko wrote: > I just noticed another rcu_is_watching() call, in rethook_try_get(), > which seems to be a similar and complementary validation check to the > one we are putting under CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING option > in this patch. It

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

2024-04-03 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 ---

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

2024-04-03 Thread Jason Xing
From: Jason Xing It relys on what reset options in MPTCP does as rfc8684 says. Reusing this logic can save us much energy. This patch replaces all the prior NOT_SPECIFIED reasons. Signed-off-by: Jason Xing --- net/mptcp/subflow.c | 26 -- 1 file changed, 20

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

2024-04-03 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 3/6] rstreason: prepare for active reset

2024-04-03 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 | 2 +- net/ipv4/tcp.c| 15 ++- net/ipv4/tcp_output.c | 2 +-

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

2024-04-03 Thread Jason Xing
From: Jason Xing Adjust the paramenter 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 | 3 ++- net/dccp/ipv4.c| 10 ++ net/dccp/ipv6.c| 10 ++

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

2024-04-03 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 0/6] Implement reset reason mechanism to detect

2024-04-03 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()).