lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALOAHbA9CDE0QCrp5TKJam5DejBzuw=AJsZZFqpWQeKxkaaHQg@mail.gmail.com>
Date: Wed, 23 Oct 2024 22:33:15 +0800
From: Yafang Shao <laoar.shao@...il.com>
To: Menglong Dong <menglong8.dong@...il.com>
Cc: edumazet@...gle.com, davem@...emloft.net, dsahern@...nel.org, 
	kuba@...nel.org, pabeni@...hat.com, rostedt@...dmis.org, mhiramat@...nel.org, 
	mathieu.desnoyers@...icios.com, netdev@...r.kernel.org, 
	linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH] net: Add tcp_drop_reason tracepoint

On Wed, Oct 23, 2024 at 8:59 PM Menglong Dong <menglong8.dong@...il.com> wrote:
>
> On Wed, Oct 23, 2024 at 8:33 PM Yafang Shao <laoar.shao@...il.com> wrote:
> >
> > We previously hooked the tcp_drop_reason() function using BPF to monitor
> > TCP drop reasons. However, after upgrading our compiler from GCC 9 to GCC
> > 11, tcp_drop_reason() is now inlined, preventing us from hooking into it.
> > To address this, it would be beneficial to introduce a dedicated tracepoint
> > for monitoring.
>
> Hello,
>
> Can the existing tracepoint kfree_skb do this work? AFAIK, you
> can attach you BPF to the kfree_skb tracepoint and do some filter
> according to the "protocol" field, or the information "sk" field. And
> this works fine in my tool.
>
> I hope I'm not missing something :/
>
> BTW, I do such filter in probe_parse_skb_sk() in
> https://github.com/OpenCloudOS/nettrace/blob/master/shared/bpf/skb_parse.h

We prefer not to hook the kfree_skb tracepoint, as we want to avoid
the overhead of parsing extensive information from @skb. Since we now
have a function that can be easily hooked, why not hook it directly?

--
Regards
Yafang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ