• Alex Gough's avatar
    Adds diagnostics for sandbox policy rules. · 9a8fdbed
    Alex Gough authored
    This copies policy rule opcodes when snapshotting policies, and
    serializes them for display in chrome://sandbox's raw view.
    
    Example rule:
    
      "NtQueryAttributesFile": [
        "!(p[1] & 1) && !(prefix(p[0], '\\??\\')) -> askBroker",
        "!(p[1] & 1) && scan(p[0], '~') -> askBroker",
        "prefix_i(p[0], '\\??\\pipe\\chrome.') -> askBroker",
        "prefix_i(p[0], '\\??\\C:\\src\\chromium\\src\\out\\release-x86\\') && ends_i(p[0], '.pdb') -> askBroker"
      ],
    
    
    Bug: 997273
    Change-Id: I54f82b0a9523fa1ed94cecf982f2b25203ae7351
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872304
    Commit-Queue: Alex Gough <ajgo@chromium.org>
    Reviewed-by: default avatarWill Harris <wfh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#710437}
    9a8fdbed
sandbox_policy_diagnostic.h 1.65 KB