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: <20230126152552.GA1265322@bhelgaas>
Date:   Thu, 26 Jan 2023 09:25:52 -0600
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>,
        m.chetan.kumar@...ux.intel.com, netdev@...r.kernel.org,
        davem@...emloft.net, johannes@...solutions.net,
        ryazanov.s.a@...il.com, loic.poulain@...aro.org,
        ilpo.jarvinen@...ux.intel.com, ricardo.martinez@...ux.intel.com,
        chiranjeevi.rapolu@...ux.intel.com, haijun.liu@...iatek.com,
        edumazet@...gle.com, pabeni@...hat.com,
        chandrashekar.devegowda@...el.com, linuxwwan@...el.com,
        linuxwwan_5g@...el.com,
        Madhusmita Sahu <madhusmita.sahu@...el.com>,
        linux-pci@...r.kernel.org
Subject: Re: [PATCH v5 net-next 3/5] net: wwan: t7xx: PCIe reset rescan

On Tue, Jan 24, 2023 at 08:45:43PM -0800, Jakub Kicinski wrote:
> Hi Bjorn,
> 
> any objections to the kind of shenanigans this is playing?

Yes, thanks for asking.  Drivers definitely should not have to do this
sort of thing.

> On Sat, 21 Jan 2023 19:03:23 +0530 m.chetan.kumar@...ux.intel.com wrote:
> > From: M Chetan Kumar <m.chetan.kumar@...ux.intel.com>
> > 
> > PCI rescan module implements "rescan work queue".
> > In firmware flashing or coredump collection procedure
> > WWAN device is programmed to boot in fastboot mode and
> > a work item is scheduled for removal & detection.
> > 
> > The WWAN device is reset using APCI call as part driver
> > removal flow. Work queue rescans pci bus at fixed interval
> > for device detection, later when device is detect work queue
> > exits.

I'm not sure what's going on here.  Do we need to reset the device
when the t7xx driver is loaded so the device will load new firmware
when it comes out of reset?

There are a few drivers that do that, e.g., with pci_reset_function().

> > +static struct remove_rescan_context t7xx_rescan_ctx;

Apparently this only supports a single t7xx instance in a system?  Not
good.

> > +void t7xx_pci_dev_rescan(void)
> > +{
> > +	struct pci_bus *b = NULL;
> > +
> > +	pci_lock_rescan_remove();
> > +	while ((b = pci_find_next_bus(b)))
> > +		pci_rescan_bus(b);

No, this driver absolutely cannot rescan and assign unassigned
resources for all the PCI buses in the system.

Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ