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

Side by Side Diff: sandbox/linux/seccomp/exit.cc

Issue 3225010: Pull seccomp-sandbox in via DEPS rather than using an in-tree copy... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/linux/seccomp/debug.cc ('k') | sandbox/linux/seccomp/getpid.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "debug.h"
6 #include "sandbox_impl.h"
7
8 namespace playground {
9
10 long Sandbox::sandbox_exit(int status) {
11 long long tm;
12 Debug::syscall(&tm, __NR_exit, "Executing handler");
13 struct {
14 int sysnum;
15 long long cookie;
16 } __attribute__((packed)) request;
17 request.sysnum = __NR_exit;
18 request.cookie = cookie();
19
20 SysCalls sys;
21 if (write(sys, processFdPub(), &request, sizeof(request)) !=
22 sizeof(request)) {
23 die("Failed to forward exit() request [sandbox]");
24 }
25 for (;;) {
26 sys._exit(status);
27 }
28 }
29
30 bool Sandbox::process_exit(int parentMapsFd, int sandboxFd, int threadFdPub,
31 int threadFd, SecureMem::Args* mem) {
32 SecureMem::lockSystemCall(parentMapsFd, mem);
33 SecureMem::sendSystemCall(threadFdPub, true, parentMapsFd, mem,
34 __NR_exit, 0);
35 return true;
36 }
37
38 } // namespace
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp/debug.cc ('k') | sandbox/linux/seccomp/getpid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698