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  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]
Date:   Mon, 6 Jul 2020 15:16:42 -0700
From:   Rajat Jain <>
To:     Bjorn Helgaas <>
Cc:     David Woodhouse <>,
        Lu Baolu <>,
        Joerg Roedel <>,
        Bjorn Helgaas <>,
        "Rafael J. Wysocki" <>,
        Len Brown <>,
        "open list:AMD IOMMU (AMD-VI)" <>,
        Linux Kernel Mailing List <>,
        linux-pci <>,
        ACPI Devel Maling List <>,
        Raj Ashok <>,
        "Krishnakumar, Lalithambika" <>,
        Mika Westerberg <>,
        Jean-Philippe Brucker <>,
        Prashant Malani <>,
        Benson Leung <>,
        Todd Broch <>,
        Alex Levin <>,
        Mattias Nissler <>,
        Rajat Jain <>,
        Bernie Keany <>,
        Aaron Durbin <>,
        Diego Rivas <>,
        Duncan Laurie <>,
        Furquan Shaikh <>,
        Jesse Barnes <>,
        Christian Kellner <>,
        Alex Williamson <>,
        Greg Kroah-Hartman <>,
        "Oliver O'Halloran" <>,
        Saravana Kannan <>,
        Suzuki K Poulose <>,
        Arnd Bergmann <>,
        Heikki Krogerus <>
Subject: Re: [PATCH v2 1/7] PCI: Keep the ACS capability offset in device

Hi Bjorn,

Thanks for taking a look.

On Mon, Jul 6, 2020 at 8:58 AM Bjorn Helgaas <> wrote:
> On Mon, Jun 29, 2020 at 09:49:37PM -0700, Rajat Jain wrote:
> > Currently this is being looked up at a number of places. Read and store it
> > once at bootup so that it can be used by all later.
> Write the commit log so it is complete even without the subject.
> Right now, you have to read the subject to know what "this" refers to.
> The subject is like the title; the log is like the body of an article.
> The title isn't *part* of the article, so the article has to make
> sense all by itself.


> > +static void pci_enable_acs(struct pci_dev *dev);
> I don't think we need this forward declaration, do we?

We need it unless we move its definition further up in the file:

drivers/pci/pci.c: In function ‘pci_restore_state’:
drivers/pci/pci.c:1551:2: error: implicit declaration of function
‘pci_enable_acs’; did you mean ‘pci_enable_ats’?
 1551 |  pci_enable_acs(dev);

Do you want me to move it up in the file so that we do not need the
forward declaration?

> > @@ -4653,7 +4653,7 @@ static int pci_quirk_intel_spt_pch_acs(struct pci_dev *dev, u16 acs_flags)
> >       if (!pci_quirk_intel_spt_pch_acs_match(dev))
> >               return -ENOTTY;
> >
> > -     pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS);
> > +     pos = dev->acs_cap;
> I assume you verified that all these quirks are FINAL quirks, since
> pci_init_capabilities() is called after HEADER quirks.  I'll
> double-check before applying this.

None of these quirks are applied via DECLARE_PCI_FIXUP_*(). All these
quirks are called (directly or indirectly) from either
pci_enable_acs() or pci_acs_enabled(),


pci_idt_bus_quirk(). That one is called from
pci_bus_read_dev_vendor_id() which should be called only after the
parent bridge has been added and setup correctly.

So it looks all good to me.



> Bjorn

Powered by blists - more mailing lists