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: <20190805131743.GS2640@lahna.fi.intel.com>
Date:   Mon, 5 Aug 2019 16:17:43 +0300
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Lukas Wunner <lukas@...ner.de>
Cc:     linux-kernel@...r.kernel.org,
        Andreas Noever <andreas.noever@...il.com>,
        Michael Jamet <michael.jamet@...el.com>,
        Yehezkel Bernat <YehezkelShB@...il.com>
Subject: Re: [PATCH 4/8] thunderbolt: Do not fail adding switch if some port
 is not implemented

On Sat, Aug 03, 2019 at 04:14:01PM +0200, Lukas Wunner wrote:
> On Fri, Jul 05, 2019 at 12:57:56PM +0300, Mika Westerberg wrote:
> > There are two ways to mark a port as unimplemented. Typical way is to
> > return port type as TB_TYPE_INACTIVE when its config space is read.
> > Alternatively if the port is not physically present (such as ports 10
> > and 11 in ICL) reading from port config space returns
> > TB_CFG_ERROR_INVALID_CONFIG_SPACE instead. Currently the driver bails
> > out from adding the switch if it receives any error during port
> > inititialization which is wrong.
> > 
> > Handle this properly and just leave the port as TB_TYPE_INACTIVE before
> > continuing to the next port.
> 
> Your patch may also cause this snippet in eeprom.c to become obsolete:
> 
> 		/* Port 5 is inaccessible on this gen 1 controller */
> 		if (sw->config.device_id == PCI_DEVICE_ID_INTEL_LIGHT_RIDGE)
> 			sw->ports[5].disabled = true;
> 
> To verify this hypothesis, one needs to comment out the call to
> tb_drom_copy_efi() as well as the above-quoted snippet and boot
> on a Mac with Light Ridge.  The driver should hit an error without
> your patch and it may work correctly with your patch.

Indeed. I'll check this - as I have Mac with LR, and update the patch
accordingly (e.g drop the check if the error does not appear).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ