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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPZGNP79kJO74W4J@wunner.de>
Date: Mon, 20 Oct 2025 16:24:52 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Shuai Xue <xueshuai@...ux.alibaba.com>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	linuxppc-dev@...ts.ozlabs.org, bhelgaas@...gle.com,
	kbusch@...nel.org, sathyanarayanan.kuppuswamy@...ux.intel.com,
	mahesh@...ux.ibm.com, oohall@...il.com, Jonathan.Cameron@...wei.com,
	terry.bowman@....com, tianruidong@...ux.alibaba.com
Subject: Re: [PATCH v6 3/5] PCI/AER: Report fatal errors of RCiEP and EP if
 link recoverd

On Mon, Oct 20, 2025 at 10:17:10PM +0800, Shuai Xue wrote:
> void aer_report_frozen_error(struct pci_dev *dev)
> {
>     struct aer_err_info info;
> 
>     if (dev->pci_type != PCI_EXP_TYPE_ENDPOINT &&
>         dev->pci_type != PCI_EXP_TYPE_RC_END)
>         return;
> 
>     aer_info_init(&info);
>     aer_add_error_device(&info, dev);
>     info.severity = AER_FATAL;
>     if (aer_get_device_error_info(&info, 0, true))
>         aer_print_error(&info, 0);
> 
>     /* pci_dev_put() pairs with pci_dev_get() in aer_add_error_device() */
>     pci_dev_put(dev);
> }

Much better.  Again, I think you don't need to rename add_error_device()
and then the code comment even fits on the same line:

	pci_dev_put(dev);  /* pairs with pci_dev_get() in add_error_device() */

> > >    .slot_reset()
> > >      => pci_restore_state()
> > >        => pci_aer_clear_status()
> > 
> > This was added in 2015 by b07461a8e45b.  The commit claims that
> > the errors are stale and can be ignored.  It turns out they cannot.
> > 
> > So maybe pci_restore_state() should print information about the
> > errors before clearing them?
> 
> While that could work, we would lose the error severity information at

Wait, we've got that saved in pci_cap_saved_state, so we could restore
the severity register, report leftover errors, then clear those errors?

Thanks,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ