Commit graph

29360 commits

Author SHA1 Message Date
Inseob Kim
731182a4a1 Migrate precompiled sepolicy hashes to Android.bp
Bug: 33691272
Test: build with odm and build without odm
Test: boot and see precompiled sepolicy used
Change-Id: Id84cca38f81ba3ecf7480d41a704085c7fff8b87
2021-05-06 11:44:37 +00:00
Nathalie Le Clair
ce32e9bcdb Merge "Add existing ro.hdmi sysprop to sepolicy" 2021-05-06 06:30:30 +00:00
Hridya Valsaraju
b99176333a Merge "Allow multiple heaps to use the system-secure vendor heap category" 2021-05-05 20:10:50 +00:00
Hridya Valsaraju
f35c70b0dd Merge changes If26ba23d,Ibea38822
* changes:
  Revert "Revert "Exclude vendor_modprobe from debugfs neverallow restrictions""
  Revert "Revert "Add neverallows for debugfs access""
2021-05-05 17:31:35 +00:00
Eric Biggers
740f9b72fa Merge "Allow dumpstate to signal keystore to dump its stack" 2021-05-05 16:16:15 +00:00
Nathalie Le Clair
f696109b23 Add existing ro.hdmi sysprop to sepolicy
Bug: 186998799
Test: make
Change-Id: If99e3c029b992cea5b4af1b4f062d3b19e601df9
2021-05-05 09:06:09 +02:00
Songchun Fan
633f7ca868 [sepolicy] allow system server to read incfs metrics from sysfs
Address denial messages like:

05-05 05:02:21.480  1597  1597 W Binder:1597_12: type=1400 audit(0.0:140): avc: denied { read } for name="reads_delayed_min" dev="sysfs" ino=107358 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

BUG: 184844615
Test: atest android.cts.statsdatom.incremental.AppErrorAtomTests#testAppCrashOnIncremental
Change-Id: I201e27e48a08f99f41a030e06c6f22518294e056
2021-05-04 22:56:41 -07:00
Hridya Valsaraju
498318cc65 Revert "Revert "Exclude vendor_modprobe from debugfs neverallow restrictions""
This reverts commit 231c04b2b9.

Now that b/186727553 is fixed, it should be safe to revert this revert.

Test: build
Bug: 184381659
Change-Id: If26ba23df19e9854a121bbcf10a027c738006515
2021-05-04 22:07:08 -07:00
Hridya Valsaraju
23f9f51fcd Revert "Revert "Add neverallows for debugfs access""
This reverts commit e95e0ec0a5.

Now that b/186727553 is fixed, it should be safe to revert this revert.

Test: build
Bug: 184381659
Change-Id: Ibea3882296db880f5cafe4f9efa36d79a183c8a1
2021-05-04 22:06:46 -07:00
Eric Biggers
f9519a6d3f Allow dumpstate to signal keystore to dump its stack
This is needed to debug hangs in keystore2.

Restricted to debuggable builds for now.

Bug: 186879912
Test: 'adb bugreport', then find the stack traces for keystore2 in the
      "VM TRACES JUST NOW" section of the main bugreport file.
Change-Id: I4434cab7e79cb4aae8bbb2e3a8abff02e0073c13
2021-05-04 21:09:35 -07:00
Lalit Maganti
6c03124c3c Merge "sepolicy: allow traced_probes to access statsd socket" 2021-05-04 19:04:45 +00:00
Treehugger Robot
22c7415dbf Merge "Revert "Revert "Add a neverallow for debugfs mounting""" 2021-05-04 16:58:40 +00:00
Alex Hong
ec6d12f2bf Label the odm_dlkm properties in "odm_dlkm/etc/build.prop"
Test: make selinux_policy
Bug: 185920634
Change-Id: I09eec15a8a2e2b2f64075f148b414bf89f8ebcd6
2021-05-04 16:06:50 +08:00
Hridya Valsaraju
15f0f9234c Give mediatranscoding access to the DMA-BUF system heap
Fixes the following denials:

avc: denied { getattr } for path="/dev/dma_heap/system" dev="tmpfs"
ino=534 scontext=u:r:mediatranscoding:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file
permissive=0

Bug: 185867872
Test: No more DMA-BUF heap related denials from
CtsMediaTranscodingTestCases

Change-Id: I45b57b45e0db996f08b82618dcd085ba0f7e6ef6
2021-05-03 16:49:16 -07:00
Hridya Valsaraju
a2a2d9cbbd Add missing permissions for Cuttlefish to support GSI testing
Once b/186727553 is fixed, booting GSI on cuttlefish will no longer load
cuttlefish's system_ext sepolicy. These domains are all private and
hence the permissions are being added to system/sepolicy to avoid
making them public(especially mediatranscoding that was changed from
public to private in Android S).

Test: build, boot
Change-Id: I4a78030015fff147545bb627c9e62afbd0daa9d7
2021-05-03 16:49:07 -07:00
Hridya Valsaraju
a885dd84c7 Revert "Revert "Add a neverallow for debugfs mounting""
This reverts commit f9dbb72654.
Issues with GSI testing fixed with
https://android-review.googlesource.com/c/platform/build/+/1686425/

Bug: 184381659
Test: manual
Change-Id: Icd07430c606e294dfaad2fc9b37d34e3dae8cbfc
2021-05-02 21:41:53 -07:00
Treehugger Robot
351331b015 Merge "Revert^4 "Build userdebug_plat_sepolicy.cil with Android.bp"" 2021-05-02 23:54:40 +00:00
Shawn Willden
bdc4f744da Merge "Allowing userdebug/eng builds crash dump access to ks" 2021-04-30 22:19:04 +00:00
Max Bires
f09391624a Allowing userdebug/eng builds crash dump access to ks
This will make debugging of keystore issues in dogfood populations much
easier than it previously was, as developers will have detailed crash
dump reporting on any issues that do occur.

Bug: 186868271
Bug: 184006658
Test: crash dumps appear if keystore2 explodes
Change-Id: Ifb36cbf96eb063c9290905178b2fdc5934050b99
2021-04-30 18:50:54 +00:00
Songchun Fan
979a1f8f34 [sepolicy] allow system_server to ioctl INCFS_IOC_GET_LAST_READ_ERROR
Solves the denial message like:

04-30 03:54:46.972 21944 21944 I Binder:21944_17: type=1400 audit(0.0:502): avc: denied { ioctl } for path=2F646174612F696E6372656D656E74616C2F4D545F646174615F6170705F766D646C3133352F6D6F756E742F2E70656E64696E675F7265616473202864656C6574656429 dev="incremental-fs" ino=2 ioctlcmd=0x6727 scontext=u:r:system_server:s0 tcontext=u:object_r:incremental_control_file:s0 tclass=file permissive=1

BUG: 184844615
Test: manual
Change-Id: I3ef32613de348bca1d58cddf4ec1296d4828b51a
2021-04-30 16:46:06 +00:00
Orion Hodson
86e3ac05e6 Merge "app_zygote.te: allow reading and searching the ART module dalvik-cache" 2021-04-30 14:22:10 +00:00
Lalit Maganti
685205d3f0 sepolicy: allow traced_probes to access statsd socket
This allows us to log metrics from traced_probes to statsd
for failures. This is required for implementation of
go/perfetto-failure-stats.

This matches the CL aosp/1690788 which adds the initial logging to
traced_probes.

This solves the following denied message from logcat:
avc: denied { write } for comm="traced_probes" name="statsdw" scontext=u:r:traced_probes:s0 tcontext=u:object_r:statsdw_socket:s0

Bug: 177215620
Change-Id: I1523df818562f839b28061ef88f1910d4745a289
2021-04-30 12:16:04 +01:00
Nicolas Geoffray
24878f8816 Merge "Allow dex2oat to read /apex/apex-info-list.xml" 2021-04-30 08:42:31 +00:00
Inseob Kim
6cc75f4587 Revert^4 "Build userdebug_plat_sepolicy.cil with Android.bp"
This reverts commit a46d61cd3f.

Reason for revert: fixed debug_ramdisk partition problem

Change-Id: If2350f115f5ff74ee50dac4e5a87c4d171067282
2021-04-30 14:53:25 +09:00
Inseob Kim
785ac2bf1a Merge "Add precompiled hash only when policy exists" 2021-04-30 01:14:15 +00:00
Inseob Kim
c96bd38275 Merge "Add sepolicy_vers for plat_sepolicy_vers.txt" 2021-04-30 00:26:53 +00:00
Sandeep Patil
04eec64bd9 OWNERS: Remove myself from owners
I haven't reviewed a single sepolicy change for over a year.
There are plenty of OWNERs who know the current code better.

Test: N/A
Bug: None

Signed-off-by: Sandeep Patil <sspatil@google.com>
Change-Id: I2f8345a0220e0f59ca56fad44768a074c3921f05
2021-04-29 14:25:08 -07:00
Oleg Matcovschi
102883c1e0 Merge "sepolicy: add ro.product.vendor_dlkm coverage" 2021-04-29 18:32:11 +00:00
Oleg Matcovschi
db8fa96ac6 sepolicy: add ro.product.vendor_dlkm coverage
Bug: 186747827
Signed-off-by: Oleg Matcovschi <omatcovschi@google.com>
Change-Id: I51801feeaf67537e6628cf34b4b7425b075f711b
2021-04-29 08:38:17 -07:00
Orion Hodson
90d3351ad1 app_zygote.te: allow reading and searching the ART module dalvik-cache
Fix: 185637711
Test: SELinux denials gone for chrome_zygote
Change-Id: I31ba5d5b4fa8cb002814809a533bf2b2dc465c99
2021-04-29 15:29:12 +00:00
Inseob Kim
1c056b1ad0 Add sepolicy_vers for plat_sepolicy_vers.txt
plat_sepolicy_vers.txt stores the version of vendor policy. This change
adds sepolicy_vers module to migrate plat_sepolicy_vers.txt to
Android.bp.

- Device's plat_sepolicy_vers: should be BOARD_SEPOLICY_VERS
- Microdroid's plat_sepolicy_vers: should be PLATFORM_SEPOLICY_VERSION
because all microdroid artifacts are bound to platform

Bug: 33691272
Test: boot device && boot microdroid
Change-Id: Ida293e1cb785b44fa1d01543d52d3f8e15b055c2
2021-04-30 00:17:39 +09:00
Treehugger Robot
d82e1e4214 Merge "app.te: enable mapping ART apexdata cache executable" 2021-04-29 14:02:34 +00:00
Inseob Kim
a76c0c8540 Add precompiled hash only when policy exists
precompiled_system_ext_and_mapping.sha256 and
precompiled_product_and_mapping.sha256 has been installed, regardless of
existence of system_ext and product policies. This change only installs
such hash files when policy files exist, for consistency.

Bug: 186727553
Test: boot yukawa and see precompiled sepolicy is used
Change-Id: Iaad827cefdbe82e68288cd6cc59b55b5f28c229d
2021-04-29 19:45:50 +09:00
Nicolas Geoffray
82bf10a79c Merge "Allow boot animation to update boot status." 2021-04-29 07:53:05 +00:00
Hridya Valsaraju
791dc49d96 Allow multiple heaps to use the system-secure vendor heap category
The ABI for system-secure heap was originally created to allow codec2 to
continue allocation in protected heaps by specifying the heap name via
the C2 HAL's ComponentStore interface. This patch make the ABI
expandable to accommodate multiple heaps both for usage by codec2 as well
as to allow unbinderized SP HALs to allocate in protected heaps.

Bug: 175697666
Test: manual

Change-Id: Ia8c1797c16441e73398c46d8727eee99614a35f1
2021-04-28 12:41:09 -07:00
Treehugger Robot
59e8007be0 Merge "Add support for invoking derive_classpath from otadexopt" 2021-04-28 17:44:31 +00:00
Christian Wailes
6553a8dbe6 Merge "Add SELinux properties for artd" 2021-04-28 16:41:09 +00:00
Xusong Wang
c5bae6f802 Merge "Allow NN HAL service to read files from apk data files" 2021-04-28 15:09:42 +00:00
Nicolas Geoffray
6a311471a6 Allow boot animation to update boot status.
This CL was missed from the topic:
https://android-review.googlesource.com/q/topic:bootanim-percent

Test: update ART module, see animation go to 100%
Bug: 184881321
Change-Id: I59706718af11751a7e1f4b5ab1ff2793f554fb19
2021-04-28 15:17:09 +01:00
Nicolas Geoffray
78f0250077 Allow dex2oat to read /apex/apex-info-list.xml
Test: ART tests
Bug: 182465342
Change-Id: Ied9f41d59795fa72b9806c71241ae0c9bc05ce48
2021-04-28 13:37:27 +01:00
Chris Wailes
467d8a80ea Add SELinux properties for artd
Test: boot device and check for artd process
Change-Id: I2a161701102ecbde3e293af0346d1db0b11d4aab
2021-04-27 14:49:13 -07:00
Alex Light
8393a05fee Add support for invoking derive_classpath from otadexopt
otadexopt needs to be able to invoke derive_classpath in order to
determine the boot-classpath after the OTA finishes.

Test: manual OTA on blueline
Bug: 186432034
Change-Id: I3ec561fc0aa9de25ae1186f012ef72ba851990d0
2021-04-27 14:31:54 -07:00
Orion Hodson
13ee65392e app.te: enable mapping ART apexdata cache executable
Some jars, such com.android.location.provider.jar, are both on the
system_server classpath and loaded as libraries. If the .oat files are
in the ART apexdata cache (due to being system_server classpath), they
need to be execute permission to be usable as AOT compiled libraries.

Bug: 184881321
Test: install an updated ART apex, open apps, see no more denials
Change-Id: I89b74dfa047699c568575d99a29c5e74abdef076
2021-04-27 16:41:23 +01:00
Midas Chien
3c24ea1793 Add a sysprop to set display update imminent timeout
Adding 'ro.surface_flinger.display_update_imminent_timeout_ms' to set
timeout for rate limit display update imminent notifications.

Bug: 164411401
Change-Id: I90a00fe7f8df3aa505f08081d096fd83b3342f59
2021-04-27 20:45:29 +08:00
Treehugger Robot
98914119ae Merge "[incfs] Allow everyone read the IncFS sysfs features" 2021-04-26 22:19:37 +00:00
Treehugger Robot
206d6d80a1 Merge "Fix permissions for vold.post_fs_data_done" 2021-04-26 20:36:34 +00:00
Eric Biggers
040ce199b2 Fix permissions for vold.post_fs_data_done
The system property "vold.post_fs_data_done" is used by init and vold to
communicate with each other in order to set up FDE on devices that use
FDE.  It needs to be gettable and settable by vold, and settable by init
and vendor_init.  This was the case in Android 11 and earlier; however,
the change
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1277447
("Rename exported and exported2 vold prop") broke this by giving this
property the type "vold_config_prop", which made it no longer settable
by vold.

Since none of the existing property types appear to be appropriate for
this particular property, define a new type "vold_post_fs_data_prop" and
grant the needed domains permission to get/set it.

This is one of a set of changes that is needed to get FDE working again
so that devices that launched with FDE can be upgraded to Android 12.

Bug: 186165644
Test: Tested FDE on Cuttlefish
Change-Id: I2fd8af0091f8b921ec37381ad3b85a156d074566
2021-04-26 12:43:05 -07:00
Hridya Valsaraju
7362f58895 Merge changes from topic "revert-1668411-MWQWEZISXF"
* changes:
  Revert "Add a neverallow for debugfs mounting"
  Revert "Add neverallows for debugfs access"
  Revert "Exclude vendor_modprobe from debugfs neverallow restrictions"
  Revert "Check that tracefs files are labelled as tracefs_type"
2021-04-23 22:06:31 +00:00
Robert Horvath
dbfe4809ba Merge "Add bootanim property context, ro.bootanim.quiescent.enabled property" 2021-04-23 16:45:32 +00:00
Hridya Valsaraju
f9dbb72654 Revert "Add a neverallow for debugfs mounting"
Revert submission 1668411

Reason for revert: Suspect for b/186173384
Reverted Changes:
Iaa4fce9f0:Check that tracefs files are labelled as tracefs_t...
I743a81489:Exclude vendor_modprobe from debugfs neverallow re...
I63a22402c:Add neverallows for debugfs access
I289f2d256:Add a neverallow for debugfs mounting

Change-Id: Ie04d7a4265ace43ba21a108af85f82ec137c6af0
2021-04-23 16:38:20 +00:00