Skip to content
Snippets Groups Projects
  1. Feb 13, 2018
    • Jeff Vander Stoep's avatar
      Improve data separation test coverage · 55d5e284
      Jeff Vander Stoep authored
      To areas need better coverage:
      1. Tests are not verifying that files in /data/vendor do not have the
      core_data_file_type attribute.
      2. No error is thrown if a type lives in both /data/vendor
      /data/<not vendor>.
      
      Bug: 72998741
      Test: build all selinux policies on master (assert build time tests)
      Test: build and boot Marlin and Taimen, verify no selinux denials and
          everything works as expected.
      
      Change-Id: I133a068123139a599b9b81ddcc254616894621eb
      55d5e284
  2. Feb 07, 2018
    • Tri Vo's avatar
      Silence expandtypeattribute build-time warning. · 19047a6a
      Tri Vo authored
      treble_sepolicy_tests emit during build time warnings for
      expandtypeattribute statements in the mapping file.
      Silence those warning.
      
      Bug: 72757373
      Test: build sepolicy
      Change-Id: Ia40d80d8172c96c75854d2e1ec0d284ea0724b5c
      19047a6a
  3. Feb 05, 2018
    • Bowgo Tsai's avatar
      Renames nonplat_* to vendor_* · afbcf21b
      Bowgo Tsai authored
      This change renames the non-platform sepolicy files on a DUT from
      nonplat_* to vendor_*.
      
      It also splits the versioned platform sepolicy from vendor_sepolicy.cil
      to a new file /vendor/etc/selinux/plat_pub_versioned.cil. And only keeps
      vendor customizations in vendor_sepolicy.cil.
      
      Build variable BOARD_SEPOLICY_DIRS is also renamed to
      BOARD_VENDOR_SEPOLICY_DIRS.
      
      Bug: 64240127
      Test: boot bullhead/taimen
      Change-Id: Iea2210c9c8ab30c9ecbcd8146f074e76e90e6943
      afbcf21b
  4. Jan 30, 2018
    • Jeff Vander Stoep's avatar
      Test that /data is properly labeled · ccf965e9
      Jeff Vander Stoep authored
      Data outside of /data/vendor should have the core_data_file_type.
      Exempt data_between_core_and_vendor for some types.
      
      Ensure core_data_file_type and coredomain_socket do not get expanded
      to their underlying types.
      
      Test: build sepolicy for all targets in master (this is a build time
          test)
      Bug: 34980020
      Change-Id: I59387a87875f4603a001fb03f22fa31cae84bf5a
      (cherry picked from commit bdd45479)
      ccf965e9
  5. Jan 29, 2018
    • Tom Cherry's avatar
      Remove vendor_init from coredomain · 9c778045
      Tom Cherry authored
      vendor_init exists on the system partition, but it is meant to be an
      extention of init that runs with vendor permissions for executing
      vendor scripts, therefore it is not meant to be in coredomain.
      
      Bug: 62875318
      Test: boot walleye
      Merged-In: I01af5c9f8b198674b15b90620d02725a6e7c1da6
      Change-Id: I01af5c9f8b198674b15b90620d02725a6e7c1da6
      9c778045
  6. Jan 25, 2018
    • Tom Cherry's avatar
      Remove vendor_init from coredomain · 70e8f421
      Tom Cherry authored
      vendor_init exists on the system partition, but it is meant to be an
      extention of init that runs with vendor permissions for executing
      vendor scripts, therefore it is not meant to be in coredomain.
      
      Bug: 62875318
      Test: boot walleye
      Change-Id: I01af5c9f8b198674b15b90620d02725a6e7c1da6
      70e8f421
  7. Jan 24, 2018
    • Jeff Vander Stoep's avatar
      Test that /data is properly labeled · bdd45479
      Jeff Vander Stoep authored
      Data outside of /data/vendor should have the core_data_file_type.
      Exempt data_between_core_and_vendor for some types.
      
      Ensure core_data_file_type and coredomain_socket do not get expanded
      to their underlying types.
      
      Test: build sepolicy for all targets in master (this is a build time
          test)
      Bug: 34980020
      Change-Id: I59387a87875f4603a001fb03f22fa31cae84bf5a
      bdd45479
  8. Jan 19, 2018
  9. Jan 12, 2018
  10. Nov 20, 2017
  11. Oct 04, 2017
  12. Sep 28, 2017
  13. Sep 26, 2017
  14. Sep 25, 2017
  15. Sep 24, 2017
  16. Sep 23, 2017
  17. Sep 01, 2017
  18. Aug 30, 2017
    • Jeff Vander Stoep's avatar
      Add test that *_violators attributes are not used · 04a4549e
      Jeff Vander Stoep authored
      Prevent regression of Treble requirements.
      
      Exempt PRODUCT_FULL_TREBLE_OVERRIDE devices like Marlin. It
      was not launched in O-API and is not required to be fully
      compliant.
      
      Bug: 65115001
      Test: Passes on Marlin. Passes on PRODUCT_FULL_TREBLE device.
          Does not pass if *_violators attributes are locally added.
      
      Change-Id: Ie720adab6ee79148c48880e0562e5bf3704c3e41
      04a4549e
  19. Aug 24, 2017
    • Jeff Vander Stoep's avatar
      add searchpolicy.py for automated tests · dec443e7
      Jeff Vander Stoep authored
      searchpolicy.py provides a subset of the functionality of sesearch.
      
      The primary benefit being that it's entirely built in-tree and thus
      can be packaged for use in automated tests included compatibility
      test suites.
      
      Example
      searchpolicy.py --libpath out/host/linux-x86/lib64/ --allow --source domain
      
      Bug: 63397379
      Test: Identical output with sesearch for the following commands
          --allow --source domain
          --allow --target domain
          --allow --target appdomain -p ioctl,open
          --allow --source lmkd -c file -p ioctl,open
          --allow --source lmkd -c file,dir -p ioctl,open
      Change-Id: I89a6c333f1f519d9171fbc1aafe27eaf5ad247f0
      dec443e7
  20. Aug 16, 2017
    • Dan Cashman's avatar
      treble sepolicy tests: Add removed attribute check. · 1c56a76b
      Dan Cashman authored
      Make sure that any attributes removed from policy are declared
      in the mapping file, in case they are relied upon by vendor
      policy.
      
      Bug: 36899958
      Test: Builds successfull, but not with removed attribute not
      in mapping file.
      Change-Id: I25526cd88a50e90513ae298ccf4f2660e4627fb4
      1c56a76b
  21. Aug 14, 2017
    • Dan Cashman's avatar
      Move compatibility files out of prebuilts dir. · 78b3d573
      Dan Cashman authored
      The treble compatibility tests check for policy differences between old
      and new policy.  To do this correctly, we must not modify the policy which
      represents the older policies.  Move the files meant to be changed to a
      different location from the ones that are not meant to be touched to avoid
      any undesired changes to old policy, e.g. commit:
      2bdefd65078d890889672938c6f0d2accdd25bc5
      
      Bug: 36899958
      Test: Build-time tests build.
      Change-Id: I8fa3947cfae756f37556fb34e1654382e2e48372
      78b3d573
  22. Aug 09, 2017
  23. Aug 08, 2017
    • Dan Cashman's avatar
      Add 26.0 api compatibility check infrastructure. · 7f7c3b82
      Dan Cashman authored
      Add support to the treble_sepolicy_tests suite that explicitly look at
      the old and current policy versions, as well as the compatibility file,
      to determine if any new types have been added without a compatibility
      entry.  This first test catches the most common and likely changes that
      could change the type label of an object for which vendor policy may have
      needed access.  It also should prove the basis for additional compatibility
      checks between old and new policies.
      
      Bug: 36899958
      Test: Policy builds and tests pass.
      Change-Id: I609c913e6354eb10a04cc1a029ddd9fa0e592a4c
      7f7c3b82
  24. Jul 31, 2017
  25. Jun 13, 2017
  26. Jun 05, 2017
    • Jeff Vander Stoep's avatar
      Run Treble sepolicy tests at build time · 1fc0682e
      Jeff Vander Stoep authored
      Bug: 37008075
      Test: build policy on Marlin
      Change-Id: I53748f94c5df66fa17a53e7d0bed1be6b8603544
      (cherry picked from commit e1ddc6df)
      1fc0682e
    • Jeff Vander Stoep's avatar
      Verify correct application of labels and attributes · bdfc0301
      Jeff Vander Stoep authored
      With project Treble, we're relying heavily on attributes for
      permission inheritance and enforcement of separation between
      platform and vendor components.
      
      We neead tests that verify those attributes are correctly applied.
      This change adds the framework for those tests including a wrapper
      around libsepol for loading and querying policy, and a python module
      for running tests on policy and file_contexts.
      
      Included with the testing framework is a test asserting that the
      coredomain attribute is only applied to core processes. This
      verification is done using the following rules:
      1. Domain's entrypoint is on /system - coredomain
      2. Domain's entrypoint is on /vendor - not coredomain
      3. Domain belongs to a whitelist of known coredomains - coredomain
      
      In a subsequent commit these tests will be applied at build time.
      However, I first need to fix existing Treble violations exposed by
      this test. These tests will also be applied during CTS.
      
      Test: LD_PRELOAD=$ANDROID_HOST_OUT/lib64/libsepolwrap.so python \
          treble.py -p $OUT/vendor/etc/selinux/precompiled_sepolicy \
          -f $OUT/vendor/etc/selinux/nonplat_file_contexts \
          -f $OUT/system/etc/selinux/plat_file_contexts
      Bug: 37008075
      Change-Id: I7825f5c2909a5801deaccf2bef2bfd227adb0ae9
      (cherry picked from commit 0366afdf)
      bdfc0301
  27. Jun 04, 2017
  28. Jun 02, 2017
  29. May 31, 2017
    • Jeff Vander Stoep's avatar
      Verify correct application of labels and attributes · 0366afdf
      Jeff Vander Stoep authored
      With project Treble, we're relying heavily on attributes for
      permission inheritance and enforcement of separation between
      platform and vendor components.
      
      We neead tests that verify those attributes are correctly applied.
      This change adds the framework for those tests including a wrapper
      around libsepol for loading and querying policy, and a python module
      for running tests on policy and file_contexts.
      
      Included with the testing framework is a test asserting that the
      coredomain attribute is only applied to core processes. This
      verification is done using the following rules:
      1. Domain's entrypoint is on /system - coredomain
      2. Domain's entrypoint is on /vendor - not coredomain
      3. Domain belongs to a whitelist of known coredomains - coredomain
      
      In a subsequent commit these tests will be applied at build time.
      However, I first need to fix existing Treble violations exposed by
      this test. These tests will also be applied during CTS.
      
      Test: LD_PRELOAD=$ANDROID_HOST_OUT/lib64/libsepolwrap.so python \
          treble.py -p $OUT/vendor/etc/selinux/precompiled_sepolicy \
          -f $OUT/vendor/etc/selinux/nonplat_file_contexts \
          -f $OUT/system/etc/selinux/plat_file_contexts
      Bug: 37008075
      Change-Id: I7825f5c2909a5801deaccf2bef2bfd227adb0ae9
      0366afdf
Loading