lkml.org 
[lkml]   [2009]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [: [git pull] headers_check fixes]
On Wed, Jan 28, 2009 at 11:44:13AM -0800, Linus Torvalds wrote:
>
>
> On Wed, 28 Jan 2009, Harvey Harrison wrote:
> > On Wed, 2009-01-28 at 09:48 -0800, H. Peter Anvin wrote:
> > >
> > > In general, no. The byteswap API is a legacy exception.
> >
> > But now that swab.h has been separated out, we could just stop exporting the
> > asm/swab.h bits while still providing a generic C-based implementation to
> > userspace.
>
> Well, the _reason_ the byteswap stuff has been interesting to user space
> is that the kernel did it better than the alternatives. Rather than having
> purely "work with big-endian data" (the networking htonl etc functions),
> the kernel had good and fairly optimized handling of various different
> forms of byte order handling.
>
> Which is why people wanted to use it in the first place - and which is why
> then doing just the generic C-based thing doesn't really fix the issue.
> Things may compile, but they kind of lost the point.

The right fix then is to provide these optimized versions as part
of their libc variant, not to keep exporting our internal
versions to userland. Because the internal version may
be subject to runtime patching and api changes etc.

Sam


\
 
 \ /
  Last update: 2009-01-28 22:01    [W:1.793 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site