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

Side by Side Diff: sandbox/linux/seccomp-bpf/trap.cc

Issue 12223109: SECCOMP-BPF: Refactor the BPF sandbox API to use fewer "static" fields and methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase (now, that the bitmask change has landed in the tree) Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <errno.h>
5 #include <signal.h> 6 #include <signal.h>
7 #include <string.h>
6 #include <sys/prctl.h> 8 #include <sys/prctl.h>
7 #include <sys/syscall.h> 9 #include <sys/syscall.h>
8 10
9 #ifndef SECCOMP_BPF_STANDALONE 11 #ifndef SECCOMP_BPF_STANDALONE
10 #include "base/logging.h" 12 #include "base/logging.h"
11 #include "base/posix/eintr_wrapper.h" 13 #include "base/posix/eintr_wrapper.h"
12 #endif 14 #endif
13 15
14 #include "sandbox/linux/seccomp-bpf/codegen.h" 16 #include "sandbox/linux/seccomp-bpf/codegen.h"
15 #include "sandbox/linux/seccomp-bpf/die.h" 17 #include "sandbox/linux/seccomp-bpf/die.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 if (global_trap_ && id > 0 && id <= global_trap_->trap_array_size_) { 336 if (global_trap_ && id > 0 && id <= global_trap_->trap_array_size_) {
335 return global_trap_->trap_array_[id - 1]; 337 return global_trap_->trap_array_[id - 1];
336 } else { 338 } else {
337 return ErrorCode(); 339 return ErrorCode();
338 } 340 }
339 } 341 }
340 342
341 Trap *Trap::global_trap_; 343 Trap *Trap::global_trap_;
342 344
343 } // namespace playground2 345 } // namespace playground2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698