platform_system_sepolicy/private/compat
Primiano Tucci 2f99809c43 Allow dumpstate to snapshot traces and attach them to bug reports
Feature description: if a background trace is happening at the
time dumpstate is invoked, the tracing daemon will snapshot
the trace into a fixed path (/data/misc/perfetto-traces/bugreport/).
Dumpstate will attach the trace, if present, to the bugreport.
From a SELinux viewpoint this involves the following permissions:
- Allow dumpstate to exec+trans perfetto --save-for-bugreport
  (this will just send an IPC to traced, which will save the trace).
- Allow dumpstate to list, read and unlink the trace file.
- Create a dedicated label for bugreport traces, to prevent that
  dumpstate gets access to other traces not meant for bug reporting.

Note that this does NOT allow dumpstate to serialze arbitary traces.
Traces must be marked as "eligible for bugreport" upfront in the
trace config (which is not under dumpstate control), by
setting bugreport_score > 0.

Design doc: go/perfetto-betterbug

Bug: 170334305
Test: manual:
      1. start a perfetto trace with bugreport_score > 0
      2. adb shell dumpstate
      3. check that the bugreport zip contains the trace

Change-Id: I259c3ee9d5be08d6b22c796b32875d7de703a230
2021-01-12 14:06:24 +00:00
..
26.0 Exempt older vendor images from recent mls changes. 2020-11-17 17:30:10 +00:00
27.0 Exempt older vendor images from recent mls changes. 2020-11-17 17:30:10 +00:00
28.0 Exempt older vendor images from recent mls changes. 2020-11-17 17:30:10 +00:00
29.0 Exempt older vendor images from recent mls changes. 2020-11-17 17:30:10 +00:00
30.0 Allow dumpstate to snapshot traces and attach them to bug reports 2021-01-12 14:06:24 +00:00