Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(887)

Unified Diff: sandbox/linux/seccomp/securemem.h

Issue 661438: Seccomp sandbox changes (performance and correctness fixes, primarily targetting x86-32) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/seccomp/sandbox_impl.h ('k') | sandbox/linux/seccomp/syscall.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp/securemem.h
===================================================================
--- sandbox/linux/seccomp/securemem.h (revision 39965)
+++ sandbox/linux/seccomp/securemem.h (working copy)
@@ -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 @@
void* r14;
void* r15;
#elif defined(__i386__)
- void* ret2;
void* ebp;
void* edi;
void* esi;
@@ -86,9 +89,9 @@
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 @@
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];
};
Property changes on: sandbox/linux/seccomp/securemem.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « sandbox/linux/seccomp/sandbox_impl.h ('k') | sandbox/linux/seccomp/syscall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698