[lkml]   [2012]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 74/74] lto, workaround: Mark do_futex noinline to prevent clobbering ebp
    From: Andi Kleen <>

    On a 32bit build gcc 4.7 with LTO decides to clobber the 6th argument on the
    stack. Unfortunately this corrupts the user EBP and leads to later crashes.
    For now mark do_futex noinline to prevent this.

    I wish there was a generic way to handle this. Seems like a ticking time
    bomb problem.

    Signed-off-by: Andi Kleen <>
    kernel/futex.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/kernel/futex.c b/kernel/futex.c
    index 3717e7b..48b5a07 100644
    --- a/kernel/futex.c
    +++ b/kernel/futex.c
    @@ -2620,7 +2620,7 @@ void exit_robust_list(struct task_struct *curr)
    curr, pip);

    -long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
    +noinline long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
    u32 __user *uaddr2, u32 val2, u32 val3)
    int cmd = op & FUTEX_CMD_MASK;

     \ /
      Last update: 2012-08-19 06:41    [W:0.021 / U:12.728 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site