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] [day] [month] [year] [list]
Message-ID: <20070430160241.79efca76@the-village.bc.nu>
Date:	Mon, 30 Apr 2007 16:02:41 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Andreas Mohr <andi@...x01.fht-esslingen.de>
Cc:	Juergen Beisert <juergen127@...uzholzen.de>,
	linux-kernel@...r.kernel.org
Subject: Re: Geode-GX1 processor in 2.6.21

> > In arch/i386/kernel/cpu/cyrix.c function geode_configure() tries to enable 
> > the "suspend on halt power saving feature". This is the line:
> > 
> > 	setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);

That will go wrong

> > #define setCx86(reg, data) do { \
> >          outb((reg), 0x22); \
> >          outb((data), 0x23); \
> > } while (0)
> > 
> > Maybe the compiler does the wrong thing if someone uses these macros in the 
> > same instruction?
> 
> Sounds quite likely.

The problem is the macro evaluates to

	outb(reg, 0x22);
	[Then the getCx86]
	outb(data, 0x23);

which isn't valid for 6x86 control. Looks like someone overoptimised it.

Either make it "inline" or split it up and it'll work

> Also, it would probably be good to convert these macros into inline functions
> in this header.

Agreed - they must be issued in order in the right way as they are CPU
level magic.
-
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