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]
Message-ID: <20220530230439.GA22405@hoboy.vegasvil.org>
Date:   Mon, 30 May 2022 16:04:39 -0700
From:   Richard Cochran <richardcochran@...il.com>
To:     Jonathan Lemon <jonathan.lemon@...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 Mon, May 30, 2022 at 10:07:44AM -0700, Jonathan Lemon wrote:
> 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:

When the PHY boots, it starts from time zero.

Then as a client it needs to adjust to today, something like:

1653951762.413809006 or Mon May 30 16:02:42 2022

(that means adding 1,653,951,762,413,809,006 nanoseconds)

Try that and see how long it takes to apply the adjustment.

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ