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

Issue 10546041: Added a new Verifier class to the BPF compiler. (Closed)

Created:
8 years, 6 months ago by Markus (顧孟勤)
Modified:
8 years, 6 months ago
CC:
chromium-reviews, agl, jln+watch_chromium.org
Visibility:
Public.

Description

Added a new Verifier class to the BPF compiler. This class ensures that the generated BPF program does in fact represent the filters that we were asked to compile. Having a verifier will allow us to make more aggressive optimizations in the future without having to worry that we generate invalid code. BUG=130662 TEST=make && demo32 && demo64 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=142258

Patch Set 1 #

Patch Set 2 : Update GYP file #

Total comments: 7

Patch Set 3 : Refactored error handling and rebased on head of the trunk #

Total comments: 6

Patch Set 4 : Typo #

Total comments: 19

Patch Set 5 : Changes requested by Chris #

Total comments: 2

Patch Set 6 : Rebased #

Patch Set 7 : Rebased #

Patch Set 8 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+286 lines, -8 lines) Patch
M sandbox/linux/seccomp-bpf/Makefile View 1 2 3 4 5 6 7 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 4 chunks +7 lines, -2 lines 0 comments Download
M sandbox/linux/seccomp-bpf/sandbox_bpf.cc View 1 2 3 4 5 6 7 5 chunks +22 lines, -5 lines 0 comments Download
A sandbox/linux/seccomp-bpf/verifier.h View 1 2 3 4 1 chunk +75 lines, -0 lines 0 comments Download
A sandbox/linux/seccomp-bpf/verifier.cc View 1 2 3 4 5 1 chunk +179 lines, -0 lines 0 comments Download
M sandbox/sandbox.gyp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Markus (顧孟勤)
8 years, 6 months ago (2012-06-07 01:08:46 UTC) #1
jln (very slow on Chromium)
A first wave of (quite easy to fix) concerns. I really hope I can convince ...
8 years, 6 months ago (2012-06-07 22:55:17 UTC) #2
Markus (顧孟勤)
I think I addressed all your concerns by refactoring the error handling. And after a ...
8 years, 6 months ago (2012-06-08 02:47:03 UTC) #3
jln (very slow on Chromium)
LGTM https://chromiumcodereview.appspot.com/10546041/diff/6002/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/10546041/diff/6002/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode300 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:300: die(err); I don't like it when functions have ...
8 years, 6 months ago (2012-06-08 19:28:22 UTC) #4
Markus (顧孟勤)
https://chromiumcodereview.appspot.com/10546041/diff/6002/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/10546041/diff/6002/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode300 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:300: die(err); On 2012/06/08 19:28:22, Julien Tinnes wrote: > I ...
8 years, 6 months ago (2012-06-08 20:04:24 UTC) #5
Markus (顧孟勤)
On Fri, Jun 8, 2012 at 12:28 PM, <jln@chromium.org> wrote: > https://chromiumcodereview.**appspot.com/10546041/diff/** > 6002/sandbox/linux/seccomp-**bpf/sandbox_bpf.h#newcode111<https://chromiumcodereview.appspot.com/10546041/diff/6002/sandbox/linux/seccomp-bpf/sandbox_bpf.h#newcode111> > ...
8 years, 6 months ago (2012-06-08 20:08:12 UTC) #6
Chris Evans
https://chromiumcodereview.appspot.com/10546041/diff/7014/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/10546041/diff/7014/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode259 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:259: for (int sysnum = MIN_SYSCALL; sysnum <= MAX_SYSCALL+1; ++sysnum) ...
8 years, 6 months ago (2012-06-11 19:20:41 UTC) #7
Markus (顧孟勤)
https://chromiumcodereview.appspot.com/10546041/diff/7014/sandbox/linux/seccomp-bpf/sandbox_bpf.cc File sandbox/linux/seccomp-bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/10546041/diff/7014/sandbox/linux/seccomp-bpf/sandbox_bpf.cc#newcode259 sandbox/linux/seccomp-bpf/sandbox_bpf.cc:259: for (int sysnum = MIN_SYSCALL; sysnum <= MAX_SYSCALL+1; ++sysnum) ...
8 years, 6 months ago (2012-06-11 20:58:43 UTC) #8
Chris Evans
https://chromiumcodereview.appspot.com/10546041/diff/8007/sandbox/linux/seccomp-bpf/verifier.cc File sandbox/linux/seccomp-bpf/verifier.cc (right): https://chromiumcodereview.appspot.com/10546041/diff/8007/sandbox/linux/seccomp-bpf/verifier.cc#newcode121 sandbox/linux/seccomp-bpf/verifier.cc:121: if (state->ip + insn.k + 1 >= state->program.size()) { ...
8 years, 6 months ago (2012-06-12 18:23:01 UTC) #9
Chris Evans
lgtm
8 years, 6 months ago (2012-06-12 20:37:55 UTC) #10
jln (very slow on Chromium)
https://chromiumcodereview.appspot.com/10546041/diff/7014/sandbox/linux/seccomp-bpf/sandbox_bpf.h File sandbox/linux/seccomp-bpf/sandbox_bpf.h (right): https://chromiumcodereview.appspot.com/10546041/diff/7014/sandbox/linux/seccomp-bpf/sandbox_bpf.h#newcode114 sandbox/linux/seccomp-bpf/sandbox_bpf.h:114: void operator=(const TypeName&) On 2012/06/11 20:58:43, Markus (顧孟勤) wrote: ...
8 years, 6 months ago (2012-06-12 20:52:14 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/markus@chromium.org/10546041/2005
8 years, 6 months ago (2012-06-14 20:42:15 UTC) #12
commit-bot: I haz the power
Failed to apply patch for sandbox/linux/seccomp-bpf/Makefile: While running patch -p1 --forward --force; patching file sandbox/linux/seccomp-bpf/Makefile ...
8 years, 6 months ago (2012-06-14 20:42:16 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/markus@chromium.org/10546041/4004
8 years, 6 months ago (2012-06-14 20:49:13 UTC) #14
commit-bot: I haz the power
8 years, 6 months ago (2012-06-14 23:12:18 UTC) #15
Change committed as 142258

Powered by Google App Engine
This is Rietveld 408576698