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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 29 Dec 2021 08:46:01 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     menglong8.dong@...il.com
Cc:     Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Network Development <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
        Menglong Dong <imagedong@...cent.com>
Subject: Re: [PATCH net-next] net: bpf: add hook for close of tcp timewait sock

On Wed, Dec 29, 2021 at 3:33 AM <menglong8.dong@...il.com> wrote:
>
> From: Menglong Dong <imagedong@...cent.com>
>
> The cgroup eBPF attach type 'CGROUP_SOCK_OPS' is able to monitor the
> state change of a tcp connect with 'BPF_SOCK_OPS_STATE_CB' ops.
>
> However, it can't trace the whole state change of a tcp connect. While
> a connect becomes 'TCP_TIME_WAIT' state, this sock will be release and
> a tw sock will be created. While tcp sock release, 'TCP_CLOSE' state
> change will be passed to eBPF program. Howeven, the real state of this
> connect is 'TCP_TIME_WAIT'.
>
> To make eBPF get the real state change of a tcp connect, add
> 'CGROUP_TWSK_CLOSE' cgroup attach type, which will be called when
> tw sock release and tcp connect become CLOSE.

The use case is not explained.
Why bpf tracing cannot be used to achieve the same?

Also there are no selftests.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ