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] [day] [month] [year] [list]
Message-ID: <c68eecd8b5b0636842b2f4022c80e283649fed85.camel@infradead.org>
Date: Thu, 18 Dec 2025 12:28:47 +0000
From: David Woodhouse <dwmw2@...radead.org>
To: Jakub Kicinski <kuba@...nel.org>, Wen Gu <guwen@...ux.alibaba.com>, 
 Thomas Weißschuh
	 <thomas.weissschuh@...utronix.de>, Thomas Gleixner <tglx@...utronix.de>
Cc: richardcochran@...il.com, andrew+netdev@...n.ch, davem@...emloft.net, 
 edumazet@...gle.com, pabeni@...hat.com, xuanzhuo@...ux.alibaba.com, 
 dust.li@...ux.alibaba.com, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v5 1/2] ptp: introduce Alibaba CIPU PHC driver

On Wed, 2025-11-05 at 16:24 -0800, Jakub Kicinski wrote:
> On Wed, 5 Nov 2025 18:22:19 +0800 Wen Gu wrote:
> > On 2025/11/1 07:58, Jakub Kicinski wrote:
> > > On Thu, 30 Oct 2025 20:13:13 +0800 Wen Gu wrote:  
> > > > This adds a driver for Alibaba CIPU PTP clock. The CIPU, an underlying
> > > > infrastructure of Alibaba Cloud, synchronizes time with atomic clocks
> > > > via the network and provides microsecond or sub-microsecond precision
> > > > timestamps for VMs and bare metals on cloud.
> > > > 
> > > > User space processes, such as chrony, running in VMs or on bare metals
> > > > can get the high precision time through the PTP device exposed by this
> > > > driver.  
> > > 
> > > As mentioned on previous revisions this is a pure clock device which has
> > > nothing to do with networking and PTP.  
> > 
> > I don't quite agree that this has nothing to do with PTP.
> > 
> > What is the difference between this CIPU PTP driver and other PTP drivers
> > under drivers/ptp? such as ptp_s390, ptp_vmw, ptp_pch, and others. Most of
> > these PTP drivers do not directly involve IEEE 1588 or networking as well.
> 
> We can't delete existing drivers. It used to be far less annoying
> until every cloud vendor under the sun decided to hack up their own
> implementation of something as simple as the clock.

Heh. In my defence, I hacked up a new one because none of the existing
options (including the KVM abomination) were any use. None of them
allow guests to rely on accurate time across live migration.

VMClock is designed specifically to solve that problem. It's now
published at https://uapi-group.org/specifications/specs/vmclock/ and
although the primary target is virtual machines, it discusses how it
could be used to build a hardware implementation using PCIe PTM.

As well as obviously implementing it in $DAYJOB, we added it to QEMU.

Although it *can* be used as a PHC providing a paired TAI timestamp, it
actually provides a y=mx+c relationship between the CPU counter (e.g.
TSC) and real time, not just a timestamp at a given point in time.

I'd like to integrate it as a first-class citizen in kernel
timekeeping, so that the kernel can directly both consume it, *and*
export the kernel's CLOCK_REALTIME to KVM guests.

I don't care what happens to the legacy snapshot-only ones though;
those can all go away as far as I'm concerned. I'd suggest that now
it's possible to do it *right*, there shouldn't be any *more* of the
legacy ones.

Having said that, it does seem rather harsh to refuse to accept this
one when there are so many other examples already in the tree. I'd
suggest that we accept it and then it can be moved to the new setup,
whatever that is, along with the other legacy snapshot-only PHCs.


Download attachment "smime.p7s" of type "application/pkcs7-signature" (5069 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ