[lkml]   [2003]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] struct loop_info64

    On Fri, 18 Apr 2003, Greg KH wrote:
    > On Fri, Apr 18, 2003 at 09:26:08AM -0700, Linus Torvalds wrote:
    > >
    > > We should literally have the rule that any user-visible data structures
    > > cannot use _any_ types other than u8/u16/u32/u64 (and _maybe_ the signed
    > > ones, if there is any real reason to).
    > I thought we did have such a rule. Well, it's unwritten I guess...

    It's certainly been a suggested rule, but yes it's unwritten. And we've
    never had a good rule for user pointers (ie right now everybody just has
    "void *", which ends up always requireing explicit conversion).

    > Oh, and shouldn't we be using the "__*" style types for crossing the
    > user/kernel boundry (__u8, __u16, __u32, etc.)? I thought that is what
    > those versions were for.

    Yes, in header files they should always be the __xx versions.

    But we really should have a __ptr64 type too. There's just no sane way to
    tell gcc about it without requireing casts, which is inconvenient (which
    means that right now it you just have to use __u64 for pointers if you
    want to be able to share the structure across 32/64-bit architectures).


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:34    [W:0.018 / U:6.548 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site