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:   Tue, 8 Sep 2020 08:41:58 +0100
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Richard Cochran <richardcochran@...il.com>
Cc:     Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Antoine Tenart <antoine.tenart@...tlin.com>,
        Matteo Croce <mcroce@...hat.com>,
        Andre Przywara <andre.przywara@....com>,
        Sven Auhagen <sven.auhagen@...eatech.de>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 4/6] net: mvpp2: ptp: add TAI support

On Sun, Sep 06, 2020 at 09:04:02PM +0100, Russell King - ARM Linux admin wrote:
> > > +static void mvpp22_tai_set_tod(struct mvpp2_tai *tai)
> > > +{
> > > +	struct timespec64 now;
> > > +
> > > +	ktime_get_real_ts64(&now);
> > > +	mvpp22_tai_settime64(&tai->caps, &now);
> > > +}
> > > +
> > > +static void mvpp22_tai_init(struct mvpp2_tai *tai)
> > > +{
> > > +	void __iomem *base = tai->base;
> > > +
> > > +	mvpp22_tai_set_step(tai);
> > > +
> > > +	/* Release the TAI reset */
> > > +	mvpp2_tai_modify(base + MVPP22_TAI_CR0, CR0_SW_NRESET, CR0_SW_NRESET);
> > > +
> > > +	mvpp22_tai_set_tod(tai);
> > 
> > The consensus on the list seems to be that new PHCs should start
> > ticking from time zero (1970), although some older drivers do use
> > ktime.  For new clocks, I'd prefer using zero.
> 
> Ok.

Should we always set the TAI counter to zero every time the TAI is
initialised, or just leave it as is (the counter may already be set
by a previous kernel, for example when a kexec has happened).

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ