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:   Tue, 12 Feb 2019 13:59:27 +0100
From:   Lukas Wunner <lukas@...ner.de>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:     linux-kernel@...r.kernel.org,
        Michael Jamet <michael.jamet@...el.com>,
        Yehezkel Bernat <YehezkelShB@...il.com>,
        Andreas Noever <andreas.noever@...il.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH v2 12/28] thunderbolt: Add functions for allocating and
 releasing hop IDs

On Tue, Feb 12, 2019 at 02:51:25PM +0200, Mika Westerberg wrote:
> On Tue, Feb 12, 2019 at 01:43:33PM +0100, Lukas Wunner wrote:
> > On Mon, Feb 11, 2019 at 10:30:43AM +0200, Mika Westerberg wrote:
> > > On Sun, Feb 10, 2019 at 01:13:53PM +0100, Lukas Wunner wrote:
> > > > If there are two Macs at the ends of the daisy-chain with Thunderbolt
> > > > devices in-between, the other Mac may already have established tunnels
> > > > to some of the devices and therefore has occupied hop entries in the
> > > > devices' path config space.  How do you ensure that you don't allocate
> > > > the same entries and overwrite the other Mac's hop entries, thereby
> > > > breaking its tunnels?
> > > 
> > > If the other Mac has enumerated the device (set the upstream port,
> > > route, depth) then the other Mac cannot access the device. You get an
> > > error (we deal with that in the later patch in the series when we
> > > identify XDomain connections). The Hop ID allocation is only relevant in
> > > a single domain.  Crossing one needs to have protocol such as we have in
> > > case of ThunderboltIP to negotiate Hop IDs used in the link between two
> > > domains.
> > 
> > Understood now, thanks.  (Well, in part at least.)
> > 
> > It looks like there's a race condition currently in tb_switch_configure()
> > wherein two machines on the daisy chain may write the config simultaneously
> > and overwrite each other's changes.  Isn't there some kind of synchonization
> > mechanism available to prevent such an outcome?
> 
> AFAICT that's expected. The host that first enumerated the device wins.

Yes but tb_switch_configure() goes on to blindly call
tb_plug_events_active().  Does that or any other subsequently called
function fail if another machine managed to overwrite the switch config?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ