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:   Mon, 30 May 2022 10:07:44 -0700
From:   Jonathan Lemon <jonathan.lemon@...il.com>
To:     Richard Cochran <richardcochran@...il.com>
Cc:     netdev@...r.kernel.org, f.fainelli@...il.com, andrew@...n.ch,
        hkallweit1@...il.com, linux@...linux.org.uk,
        bcm-kernel-feedback-list@...adcom.com, kernel-team@...com,
        davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        edumazet@...gle.com
Subject: Re: [PATCH net-next v5 2/2] net: phy: broadcom: Add PTP support for
 some Broadcom PHYs.

On Sat, May 28, 2022 at 05:34:47PM -0700, Richard Cochran wrote:
> On Wed, May 18, 2022 at 03:39:35PM -0700, Jonathan Lemon wrote:
> 
> > +static int bcm_ptp_adjtime_locked(struct bcm_ptp_private *priv,
> > +				  s64 delta_ns)
> > +{
> > +	struct timespec64 ts;
> > +	int err;
> > +
> > +	err = bcm_ptp_gettime_locked(priv, &ts, NULL);
> > +	if (!err) {
> > +		set_normalized_timespec64(&ts, ts.tv_sec,
> > +					  ts.tv_nsec + delta_ns);
> 
> This also takes a LONG time when delta is large...

Didn't we just go through this?  What constitutes a "large" offset here?
The current version seems acceptable to me:

root@rpi:~/src/rpi # time phc_ctl /dev/ptp0 -- adj 86400
phc_ctl[766492.486]: adjusted clock by 86400.000000 seconds

real    0m0.009s
user    0m0.002s
sys 0m0.007s

root@rpi:~/src/rpi # time phc_ctl /dev/ptp0 -- adj -86400
phc_ctl[766494.647]: adjusted clock by -86400.000000 seconds

real    0m0.009s
user    0m0.009s
sys 0m0.000s

-- 
Jonathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ