Commit graph

6552 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
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
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
5ace493461 Merge "Adding SEPolicy for IRemotelyProvisionedComponent" 2021-02-16 23:48:44 +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
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
Treehugger Robot
cbf08f8cc7 Merge changes from topic "uid_pid with recovery mode"
* changes:
  sepolicy: grant system_server process group creation rights
  sepolicy: rules for uid/pid cgroups v2 hierarchy
2021-02-13 21:32:31 +00:00
Marco Ballesio
98a5e60592 sepolicy: grant system_server process group creation rights
system_server must be allowed to create process groups in behalf of
processes spawned by the app zygote

Bug: 62435375
Bug: 168907513
Test: verified that webview processes are migrated in their own process
group

Change-Id: Icd9cd53b759a79fe4dc46f7ffabc0cf248e6e4b8
2021-02-12 15:16:18 -08:00
Elliott Hughes
5aaf7f3461 init/ueventd and system_server no longer need access to /dev/hw_random.
We let the kernel worry about that now.

Bug: http://b/179086242
Test: treehugger
Change-Id: I51bdfaf7488717cc4e4c642261e31d1801cfba68
2021-02-12 09:33:22 -08:00
Mohammad Islam
1a2a3bd369 Merge "Allow apexd to relabel files in /data/apex/decompressed" 2021-02-12 10:16:55 +00:00
Treehugger Robot
98e48ac6b4 Merge "The SE Policies to incorporate ISecureClock and ISharedSecret services along with IKeyMintDevice service into default keymint HAL Server. Test: Rebuild, execute and run atest VtsAidlSharedSecretTargetTest and atest VtsAidlSecureClockTargetTest. Bug: b/171844725, b/168673523." 2021-02-12 02:42:35 +00:00
Shubang Lu
a19f9d2455 Merge "Add SE policy for media_metrics" 2021-02-12 02:00:32 +00:00
Maciej Żenczykowski
d68cb48e90 apply 'fs_bpf_tethering' label to /sys/fs/bpf/tethering
We want to label /sys/fs/bpf/tethering/... with a new label distinct
from /sys/fs/bpf, as this will allow locking down the programs/maps
tighter then is currently possible with the existing system.

These programs and maps are provided via the tethering mainline module,
and as such their number, names, key/value types, etc. are all prone to
be changed by a tethering mainline module update.

Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifc4108d76a1106a936b941a3dda1abc5a65c05b0
2021-02-11 17:45:06 -08:00
Treehugger Robot
83d6f96fdc Merge "Allow dumpsys meminfo to print out DMA-BUF statistics" 2021-02-11 23:48:04 +00:00