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

Issue 11096012: Add a platform-specific syscall number iterator. (Closed)

Created:
8 years, 2 months ago by Jorge Lucangeli Obes
Modified:
8 years, 2 months ago
CC:
chromium-reviews, agl, jln+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Add a platform-specific syscall number iterator. Avoid needlessly expensive scanning of system call ranges. This CL improves how we deal with discontiguous ranges of system call numbers. (Original CL by markus@chromium.org) TEST=sandbox_linux_unittests on x86_64 and ARM BUG=148856 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161943

Patch Set 1 #

Patch Set 2 : Rename #define's and extract ARM private syscall logic. #

Total comments: 10

Patch Set 3 : Code style cleanup, added ARM unit tests, rework IsArmPrivate API. #

Patch Set 4 : Amended trivial policies in sandbox_seccomp_bpf_linux.cc #

Patch Set 5 : Correctly amend the policies. #

Patch Set 6 : Fixed upload. #

Total comments: 28

Patch Set 7 : Assume MIN_SYSCALL == 0, remove X32 support, address comments. #

Total comments: 26

Patch Set 8 : Addressed comments. #

Patch Set 9 : Fixed one comment. #

Total comments: 6

Patch Set 10 : Addressed nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+404 lines, -112 lines) Patch
M content/common/sandbox_seccomp_bpf_linux.cc View 1 2 3 4 3 chunks +3 lines, -5 lines 0 comments Download
M sandbox/linux/sandbox_linux.gypi View 2 chunks +3 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf/Makefile View 1 chunk +1 line, -1 line 0 comments Download
M sandbox/linux/seccomp-bpf/sandbox_bpf.h View 1 2 3 4 5 6 7 chunks +27 lines, -16 lines 0 comments Download
M sandbox/linux/seccomp-bpf/sandbox_bpf.cc View 1 2 3 4 5 6 5 chunks +23 lines, -62 lines 0 comments Download
M sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc View 1 2 3 4 5 6 7 8 6 chunks +53 lines, -21 lines 0 comments Download
A sandbox/linux/seccomp-bpf/syscall_iterator.h View 1 2 3 4 5 6 7 8 9 1 chunk +58 lines, -0 lines 0 comments Download
A sandbox/linux/seccomp-bpf/syscall_iterator.cc View 1 2 3 4 5 6 7 8 9 1 chunk +91 lines, -0 lines 0 comments Download
A sandbox/linux/seccomp-bpf/syscall_iterator_unittest.cc View 1 2 3 4 5 6 7 1 chunk +135 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf/verifier.cc View 3 chunks +10 lines, -7 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Jorge Lucangeli Obes
If we can get this in then we can re-enable Seccomp-BPF for ARM.
8 years, 2 months ago (2012-10-08 23:50:45 UTC) #1
Jorge Lucangeli Obes
On 2012/10/08 23:50:45, Jorge Lucangeli Obes wrote: > If we can get this in then ...
8 years, 2 months ago (2012-10-09 19:53:49 UTC) #2
Jorge Lucangeli Obes
On 2012/10/09 19:53:49, Jorge Lucangeli Obes wrote: > On 2012/10/08 23:50:45, Jorge Lucangeli Obes wrote: ...
8 years, 2 months ago (2012-10-11 16:38:18 UTC) #3
jln (very slow on Chromium)
Sorry for the unacceptably long delay. Here are a few design-level remarks. I'll go over ...
8 years, 2 months ago (2012-10-11 22:41:18 UTC) #4
jln (very slow on Chromium)
Sorry, I forgot to include the code comments. https://chromiumcodereview.appspot.com/11096012/diff/6001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/11096012/diff/6001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode285 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:285: for ...
8 years, 2 months ago (2012-10-11 22:42:00 UTC) #5
jln (very slow on Chromium)
Ohh, and adding Markus on that CL.
8 years, 2 months ago (2012-10-11 22:59:07 UTC) #6
Jorge Lucangeli Obes
https://chromiumcodereview.appspot.com/11096012/diff/6001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/11096012/diff/6001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode285 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:285: for (SyscallIterator iter(true); !iter.Done(); ) { On 2012/10/11 22:42:00, ...
8 years, 2 months ago (2012-10-12 17:58:23 UTC) #7
Jorge Lucangeli Obes
Fixed upload.
8 years, 2 months ago (2012-10-12 18:17:56 UTC) #8
jln (very slow on Chromium)
I can't believe the complexity brought by the syscall poking. This is madness. I'll talk ...
8 years, 2 months ago (2012-10-12 20:26:52 UTC) #9
Jorge Lucangeli Obes
Addressing comments. https://chromiumcodereview.appspot.com/11096012/diff/26003/sandbox/linux/seccomp-bpf/sandbox_bpf.h File sandbox/linux/seccomp-bpf/sandbox_bpf.h (right): https://chromiumcodereview.appspot.com/11096012/diff/26003/sandbox/linux/seccomp-bpf/sandbox_bpf.h#newcode227 sandbox/linux/seccomp-bpf/sandbox_bpf.h:227: // Checks whether a particular system call ...
8 years, 2 months ago (2012-10-13 01:39:29 UTC) #10
jln (very slow on Chromium)
Mostly two general remarks: - CHECK is a form of documentation of the programmer's assumption. ...
8 years, 2 months ago (2012-10-13 02:44:22 UTC) #11
Jorge Lucangeli Obes
I wanted to upload before the weekend so as to not lose all the context ...
8 years, 2 months ago (2012-10-13 04:45:42 UTC) #12
jln (very slow on Chromium)
LGTM with some nits. https://chromiumcodereview.appspot.com/11096012/diff/41003/sandbox/linux/seccomp-bpf/syscall_iterator.cc File sandbox/linux/seccomp-bpf/syscall_iterator.cc (right): https://chromiumcodereview.appspot.com/11096012/diff/41003/sandbox/linux/seccomp-bpf/syscall_iterator.cc#newcode17 sandbox/linux/seccomp-bpf/syscall_iterator.cc:17: // |num_| has been initialized ...
8 years, 2 months ago (2012-10-13 17:44:55 UTC) #13
Jorge Lucangeli Obes
https://chromiumcodereview.appspot.com/11096012/diff/41003/sandbox/linux/seccomp-bpf/syscall_iterator.cc File sandbox/linux/seccomp-bpf/syscall_iterator.cc (right): https://chromiumcodereview.appspot.com/11096012/diff/41003/sandbox/linux/seccomp-bpf/syscall_iterator.cc#newcode17 sandbox/linux/seccomp-bpf/syscall_iterator.cc:17: // |num_| has been initialized to MIN_SYSCALL, which we ...
8 years, 2 months ago (2012-10-15 17:25:36 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jorgelo@chromium.org/11096012/35002
8 years, 2 months ago (2012-10-15 18:22:21 UTC) #15
commit-bot: I haz the power
8 years, 2 months ago (2012-10-15 20:33:17 UTC) #16
Change committed as 161943

Powered by Google App Engine
This is Rietveld 408576698