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: <20231218113151.GC1074920@black.fi.intel.com>
Date: Mon, 18 Dec 2023 13:31:51 +0200
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Sanath S <sanaths2@....com>
Cc: Sanath S <Sanath.S@....com>, mario.limonciello@....com,
	andreas.noever@...il.com, michael.jamet@...el.com,
	YehezkelShB@...il.com, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [Patch v2 2/2] thunderbolt: Teardown tunnels and reset
 downstream ports created by boot firmware

On Mon, Dec 18, 2023 at 04:49:13PM +0530, Sanath S wrote:
> > The discover part should not do anything (like write the hardware) so
> > perhaps it is just some timing thing (but that's weird too).
> > 
> > I think we should do something like this:
> > 
> > 1. Disable all enabled protocol adapters (reset them to defaults).
> > 2. Clear all protocol adapter paths.
> > 3. Issue DPR over all enabled USB4 ports.
> > 
> > BTW, what you mean "didn't work"?
> Path activation would go fine after DPR like below:
> 
> [   15.090905] thunderbolt 0000:c4:00.5: 0:5 <-> 2:9 (PCI): activating
> [   15.090932] thunderbolt 0000:c4:00.5: activating PCIe Down path from 0:5
> to 2:9
> [   15.091602] thunderbolt 0000:c4:00.5: activating PCIe Up path from 2:9 to
> 0:5
> 
> But, PCIE enumeration doesn't happen (pcie link up will not happen, will not
> see below logs)
> [   15.134223] pcieport 0000:00:03.1: pciehp: Slot(0-1): Card present
> [   15.134243] pcieport 0000:00:03.1: pciehp: Slot(0-1): Link Up

Okay, what if you like reset the PCIe adapter config spaces back to the
defaults? Just as an experiment.

> > > > > > +			} else if (tb_port_is_usb3_down(port) ||
> > > > > > +				   tb_port_is_usb3_up(port)) {
> > > > > > +				tb_usb3_port_enable(port, false);
> > > > > > +			} else if (tb_port_is_dpin(port) ||
> > > > > > +				   tb_port_is_dpout(port)) {
> > > > > > +				tb_dp_port_enable(port, false);
> > > > > > +			} else if (tb_port_is_pcie_down(port) ||
> > > > > > +				   tb_port_is_pcie_up(port)) {
> > > > > > +				tb_pci_port_enable(port, false);
> > > Here, as per spec it would be better if we first teardown it for DOWN path
> > > and then the UP
> > > path.
> > Right makes sense.
> We never get up_port of protocol adapters here for reset. It's always
> down_port.
> So probably when we discover the path, we do path deactivation for both down
> and up ports.

If we are going to do DPR anyway, it should not matter.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ