[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080102013126.GN27566@does.not.exist>
Date: Wed, 2 Jan 2008 03:31:26 +0200
From: Adrian Bunk <bunk@...nel.org>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Mike Frysinger <vapier@...too.org>, tglx@...utronix.de,
mingo@...hat.com, Andi Kleen <andi@...stfloor.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: asm-x86/byteorder.h: clean up for userspace
On Tue, Jan 01, 2008 at 01:19:42PM -0800, H. Peter Anvin wrote:
> Christoph Hellwig wrote:
>> On Mon, Dec 31, 2007 at 01:12:45PM -0500, Mike Frysinger wrote:
>>> Since asm-x86/byteorder.h is exported to userspace, use __asm__ rather than
>>> asm in its code.
>>
>> The correct fix is to not export it to userspace.
>
> Unfortunately, it's historically been provided, for over 15 years. It's
> also trivial to export, without funnies, and it's *useful* to userspace, as
> it provides an interface sorely lacking from the stock libc interfaces.
>...
Userspace either has to #define CONFIG_X86_BSWAP or it'll get the slow
versions of these functions...
Leaking CONFIG_ variables to userspace is not really funny - I remember
e.g. what tricks MySQL does (did?) for (ab)using asm-i386/atomic.h in
userspace.
> -hpa
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
--
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