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:	Thu, 13 Dec 2007 08:48:51 +1030
From:	David Newall <david@...idnewall.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	Rene Herman <rene.herman@...access.nl>,
	Paul Rolland <rol@...917.net>,
	"H. Peter Anvin" <hpa@...or.com>, Krzysztof Halasa <khc@...waw.pl>,
	Pavel Machek <pavel@....cz>, Andi Kleen <andi@...stfloor.org>,
	"David P. Reed" <dpreed@...d.com>, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, rol@...be.net
Subject: Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern AMD64
 with MCP51 laptops

Alan Cox wrote:
>> without need.  Not surprising since it has such a vague specific 
>> meaning.  One could say, Linux on i386 is liberally sprinkled with 
>>     
>
> "vague specific" ? sorry don't follow you.
>   

The _p variants are a universal fixture, defined as ending with a pause, 
but without specifying the duration.  (The duration is architecture 
specific, mostly zero.)  It really isn't a form that should be used in 
generic code.

>> I really prefer accurate code, but I'm also pragmatic and realise that 
>> it's far too much work to fix this any time soon.  But if it were to be 
>> fixed, then perhaps _p would take an additional parameter, measured in 
>> cycles of delay.
>>     
>
> measured in what, against what, for which bus.
>
> inb_p/outb_p are really only meaningful for ISA/LPC bus devices. In those
> cases it is precisely defined. Its use for PCI devices is a bit suspect
> and as a general rule probably wrong.

Yes, it's now clear that all of this is so.  Regrettably, it's used in 
dozens of drivers, most having nothing to do with an ISA/LPC bus.

If it really is specific to the ISA architecture, then it should only be 
used in architecture specific code.

I think the solution is to remove it.  Replace all _p calls with the 
non-_p variant, and add an explicit udelay.  Udelay can initially be set 
conservatively until it's been properly calibrated, allowing it to be 
used during early boot.  The good news is that it's only used in a few 
dozen drivers, so that actually might be doable.  And then, who knows, 
maybe Microsoft might have to scratch their corporate heads, trying to 
find out how to compete with a suddenly much faster Linux! :-p
--
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