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: <CAPcyv4jxTcUEgcfPRckHqrUPy8gR7ZJsxDaeU__pSq6PqJERAQ@mail.gmail.com>
Date:   Tue, 16 Mar 2021 22:08:31 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     Lukas Wunner <lukas@...ner.de>
Cc:     Kuppuswamy Sathyanarayanan 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Linux PCI <linux-pci@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Raj, Ashok" <ashok.raj@...el.com>,
        Keith Busch <kbusch@...nel.org>, knsathya@...nel.org,
        Sinan Kaya <okaya@...nel.org>
Subject: Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

On Tue, Mar 16, 2021 at 9:14 PM Lukas Wunner <lukas@...ner.de> wrote:
>
> On Fri, Mar 12, 2021 at 07:32:08PM -0800, sathyanarayanan.kuppuswamy@...ux.intel.com wrote:
> > +     if ((events == PCI_EXP_SLTSTA_DLLSC) && is_dpc_reset_active(pdev)) {
> > +             ctrl_info(ctrl, "Slot(%s): DLLSC event(DPC), skipped\n",
> > +                       slot_name(ctrl));
> > +             ret = IRQ_HANDLED;
> > +             goto out;
> > +     }
>
> Two problems here:
>
> (1) If recovery fails, the link will *remain* down, so there'll be
>     no Link Up event.  You've filtered the Link Down event, thus the
>     slot will remain in ON_STATE even though the device in the slot is
>     no longer accessible.  That's not good, the slot should be brought
>     down in this case.

Can you elaborate on why that is "not good" from the end user
perspective? From a driver perspective the device driver context is
lost and the card needs servicing. The service event starts a new
cycle of slot-attention being triggered and that syncs the slot-down
state at that time.

>
> (2) If recovery succeeds, there's a race where pciehp may call
>     is_dpc_reset_active() *after* dpc_reset_link() has finished.
>     So both the DPC Trigger Status bit as well as pdev->dpc_reset_active
>     will be cleared.  Thus, the Link Up event is not filtered by pciehp
>     and the slot is brought down and back up even though DPC recovery
>     was succesful, which seems undesirable.

The hotplug driver never saw the Link Down, so what does it do when
the slot transitions from Link Up to Link Up? Do you mean the Link
Down might fire after the dpc recovery has completed if the hotplug
notification was delayed?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ