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: <0eb8283cfb0de9e4e5fd67b186b8b6c7aab80766.camel@infradead.org>
Date: Fri, 15 Aug 2025 19:43:34 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Jakub Kicinski <kuba@...nel.org>, Wen Gu <guwen@...ux.alibaba.com>
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,  Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH net-next v4] ptp: add Alibaba CIPU PTP clock driver

On Fri, 2025-08-15 at 11:38 -0700, Jakub Kicinski wrote:
> On Tue, 12 Aug 2025 19:53:21 +0800 Wen Gu wrote:
> > This adds a driver for Alibaba CIPU PTP clock. The CIPU, an underlying
> > infrastructure of Alibaba Cloud, synchronizes time with reference clocks
> > continuously and provides PTP clocks for VMs and bare metals in cloud.
> 
> > +static struct attribute *ptp_cipu_attrs[] = {
> > +	&dev_attr_reg_dev_feat.attr,
> > +	&dev_attr_reg_gst_feat.attr,
> > +	&dev_attr_reg_drv_ver.attr,
> > +	&dev_attr_reg_env_ver.attr,
> > +	&dev_attr_reg_dev_stat.attr,
> > +	&dev_attr_reg_sync_stat.attr,
> > +	&dev_attr_reg_tm_prec_ns.attr,
> > +	&dev_attr_reg_epo_base_yr.attr,
> > +	&dev_attr_reg_leap_sec.attr,
> > +	&dev_attr_reg_max_lat_ns.attr,
> > +	&dev_attr_reg_mt_tout_us.attr,
> > +	&dev_attr_reg_thresh_us.attr,
> > +
> > +	&dev_attr_ptp_gettm.attr,
> > +	&dev_attr_ptp_gettm_inval_err.attr,
> > +	&dev_attr_ptp_gettm_tout_err.attr,
> > +	&dev_attr_ptp_gettm_excd_thresh.attr,
> > +
> > +	&dev_attr_dev_clk_abn.attr,
> > +	&dev_attr_dev_clk_abn_rec.attr,
> > +	&dev_attr_dev_maint.attr,
> > +	&dev_attr_dev_maint_rec.attr,
> > +	&dev_attr_dev_maint_tout.attr,
> > +	&dev_attr_dev_busy.attr,
> > +	&dev_attr_dev_busy_rec.attr,
> > +	&dev_attr_dev_err.attr,
> > +	&dev_attr_dev_err_rec.attr,
> 
> This driver is lacking documentation. You need to describe how the user
> is expected to interact with the device and document all these sysfs
> attributes.
> 
> Maybe it's just me, but in general I really wish someone stepped up
> and created a separate subsystem for all these cloud / vm clocks.
> They have nothing to do with PTP. In my mind PTP clocks are simple HW
> tickers on which we build all the time related stuff. While this driver
> reports the base year for the epoch and leap second status via sysfs.

None of it should exist in the cloud anyway. The *only* thing that
makes sense for a VM is for the hypervisor to just *tell* the guest
what the relationship is between the CPU's hardware counter (e.g. TSC)
and real time. Which is what VMclock was invented for. Use that,
instead of making *every* guest on the system duplicate the same work
of synchronising the *same* underlying oscillator. Badly, with steal
time in the mix.

Given PCIe PTM to synchronize counters, you could even implement
vmclock over PCI for bare metal.


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