Brad Bishop | a891d15 | 2019-09-13 06:17:45 -0400 | [diff] [blame^] | 1 | From d1d7b616219fd47736c804ff4c2f393d7184a75b Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 23 Dec 2018 16:58:04 -0800 |
| 4 | Subject: [PATCH] chromium: stack pointer clobber |
| 5 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 6 | Do not add stack pointer to clobber list |
| 7 | |
| 8 | it was being ignored until gcc 9.0 became capable |
| 9 | of flagging this silent ignoring via [1] |
| 10 | |
| 11 | [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813<Paste> |
| 12 | |
| 13 | Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/linux-syscall-support/+/1390160] |
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
Brad Bishop | a891d15 | 2019-09-13 06:17:45 -0400 | [diff] [blame^] | 15 | --- |
| 16 | src/third_party/lss/linux_syscall_support.h | 10 +++++----- |
| 17 | 1 file changed, 5 insertions(+), 5 deletions(-) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 18 | |
Brad Bishop | a891d15 | 2019-09-13 06:17:45 -0400 | [diff] [blame^] | 19 | Index: b/src/third_party/lss/linux_syscall_support.h |
| 20 | =================================================================== |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 21 | --- a/src/third_party/lss/linux_syscall_support.h |
| 22 | +++ b/src/third_party/lss/linux_syscall_support.h |
Brad Bishop | a891d15 | 2019-09-13 06:17:45 -0400 | [diff] [blame^] | 23 | @@ -1957,7 +1957,7 @@ struct kernel_statfs { |
| 24 | LSS_ENTRYPOINT \ |
| 25 | "pop %%ebx" \ |
| 26 | args \ |
| 27 | - : "esp", "memory"); \ |
| 28 | + : "memory"); \ |
| 29 | LSS_RETURN(type,__res) |
| 30 | #undef _syscall0 |
| 31 | #define _syscall0(type,name) \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 32 | @@ -1966,7 +1966,7 @@ struct kernel_statfs { |
| 33 | __asm__ volatile(LSS_ENTRYPOINT \ |
| 34 | : "=a" (__res) \ |
| 35 | : "0" (__NR_##name) \ |
| 36 | - : "esp", "memory"); \ |
| 37 | + : "memory"); \ |
| 38 | LSS_RETURN(type,__res); \ |
| 39 | } |
| 40 | #undef _syscall1 |
Brad Bishop | a891d15 | 2019-09-13 06:17:45 -0400 | [diff] [blame^] | 41 | @@ -2014,7 +2014,7 @@ struct kernel_statfs { |
| 42 | : "i" (__NR_##name), "ri" ((long)(arg1)), \ |
| 43 | "c" ((long)(arg2)), "d" ((long)(arg3)), \ |
| 44 | "S" ((long)(arg4)), "D" ((long)(arg5)) \ |
| 45 | - : "esp", "memory"); \ |
| 46 | + : "memory"); \ |
| 47 | LSS_RETURN(type,__res); \ |
| 48 | } |
| 49 | #undef _syscall6 |
| 50 | @@ -2036,7 +2036,7 @@ struct kernel_statfs { |
| 51 | : "i" (__NR_##name), "0" ((long)(&__s)), \ |
| 52 | "c" ((long)(arg2)), "d" ((long)(arg3)), \ |
| 53 | "S" ((long)(arg4)), "D" ((long)(arg5)) \ |
| 54 | - : "esp", "memory"); \ |
| 55 | + : "memory"); \ |
| 56 | LSS_RETURN(type,__res); \ |
| 57 | } |
| 58 | LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, |
| 59 | @@ -2122,7 +2122,7 @@ struct kernel_statfs { |
| 60 | : "0"(-EINVAL), "i"(__NR_clone), |
| 61 | "m"(fn), "m"(child_stack), "m"(flags), "m"(arg), |
| 62 | "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr) |
| 63 | - : "esp", "memory", "ecx", "edx", "esi", "edi"); |
| 64 | + : "memory", "ecx", "edx", "esi", "edi"); |
| 65 | LSS_RETURN(int, __res); |
| 66 | } |
| 67 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 68 | @@ -2407,7 +2407,7 @@ struct kernel_statfs { |
| 69 | "d"(LSS_SYSCALL_ARG(parent_tidptr)), |
| 70 | "r"(LSS_SYSCALL_ARG(newtls)), |
| 71 | "r"(LSS_SYSCALL_ARG(child_tidptr)) |
| 72 | - : "rsp", "memory", "r8", "r10", "r11", "rcx"); |
| 73 | + : "memory", "r8", "r10", "r11", "rcx"); |
| 74 | } |
| 75 | LSS_RETURN(int, __res); |
| 76 | } |