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, 15 Aug 2018 20:50:03 +0000
From:   <Bryan.Whitehead@...rochip.com>
To:     <arnd@...db.de>
CC:     <UNGLinuxDriver@...rochipTechnology.Mail.Onmicrosoft.com>,
        <davem@...emloft.net>, <yuehaibing@...wei.com>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <richardcochran@...il.com>
Subject: RE: [PATCH] net: lan743x_ptp: convert to ktime_get_clocktai_ts64

> > > > > Question: this is the only ptp driver that sets the hardware
> > > > > time to the current system time in TAI. Why does it do that?
> > > >
> > > > This is done when the driver starts up after reset. Otherwise the
> > > > clock is off
> > > by 48 years.
> > > > It seemed to me that the system time was the most appropriate
> > > > clock to
> > > sync to.
> > > > If my reasoning is incorrect, please enlighten me.
> > >
> > > I've never worked with PTP, but my understanding from looking at the
> > > other drivers is that the time normally gets set either from another
> > > host through the PTP protocol, or using clock_settime() from user
> > > space with the current time.
> >
> > Those methods will still work. But if it's not set by those methods, I
> > thought the clock should at least be set once on driver startup to align with
> the system clock.
> > After that, other methods are free to reset it again.
> 
> (adding Richard Cochran to Cc for more insight here)
> 
> I would argue that it's more important that the driver behaves like all other
> PTP implementations. If we want the behavior to be that the initial PTP time
> is set to the ktime_get_clocktai_ts64() value, then this should be done by the
> PTP core rather than the device driver. If there is a good reason that the
> other drivers don't do it like this, then I would assume the same reason
> applies to lan743x.
> 

Sounds reasonable to me. I will yield to Richard's insight.
But it would be nice if requirements like these were documented.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ