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: <47B9ECE0.70000@keyaccess.nl>
Date:	Mon, 18 Feb 2008 21:38:56 +0100
From:	Rene Herman <rene.herman@...access.nl>
To:	"David P. Reed" <dpreed@...d.com>
CC:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Dmitry Torokhov <dtor_core@...ritech.net>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: use explicit timing delay for pit accesses in kernel
 and pcspkr driver

On 18-02-08 19:58, David P. Reed wrote:

> --- linux-2.6.orig/include/asm-x86/i8253.h
> +++ linux-2.6/include/asm-x86/i8253.h
> @@ -12,7 +12,25 @@ extern struct clock_event_device *global
>  
>  extern void setup_pit_timer(void);
>  
> -#define inb_pit		inb_p
> -#define outb_pit	outb_p
> +/* accesses to PIT registers need careful delays on some platforms. Define
> +   them here in a common place */
> +static inline unsigned char inb_pit(unsigned int port)
> +{
> +	/* delay for some accesses to PIT on motherboard or in chipset must be
> +	   at least one microsecond, but be safe here. */
> +	unsigned char value = inb(port);
> +	udelay(2);
> +	return value;
> +}

With the remark that (at least) the PIT is accessed at a time that 
microseconds and hence udelay are still a total fiction, this looks obvious 
otherwise.

Now with respect to the original pre port 80 "jmp $+2" I/O delay (which the 
Pentium obsoleted) I suppose it'll probably be okay even without fixing that 
specifically but do note such -- it's a vital part of the problem.

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