Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [PATCH] x86: do not expose CONFIG_BSWAP to userspace | Date | Thu, 29 Jan 2009 00:24:08 +0100 |
| |
On Wednesday 28 January 2009, H. Peter Anvin wrote: > So, one ends up doing something like: > > #ifdef __i486__ > # define __CPU_HAVE_BSWAP > #endif > #ifdef __i586__ > # define __CPU_HAVE_BSWAP > #endif > > ... and so on, and have to keep this up to date with the latest > inventions of the gcc people. *Sob.*
Well, to put this into perspective: The bswap inline assembly was introduced in Linux-1.3.51 "Greased Weasel", back in 1995 and at no time it was ever visible to user space, unless the code manually included <linux/config.h> (which we broke) or defined CONFIG_M486, CONFIG_X86_BSWAP and/or __KERNEL__, depending on the kernel version.
I take this as a strong indication that user space applications won't generally expect to get the bswap instruction from including the kernel headers. For the longest time, we actually had
/* For avoiding bswap on i386 */ #ifdef __KERNEL__ #include <linux/config.h> #endif
which I read as explicitly using the portable i386 version for all user space.
Arnd <>< -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |