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: <200901051417.35080.rjw@sisk.pl>
Date:	Mon, 5 Jan 2009 14:17:34 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Pavel Machek <pavel@...e.cz>
Cc:	Len Brown <lenb@...nel.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	pm list <linux-pm@...ts.linux-foundation.org>,
	Matthew Wilcox <matthew@....cx>,
	"H. Peter Anvin" <hpa@...or.com>,
	LKML <linux-kernel@...r.kernel.org>, Greg KH <greg@...ah.com>,
	Linux PCI <linux-pci@...r.kernel.org>
Subject: Re: [RFC][PATCH 2/10] PCI PM: Add suspend counterpart of pci_reenable_device

On Monday 05 January 2009, Pavel Machek wrote:
> Hi!
> 
> > PCI devices without drivers are not disabled during suspend and
> > hibernation, but they are enabled during resume, with the help of
> > pci_reenable_device(), so there is an unbalanced execution of
> > pcibios_enable_device() in the resume code path.
> > 
> > To correct this introduce function pci_disable_enabled_device()
> > that will disable the argument device, if it is enabled when the
> > function is being run, without updating the device's pci_dev
> > structure and use it in the suspend code path to balance the
> > pci_reenable_device() executed during resume.
> 
> > +/**
> > + * pci_disable_enabled_device - Disable device without updating enable_cnt
> > + * @dev: PCI device to disable
> > + *
> > + * NOTE: This function is a backend of PCI power management routines and is
> > + * not supposed to be called drivers.
> 
> "by drivers"?

Yes, thanks.

> > @@ -441,7 +455,10 @@ static int pci_pm_suspend(struct device 
> >  		}
> >  	} else if (pci_has_legacy_pm_support(pci_dev)) {
> >  		error = pci_legacy_suspend(dev, PMSG_SUSPEND);
> > +	} else {
> > +		pci_default_pm_suspend_early(pci_dev);
> >  	}
> > +
> >  	pci_fixup_device(pci_fixup_suspend, pci_dev);
> >  
> >  	return error;
> 
> So tre fixup runs on the disabled device?

Yes, but the device's config space is still available at this point.
 
> Acked-by: Pavel Machek <Pavel@...e.cz>

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ