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]
Date:   Fri, 8 Dec 2017 09:03:56 -0200
From:   Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
To:     Yafang Shao <laoar.shao@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Song Liu <songliubraving@...com>,
        Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        yoshfuji@...ux-ipv6.org, Steven Rostedt <rostedt@...dmis.org>,
        Brendan Gregg <bgregg@...flix.com>, netdev@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 net-next] net/tcp: trace all TCP/IP state transition
 with tcp_set_state tracepoint

On Fri, Dec 08, 2017 at 11:40:23AM +0800, Yafang Shao wrote:
> It will looks like these,
> 
>     if (sk->sk_protocol == IPPROTO_TCP)
>         __tcp_set_state(newsk, TCP_SYN_RECV);
>     else
>         newsk->sk_state = TCP_SYN_RECV;
> 
> 
>     if (sk->sk_protocol == IPPROTO_TCP)
>           __tcp_set_state(sk, TCP_CLOSE);
>     else
>           sk->sk_state = TCP_CLOSE;
> 
>     if (sk->sk_protocol == IPPROTO_TCP)
>           tcp_state_store(sk,  state);
>     else
>           sk_state_store(sk, state);
> 
> 
> Some redundant code.
> 
> IMO, put these similar code into a wrapper is more nice.

Agreed. Hmpf, looks like one way or another, we have to add the sk_
functions to do such check, and then the tcp_* won't help much.

I'm okay with this v5 then, can't see a better way around it.

  Marcelo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ