Hi Andreas,

On Wed, Sep 23, 2015 at 11:12 PM, Andreas Schwab <[email protected]> wrote:
> Make sure the compiler does not modify arguments of syscall functions.
> This can happen if the compiler generates a tailcall to another
> function.  For example, without asmlinkage_protect sys_openat is compiled
> into this function:
>
> sys_openat:
>         clr.l %d0
>         move.w 18(%sp),%d0
>         move.l %d0,16(%sp)
>         jbra do_sys_open
>
> Note how the fourth argument is modified in place, modifying the register
> %d4 that gets restored from this stack slot when the function returns to
> user-space.  The caller may expect the register to be unmodified across
> system calls.
>
> Signed-off-by: Andreas Schwab <[email protected]>

Thanks, applied and queued for v4.3 and stable.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to