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: <200703291851.19424.maximlevitsky@gmail.com>
Date:	Thu, 29 Mar 2007 18:51:18 +0200
From:	Maxim Levitsky <maximlevitsky@...il.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	Jeff Chua <jeff.chua.linux@...il.com>,
	Adrian Bunk <bunk@...sta.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	"Rafael J. Wysocki" <rjw@...k.pl>, pavel@...e.cz,
	linux-pm@...ts.osdl.org, gregkh@...e.de,
	linux-pci@...ey.karlin.mff.cuni.cz,
	Jens Axboe <jens.axboe@...cle.com>,
	Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
	jgarzik@...ox.com, linux-ide@...r.kernel.org,
	"Michael S. Tsirkin" <mst@...lanox.co.il>
Subject: Re: [ PATCH] Add suspend/resume for HPET was: Re: [3/6] 2.6.21-rc4: known regressions

On Thursday 29 March 2007 18:35:21 Linus Torvalds wrote:
> 
> On Thu, 29 Mar 2007, Maxim wrote:
> 
> > On Thursday 29 March 2007 07:08:58 Linus Torvalds wrote:
> > > 
> > > (Or, better yet, shouldn't we set "boot_hpet_disable" when we decide not 
> > > to use the HPET, and set hpet_virt_address to NULL?)
> > 
> > This is done here
> > 
> > out_nohpet:
> > 	iounmap(hpet_virt_address);
> > 	hpet_virt_address = NULL;
> 
> No, that only clears hpet_virt_address, and thus makes all subsequent 
> "hpet_readl()" and "hpet_writel()" calls oops.
> 
> But it doesn't actually *tell* anybody that the HPET is disabled, so if 
> you later on do
> 
> 	if (is_hpet_capable()) {
> 		time = hpet_readl(..);
> 		..
> 
> you will just Oops!
> 
> So as far as I can see, even with your latest patch, if hpet_enable() 
> fails (and triggers the "goto out_nohpet" cases), you'll just oops 
> immediately when you try to suspend/resume the HPET.
> 
> THAT was what I meant - when we clear hpet_virt_address, we should also 
> tell all potential subsequent users that the HPET is not there!
> 
> 		Linus
> 

Hi,
	I agree, and as you said I did exactly that:

out_nohpet:
	iounmap(hpet_virt_address);
	hpet_virt_address = NULL;
	boot_hpet_disable = 1; <<<--- this ensures that is_hpet_capable() will never return positive value


	I also sent an updated version on my patch with subject line "[PATCH v2] Add suspend/resume for HPET"

	I forgot (a typo) to check error code in  hpet_register_sysfs
	Thanks to Sergei Shtylyov for pointing me on that.

	This patch should be ok.

	Best regards,
		Maxim Levitsky
-
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