Commit graph

28541 commits

Author SHA1 Message Date
Devin Moore
d966b6089f Merge "Add sepolicy for /proc/bootconfig" 2021-02-24 15:56:48 +00:00
Treehugger Robot
fca3cb0201 Merge "Move qemu.sf.lcd_density into system/sepolicy" 2021-02-24 05:20:32 +00:00
Yi Kong
3dad1d73fa Merge "Allow profcollectd to read bootstrap bionic libs" 2021-02-24 04:32:48 +00:00
Roman Kiryanov
f6afebf934 Move qemu.sf.lcd_density into system/sepolicy
qemu.sf.lcd_density is rerefenced by surfaceflinger
and zygote.

Bug: 178144237
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Iede75d1170aeac9d020d60a3a66a1f69cee46abf
Merged-In: Iede75d1170aeac9d020d60a3a66a1f69cee46abf
2021-02-23 20:15:33 -08:00
David Anderson
6461578be7 Merge "Fix missing domain transition for snapuserd in recovery." 2021-02-23 20:28:19 +00:00
Yi Kong
262010754e Allow profcollectd to read bootstrap bionic libs
... so that it can generate profiles for them.

Test: TreeHugger
Change-Id: I2c7b6d2c1d257852e25d6dbe8c5133c160635ea0
2021-02-23 20:01:48 +00:00
Devin Moore
840d4f3bf3 Add sepolicy for /proc/bootconfig
Vendor boot hal, init, and vold processes all require permission.

Test: build and boot aosp_cf_x86_64_phone
Bug: 173815685
Change-Id: I15692dcd39dfc9c3a3b7d8c12d03eff0a7c96f72
2021-02-23 07:42:06 -08:00
Randall Huang
869f63a202 SELinux policy for /dev/sys/block/by-name/userdata
Bug: 180874192
Test: no denials on boot
Signed-off-by: Randall Huang <huangrandall@google.com>
Change-Id: If9374b1cfad21f6c070ebccf3043582ca485a65a
2021-02-23 13:41:13 +00:00
Mohammad Islam
74e85309f4 Merge changes from topic "apex_reserve"
* changes:
  Allow update_engine to communicate with apexd
  Add necessary sepolicy for update_engine to reserve space on data
2021-02-23 10:26:26 +00:00
David Anderson
d84b67e1cc Fix missing domain transition for snapuserd in recovery.
System files in recovery are labelled as rootfs, so we need an explicit
transition to snapuserd. Without this, factory data resets will fail
with a VABC OTA pending, with the following denial:

        avc:  denied  { entrypoint } for  pid=522 comm="init" path="/system/bin/snapuserd"
                dev="rootfs" ino=1491 scontext=u:r:snapuserd:s0 tcontext=u:object_r:rootfs:s0
                tclass=file permissive=0

Bug: 179336104
Test: factory data reset with VABC OTA pending
Change-Id: Ia839d84a48f2ac8ccb37d6ae3b1f8a8f7e619931
2021-02-23 00:10:43 -08:00
Inseob Kim
e35b49bd16 Add cil files to Android.bp for microdroid
Contexts files, plat_sepolicy.cil, and 10000.0.cil are needed to boot.
This adds cil files to microdroid. But cil files are temporary and only
for testing. We'll need to migrate real cil files to Android.bp.

Bug: 178993690
Test: boot microdroid
Change-Id: I711b1db39c11d88bc1f9defeff5799e6f24756ab
2021-02-22 14:36:25 +09:00
Treehugger Robot
4bf88c4d96 Merge "tracing: allow select tracepoints on release builds" 2021-02-19 13:44:25 +00:00
Mohammad Samiul Islam
606a3dca3e Allow update_engine to communicate with apexd
When we serve compressed APEX via OTA, we need to ensure device has
enough space to decompress them during boot. In order to do that,
update_engine will need to pass metadata about the OTA to apexd so that
it can make calculation about space requirments. Update engine in return
will display warning to user if the space requirement can't be
fulfilled.

Bug: 172911822
Test: manual
Change-Id: Idff25ac8e5165da70c539edcf6b292e04299a5c6
2021-02-19 13:21:51 +00:00
Kelvin Zhang
a1e58814a8 Add necessary sepolicy for update_engine to reserve space on data
Test: serve an OTA, make sure /data/apex/reserved is present
Bug: 172911822

Change-Id: I9f7967c9047ae834eb55a48d56ffc34a7b37f5db
2021-02-19 11:30:50 +00:00
Treehugger Robot
e674dd49b5 Merge "Allow dexoptanalyzer to use fd's from odsign." 2021-02-19 10:57:49 +00:00
Treehugger Robot
b8cc291268 Merge "sepolicy: Add label to userdata file node" 2021-02-19 09:26:08 +00:00
Martijn Coenen
6badc7f4c8 Allow dexoptanalyzer to use fd's from odsign.
odsign exec()'s odrefresh, which in turn exec()'s dexoptanalyzer.

Bug: 165630556
Test: No denials on boot
Change-Id: Ie97726cfbdbf09f75fa0b00d34ee10c9bdf5a5d7
2021-02-19 09:53:44 +01:00
Ady Abraham
a476e99e21 Merge "Add a sysprop to control layer caching" 2021-02-19 01:59:48 +00:00
Randall Huang
10d42cec51 sepolicy: Add label to userdata file node
The userdata file node should be labeled to
avoid avc denied.

Bug: 171760673
Bug: 177364376
Test: build pass
Signed-off-by: Randall Huang <huangrandall@google.com>
Change-Id: I9ba89c75c120864c64ea278934b15edc3ba18a6c
2021-02-19 07:45:02 +08:00
Janis Danisevskis
1aad552cfd Merge "Keystore 2.0: Add permissions and policy for user manager AIDL." 2021-02-18 23:00:29 +00:00
Weilun Du
e76978cef7 Merge "Revert^2 "Add qemu.hw.mainkeys to system property_contexts"" 2021-02-18 21:40:53 +00:00
Gavin Corkery
3bb3559e2e Merge "Add sepolicy for scheduling module data directories" 2021-02-18 20:51:51 +00:00
Ady Abraham
48f3dd6a25 Add a sysprop to control layer caching
Adding 'ro.surface_flinger.enable_layer_caching' to control
whether layer caching feature should be enabled or not.

Bug: 158790260
Change-Id: I3ceb84d2a9209b2c422ba93057e9323ca6816ca5
2021-02-18 19:22:02 +00:00
Ryan Savitski
b088e4b11e tracing: allow select tracepoints on release builds
This primarily affects perfetto's traced_probes and shell-invoked
binaries like atrace, but also anyone with access to "debugfs_tracing".

These tracepoints are being actively collected in internal tracing, so
we would like to also make them available on release builds, as they
should be a source of useful system information there as well.

The ones we definitely need:
* sched_waking, sched_wakeup_new: both are similar to the
  already-allowed sched_wakeup. The first differs in which exact process
  context it occurs in, and the latter is the wakeup events of only the
  fresh tasks.
* oom/mark_victim: contains only the pid of the victim. Useful for
  memory-related tracing and analysis.

The other events in this patch are of lesser importance, but also are
fairly straightforward - clocks and priority for frequency/power tracing.

Small extra change: sched_process_free was only relabeled in the tracefs
block, so I've added it to debugfs to keep them in sync. (I wonder whether
debugfs is even necessary at this point... but that's outside of scope
here.)

See the attached bug for a longer explanation. There will also be a
separate patch for system/frameworks/native/atrace/atrace.rc for the
Unix file permissions of these files.

Bug: 179788446
Tested: I did not have access to a "user" build, but I've manually
        checked the labels of events/.../enable tracefs files via ls -Z,
        and strace'd traced_probes on a hacky debug build where I
        commented out its SELinux allow-rule for debugfs_tracing_debug.
Change-Id: I15a9cb33950718757e3ecbd7c71de23b25f85f1d
2021-02-18 16:13:03 +00:00
Yi Kong
e9d2671e10 Allow profcollect to create/rmdir in its own data dir
Test: boot
Bug: 79161490
Change-Id: Iee0ecd4193bddbbefc7b80ef2ef5f37266995283
2021-02-18 17:20:21 +08:00
Josh Gao
b4a8306599 Merge "Let apps read tombstones given to them." 2021-02-18 08:40:57 +00:00
Tianjie Xu
4bda81af5d Merge "Give ota.other.vbmeta_digest the proper context" 2021-02-18 04:10:37 +00:00
Tianjie
63fd05d579 Give ota.other.vbmeta_digest the proper context
Give it the u:object_r:ota_prop:s0 since the prop is only set
after an update.

Bug: 177625570
Test: boot the device, check the prop is written by update_engine
Change-Id: I4cf21d2a6af2a2083d4a5eba7751011cc6d0c522
2021-02-17 16:33:52 -08:00
Pavel Grafov
06f5894936 Merge "Allow wificond access wifi keys in KeyStore2" 2021-02-17 21:53:41 +00:00
Treehugger Robot
ad580990c4 Merge "Add sepolicy swcodec native flag namespace." 2021-02-17 21:30:16 +00:00
Weilun Du
e2a8a145ec Revert^2 "Add qemu.hw.mainkeys to system property_contexts"
509b35e5d9

Bug: 180412668
Merged-In: I4067bba36613fa41e3c7a085da76cda4784753ad
Change-Id: I4067bba36613fa41e3c7a085da76cda4784753ad
2021-02-17 18:29:59 +00:00
Hasini Gunasinghe
685ca0c888 Keystore 2.0: Add permissions and policy for user manager AIDL.
Bug: 176123105
Test: User can set a password and unlock the phone.
Change-Id: I96c033328eb360413e82e82c0c69210dea2ddac9
2021-02-17 08:55:31 -08:00
Treehugger Robot
bdfc2c96ce Merge "Add /data/misc/a11ytrace folder to store accessibility trace files." 2021-02-17 13:02:34 +00:00
Treehugger Robot
e91790707a Merge "Check vendor_property_contexts namespaces" 2021-02-17 07:12:30 +00:00
Inseob Kim
2bcc045724 Check vendor_property_contexts namespaces
For devices launching with Android Q or later, vendor_property_contexts
and odm_property_contexts should only contain vendor and odm properties.
This checks property_contexts files in build time.

To temporarily disable this check, users can set
BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE := true in BoardConfig.mk. But
VTS is still enforced, so users will have to fix the violations anyway.

Bug: 175526482
Test: m vendor_property_contexts after making violations
Change-Id: I99d6fff9033d78e1d276eed2682a2719dab84ae2
2021-02-17 12:41:38 +09:00
Treehugger Robot
9c26e0265d Merge "Add CEC HAL 1.1" 2021-02-17 00:17:54 +00:00
Treehugger Robot
5ace493461 Merge "Adding SEPolicy for IRemotelyProvisionedComponent" 2021-02-16 23:48:44 +00:00
Treehugger Robot
01a9e4de24 Merge "Allow third-party apps to access tuner hal fd" 2021-02-16 22:25:18 +00:00
Elliott Hughes
adaf4fe7a9 Merge "init/ueventd and system_server no longer need access to /dev/hw_random." 2021-02-16 20:08:39 +00:00
Amy Zhang
db13ae741e Allow third-party apps to access tuner hal fd
The fd shared here is the fast message queue descriptor of the Tuner
Filter MQ or DVR MQ, sent from the Tuner HAL HIDL interface to Tuner Service.

Tuner service would convert the hidl mq descriptor into an aidl one then
passed to the Tuner JNI. Tuner JNI would read/write data into fmq
through the shared fd when the third-party app calls corresponding APIs.
The fd won't be exposed through SDK APIs.

The same fd won't be shared among apps. Each app only has access to
their own Tuner java instance through Tuner SDK, and read/write their
own Filter/Dvr.

Test: atest TunerDvrTest#testDvrPlayback
Bug: 159067322
Bug: 174500129
Bug: 171378420
Bug: 158868205
Change-Id: I34c113a092673f8ea9bcb7428b5562101c4d35ec
2021-02-16 11:17:49 -08:00
Ram Muthiah
523a649401 Merge "Revert "Add qemu.hw.mainkeys to system property_contexts"" 2021-02-16 19:05:10 +00:00
Ram Muthiah
509b35e5d9 Revert "Add qemu.hw.mainkeys to system property_contexts"
Revert submission 1582845-qemu-prop

Reason for revert: aosp_hawk-userdebug is broken on an RVC branch
Reverted Changes:
Idfc2bffa5:Add qemu.hw.mainkeys to system property_contexts
If013ff33f:Remove qemu.hw.mainkeys from vendor_qemu_prop
Bug: 180412668
Change-Id: I335afb931eaeb019f66e3feedea80b0c8888f7a3
2021-02-16 18:58:10 +00:00
Hongming Jin
58f83415ea Add /data/misc/a11ytrace folder to store accessibility trace files.
Bug: 157601519
Test: adb shell cmd accessibility start-trace
      adb shell cmd accessibility stop-trace
Change-Id: Id4224cee800fe3e10f33794c96048366a0bf09bb
2021-02-16 09:35:09 -08:00
Nick Chalko
81a4dd40d6 Add sepolicy swcodec native flag namespace.
Test: add sepolicy, build, check GetServerConfigurableFlag function
Bug: 179286276
Change-Id: Ia16d110900251b3fb3e3959d73524c8814199270
2021-02-16 09:22:16 -08:00
Weilun Du
23bb01756e Merge "Add qemu.hw.mainkeys to system property_contexts" 2021-02-16 16:44:00 +00:00
Max Bires
d2a9e6e630 Adding SEPolicy for IRemotelyProvisionedComponent
This SEPolicy change allows the hal_keymint domain to add
hal_remotelyprovisionedcomponent_service to hwservice_manager.

Test: The Keymint HAL can successfully start an instance of
IRemotelyProvisionedComponent

Change-Id: I15f34daf319e8de5b656bfacb8d050950bf8f250
2021-02-15 20:48:45 -08:00
Gavin Corkery
cd3bb575ab Add sepolicy for scheduling module data directories
Test: Manually test writing and reading files
Bug: 161353402
Change-Id: Ifbc0e4db0ec51f6565a0f52df06b1d148577b788
2021-02-15 22:31:27 +00:00
Maciej Żenczykowski
c281113ea8 Merge "apply 'fs_bpf_tethering' label to /sys/fs/bpf/tethering" 2021-02-15 12:21:54 +00:00
Galia Peycheva
7959b6eb1b Merge "Add blur sysprop to sepolicy" 2021-02-15 12:20:29 +00:00
Marvin Ramin
90c2c856ae Add CEC HAL 1.1
Update contexts to include CEC HAL v1.1

Bug: 169121290
Test: make
Change-Id: Ia28afad7d9963886b0d4286436e2024cdd93c8d4
2021-02-15 09:36:55 +01:00