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: Thu, 14 Dec 2023 21:59:32 +0000
From: Min Li <min.li.xe@...esas.com>
To: Richard Cochran <richardcochran@...il.com>, Min Li <lnimi@...mail.com>
CC: "lee@...nel.org" <lee@...nel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
Subject: RE: [PATCH net-next v3 1/2] ptp: introduce PTP_CLOCK_EXTOFF event for
 the measured external offset


> On Thu, Dec 14, 2023 at 11:36:24AM -0500, Min Li wrote:
> > diff --git a/include/uapi/linux/ptp_clock.h
> > b/include/uapi/linux/ptp_clock.h index da700999c..66f4dd73a 100644
> > --- a/include/uapi/linux/ptp_clock.h
> > +++ b/include/uapi/linux/ptp_clock.h
> > @@ -32,6 +32,7 @@
> >  #define PTP_RISING_EDGE    (1<<1)
> >  #define PTP_FALLING_EDGE   (1<<2)
> >  #define PTP_STRICT_FLAGS   (1<<3)
> > +#define PTP_EXT_OFFSET     (1<<4)
> 
> This isn't going to work.
> 
> If user space enables time stamps twice, once with PTP_EXT_OFFSET and
> once without, it won't be able to differentiate the two when it reads a
> ptp_extts_event.
> 
> Thanks,
> Richard

Hi Richard
Would it be Ok if I use the flags to differentiate extts events from extoff?

 struct ptp_extts_event {
-       struct ptp_clock_time t; /* Time event occured. */
+       union {
+               struct ptp_clock_time t; /* Time event occurred. */
+               __s64 offset_ns;         /* Offset event occurred. */
+       };
         unsigned int index;      /* Which channel produced the event. */
         unsigned int flags;      /* Reserved for future use. */
         unsigned int rsv[2];     /* Reserved for future use. */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ