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]
Message-Id: <20140721.162448.2136956416390069389.davem@davemloft.net>
Date:	Mon, 21 Jul 2014 16:24:48 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	willemb@...gle.com
Cc:	netdev@...r.kernel.org, eric.dumazet@...il.com,
	richardcochran@...il.com
Subject: Re: [PATCH net-next v3 1/5] net-timestamp: extend SCM_TIMESTAMPING
 ancillary data struct

From: Willem de Bruijn <willemb@...gle.com>
Date: Mon, 21 Jul 2014 15:35:53 -0400

> Applications that request kernel tx timestamps with SO_TIMESTAMPING
> read timestamps as recvmsg() ancillary data. The response is defined
> implicitly as timespec[3]. Define the struct, and
> 
> 1) Add support for new tstamp types. On tx, scm_timestamping always
> accompanies a sock_extended_err. Define previously unused field
> ee_info to signal the type of ts[0]. Introduce SCM_TSTAMP_SND.
> 
> 2) Add support to discern timestamps. When multiple timestamped
> packets are in flight concurrently, correlating a timestamp with
> the right send() call is non-trivial. Define previously unused field
> ee_data to communicate a send() specific key, skb->mark. It is
> up to the application to optionally set this field to a unique
> value for each send call.
> 
> The reception path is not modified. On rx, no struct similar to
> sock_extended_err is passed along with SCM_TIMESTAMPING.
> 
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>

I'm not so sure about this skb->mark usage, it has other uses for things
such as classification, it influences route lookups, netfilter behavior,
etc.

I do not think you therefore want to add another usage, timestamp packet
keying, which may conflict.

Also:

>  	if (sock_flag(sk, SOCK_RCVTSTAMP) ||
>  	    sock_flag(sk, SOCK_TIMESTAMPING_RX_SOFTWARE) ||
> -	    (kt.tv64 && sock_flag(sk, SOCK_TIMESTAMPING_SOFTWARE)) ||
> +	    (kt.tv64 && (sock_flag(sk, SOCK_TIMESTAMPING_SOFTWARE) ||
> +	     skb_shinfo(skb)->tx_flags & SKBTX_ANY_SW_TSTAMP)) ||

This isn't indented correctly, the tx_flags test is part of the sock_flag()
test expression right before it so either:

	    (kt.tv64 && (sock_flag(sk, SOCK_TIMESTAMPING_SOFTWARE) ||
			 skb_shinfo(skb)->tx_flags & SKBTX_ANY_SW_TSTAMP)) ||

or:


	    (kt.tv64 &&
	     (sock_flag(sk, SOCK_TIMESTAMPING_SOFTWARE) ||
	      skb_shinfo(skb)->tx_flags & SKBTX_ANY_SW_TSTAMP)) ||

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ