Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 1 | From 5c63eb5d56abd4e5232add4727247965a863d851 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 15 Dec 2019 14:02:45 -0800 |
| 4 | Subject: [PATCH] Do not add stack pointer to clobber list |
| 5 | |
| 6 | It was being ignored until now when gcc 9.0 became capable |
| 7 | of flagging these silent ignore via [1]. |
| 8 | |
| 9 | We weren't actually clobbering the stack pointers here |
| 10 | so it should not cause change in behavior. |
| 11 | |
| 12 | [1] https://gcc.gnu.org/PR52813 |
| 13 | |
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 15 | --- |
| 16 | linux_syscall_support.h | 8 ++++---- |
| 17 | 1 file changed, 4 insertions(+), 4 deletions(-) |
| 18 | |
| 19 | diff --git a/linux_syscall_support.h b/linux_syscall_support.h |
| 20 | index 9276f56..6e73309 100644 |
| 21 | --- a/linux_syscall_support.h |
| 22 | +++ b/linux_syscall_support.h |
| 23 | @@ -1955,7 +1955,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) \ |
| 32 | @@ -2012,7 +2012,7 @@ struct kernel_statfs { |
| 33 | : "i" (__NR_##name), "ri" ((long)(arg1)), \ |
| 34 | "c" ((long)(arg2)), "d" ((long)(arg3)), \ |
| 35 | "S" ((long)(arg4)), "D" ((long)(arg5)) \ |
| 36 | - : "esp", "memory"); \ |
| 37 | + : "memory"); \ |
| 38 | LSS_RETURN(type,__res); \ |
| 39 | } |
| 40 | #undef _syscall6 |
| 41 | @@ -2034,7 +2034,7 @@ struct kernel_statfs { |
| 42 | : "i" (__NR_##name), "0" ((long)(&__s)), \ |
| 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 | LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, |
| 50 | @@ -2120,7 +2120,7 @@ struct kernel_statfs { |
| 51 | : "0"(-EINVAL), "i"(__NR_clone), |
| 52 | "m"(fn), "m"(child_stack), "m"(flags), "m"(arg), |
| 53 | "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr) |
| 54 | - : "esp", "memory", "ecx", "edx", "esi", "edi"); |
| 55 | + : "memory", "ecx", "edx", "esi", "edi"); |
| 56 | LSS_RETURN(int, __res); |
| 57 | } |
| 58 | |
| 59 | -- |
| 60 | 2.24.1 |
| 61 | |