diff options
| -rw-r--r-- | arch/x86/ia32/ia32entry.S | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 84e3a4ef9719..518bb99c3394 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S | |||
| @@ -50,7 +50,12 @@ | |||
| 50 | /* | 50 | /* |
| 51 | * Reload arg registers from stack in case ptrace changed them. | 51 | * Reload arg registers from stack in case ptrace changed them. |
| 52 | * We don't reload %eax because syscall_trace_enter() returned | 52 | * We don't reload %eax because syscall_trace_enter() returned |
| 53 | * the value it wants us to use in the table lookup. | 53 | * the %rax value we should see. Instead, we just truncate that |
| 54 | * value to 32 bits again as we did on entry from user mode. | ||
| 55 | * If it's a new value set by user_regset during entry tracing, | ||
| 56 | * this matches the normal truncation of the user-mode value. | ||
| 57 | * If it's -1 to make us punt the syscall, then (u32)-1 is still | ||
| 58 | * an appropriately invalid value. | ||
| 54 | */ | 59 | */ |
| 55 | .macro LOAD_ARGS32 offset, _r9=0 | 60 | .macro LOAD_ARGS32 offset, _r9=0 |
| 56 | .if \_r9 | 61 | .if \_r9 |
| @@ -60,6 +65,7 @@ | |||
| 60 | movl \offset+48(%rsp),%edx | 65 | movl \offset+48(%rsp),%edx |
| 61 | movl \offset+56(%rsp),%esi | 66 | movl \offset+56(%rsp),%esi |
| 62 | movl \offset+64(%rsp),%edi | 67 | movl \offset+64(%rsp),%edi |
| 68 | movl %eax,%eax /* zero extension */ | ||
| 63 | .endm | 69 | .endm |
| 64 | 70 | ||
| 65 | .macro CFI_STARTPROC32 simple | 71 | .macro CFI_STARTPROC32 simple |
