lkml.org 
[lkml]   [2007]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] fix for futex_wait signal stack corruption


    On Tue, 4 Dec 2007, Steven Rostedt wrote:
    >
    > Seems that arg3 is not used here and since the timer is 64 bits, we can
    > store the bottom 32 bits in arg2 and the top in arg3 (this will work for
    > both 32 and 64 bit archs).

    Yes. That should work fine.

    The restart logic sometimes results in odd calling conventions, and quite
    frankly, we could just change how "restart_block" looks too. There is
    nothing that says that it has to be

    unsigned long arg0, arg1, arg2, arg3

    and that particular layout was just picked on a whim. The only issue is:

    - we don't want the restart block to be *too* large, since it's part of
    the thread info.
    - but we need to have enough room for all the system calls that want to
    use the restart block, and preferably in a reasonable format.

    So far, using "unsigned long" has been good enough, in that it's big
    enough for a pointer and all normal arguments, but if something really
    deeply wants another format or a guaranteed 64-bit word regardless of
    architecture, we could make one or more of the arguments be "u64" instead.

    But in this case, since there is already unused argument space, I think
    that doing the "32 high bits + 32 low bits" is probably the best option.

    Linus


    \
     
     \ /
      Last update: 2007-12-04 23:47    [W:0.028 / U:0.844 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site