blob: edf903552dca00b14327628bd2c455c3f6fa8caa [file] [log] [blame]
Brad Bishopa891d152019-09-13 06:17:45 -04001From d1d7b616219fd47736c804ff4c2f393d7184a75b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 23 Dec 2018 16:58:04 -0800
4Subject: [PATCH] chromium: stack pointer clobber
5
Brad Bishop19323692019-04-05 15:28:33 -04006Do not add stack pointer to clobber list
7
8it was being ignored until gcc 9.0 became capable
9of flagging this silent ignoring via [1]
10
11[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813<Paste>
12
13Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/linux-syscall-support/+/1390160]
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
Brad Bishopa891d152019-09-13 06:17:45 -040015---
16 src/third_party/lss/linux_syscall_support.h | 10 +++++-----
17 1 file changed, 5 insertions(+), 5 deletions(-)
Brad Bishop19323692019-04-05 15:28:33 -040018
Brad Bishopa891d152019-09-13 06:17:45 -040019Index: b/src/third_party/lss/linux_syscall_support.h
20===================================================================
Brad Bishop19323692019-04-05 15:28:33 -040021--- a/src/third_party/lss/linux_syscall_support.h
22+++ b/src/third_party/lss/linux_syscall_support.h
Brad Bishopa891d152019-09-13 06:17:45 -040023@@ -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 Bishop19323692019-04-05 15:28:33 -040032@@ -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 Bishopa891d152019-09-13 06:17:45 -040041@@ -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 Bishop19323692019-04-05 15:28:33 -040068@@ -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 }