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]
Date:   Thu, 10 May 2018 11:27:46 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     poza@...eaurora.org
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>,
        Philippe Ombredanne <pombredanne@...b.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        Dongdong Liu <liudongdong3@...wei.com>,
        Keith Busch <keith.busch@...el.com>, Wei Zhang <wzhang@...com>,
        Sinan Kaya <okaya@...eaurora.org>,
        Timur Tabi <timur@...eaurora.org>,
        linux-pci-owner@...r.kernel.org
Subject: Re: [PATCH v15 8/9] PCI/DPC: Unify and plumb error handling into DPC

On Thu, May 10, 2018 at 07:56:00PM +0530, poza@...eaurora.org wrote:
> On 2018-05-10 18:52, Bjorn Helgaas wrote:
> > On Thu, May 03, 2018 at 01:03:57AM -0400, Oza Pawandeep wrote:
> ...

> > > -static pci_ers_result_t reset_link(struct pci_dev *dev)
> > > +static pci_ers_result_t reset_link(struct pci_dev *dev, int severity)
> > >  {
> > >  	struct pci_dev *udev;
> > >  	pci_ers_result_t status;
> > >  	struct pcie_port_service_driver *driver;
> > > +	u32 service;
> > > 
> > >  	if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
> > >  		/* Reset this port for all subordinates */
> > > @@ -196,7 +197,12 @@ static pci_ers_result_t reset_link(struct
> > > pci_dev *dev)
> > >  	}
> > > 
> > >  	/* Use the aer driver of the component firstly */
> > > -	driver = pcie_port_find_service(udev, PCIE_PORT_SERVICE_AER);
> > > +	if (severity == DPC_FATAL)
> > > +		service = PCIE_PORT_SERVICE_DPC;
> > > +	else
> > > +		service = PCIE_PORT_SERVICE_AER;
> > > +
> > > +	driver = pcie_port_find_service(udev, service);
> > 
> > This is where I was wondering about passing in "service" directly
> > instead
> > of "severity".
> 
> passing service directly instead of severity ? (I do not think you meant to
> write severity there)

I did mean "severity".

> perhaps do you mean following ?
> 
> if (severity == DPC_FATAL)
>          pcie_port_find_service(udev, PCIE_PORT_SERVICE_DPC);
> else
>          pcie_port_find_service(udev, PCIE_PORT_SERVICE_AER);

No, my thought was that most of the places that use "severity" only
use it to decide between PCIE_PORT_SERVICE_DPC and
PCIE_PORT_SERVICE_AER, so if you just passed in "service" directly,
you wouldn't need this "if" statement.

Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ