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: <20211011125815.GC14317@hoboy.vegasvil.org>
Date:   Mon, 11 Oct 2021 05:58:15 -0700
From:   Richard Cochran <richardcochran@...il.com>
To:     Sebastien Laveze <sebastien.laveze@....nxp.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        yangbo.lu@....com, yannick.vignon@....nxp.com,
        rui.sousa@....nxp.com
Subject: Re: [PATCH net-next] ptp: add vclock timestamp conversion IOCTL

On Fri, Oct 08, 2021 at 09:13:58AM +0200, Sebastien Laveze wrote:
> Of course, so what tests and measurements can we bring on the table to
> convince you that it doesn't lead to chaos ?

So, to restate what I've said before, you cannot adjust both the
physical clock and the virtual clock at the same time.

Here is a simple example that has no solution, AFAICT.

- Imagine one physical and one virtual clock based on it.

- A user space program using the virtual clock synchronizes to within
  100 nanoseconds of its upstream PTP Domain.  So far, so good.

- Now a second program using the physical clock starts up, and
  proceeds to measure, then correct the gross phase offset to its
  upstream PTP Domain.

- The driver must now add, as your proposal entails, the reverse
  correction into the virtual clock's timecounter/cyclecounter.

- However, this particular physical clock uses a RMW pattern to
  program the offset correction.

- Boom.  Now the duration of the RMW becomes an offset error in the
  virtual clock.  The magnitude may be microseconds or even
  milliseconds for devices behind slow MDIO buses, for example.

End of story.

Thanks,
Richard


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ