lkml.org 
[lkml]   [2011]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: RFD: x32 ABI system call numbers
    From
    On Wed, Aug 31, 2011 at 10:05 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
    > On Wed, Aug 31, 2011 at 9:46 AM, Linus Torvalds
    > <torvalds@linux-foundation.org> wrote:
    >>
    >> I really think that "x32" should try to aim *VERY* hard at using the
    >> 64-bit system calls, and seeing itself as being a "32-bit application
    >> in a 64-bit world".  That's not just true for time_t (which I think
    >> should be 64-bit on anything new that expects to survive for any
    >> amount of time), but in general.
    >>
    >
    > I have been making x32 to use 64bit system calls as much as possible.
    > Hopefully, I will get it to work in a week or 2.
    >

    I have an x32 kernel which usea 64bit time_t/timespec/timeval and file
    system interface:

    1. Use 64bit system calls as much as we can.
    2. There are 32 compat system calls for x32 to support structure parameters
    with pointers and longs.
    3. Use x86-64 vDSO relocatable files directly to generate x32 vDSO.

    We need to make decision on some system calls which take a pointer
    to structure with long. For example, msg calls take a pointer to

    struct msgbuf {
    long mtype; /* message type, must be > 0 */
    char mtext[1]; /* message data */
    };

    We have 3 choices:

    1. Use long long for x32 and use 64bit msg system calls.
    2. Keep long for x32 and use compat system call.
    3. Add a 4byte padding for x32 and sign-extend from mtype to 4byte
    padding before passing to 64bit msg system call.

    I implemented option 1. I can also implement option 2 or 3.

    Thanks.


    --
    H.J.
    --
    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/

    \
     
     \ /
      Last update: 2011-09-03 04:59    [W:0.030 / U:120.320 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site