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] [day] [month] [year] [list]
Date:   Tue, 30 Jun 2020 01:11:09 +0200
From:   Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pci: consolidate typing of
 pci_error_handlers::error_detected()

On Mon, Jun 29, 2020 at 04:29:28PM -0500, Bjorn Helgaas wrote:
> On Sun, Jun 28, 2020 at 06:12:33PM +0200, Luc Van Oostenryck wrote:
> > The method struct pci_error_handlers::error_detected() is defined and
> > documented as taking an 'enum pci_channel_state' for the second
> > argument but most drivers use 'pci_channel_state_t' instead.
> > This 'pci_channel_state_t' is not a typedef for the enum but a typedef
> > for a bitwise type in order to have better/stricter typechecking.
> > 
> > So, consolidate everything by using the restricted type in the
> > method's definition, in the documentation and in the drivers not
> > using 'pci_channel_state_t'.
> 
>   $ git grep "\<pci_channel_state\>"
>   Documentation/PCI/pci-error-recovery.rst:	enum pci_channel_state {
>   Documentation/PCI/pci-error-recovery.rst:pci_channel_state value of pci_channel_io_perm_failure.
>   arch/powerpc/kernel/eeh_driver.c:static void eeh_set_channel_state(struct eeh_pe *root, enum pci_channel_state s)
>   drivers/net/ethernet/intel/ice/ice_main.c:ice_pci_err_detected(struct pci_dev *pdev, enum pci_channel_state err)
>   drivers/pci/pci.h:			enum pci_channel_state state,
>   drivers/pci/pcie/err.c:				 enum pci_channel_state state,
>   drivers/pci/pcie/err.c:			enum pci_channel_state state,
> 
> Should these be changed as well?  If not, why not?  Some of them look
> analogous to the ones changed below.

Oh yes, surely. This is in fact a resend of an old patch (Dec 2018)
and it seems that these are more recent. I'll check, update and send
a new version.

-- Luc

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ