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:   Mon, 27 Sep 2021 13:23:04 -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 Mon, Sep 27, 2021 at 06:00:08PM +0200, Sebastien Laveze wrote:
> The "typically" was more a reference to this possible implementation of
> AS-2020 using a common CMLDS layer and several domains using a single
> socket.
> 
> So, without this IOCTL the design would be 1 socket for CMLDS layer
> and 1 socket for each domain plus some specific filtering for each
> socket to avoid processing the unwanted traffic.
> 
> With this IOCTL, the design would be 1 socket and 1 conversion for the
> sync messages in the appropriate domain.

The ioctl solution is gross.  A program with eight vclocks should call
recvmsg and parse the CMSG, then go and call ioctl seven times?  Yuck.

What you really want is the socket to return more than one time stamp.
So why not do that instead?

Right now, the SO_TIMESTAMPING has an array of

   struct timespec ts[3] = 
   [0] SOFTWARE
   [1] LEGACY (unused)
   [2] HARDWARE

You can extend that to have

   [0] SOFTWARE
   [1] LEGACY (unused)
   [2] HARDWARE (vclock 0)
   [3] HARDWARE (vclock 1)
   [4] HARDWARE (vclock 2)
   ...
   [N] HARDWARE (vclock N-2)

You could store the selected vclocks in a bit mask associated with the socket.

Hm?

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ