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]
Date:   Sat, 17 Jun 2017 20:14:33 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Piotr Gregor <piotrgregor@...ncme.org>
Cc:     Alex Williamson <alex.williamson@...hat.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Neo Jia <cjia@...dia.com>,
        Kirti Wankhede <kwankhede@...dia.com>,
        Vlad Tsyrklevich <vlad@...rklevich.net>,
        Arvind Yadav <arvind.yadav.cs@...il.com>,
        Yongji Xie <xyjxie@...ux.vnet.ibm.com>,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org
Subject: Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

On Sat, Jun 17, 2017 at 06:45:44PM +0100, Piotr Gregor wrote:
> Hi Bjorn,
> 
> The pci_cfg_access_lock is most likely not needed there.
> The assignment by return type is indeed preferred in this case.
> 
> However, you have changed the meaning of returned boolean information
> by pci_intx_mask_broken leaving pci_intx_mask_supported unchanged.
> The test should be: 
> 
>     if (new != toggle) /* the test failed */
> 	        return 1;
> 	return 0;

Oh, you're absolutely right, thanks for catching that!  I updated my
pci/enumeration branch.

> Regarding v2.3 - do you think it is worth to apply the check
> so we would have something like
> 
>     if ((new == toggle) || PCI_VERSION_PRIOR_TO_23) /* test OK or PCI prior to r2.3 */
> 	        return 0;
> 	return 1;

I'm not sure how to test for r2.3 compliance.  But even if we could, I
guess I think the current code is probably better because it actually
checks the property we care about, not a spec revision that is one
step removed from the property.

Bjorn

Powered by blists - more mailing lists