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-next>] [day] [month] [year] [list]
Message-ID: <1402562399.8095.5.camel@jlt4.sipsolutions.net>
Date:	Thu, 12 Jun 2014 10:39:59 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	John Stultz <john.stultz@...aro.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>,
	"John W. Linville" <linville@...driver.com>,
	linux-wireless@...r.kernel.org,
	Stephen Hemminger <shemminger@...ux-foundation.org>,
	netdev <netdev@...r.kernel.org>
Subject: Re: net_timedelta() affected by settimeofday() (was: [patch 12/13]
 net: mac80211: Remove silly timespec dance)

On Thu, 2014-06-12 at 10:35 +0200, Johannes Berg wrote:
> +netdev, Stephen

Well, stupid me. Fixing that netdev address.

> On Thu, 2014-06-12 at 10:19 +0200, Thomas Gleixner wrote:
> > On Thu, 12 Jun 2014, Johannes Berg wrote:
> > 
> > > On Wed, 2014-06-11 at 23:59 +0000, Thomas Gleixner wrote:
> > > 
> > > > +	msrmnt = ktime_to_ms(net_timedelta(skb_arv));
> > > 
> > > This is probably more of a question about net_timedelta(), but is
> > > ktime_get_real() really appropriate for duration measurements? Isn't
> > > that non-monotonic?
> > 
> > Well, it's monotonic, but might be affected by settimeofday().
> 
> Right, but isn't that odd? Suddenly your delay measurement here might be
> minutes, hours, or years if you settimeofday() between timestamping and
> calculating the delta. That seems very strange to me, why would that be
> the right behaviour in any way?
> 
> Now, it seems that there are only two current users of net_timedelta()
> (in DCCP) so perhaps it's not too late to change some of this?
> 
> Maybe in general the skb timestamp should be based on a different clock
> and only adjusted to real time when used in userspace?


--
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