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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f8719589-e56a-25c1-b955-4abd67cf7490@nvidia.com>
Date:   Sat, 21 Aug 2021 10:26:16 -0500
From:   Shanker R Donthineni <sdonthineni@...dia.com>
To:     Bjorn Helgaas <bhelgaas@...gle.com>
CC:     Alex Williamson <alex.williamson@...hat.com>,
        <linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linuxppc-dev@...ts.ozlabs.org>,
        "Oliver O'Halloran" <oohall@...il.com>,
        Russell Currey <ruscur@...sell.cc>
Subject: Re: [PATCH] PCI/AER: Continue AER recovery of device with
 NO_BUS_RESET set



On 8/21/21 8:30 AM, Shanker Donthineni wrote:
> External email: Use caution opening links or attachments
>
>
> In the current implementation, the AER FATAL and NONFTAL recovery will be
> terminated for the device that exhibits NO_BUS_RESET quirk. The non-zero

Correction, this problem happens only for AER_FATAL recovery case.

> return value from pci_bus_error_reset() is treated as an error condition
> in aer_root_reset() which leads to return PCI_ERS_RESULT_DISCONNECT.
>
>   aer_recover_work_func()
>     pcie_do_recovery()
>       report_frozen_detected()
>       if (aer_root_reset() == PCI_ERS_RESULT_DISCONNECT)
>          goto failed           # termimates here because of NO_BUS_RESET
>
>       ...
>       report_mmio_enabled()
>       report_resume()
>       pcie_clear_xxx_status()
>       ...
>       return 0
>   failed:
>       pci_uevent_ers(PCI_ERS_RESULT_DISCONNECT);
>
> The return value -ENOTTY from pci_bus_error_reset() indicates SBR was
> skipped but no real errors were encountered. This scenario could be
> considered as a non-error case so that the PCI device driver gets the
> opportunity to recover the device back to an operational state instead
> of keeping it in the DISCONNECT state.
>
> Signed-off-by: Shanker Donthineni <sdonthineni@...dia.com>
> ---
>  drivers/pci/pcie/aer.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> index 9784fdcf30061..8cf6bd6a3376d 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -1414,8 +1414,12 @@ static pci_ers_result_t aer_root_reset(struct pci_dev *dev)
>                         pci_info(dev, "not reset (no FLR support: %d)\n", rc);
>         } else {
>                 rc = pci_bus_error_reset(dev);
> -               pci_info(dev, "%s Port link has been reset (%d)\n",
> -                       pci_is_root_bus(dev->bus) ? "Root" : "Downstream", rc);
> +               pci_info(dev, "%s Port link has %sbeen reset (%d)\n",
> +                       pci_is_root_bus(dev->bus) ? "Root" : "Downstream",
> +                       rc == -ENOTTY ? "not " : "", rc);
> +
> +               if (rc == -ENOTTY)
> +                       rc = 0;
>         }
>
>         if ((host->native_aer || pcie_ports_native) && aer) {
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ