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]
Message-ID: <20171023110445.GA29656@lahna.fi.intel.com>
Date:   Mon, 23 Oct 2017 14:04:45 +0300
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>,
        Ashok Raj <ashok.raj@...el.com>,
        Keith Busch <keith.busch@...el.com>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Lukas Wunner <lukas@...ner.de>,
        Michael Jamet <michael.jamet@...el.com>,
        Yehezkel Bernat <yehezkel.bernat@...el.com>,
        Mario.Limonciello@...l.com, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 8/8] PCI: pciehp: Check that the device is really
 present before touching it

On Fri, Oct 20, 2017 at 04:15:02PM -0500, Bjorn Helgaas wrote:
> > +
> > +		/* Check if the device is really there anymore */
> > +		present = presence ? pci_device_is_present(dev) : false;
> > +
> > +		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE && present) {
> >  			pci_read_config_byte(dev, PCI_BRIDGE_CONTROL, &bctl);
> 
> I don't like this fix because it's still racy.  We always have to be deal
> with a config read that returns 0xffffffff, even if we previously checked
> pci_device_is_present().  The device might have disappeared in the interim.

That's a fair point. I guess it is better just to check if bctl holds
0xffff before we decide it is a display device.

I'll rework this patch and send an updated version separately.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ