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

Issue 494743003: sandbox: Add support for the new seccomp() system call in kernel 3.17. (Closed)

Created:
6 years, 4 months ago by Robert Sesek
Modified:
6 years, 3 months ago
CC:
chromium-reviews, jln+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

sandbox: Add support for the new seccomp() system call in kernel 3.17. This new system call can be used to set NO_NEW_PRIVS, install a BPF filter, and synchronize that filter across the thread group. BUG=308763, 308775 TEST=New SandboxBPF.Tsync test where kernel support is available. R=jln@chromium.org Committed: https://crrev.com/07884070ecfe2e6ad00a5493dfdc4df891bbd142 Cr-Commit-Position: refs/heads/master@{#291739}

Patch Set 1 #

Total comments: 29

Patch Set 2 : Address comments #

Total comments: 4

Patch Set 3 : Assert thread state #

Total comments: 11

Patch Set 4 : Always take seccomp() path #

Patch Set 5 : Rebase #

Total comments: 2

Patch Set 6 : Put on tinfoil hat #

Patch Set 7 : Fix clang compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -28 lines) Patch
M sandbox/linux/seccomp-bpf/linux_seccomp.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf/sandbox_bpf.h View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M sandbox/linux/seccomp-bpf/sandbox_bpf.cc View 1 2 3 4 5 7 chunks +56 lines, -22 lines 0 comments Download
M sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc View 1 2 3 4 5 6 3 chunks +89 lines, -5 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Robert Sesek
6 years, 4 months ago (2014-08-20 18:16:57 UTC) #1
jln (very slow on Chromium)
Look good, with mostly minor remarks! https://chromiumcodereview.appspot.com/494743003/diff/1/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/494743003/diff/1/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode441 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:441: int rv = ...
6 years, 4 months ago (2014-08-20 21:34:21 UTC) #2
Robert Sesek
Thanks for the review! https://codereview.chromium.org/494743003/diff/1/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://codereview.chromium.org/494743003/diff/1/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode441 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:441: int rv = syscall(__NR_seccomp); On ...
6 years, 4 months ago (2014-08-21 16:50:18 UTC) #3
jln (very slow on Chromium)
I think we should continue passing PROCESS_XX_THREADED for now and strictly assert it. WDYT? https://chromiumcodereview.appspot.com/494743003/diff/1/sandbox/linux/seccomp-bpf/sandbox_bpf.cc ...
6 years, 4 months ago (2014-08-21 18:47:10 UTC) #4
Robert Sesek
You've convinced me; I now assert the right thread_state and added tests for that. https://chromiumcodereview.appspot.com/494743003/diff/40001/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc ...
6 years, 4 months ago (2014-08-21 20:26:41 UTC) #5
jln (very slow on Chromium)
Sorry if I was not clear: I still thought that using TSYNC whenever it is ...
6 years, 4 months ago (2014-08-21 21:04:42 UTC) #6
Robert Sesek
Also rebased in the last patch set. https://codereview.chromium.org/494743003/diff/80001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://codereview.chromium.org/494743003/diff/80001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode443 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:443: int rv ...
6 years, 4 months ago (2014-08-25 17:17:27 UTC) #7
Robert Sesek
https://codereview.chromium.org/494743003/diff/80001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://codereview.chromium.org/494743003/diff/80001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode443 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:443: int rv = syscall(__NR_seccomp); On 2014/08/25 17:17:26, rsesek wrote: ...
6 years, 4 months ago (2014-08-25 17:49:02 UTC) #8
jln (very slow on Chromium)
Another comment. Sorry for being so nit-picky here, but I'm paranoid about this path. https://chromiumcodereview.appspot.com/494743003/diff/160001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc ...
6 years, 4 months ago (2014-08-25 18:13:49 UTC) #9
Robert Sesek
https://chromiumcodereview.appspot.com/494743003/diff/160001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/494743003/diff/160001/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode573 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:573: if (SupportsSeccompThreadFilterSynchronization() == STATUS_AVAILABLE) { On 2014/08/25 18:13:49, jln ...
6 years, 4 months ago (2014-08-25 18:25:14 UTC) #10
jln (very slow on Chromium)
lgtm
6 years, 4 months ago (2014-08-25 18:26:59 UTC) #11
Robert Sesek
The CQ bit was checked by rsesek@chromium.org
6 years, 4 months ago (2014-08-25 18:27:13 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsesek@chromium.org/494743003/180001
6 years, 4 months ago (2014-08-25 18:27:50 UTC) #13
Robert Sesek
The CQ bit was checked by rsesek@chromium.org
6 years, 4 months ago (2014-08-25 18:41:15 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsesek@chromium.org/494743003/200001
6 years, 4 months ago (2014-08-25 18:41:38 UTC) #15
commit-bot: I haz the power
Committed patchset #7 (200001) as e320c4dfad9a446c3fce8fed2a91d1601d7c9b69
6 years, 4 months ago (2014-08-25 19:37:22 UTC) #16
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 02:36:47 UTC) #17
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/07884070ecfe2e6ad00a5493dfdc4df891bbd142
Cr-Commit-Position: refs/heads/master@{#291739}

Powered by Google App Engine
This is Rietveld 408576698