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, 28 Oct 2016 13:14:33 +0200
From:   Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@...csson.com>
To:     Eric Dumazet <eric.dumazet@...il.com>
CC:     <netdev@...r.kernel.org>, <tipc-discussion@...ts.sourceforge.net>,
        <jon.maloy@...csson.com>, <maloy@...jonn.com>,
        <ying.xue@...driver.com>
Subject: Re: [PATCH net-next v1 13/16] tipc: create TIPC_DISCONNECTING as a
 new sk_state

On 10/27/2016 05:03 PM, Eric Dumazet wrote:
> On Thu, 2016-10-27 at 16:22 +0200, Parthasarathy Bhuvaragan wrote:
>> In this commit, we create a new tipc socket state TIPC_DISCONNECTING in
>> sk_state. TIPC_DISCONNECTING is replacing the socket connection status
>> update using SS_DISCONNECTING.
>> TIPC_DISCONNECTING is set for connection oriented sockets at:
>> - tipc_shutdown()
>> - connection probe timeout
>> - when we receive an error message on the connection.
>>
>> There is no functional change in this commit.
>>
>> Acked-by: Ying Xue <ying.xue@...driver.com>
>> Acked-by: Jon Maloy <jon.maloy@...csson.com>
>> Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@...csson.com>
>> ---
>>  include/uapi/linux/tipc.h |  1 +
>>  net/tipc/socket.c         | 39 +++++++++++++++++++++++----------------
>>  2 files changed, 24 insertions(+), 16 deletions(-)
>>
>> diff --git a/include/uapi/linux/tipc.h b/include/uapi/linux/tipc.h
>> index ae45de5e0d93..f5c03fdfc8a8 100644
>> --- a/include/uapi/linux/tipc.h
>> +++ b/include/uapi/linux/tipc.h
>> @@ -184,6 +184,7 @@ enum {
>>  	TIPC_PROBING,
>>  	TIPC_ESTABLISHED,
>>  	TIPC_OPEN,
>> +	TIPC_DISCONNECTING,
>>  };
>
>
> Note that all these TIPC socket states might conflict with
> sk_fullsock(), sk_listener(), inet6_sk(), ip_skb_dst_mtu(),
> sk_const_to_full_sk() , skb_to_full_sk() helpers.
>
> So there is definitely a high risk.
>
>
Eric, i can map the tipc state to a corresponding tcp state like the 
patch below. This resembles the way its done in l2tp and sctp.
Do you see any issue with that?

diff --git a/include/uapi/linux/tipc.h b/include/uapi/linux/tipc.h
index f2d9294d0920..e697f809549e 100644
--- a/include/uapi/linux/tipc.h
+++ b/include/uapi/linux/tipc.h
@@ -180,15 +180,17 @@ struct tipc_event {
   *     Definitions for the TIPC protocol sk_state field.
   */
  enum {
-       TIPC_LISTEN = 1,
-       TIPC_PROBING,
-       TIPC_ESTABLISHED,
-       TIPC_OPEN,
-       TIPC_DISCONNECTING,
-       TIPC_CLOSING,
-       TIPC_CONNECTING,
+       TIPC_LISTEN = TCP_LISTEN,
+       TIPC_ESTABLISHED = TCP_ESTABLISHED,
+       TIPC_CLOSE = TCP_CLOSE,
+       TIPC_CONNECTING = TCP_SYN_SENT,
+       TIPC_DISCONNECTING = TCP_CLOSE_WAIT,
  };

I will deleted TIPC_OPEN and TIPC_PROBING, the former can be set to 
TIPC_CLOSE like its done in tcp and the later can be replaced this with 
a probes_out counter.

/Partha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ