diff options
| author | Andreas Schwab <schwab@linux-m68k.org> | 2015-09-23 23:12:09 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 20:44:59 +0200 |
| commit | df68f64bae8e44469e7adba7b5aa8be319beadd3 (patch) | |
| tree | 8c593b25b674d5905189af8ecbe156e0affc5f32 /kernel | |
| parent | a58b61aae75b82391a4248f6f9fc37cfb51bf2dc (diff) | |
m68k: Define asmlinkage_protect
commit 8474ba74193d302e8340dddd1e16c85cc4b98caf upstream.
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 <schwab@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
