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:	Fri, 28 Sep 2012 10:26:38 +0200
From:	Richard Cochran <richardcochran@...il.com>
To:	Miroslav Lichvar <mlichvar@...hat.com>
Cc:	netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
	Jacob Keller <jacob.e.keller@...el.com>,
	John Stultz <john.stultz@...aro.org>
Subject: Re: [PATCH RFC net-next 1/1] ptp: add an ioctl to compare PHC time
 with system time

On Fri, Sep 28, 2012 at 09:53:03AM +0200, Miroslav Lichvar wrote:
> On Thu, Sep 27, 2012 at 08:12:16PM +0200, Richard Cochran wrote:
> > This patch adds an ioctl for PTP Hardware Clock (PHC) devices that allows
> > user space to measure the time offset between the PHC and the system
> > clock. Rather than hard coding any kind of estimation algorithm into the
> > kernel, this patch takes the more flexible approach of just delivering
> > an array of raw clock readings. In that way, the user space clock servo
> > may be adapted to new and different hardware clocks.
> 
> Would it make sense to extend the ioctl to allow also comparing the
> PHC with another PHC or perhaps even a different system clock than
> CLOCK_REALTIME?
> 
> I'm thinking if someone wanted to synchronize one PHC to another, it
> should be better to work with phc1-phc2 offsets than combine phc1-sys
> and sys-phc2 offsets.

Yes, I did think of that, too. There are some reserved fields in the
ioctl. It would be possible to use one field as a clockid_t for the
second phc device. For the static CLOCK_XYZ clock ids we could have a
switch/case. Then we could read any two clocks in the same way as in
this patch.

I am guessing it would be possible to synchronize two PHC devices to
within a few microseconds this way. Probably that is not good enough
to implement a boundary clock, for example, so I have my doubts about
the utility of this. But in any case, it is possible, and I think that
feature can wait for now.

Thanks,
Richard
--
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