summaryrefslogtreecommitdiffstats
path: root/sandbox/linux/seccomp/securemem.h
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/linux/seccomp/securemem.h')
-rw-r--r--sandbox/linux/seccomp/securemem.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/sandbox/linux/seccomp/securemem.h b/sandbox/linux/seccomp/securemem.h
index 4c208ce..f9a5c97 100644
--- a/sandbox/linux/seccomp/securemem.h
+++ b/sandbox/linux/seccomp/securemem.h
@@ -1,3 +1,7 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
#ifndef SECURE_MEM_H__
#define SECURE_MEM_H__
@@ -50,7 +54,6 @@ class SecureMem {
void* r14;
void* r15;
#elif defined(__i386__)
- void* ret2;
void* ebp;
void* edi;
void* esi;
@@ -86,9 +89,9 @@ class SecureMem {
char securePage[4096];
};
union {
- // This scratch space is used by the trusted thread to read parameters
- // for unrestricted system calls.
struct {
+ // This scratch space is used by the trusted thread to read parameters
+ // for unrestricted system calls.
long tmpSyscallNum;
void* tmpArg1;
void* tmpArg2;
@@ -97,6 +100,11 @@ class SecureMem {
void* tmpArg5;
void* tmpArg6;
void* tmpReturnValue;
+
+ // We often have long sequences of calls to gettimeofday(). This is
+ // needlessly expensive. Coalesce them into a single call.
+ long lastSyscallNum;
+ int gettimeofdayCounter;
} __attribute__((packed));
char scratchPage[4096];
};