Skip to content
Snippets Groups Projects
  1. Dec 11, 2018
    • Benjamin Schwartz's avatar
      Add power.stats HAL 1.0 sepolicy · e7040ead
      Benjamin Schwartz authored
      Also giving statsd permission to access it. This change copies the internal sepolicy to AOSP.
      
      Bug: 111185513
      Bug: 120551881
      Test: make
      Change-Id: I7e0386777e05580299caf9b97cb7804459f1a9d0
      e7040ead
  2. Oct 08, 2018
    • Howard Ro's avatar
      Allow zygote to write to statsd and refactor · 98de322a
      Howard Ro authored
      We plan on migrating MetricsLogger to write to statsd socket. So we need to
      allow zygote, which writes to logd using MetricsLogger, to also be able
      to statsd. We also re-locate some sepolicies to write to statsd socket
      in their respective policy definitions.
      
      Bug: 110537511
      Test: no failure/violations observed
      Change-Id: I21fd352a25ed946516f9a45ac3b5e9bf97b059bc
      98de322a
  3. Sep 28, 2018
    • Howard Ro's avatar
      Update sepolicies for stats hal · 578a1891
      Howard Ro authored
      Bug: 116732452
      Test: No sepolicy violations observed with this change
      (cherry picked from commit I1958182dd8ecc496625da2a2a834f71f5d43e7bb)
      
      Change-Id: Ib386767d8acfacf9fedafd9a79dd555ce233f41c
      578a1891
  4. Sep 27, 2018
    • Nick Kralevich's avatar
      Introduce system_file_type · 5e37271d
      Nick Kralevich authored
      system_file_type is a new attribute used to identify files which exist
      on the /system partition. It's useful for allow rules in init, which are
      based off of a blacklist of writable files. Additionally, it's useful
      for constructing neverallow rules to prevent regressions.
      
      Additionally, add commented out tests which enforce that all files on
      the /system partition have the system_file_type attribute. These tests
      will be uncommented in a future change after all the device-specific
      policies are cleaned up.
      
      Test: Device boots and no obvious problems.
      Change-Id: Id9bae6625f042594c8eba74ca712abb09702c1e5
      5e37271d
  5. Aug 23, 2018
  6. May 10, 2018
    • Andreas Gampe's avatar
      Sepolicy: Fix perfprofd permissions · 835881aa
      Andreas Gampe authored
      Let statsd find the service. The system server wants to read file
      attributes for the perfprofd dropbox file.
      
      Bug: 73175642
      Test: m
      Test: manual
      Change-Id: I0c0b1dac057af90fff440286226093ec15b5e247
      835881aa
  7. May 03, 2018
    • yro's avatar
      Allow lmkd to log to statsd · db2e6085
      yro authored
      Bug: 78603347
      Test: build and locally tested
      Change-Id: Ib9b041af63d1fac7a689b932e7a2b202fa8d0f83
      db2e6085
    • Yao Chen's avatar
      Allow lmkd to log to statsd · 78e3ed44
      Yao Chen authored
      Bug: 78603347
      Test: build and locally tested
      Change-Id: I7e4eb8ebb2c1a0b7d684b471141da991a19bc98d
      78e3ed44
  8. Apr 25, 2018
  9. Apr 23, 2018
    • yro's avatar
      Allow radio to write to statsd · af8fb9f7
      yro authored
      The corresponding change in aosp is made at aosp/669146
      
      Violation:
      04-23 10:51:03.926  2103  2103 W m.android.phone: type=1400 audit(0.0:8): avc: denied { write } for name="statsdw" dev="tmpfs" ino=22538 scontext=u:r:radio:s0 tcontext=u:object_r:statsdw_socket:s0 tclass=sock_file permissive=0
      
      Bug: 78318738
      Test: manual
      Change-Id: I8aa70b07281df8a732f2f99d4d323961e425feea
      af8fb9f7
  10. Apr 20, 2018
  11. Apr 17, 2018
    • Bookatz's avatar
      NO PARTIAL RERUN · 055a958d
      Bookatz authored
      Statsd sepolicy hal_health
      
      Statsd monitors battery capacity, which requires calls to the health
      hal.
      
      Fixes: 77923174
      Bug: 77916472
      Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.HostAtomTests#testFullBatteryCapacity
      Merged-In: I2d6685d4b91d8fbc7422dfdd0b6ed96bbddc0886
      Change-Id: I767068c60cff6c1baba615d89186705107531c02
      055a958d
  12. Apr 12, 2018
    • Bookatz's avatar
      Statsd sepolicy hal_health · 1300945c
      Bookatz authored
      Statsd monitors battery capacity, which requires calls to the health
      hal.
      
      Fixes: 77923174
      Bug: 77916472
      Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.HostAtomTests#testFullBatteryCapacity
      Change-Id: I2d6685d4b91d8fbc7422dfdd0b6ed96bbddc0886
      1300945c
  13. Mar 31, 2018
  14. Mar 30, 2018
  15. Mar 28, 2018
  16. Mar 27, 2018
  17. Feb 27, 2018
    • Tej Singh's avatar
      Statsd sepolicy for thermal hal · c26ac738
      Tej Singh authored
      Updates statsd sepolicy so it can use the thermal hal.
      
      Test: verified these policies solved sepolicy issues with thermal hal.
      Change-Id: I36839a72494b084d5742c4d83c3ce9814102b974
      c26ac738
  18. Feb 23, 2018
    • Bookatz's avatar
      Fix benign statsd selinux violations · c9f205b5
      Bookatz authored
      These two selinux policy violations keep showing up from statsd's CTS
      tests, although statsd and the CTS test seemed to function fine despite
      them. Nonetheless, they seem reasonable to add to the list.
      
      Bug: 73548694
      Test: N/A. It didn't seem to be causing any issues in the first place.
      Change-Id: Id36c5229c0d7de83675166caeb07c87b719dc374
      c9f205b5
  19. Feb 16, 2018
  20. Feb 13, 2018
    • Bookatz's avatar
      Statsd allow shell in selinux policy · 022ab0e7
      Bookatz authored
      CTS tests need to be able to call, from hostside:
      adb shell cmd stats dump-report (and others)
      On a user build, this will fail because of an selinux policy violation
      from shell. This cl fixes this by granting shell permission.
      
      Similarly, Settings needs to communicate with statsd, so
      system_app-statsd binder calls are given permission.
      
      Bug: 72961153
      Bug: 73255014
      Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.HostAtomTests
      Test: manual confirmation
      Change-Id: I6589ab4ef5c91a4a7f78eb97b63d9bb43e3d8f02
      022ab0e7
  21. Feb 02, 2018
    • Jeff Vander Stoep's avatar
      Enable Traceur on user builds. · de04528c
      Jeff Vander Stoep authored
      Test: Standard Traceur workflow works successfully with no
      selinux denials on a user build.
      Bug: 64762598
      Change-Id: I0dfe506d463b63d70c5bda03f8706041ea7ab448
      de04528c
  22. Jan 29, 2018
    • Primiano Tucci's avatar
      SELinux policies for Perfetto cmdline client (/system/bin/perfetto) · 1a9f4f7a
      Primiano Tucci authored
      Instead of having statsd linking the perfetto client library
      and talk directly to its socket, we let just statsd exec()
      the /system/bin/perfetto cmdline client.
      
      There are two reasons for this:
      1) Simplify the interaction between statsd and perfetto, reduce
        dependencies, binary size bloat and isolate faults.
      2) The cmdline client also takes care of handing the trace to
        Dropbox. This allows to expose the binder interaction surface
        to the short-lived cmdline client and avoid to grant binder
        access to the perfetto traced daemon.
      
      This cmdline client will be used by:
       - statsd
       - the shell user (for our UI and Studio)
      
      Bug: 70942310
      Change-Id: I8cdde181481ad0a1a5cae5937ac446cedac54a1f
      1a9f4f7a
  23. Jan 25, 2018
  24. Jan 24, 2018
  25. Jan 19, 2018
    • Yao Chen's avatar
      Allow dumpstate to call statsd. This is needed for bugreport. · b10ff337
      Yao Chen authored
      Selinux violations while calling dump() on statsd by bugreport.
      
      avc: denied { call } for scontext=u:r:dumpstate:s0 tcontext=u:r:statsd:s0 tclass=binder permissive=1
      denied { use } for path="pipe:[411602]" dev="pipefs" ino=411602 scontext=u:r:statsd:s0 tcontext=u:r:dumpstate:s0 tclass=fd permissive=1
      avc: denied { write } for path="pipe:[411602]" dev="pipefs" ino=411602 scontext=u:r:statsd:s0 tcontext=u:r:dumpstate:s0 tclass=fifo_file permissive=1
      avc: denied { getattr } for path="pipe:[411602]" dev="pipefs" ino=411602 scontext=u:r:statsd:s0 tcontext=u:r:dumpstate:s0 tclass=fifo_file permissive=1
      
      Test: manual
      Change-Id: I46c5b119548378cc80c6e4498d00edad5959d188
      b10ff337
  26. Jan 10, 2018
    • yro's avatar
      Update statsd sepolicies to avoid selinux violations during cts tests · e27af27f
      yro authored
      and pulling metrics
      
      Bug: 63757906
      Test: manual testing conducted
      Change-Id: Ieba524ee676dfb4a457d39d025d203bf02a70831
      e27af27f
    • Primiano Tucci's avatar
      Perfetto SELinux policies · c80f9e03
      Primiano Tucci authored
      Perfetto is a performance instrumentation and logging framework,
      living in AOSP's /external/pefetto.
      Perfetto introduces in the system one binary and two daemons
      (the binary can specialize in either depending on the cmdline).
      
      1) traced: unprivileged daemon. This is architecturally similar to logd.
         It exposes two UNIX sockets:
         - /dev/socket/traced_producer : world-accessible, allows to stream
           tracing data. A tmpfs file descriptor is sent via SCM_RIGHTS
           from traced to each client process, which needs to be able to
           mmap it R/W (but not X)
         - /dev/socket/traced_consumer : privilege-accessible (only from:
           shell, statsd). It allows to configure tracing and read the trace
           buffer.
      2) traced_probes: privileged daemon. This needs to:
         - access tracingfs (/d/tracing) to turn tracing on and off.
         - exec atrace
         - connect to traced_producer to stream data to traced.
      
      init.rc file:
      https://android-review.googlesource.com/c/platform/external/perfetto/+/575382/14/perfetto.rc
      
      Bug: 70942310
      Change-Id: Ia3b5fdacbd5a8e6e23b82f1d6fabfa07e4abc405
      c80f9e03
  27. Jan 09, 2018
  28. Jan 02, 2018
    • Max Bires's avatar
      Adding a traceur_app domain to remove it from shell · 4ea5569f
      Max Bires authored
      This CL creates a traceur_app domain with userdebug privileges akin to
      what shell has with regards to being able to find most services on
      device. Previously, traceur was running as shell which was an
      unintentional abuse of selinux architecture.
      
      Bug: 68126425
      Test: Traceur functions outside of shell user privilege
      Change-Id: Ib5090e7e8225ad201b3ec24b506fe2717101d0f1
      4ea5569f
  29. Dec 19, 2017
  30. Dec 16, 2017
Loading