summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authoreugenis@chromium.org <eugenis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-05 11:30:57 +0000
committereugenis@chromium.org <eugenis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-05 11:30:57 +0000
commitc29ddad17a1b5f3a6a4a8345e31a0f3cf0a5b468 (patch)
tree4d1bc39ec8054a496f3435618c5ef7a2f2e31559 /sandbox
parentbb2585993e940506ee1e6293091208b508b77606 (diff)
downloadchromium_src-c29ddad17a1b5f3a6a4a8345e31a0f3cf0a5b468.zip
chromium_src-c29ddad17a1b5f3a6a4a8345e31a0f3cf0a5b468.tar.gz
chromium_src-c29ddad17a1b5f3a6a4a8345e31a0f3cf0a5b468.tar.bz2
Add "cc" to inline asm clobber list.
SyscallAsm() clobbers the flags register. BUG=325707 TEST=sandbox_linux_unittests on Android with AddressSanitizer R=markus@chromium.org Review URL: https://codereview.chromium.org/104613002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238944 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/linux/seccomp-bpf/syscall.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sandbox/linux/seccomp-bpf/syscall.cc b/sandbox/linux/seccomp-bpf/syscall.cc
index a5cbb02..6be827a 100644
--- a/sandbox/linux/seccomp-bpf/syscall.cc
+++ b/sandbox/linux/seccomp-bpf/syscall.cc
@@ -196,7 +196,7 @@ intptr_t SandboxSyscall(int nr,
// N.B. These are not the calling conventions normally used by the ABI.
: "=a"(ret)
: "0"(ret), "D"(args)
- : "esp", "memory", "ecx", "edx");
+ : "cc", "esp", "memory", "ecx", "edx");
#elif defined(__x86_64__)
intptr_t ret = nr;
{
@@ -208,7 +208,7 @@ intptr_t SandboxSyscall(int nr,
// N.B. These are not the calling conventions normally used by the ABI.
: "=a"(ret)
: "0"(ret), "r"(data)
- : "rsp", "memory",
+ : "cc", "rsp", "memory",
"rcx", "rdi", "rsi", "rdx", "r8", "r9", "r10", "r11");
}
#elif defined(__arm__)
@@ -221,7 +221,7 @@ intptr_t SandboxSyscall(int nr,
// N.B. These are not the calling conventions normally used by the ABI.
: "=r"(inout)
: "0"(inout), "r"(data)
- : "lr", "memory", "r1", "r2", "r3", "r4", "r5"
+ : "cc", "lr", "memory", "r1", "r2", "r3", "r4", "r5"
#if !defined(__arm__)
// In thumb mode, we cannot use "r7" as a general purpose register, as
// it is our frame pointer. We have to manually manage and preserve it.