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: <20200306164157.GA175224@google.com>
Date:   Fri, 6 Mar 2020 10:41:57 -0600
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     "Kuppuswamy, Sathyanarayanan" 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>
Cc:     linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        ashok.raj@...el.com
Subject: Re: [PATCH v17 09/12] PCI/AER: Allow clearing Error Status Register
 in FF mode

On Fri, Mar 06, 2020 at 08:11:41AM -0800, Kuppuswamy, Sathyanarayanan wrote:
> On 3/6/2020 8:04 AM, Bjorn Helgaas wrote:
> > On Thu, Mar 05, 2020 at 09:45:46PM -0800, Kuppuswamy, Sathyanarayanan wrote:
> > > On 3/3/2020 6:36 PM, sathyanarayanan.kuppuswamy@...ux.intel.com wrote:
> > > > From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
> > > > 
> > > > As per PCI firmware specification r3.2 System Firmware Intermediary
> > > > (SFI) _OSC and DPC Updates ECR
> > > > (https://members.pcisig.com/wg/PCI-SIG/document/13563), sec titled "DPC
> > > > Event Handling Implementation Note", page 10, Error Disconnect Recover
> > > > (EDR) support allows OS to handle error recovery and clearing Error
> > > > Registers even in FF mode. So create new API pci_aer_raw_clear_status()
> > > > which allows clearing AER registers without FF mode checks.
> > > > 
> > > > Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
> > > > ---
> > > >    drivers/pci/pci.h      |  2 ++
> > > >    drivers/pci/pcie/aer.c | 22 ++++++++++++++++++----
> > > >    2 files changed, 20 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
> > > > index e57e78b619f8..c239e6dd2542 100644
> > > > --- a/drivers/pci/pci.h
> > > > +++ b/drivers/pci/pci.h
> > > > @@ -655,6 +655,7 @@ extern const struct attribute_group aer_stats_attr_group;
> > > >    void pci_aer_clear_fatal_status(struct pci_dev *dev);
> > > >    void pci_aer_clear_device_status(struct pci_dev *dev);
> > > >    int pci_cleanup_aer_error_status_regs(struct pci_dev *dev);
> > > > +int pci_aer_raw_clear_status(struct pci_dev *dev);
> > > >    #else
> > > >    static inline void pci_no_aer(void) { }
> > > >    static inline void pci_aer_init(struct pci_dev *d) { }
> > > > @@ -665,6 +666,7 @@ static inline int pci_cleanup_aer_error_status_regs(struct pci_dev *dev)
> > > >    {
> > > >    	return -EINVAL;
> > > >    }
> > > > +int pci_aer_raw_clear_status(struct pci_dev *dev) { return -EINVAL; }
> > 
> > > It's missing static specifier. It needs to be fixed. I can fix it in
> > > next version.  Bjorn, if there is no need for next version, can you
> > > please make this change?
> > 
> > pci_aer_raw_clear_status() is defined in aer.c and called from aer.c
> > and edr.c, so I do not think it can be static.  Am I missing
> > something?

> For kernel configs that does not define CONFIG_PCIEAER, it will create
> redefinition error since pci.h can be included in many files.

Oh, right, I thought you were talking about the definition in aer.c.
The stub in pci.h is missing "inline" as well as "static".

Fixed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ