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: <87ft6ntnlh.fsf@nanos.tec.linutronix.de>
Date:   Fri, 09 Oct 2020 17:39:54 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     "Meisinger\, Andreas" <andreas.meisinger@...mens.com>,
        "vinicius.gomes\@intel.com" <vinicius.gomes@...el.com>,
        "Geva\, Erez" <erez.geva.ext@...mens.com>,
        "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev\@vger.kernel.org" <netdev@...r.kernel.org>,
        "xiyou.wangcong\@gmail.com" <xiyou.wangcong@...il.com>,
        "davem\@davemloft.net" <davem@...emloft.net>,
        "kuba\@kernel.org" <kuba@...nel.org>,
        "jhs\@mojatatu.com" <jhs@...atatu.com>,
        "jiri\@resnulli.us" <jiri@...nulli.us>,
        "avagin\@gmail.com" <avagin@...il.com>,
        "0x7f454c46\@gmail.com" <0x7f454c46@...il.com>,
        "ebiederm\@xmission.com" <ebiederm@...ssion.com>,
        "mingo\@kernel.org" <mingo@...nel.org>,
        "john.stultz\@linaro.org" <john.stultz@...aro.org>,
        "mkubecek\@suse.cz" <mkubecek@...e.cz>,
        "oleg\@redhat.com" <oleg@...hat.com>,
        "peterz\@infradead.org" <peterz@...radead.org>,
        "richardcochran\@gmail.com" <richardcochran@...il.com>,
        "sboyd\@kernel.org" <sboyd@...nel.org>,
        "vdronov\@redhat.com" <vdronov@...hat.com>,
        "bigeasy\@linutronix.de" <bigeasy@...utronix.de>,
        "frederic\@kernel.org" <frederic@...nel.org>,
        "edumazet\@google.com" <edumazet@...gle.com>
Cc:     "jesus.sanchez-palencia\@intel.com" 
        <jesus.sanchez-palencia@...el.com>,
        "vedang.patel\@intel.com" <vedang.patel@...el.com>,
        "Sudler\, Simon" <simon.sudler@...mens.com>,
        "Bucher\, Andreas" <andreas.bucher@...mens.com>,
        "henning.schild\@siemens.com" <henning.schild@...mens.com>,
        "jan.kiszka\@siemens.com" <jan.kiszka@...mens.com>,
        "Zirkler\, Andreas" <andreas.zirkler@...mens.com>,
        "Sakic\, Ermin" <ermin.sakic@...mens.com>,
        "anninh.nguyen\@siemens.com" <anninh.nguyen@...mens.com>,
        "Saenger\, Michael" <michael.saenger@...mens.com>,
        "Maehringer\, Bernd" <bernd.maehringer@...mens.com>,
        "gisela.greinert\@siemens.com" <gisela.greinert@...mens.com>,
        "Geva\, Erez" <erez.geva.ext@...mens.com>,
        "ErezGeva2\@gmail.com" <ErezGeva2@...il.com>,
        "guenter.steindl\@siemens.com" <guenter.steindl@...mens.com>
Subject: Re: AW: [PATCH 0/7] TC-ETF support PTP clocks series

Andreas,

On Fri, Oct 09 2020 at 11:17, Andreas Meisinger wrote:

please do not top-post and trim your replies.

> Yet we do already have usecases where this can't be done. Additionally
> a lot of discussions at this topic are ongoing in 60802 profile
> creation too.  Some of our usecases do require a network which does
> not depend on any external timesource. This might be due to the
> network not being connected (to the internet) or just because the
> network may not be able to rely on or trust an external
> timesource. Some reasons for this might be safety, security,
> availability or legal implications ( e.g. if a machine builder has to
> guarantee operation of a machine which depends on an internal tsn
> network).

I'm aware of the reasons for these kind of setups.

> About your question if an application needs to be able to sync to
> multiple timescales. A small count of usecases even would require
> multiple independent timesources to be used. At the moment they all
> seem to be located in the area of extreme high availability. There's
> ongoing evaluation about this issues and we're not sure if there's a
> way to do this without special hardware so we didn't address it here.

Reading several raw PTP clocks is always possible through the existing
interfaces and if the coordidation between real TAI and the raw PTP
clocks is available, then these interfaces could be extended to provide
time normalized to real TAI.

But that does not allow to utilize the magic clocks for arming timers so
these have to be based on some other clock and the application needs to do
the conversion back and forth.

Now I said that we could abuse time name spaces for providing access to
_one_ magic TAI clock which lets the kernel do that work, but thinking
more about it, it should be possible to do so for all of them even
without name spaces.

The user space daemon which does the correlation between these PTP
domains and TAI is required in any case, so the magic clock TAI_PRIVATE
is not having any advantage.

If that correlation exists then at least clock_nanosleep() should be
doable. So clock_nanosleep(clock PTP/$N) would convert the sleep time to
TAI and queue a timer internally on the CLOCK_TAI base.

Depending on the frequency drift between CLOCK_TAI and clock PTP/$N the
timer expiry might be slightly inaccurate, but surely not more
inaccurate than if that conversion is done purely in user space.

The self rearming posix timers would work too, but the self rearming is
based on CLOCK_TAI, so rounding errors and drift would be accumulative.
So I'd rather stay away from them.

If there is no deamon which manages the correlation then the syscall
would fail.

If such a coordination exists, then the whole problem in the TSN stack
is gone. The core can always operate on TAI and the network device which
runs in a different time universe would use the same conversion data
e.g. to queue a packet for HW based time triggered transmission. Again
subject to slight inaccuracy, but it does not come with all the problems
of dynamic clocks, locking issues etc. As the frequency drift between
PTP domains is neither fast changing nor randomly jumping around the
inaccuracy might even be a mostly academic problem.

Thoughts?

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ