Skip to content
Snippets Groups Projects
  1. Apr 21, 2017
    • Alex Klyubin's avatar
      Restrict access to hwservicemanager · 53656c17
      Alex Klyubin authored
      This adds fine-grained policy about who can register and find which
      HwBinder services in hwservicemanager.
      
      Test: Play movie in Netflix and Google Play Movies
      Test: Play video in YouTube app and YouTube web page
      Test: In Google Camera app, take photo (HDR+ and conventional),
            record video (slow motion and normal), and check that photos
            look fine and videos play back with sound.
      Test: Cast screen to a Google Cast device
      Test: Get location fix in Google Maps
      Test: Make and receive a phone call, check that sound works both ways
            and that disconnecting the call frome either end works fine.
      Test: Run RsHelloCompute RenderScript demo app
      Test: Run fast subset of media CTS tests:
            make and install CtsMediaTestCases.apk
            adb shell am instrument -e size small \
                -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
      Test: Play music using Google Play music
      Test: Adjust screen brightness via the slider in Quick Settings
      Test: adb bugreport
      Test: Enroll in fingerprint screen unlock, unlock screen using
            fingerprint
      Test: Apply OTA update:
            Make some visible change, e.g., rename Settings app.
            make otatools && \
            make dist
            Ensure device has network connectivity
            ota_call.py -s <serial here> --file out/dist/sailfish-ota-*.zip
            Confirm the change is now live on the device
      Bug: 34454312
      (cherry picked from commit 632bc494)
      Merged-In: Iecf74000e6c68f01299667486f3c767912c076d3
      Change-Id: I7a9a487beaf6f30c52ce08e04d415624da49dd31
      53656c17
  2. Apr 18, 2017
    • Alex Klyubin's avatar
      surfaceflinger and apps are clients of Configstore HAL · 75ca4832
      Alex Klyubin authored
      This commit marks surfaceflinger and app domain (except isolated_app)
      as clients of Configstore HAL. This cleans up the policy and will make
      it easier to restrict access to HwBinder services later.
      
      Test: Play YouTube clip in YouTube app and YouTube web page in Chrome
      Test: Take an HDR+ photo, a normal photo, a video, and slow motion
            video in Google Camera app. Check that photos show up fine and
            that videos play back with sound.
      Test: Play movie using Google Play Movies
      Test: Google Maps app displays the Android's correct location
      Bug: 34454312
      Change-Id: I0f468a4289132f4eaacfb1d13ce4e61604c2a371
      75ca4832
  3. Apr 03, 2017
    • Alex Klyubin's avatar
      No access to tee domain over Unix domain sockets · f86d54f0
      Alex Klyubin authored
      The tee domain is a vendor domain. Thus it cannot be accessed by
      non-vendor components over Unix domain sockets.
      
      It appears that the rules granting this access are not needed.
      
      Test: Flash a clean build with this change. Confirm that bullhead,
            angler, sailfish, ryu, boot without new denials.
            Confirm that YouTube, Netflix, Google Play Movies play back
            videos without new denials.
      Bug: 36714625
      Bug: 36715266
      
      Change-Id: I639cecd07c9a3cfb257e62622b51b7823613472a
      f86d54f0
  4. Mar 24, 2017
    • Alex Klyubin's avatar
      Vendor domains must not use Binder · f5446eb1
      Alex Klyubin authored
      On PRODUCT_FULL_TREBLE devices, non-vendor domains (except vendor
      apps) are not permitted to use Binder. This commit thus:
      * groups non-vendor domains using the new "coredomain" attribute,
      * adds neverallow rules restricting Binder use to coredomain and
        appdomain only, and
      * temporarily exempts the domains which are currently violating this
        rule from this restriction. These domains are grouped using the new
        "binder_in_vendor_violators" attribute. The attribute is needed
        because the types corresponding to violators are not exposed to the
        public policy where the neverallow rules are.
      
      Test: mmm system/sepolicy
      Test: Device boots, no new denials
      Test: In Chrome, navigate to ip6.me, play a YouTube video
      Test: YouTube: play a video
      Test: Netflix: play a movie
      Test: Google Camera: take a photo, take an HDR+ photo, record video with
            sound, record slow motion video with sound. Confirm videos play
            back fine and with sound.
      Bug: 35870313
      Change-Id: I0cd1a80b60bcbde358ce0f7a47b90f4435a45c95
      f5446eb1
  5. Mar 20, 2017
    • Alex Klyubin's avatar
      Move Graphics Allocator HAL IPC rules to proper location · 49274721
      Alex Klyubin authored
      Every client of Graphics Allocator HAL needs permission to (Hw)Binder
      IPC into the HAL.
      
      Test: Device boots, no denials to do with hal_graphics_allocator
            (also, removing the binder_call(hal_graphics_allocator_client,
            hal_graphics_allocator_server) leads to denials)
      Test: GUI works, YouTube works
      Bug: 34170079
      
      Change-Id: I5c64d966862a125994dab903c2eda5815e336a94
      49274721
  6. Mar 17, 2017
    • Alex Klyubin's avatar
      Annotate most remaining HALs with _client/_server · 9e6b24c6
      Alex Klyubin authored
      This switches most remaining HALs to the _client/_server approach.
      To unblock efforts blocked on majority of HALs having to use this
      model, this change does not remove unnecessary rules from clients of
      these HALs. That work will be performed in follow-up commits. This
      commit only adds allow rules and thus does not break existing
      functionality.
      
      The HALs not yet on the _client/_server model after this commit are:
      * Allocator HAL, because it's non-trivial to declare all apps except
        isolated apps as clients of this HAL, which they are.
      * Boot HAL, because it's still on the non-attributized model and I'm
        waiting for update_engine folks to answer a couple of questions
        which will let me refactor the policy of this HAL.
      
      Test: mmm system/sepolicy
      Test: Device boots, no new denials
      Test: Device boots in recovery mode, no new denials
      Bug: 34170079
      Change-Id: I03e6bcec2fa02f14bdf17d11f7367b62c68a14b9
      9e6b24c6
  7. Feb 10, 2017
    • Jeff Vander Stoep's avatar
      surfaceflinger: grant access to vr_manager_service · 8bf3b7a8
      Jeff Vander Stoep authored
      Addresses
      avc:  denied  { find } for service=vrmanager pid=472 uid=1000
      scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:vr_manager_service:s0
      tclass=service_manager
      
      Test: Marlin builds and boots. Denial no longer observed.
      Bug: 35258608
      Bug: 35197529
      Change-Id: I480dff3fdaf01f71e29e96f08350f705c6a23bba
      8bf3b7a8
  8. Feb 09, 2017
  9. Feb 07, 2017
    • Alex Klyubin's avatar
      Move surfaceflinger policy to private · 5d30beb1
      Alex Klyubin authored
      This leaves only the existence of surfaceflinger domain as public API.
      All other rules are implementation details of this domain's policy
      and are thus now private.
      
      Test: No change to policy according to sesearch, except for
            disappearance of all allow rules to do with
            surfaceflinger_current except those created by other domains'
            allow rules referencing surfaceflinger domain from public and
            vendor policies.
      Bug: 31364497
      
      Change-Id: I177751afad82ec27a5b6d2440cf0672cb5b9dfb8
      5d30beb1
  10. Oct 06, 2016
    • dcashman's avatar
      Split general policy into public and private components. · cc39f637
      dcashman authored
      Divide policy into public and private components.  This is the first
      step in splitting the policy creation for platform and non-platform
      policies.  The policy in the public directory will be exported for use
      in non-platform policy creation.  Backwards compatibility with it will
      be achieved by converting the exported policy into attribute-based
      policy when included as part of the non-platform policy and a mapping
      file will be maintained to be included with the platform policy that
      maps exported attributes of previous versions to the current platform
      version.
      
      Eventually we would like to create a clear interface between the
      platform and non-platform device components so that the exported policy,
      and the need for attributes is minimal.  For now, almost all types and
      avrules are left in public.
      
      Test: Tested by building policy and running on device.
      
      Change-Id: Idef796c9ec169259787c3f9d8f423edf4ce27f8c
      cc39f637
Loading