From: Adrian Bunk <bunk@kernel.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Mike Frysinger <vapier@gentoo.org>,
tglx@linutronix.de, mingo@redhat.com,
Andi Kleen <andi@firstfloor.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: asm-x86/byteorder.h: clean up for userspace
Date: Wed, 2 Jan 2008 03:31:26 +0200 [thread overview]
Message-ID: <20080102013126.GN27566@does.not.exist> (raw)
In-Reply-To: <477AAE6E.8080305@zytor.com>
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
next prev parent reply other threads:[~2008-01-02 1:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-31 18:12 asm-x86/byteorder.h: clean up for userspace Mike Frysinger
2008-01-01 15:22 ` Ingo Molnar
2008-01-01 17:47 ` Christoph Hellwig
2008-01-01 18:17 ` Mike Frysinger
2008-01-01 21:19 ` H. Peter Anvin
2008-01-02 1:31 ` Adrian Bunk [this message]
2008-01-02 2:22 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080102013126.GN27566@does.not.exist \
--to=bunk@kernel.org \
--cc=andi@firstfloor.org \
--cc=hch@infradead.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox