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: <475DEBD8.2080608@zytor.com>
Date:	Mon, 10 Dec 2007 17:46:00 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	David Newall <david@...idnewall.com>
CC:	Krzysztof Halasa <khc@...waw.pl>,
	Rene Herman <rene.herman@...access.nl>,
	Pavel Machek <pavel@....cz>, Andi Kleen <andi@...stfloor.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	"David P. Reed" <dpreed@...d.com>, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern AMD64
 with MCP51 laptops

David Newall wrote:
> H. Peter Anvin wrote:
>> David Newall wrote:
>>> Where did the 8us delay come from?  The documentation and source is 
>>> careful not to say how long the delay is.  Would changing it to, say 
>>> 1us, be technically wrong?  Is code that requires 8us correct?
>>
>> I think a single ISA bus transaction is 1 µs, so two of them back to 
>> back should be 2 µs, not 8 µs...
> 
> Exactly.  You think it's 2us, but the documentation doesn't say.  The _p 
> functions are generic inasmuch as they provide an unspecified delay.  
> Drivers which work across platforms, and which use _p, therefore have 
> different delays on different platforms.  Should the length of the delay 
> be unimportant?  I wouldn't have thought so.  If it is important, does 
> that mean that such drivers are buggy on some platforms?
> 

What it specifically does is it generates a delay which is proportional 
to the ISA/LPC clock.

> I really *hate* the idea that access to non-present hardware is used to 
> generate a delay.  That sucks so badly.  It's worthy of a school-aged 
> hacker, not of a world-leading operating system.  It's so not 
> best-practice that it's worst-practice.
> 

Perhaps you do, but it's the de facto standard on the platform.  Every 
BIOS uses the same technique, because it works.

*Now*, the real question is how many drivers actually need these delays. 
  My guess is most don't at all.

	-hpa

--
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