Descriptionsandbox/linux: refactor bpf_dsl dependency on die.h
This CL changes the bpf_dsl "Kill" builtin function to simply map to
SECCOMP_RET_KILL, rather than to a trap handler. Additionally, it
changes the default PolicyCompiler behavior for handling impossible
conditions to use this behavior.
However, it also adds SetPanicFunc as a way to override this default
behavior, and SandboxBPF uses this to maintain Chrome's historical
behavior of printing an error message with SANDBOX_DIE.
Arguably the Policy object should actually be responsible for
providing a Panic function, but that change will require modifying
existing Policy classes elsewhere in the Chromium source tree, so
I'll look into that in a followup CL.
BUG=449357
Committed: https://crrev.com/e7883acd4d078cc668d639f2a98c02b2cd106335
Cr-Commit-Position: refs/heads/master@{#344574}
Patch Set 1 #Patch Set 2 : Use logging.h instead of errx #
Total comments: 2
Patch Set 3 : Change default panic behavior to simply Kill #
Dependent Patchsets: Messages
Total messages: 15 (4 generated)
|