bpf_dsl: support arbitrary (arg & mask) == val expressions
Rework the seccomp_bpf compiler internals to work in terms of a single general masked-equality condition instead of the variety of limited condition operators previously supported. All of the peephole optimizations previously applied continue to be supported so similar instructions should be emitted, but the handling of upper/lower words is more cleanly structured now. The old sandbox->Cond() interface continues to be supported for now so that the old seccomp_bpf_unittests continue to give us assurances that the new code generator is still correct. Meanwhile, we provide a new lower-level sandbox->CondMaskedEqual() method that bpf_dsl can now use. BUG=408845 R=jln@chromium.org Review URL: https://codereview.chromium.org/530133003 Cr-Commit-Position: refs/heads/master@{#293347}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment