Commit graph

5318 commits

Author SHA1 Message Date
Treehugger Robot
4696e7435a Merge "perfetto: allow producers to supply shared memory" am: 429ce33777 am: 63b0c52392 am: cb085e398f
Change-Id: I1444fccc8bd6ebefc166f05715694de9d9ef47a2
2020-02-17 10:11:53 +00:00
Songchun Fan
a2e1abde38 Merge changes Ie973be6b,Ie090e085 am: ff40f150e8 am: a403503c57 am: 23cb5adc6e
Change-Id: I26fae9ed6a962bf55077b17e3dbdcd692f525eaf
2020-02-17 10:11:43 +00:00
George Chang
f2e6ab34c5 Merge "Add sepolicy for persist.nfc_cfg." am: 9cc657e43e am: 4fc2a2396a am: 989fcaae3c
Change-Id: Ia8fc2e68189a35df1689a268d3c8dede5e9a219d
2020-02-17 10:11:22 +00:00
Treehugger Robot
ba73230e6d Merge "access_vectors: add lockdown class" am: 98d0a95753 am: 9c6a92e0e7 am: 86a25241c5
Change-Id: I42ce31fa5d58cb3e59785f157949fcc9b1b95603
2020-02-17 10:11:12 +00:00
David Stevens
f746f9c25f Merge commit 'f3187f394915eac633f6803ac0ed34a4455d3a17' into manual_merge_f3187f394915eac633f6803ac0ed34a4455d3a17
Bug: None
Test: blueline boots and property is build time configurable

Change-Id: Ie7a0f25f7e40a8aaa446033702c5fc0f32f438e0
2020-02-17 04:28:59 +00:00
Treehugger Robot
57ba84c959 Merge "snapshotctl: allow to write stats" 2020-02-16 14:14:51 +00:00
Mark Salyzyn
79f9ca6789 bootstat: enhance last reboot reason property with file backing
Helps with support of recovery and rollback boot reason history, by
also using /metadata/bootstat/persist.sys.boot.reason to file the
reboot reason.  For now, label this file metadata_bootstat_file.

Test: manual
Bug: 129007837
Change-Id: Id1d21c404067414847bef14a0c43f70cafe1a3e2
2020-02-14 13:30:21 -08:00
Maciej Żenczykowski
1d896ff5e5 Merge "grant bpfloader CAP_CHOWN" 2020-02-14 21:19:16 +00:00
Alessio Balsini
59cfa127e2 snapshotctl: allow to write stats
To send statistics about snapshot merge times, snapshotctl will take
care of packing and sending all the information.
Allow snapshotctl to do so by creating an sepolicy exception.

Bug: 138817833
Test: statsd_testdrive
Change-Id: If805a522898cb6c9838779be23df6078f77d0cdc
Signed-off-by: Alessio Balsini <balsini@google.com>
2020-02-14 20:51:53 +00:00
Treehugger Robot
429ce33777 Merge "perfetto: allow producers to supply shared memory" 2020-02-14 19:59:49 +00:00
Songchun Fan
ff40f150e8 Merge changes Ie973be6b,Ie090e085
* changes:
  permissions for incremental control file
  new label for incremental control files
2020-02-14 18:00:02 +00:00
George Chang
9cc657e43e Merge "Add sepolicy for persist.nfc_cfg." 2020-02-14 11:37:33 +00:00
Treehugger Robot
98d0a95753 Merge "access_vectors: add lockdown class" 2020-02-14 10:18:17 +00:00
stevensd
e3e16a313b Merge "selinux policy for buffer queue config" 2020-02-14 02:54:20 +00:00
Etan Cohen
8bd638eae4 Merge "[WIFICOND] Rename service to nl80211" 2020-02-13 22:34:09 +00:00
Songchun Fan
051549cc83 remove incfs genfscon label am: d9b78b4c84 am: b55fd10e0b am: 6262f99b5a
Change-Id: If020e8520a27c473551bd1d92529d9e4cee44830
2020-02-13 21:16:04 +00:00
Nick Kralevich
e4686b4d8e access_vectors: add lockdown class
Needed to support upstream patch
59438b4647

Bug: 148822198
Test: compiles
Change-Id: I304c1a97c12067dd08d4ceef93702101908012ed
2020-02-13 13:05:54 -08:00
Songchun Fan
3922253de9 permissions for incremental control file
=== for mounting and create file ===

02-12 21:09:41.828   593   593 I Binder:593_2: type=1400 audit(0.0:832): avc: denied { relabelto } for name=".pending_reads" dev="incremental-fs" ino=2 scontext=u:r:vold:s0 tcontext=u:object_r:incremental_control_file:s0 tclass=file permissive=1
02-12 21:09:41.838   593   593 I Binder:593_2: type=1400 audit(0.0:833): avc: denied { read } for name=".pending_reads" dev="incremental-fs" ino=2 scontext=u:r:vold:s0 tcontext=u:object_r:incremental_control_file:s0 tclass=file permissive=1
02-12 21:09:41.838   593   593 I Binder:593_2: type=1400 audit(0.0:834): avc: denied { open } for path="/data/incremental/MT_data_incremental_tmp_1485189518/mount/.pending_reads" dev="incremental-fs" ino=2 scontext=u:r:vold:s0 tcontext=u:object_r:incremental_control_file:s0 tclass=file permissive=1
02-12 21:09:41.838   593   593 I Binder:593_2: type=1400 audit(0.0:835): avc: denied { getattr } for path=2F646174612F696E6372656D656E74616C2F4D545F646174615F696E6372656D656E74616C5F746D705F313438353138393531382F6D6F756E742F2E70656E64696E675F7265616473202864656C6574656429 dev="incremental-fs" ino=2 scontext=u:r:vold:s0 tcontext=u:object_r:incremental_control_file:s0 tclass=file permissive=1
02-12 21:09:41.838   593   593 I Binder:593_2: type=1400 audit(0.0:836): avc: denied { read } for path=2F646174612F696E6372656D656E74616C2F4D545F646174615F696E6372656D656E74616C5F746D705F313438353138393531382F6D6F756E742F2E70656E64696E675F7265616473202864656C6574656429 dev="incremental-fs" ino=2 scontext=u:r:system_server:s0 tcontext=u:object_r:incremental_control_file:s0 tclass=file permissive=1
02-12 21:09:41.841  1429  1429 I PackageInstalle: type=1400 audit(0.0:837): avc: denied { ioctl } for path=2F646174612F696E6372656D656E74616C2F4D545F646174615F696E6372656D656E74616C5F746D705F313438353138393531382F6D6F756E742F2E70656E64696E675F7265616473202864656C6574656429 dev="incremental-fs" ino=2 ioctlcmd=0x671e scontext=u:r:system_server:s0 tcontext=u:object_r:incremental_control_file:s0 tclass=file permissive=1

=== for reading signature from file ===
02-12 21:09:47.931  8972  8972 I android.vending: type=1400 audit(0.0:848): avc: denied { ioctl } for path="/data/app/vmdl951541350.tmp/base.apk" dev="incremental-fs" ino=6416 ioctlcmd=0x671f scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=1 app=com.android.vending
02-12 21:09:47.994  1429  1429 I AppIntegrityMan: type=1400 audit(0.0:849): avc: denied { ioctl } for path="/data/app/vmdl951541350.tmp/base.apk" dev="incremental-fs" ino=6416 ioctlcmd=0x671f scontext=u:r:system_server:s0 tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=1
02-12 21:09:50.034  8972  8972 I com.android.vending: type=1400 audit(0.0:850): avc: denied { ioctl } for comm=62674578656375746F72202332 path="/data/app/vmdl951541350.tmp/base.apk" dev="incremental-fs" ino=6416 ioctlcmd=0x671f scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=1 app=com.android.vending
02-12 21:09:52.914  1429  1429 I PackageManager: type=1400 audit(0.0:851): avc: denied { ioctl } for path=2F646174612F696E6372656D656E74616C2F4D545F646174615F696E6372656D656E74616C5F746D705F313438353138393531382F6D6F756E742F2E70656E64696E675F7265616473202864656C6574656429 dev="incremental-fs" ino=2 ioctlcmd=0x671e scontext=u:r:system_server:s0 tcontext=u:object_r:incremental_control_file:s0 tclass=file permissive=1

=== data loader app reading from log file ===
02-12 22:09:19.741  1417  1417 I Binder:1417_3: type=1400 audit(0.0:654): avc: denied { read } for path=2F646174612F696E6372656D656E74616C2F4D545F646174615F696E6372656D656E74616C5F746D705F3131393237303339342F6D6F756E742F2E70656E64696E675F7265616473202864656C6574656429 dev="incremental-fs" ino=2 scontext=u:r:system_app:s0 tcontext=u:object_r:incremental_control_file:s0 tclass=file permissive=1
02-12 22:09:19.741 15903 15903 I Binder:15903_4: type=1400 audit(0.0:655): avc: denied { getattr } for path=2F646174612F696E6372656D656E74616C2F4D545F646174615F696E6372656D656E74616C5F746D705F3131393237303339342F6D6F756E742F2E70656E64696E675F7265616473202864656C6574656429 dev="incremental-fs" ino=2 scontext=u:r:system_app:s0 tcontext=u:object_r:incremental_control_file:s0 tclass=file permissive=1

Test: manual with incremental installation
BUG: 133435829
Change-Id: Ie973be6bc63faf8fe98c9e684060e9c81d124e6e
2020-02-13 12:53:36 -08:00
Songchun Fan
b1512f3ab7 new label for incremental control files
Test: manual with incremental installation
Test: coral:/data/incremental/MT_data_incremental_tmp_1658593565/mount # ls -lZ .pending_reads
Test: -rw-rw-rw- 1 root root u:object_r:incremental_control_file:s0  0 1969-12-31 19:00 .pending_reads
BUG: 133435829
Change-Id: Ie090e085d94c5121bf61237974effecef2dcb180
2020-02-13 12:52:51 -08:00
Maciej Żenczykowski
1189fac418 grant bpfloader CAP_CHOWN
so that it can change the uid/gid of pinned bpf progs and maps

Test: build, atest
Bug: 149434314
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1d873c7799e1d9fa5d4bde145e89254dabb75a01
2020-02-13 20:46:02 +00:00
Songchun Fan
d9b78b4c84 remove incfs genfscon label
Test: manual with incremental installation
BUG: 133435829
Change-Id: I8b38db18851a5b3baf925be621de3eb0e83efbb4
2020-02-13 08:44:48 -08:00
David Stevens
3942fe1682 selinux policy for buffer queue config
Test: boot and check for no policy violations

Change-Id: I1ea2a79b9a45b503dcb061c196c5af1d0ddab653
2020-02-13 20:11:47 +09:00
Etan Cohen
fde1dadc71 [WIFICOND] Rename service to nl80211
Per API council feedback.

Bug: 149105833
Bug: 148680192
Test: atest android.net.wifi
Test: atest com.android.server.wifi
Test: manual - flash/boot - verify Wi-Fi scan/associate
Change-Id: Idaf7603d4ab79ddde5c223097ed9fe8734299eea
2020-02-12 11:26:59 -08:00
George Chang
db1dbd94a1 Add sepolicy for persist.nfc_cfg.
Add a new nfc_cfg persist property for nfc features

Bug: 142626304
Test: set property and load target files.
Change-Id: I853c97e8113dbcf729cf59ad45895402b0c82b3e
2020-02-12 16:20:52 +00:00
Automerger Merge Worker
75b244da1f Merge "Use setxattr for incremental-fs" am: 2ddfad3709 am: 3b77d78709 am: 1ae4188d63
Change-Id: I7e53e9b1d146f89c370af2ccf0f39626956b721d
2020-02-12 00:53:26 +00:00
Songchun Fan
2ddfad3709 Merge "Use setxattr for incremental-fs" 2020-02-11 23:56:51 +00:00
Songchun Fan
ecafc55b70 Use setxattr for incremental-fs
BUG: b/133435829
Test: manual
Change-Id: I782f2041da5824fe28917789208e00d6ed10de79
2020-02-11 14:33:08 -08:00
Automerger Merge Worker
924f09c6f1 Merge "selinux rules for apk files installed with Incremental" am: fcbfe3155f am: a0c022882c am: acab3cff75
Change-Id: If8d0b2c9955fba6caa5587a063a521399905ca70
2020-02-11 22:14:22 +00:00
Songchun Fan
fcbfe3155f Merge "selinux rules for apk files installed with Incremental" 2020-02-11 21:24:04 +00:00
Ken Chen
64f0be204b Define sepolicy for redirect-socket-calls feature
Define two property_context.

1. vendor_socket_hook_prop - for ro.vendor.redirect_socket_calls. The
property set once in vendor_init context. It's evaluated at process
start time and is cannot change at runtime on a given device. The set
permission is restricted to vendor_init. The read permission is
unrestricted.

2. socket_hook_prop - for net.redirect_socket_calls.hooked. The
property can be changed by System Server at runtime. It's evaluated when
shimmed socket functions is called. The set permission is restricted to
System Server. The read permission is unrestricted.

Bug: Bug: 141611769
Test: System Server can set net.redirect_socket_calls.hooked
      libnetd_client can read both properties
      libnetd_client can't set both properties

Change-Id: Ic42269539923e6930cc0ee3df8ba032797212395
2020-02-11 20:55:02 +08:00
Automerger Merge Worker
0b18794a23 Merge "sepolicy: new prereboot_data_file type" am: e8b7cecad3 am: b98676bc7a am: 4cfad4bd0c
Change-Id: I730e1d0c934f5588c9dc3e6f6de98ee6eaae7aab
2020-02-11 03:27:40 +00:00
Jerry Chang
e8b7cecad3 Merge "sepolicy: new prereboot_data_file type" 2020-02-11 02:49:29 +00:00
Automerger Merge Worker
51febc5e3a Merge "Update sepolicy to allow pushing atoms from surfaceflinger to statsd" am: c95ae9044d am: 0d8788688f am: 48ad52b24b
Change-Id: I6c843f4fb34835767d4d0f77b47613612ab003ba
2020-02-11 01:42:54 +00:00
Alec Mouri
c95ae9044d Merge "Update sepolicy to allow pushing atoms from surfaceflinger to statsd" 2020-02-11 01:01:20 +00:00
Automerger Merge Worker
ab4fea6bc3 Merge "Revert "Add sepolicy for persist.nfc"" am: a85454834d am: 456f93e9f3 am: a0eacce8e5
Change-Id: I3ac4a1e86c1b6ce4c624b4386e9a857f3b1b3cf6
2020-02-11 00:28:00 +00:00
Jon Spivack
a85454834d Merge "Revert "Add sepolicy for persist.nfc"" 2020-02-10 23:42:41 +00:00
Jon Spivack
c7bc7ee309 Revert "Add sepolicy for persist.nfc"
This reverts commit 34240604aa.

Reason for revert: Droidcop: Potential culprit for Bug149218822- verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: Iaba9f6e9125ac456a5787b1fcbb67d68c91c5f42
2020-02-10 19:08:31 +00:00
Automerger Merge Worker
8980ab9b51 Merge "Add userspace_reboot_log_prop" am: 4119b07d1b am: 250f731efd am: f0531762ca
Change-Id: I83b726332f54feaae999e3e7d597f5792a45faad
2020-02-10 17:58:39 +00:00
Alec Mouri
b254ff2d5b Update sepolicy to allow pushing atoms from surfaceflinger to statsd
Bug: 148543048
Test: builds
Test: statsd_testdrive
Change-Id: I8ea6659d575fa2e7e5961dc1fea3219c238c9e41
2020-02-10 09:50:53 -08:00
Nikita Ioffe
4119b07d1b Merge "Add userspace_reboot_log_prop" 2020-02-10 17:22:03 +00:00
Automerger Merge Worker
e9ff44cc60 Merge "Add sepolicy for persist.nfc" am: 036eb2518d am: 49e3bbdb1d am: 0635260a99
Change-Id: Ifacb3d44820ec959509067c6a46a19a1076c9db7
2020-02-10 11:58:33 +00:00
Treehugger Robot
036eb2518d Merge "Add sepolicy for persist.nfc" 2020-02-10 11:15:36 +00:00
Automerger Merge Worker
d951bab082 Merge "selinux rules for loading incremental module" am: 3cf7d1b5ee am: 8c020eec71 am: 0c789cc584
Change-Id: Ifdd7e864f7d9fee65aac576272a1fedb8ee88e71
2020-02-07 20:14:44 +00:00
Songchun Fan
3cf7d1b5ee Merge "selinux rules for loading incremental module" 2020-02-07 19:33:08 +00:00
Automerger Merge Worker
a9b46a9d89 Merge "GpuService binder call StatsManagerService" am: 53114d6184 am: 6820031087 am: a2227cc786
Change-Id: I3af3764caf95b9764e6d96f641e41cc23f5a4501
2020-02-07 18:55:27 +00:00
Jeffrey Huang
53114d6184 Merge "GpuService binder call StatsManagerService" 2020-02-07 18:03:26 +00:00
Jeffrey Huang
aac4b2f8c0 Merge "Allow system server to add StatsHal" 2020-02-07 18:03:04 +00:00
Songchun Fan
99d9374760 selinux rules for loading incremental module
Defining incremental file system driver module, allowing vold to load
and read it.

=== Denial messages ===
02-04 16:48:29.193   595   595 I Binder:595_4: type=1400 audit(0.0:507): avc: denied { read } for name="incrementalfs.ko" dev="dm-2" ino=1684 scontext=u:r:vold:s0 tcontext=u:object_r:vendor_incremental_module:s0 tclass=file permissive=1
02-04 16:48:29.193   595   595 I Binder:595_4: type=1400 audit(0.0:508): avc: denied { open } for path="/vendor/lib/modules/incrementalfs.ko" dev="dm-2" ino=1684 scontext=u:r:vold:s0 tcontext=u:object_r:vendor_incremental_module:s0 tclass=file permissive=1
02-04 16:48:29.193   595   595 I Binder:595_4: type=1400 audit(0.0:509): avc: denied { sys_module } for capability=16 scontext=u:r:vold:s0 tcontext=u:r:vold:s0 tclass=capability permissive=1
02-04 16:48:29.193   595   595 I Binder:595_4: type=1400 audit(0.0:510): avc: denied { module_load } for path="/vendor/lib/modules/incrementalfs.ko" dev="dm-2" ino=1684 scontext=u:r:vold:s0 tcontext=u:object_r:vendor_incremental_module:s0 tclass=system permissive=1

Test: manual
BUG: 147371381
Change-Id: I5bf4e28c28736b4332e7a81c344ce97ac7278ffb
2020-02-07 09:52:34 -08:00
Songchun Fan
020e3ab035 selinux rules for apk files installed with Incremental
Apk files installed with Incremental are actually stored under the
/data/incremental directory.

Since files under /data/incremental are labeled as apk_file_data, we
need additional permissions to enable an apk installation.

Denial messages:

=== vold ===
02-04 14:22:45.756   599   599 I Binder:599_3: type=1400 audit(0.0:607): avc: denied { read } for name="mount" dev="dm-5" ino=894 scontext=u:r:vold:s0 tcontext=u:object_r:apk_data_file:s0 tclass=dir permissive=1
02-04 14:22:45.756   599   599 I Binder:599_3: type=1400 audit(0.0:608): avc: denied { open } for path="/data/incremental/data_incremental_tmp_792314038/mount" dev="dm-5" ino=894 scontext=u:r:vold:s0 tcontext=u:object_r:apk_data_file:s0 tclass=dir permissive=1
02-04 14:22:45.760   599   599 I Binder:599_3: type=1400 audit(0.0:609): avc: denied { mounton } for path="/data/incremental/data_incremental_tmp_792314038/mount" dev="dm-5" ino=894 scontext=u:r:vold:s0 tcontext=u:object_r:apk_data_file:s0 tclass=dir permissive=1
02-04 14:22:45.766  1431  1431 I PackageInstalle: type=1400 audit(0.0:620): avc: denied { read write open } for path="/data/incremental/data_incremental_tmp_792314038/backing_store/.index/f5c14952f6dde3b4a77a94e45388c012" dev="dm-5" ino=897 scontext=u:r:vold:s0
02-04 14:22:45.923  1431  1431 I PackageManager: type=1400 audit(0.0:637): avc: denied { write } for path="/data/incremental/data_incremental_tmp_792314038/backing_store/st_5_0" dev="dm-5" ino=896 scontext=u:r:vold:s0 tcontext=u:object_r:apk_data_file:s0 tclass=dir permissive=1
02-04 14:22:47.326  8839  8839 I android.vending: type=1400 audit(0.0:658): avc: denied { read write open } for path="/data/incremental/data_incremental_tmp_792314038/backing_store/st_6_1/flipboard.app-KPIT2MBSpQYWG-USITOftw==/base.apk" dev="dm-5" ino=899 scontext=u:r:vold:s0 tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=1 app=com.android.vending
02-04 14:22:45.780   599   599 I Binder:599_3: type=1400 audit(0.0:623): avc: denied { getattr } for path="/data/app/vmdl1155417082.tmp" dev="dm-5" ino=888 scontext=u:r:vold:s0 tcontext=u:object_r:apk_tmp_file:s0 tclass=dir permissive=1
02-04 14:22:45.780   599   599 I Binder:599_3: type=1400 audit(0.0:624): avc: denied { read } for name="vmdl1155417082.tmp" dev="dm-5" ino=888 scontext=u:r:vold:s0 tcontext=u:object_r:apk_tmp_file:s0 tclass=dir permissive=1
02-04 14:22:45.780   599   599 I Binder:599_3: type=1400 audit(0.0:625): avc: denied { open } for path="/data/app/vmdl1155417082.tmp" dev="dm-5" ino=888 scontext=u:r:vold:s0 tcontext=u:object_r:apk_tmp_file:s0 tclass=dir permissive=1
02-04 14:22:45.780   599   599 I Binder:599_3: type=1400 audit(0.0:627): avc: denied { mounton } for path="/data/app/vmdl1155417082.tmp" dev="dm-5" ino=888 scontext=u:r:vold:s0 tcontext=u:object_r:apk_tmp_file:s0 tclass=dir permissive=1

02-04 15:32:02.386   591   591 I Binder:591_4: type=1400 audit(0.0:537): avc: denied { search } for name="incremental" dev="dm-5" ino=120 scontext=u:r:vold:s0 tcontext=u:object_r:apk_data_file:s0 tclass=dir permissive=1

=== system_app ===
02-04 14:22:45.793  5064  5064 I Binder:5064_1: type=1400 audit(0.0:633): avc: denied { write } for path="/data/incremental/data_incremental_tmp_792314038/backing_store/st_5_0/base.apk" dev="dm-5" ino=899 scontext=u:r:system_app:s0 tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=1

Test: manual
BUG: 133435829
Change-Id: I70f25a6e63dd2be87ccbe9fb9e9d50fa64d88c36
2020-02-07 16:34:42 +00:00
Jerry Chang
5594f307c8 sepolicy: new prereboot_data_file type
This adds the type and permissions for dumping and appending prereboot
information.

Bug: 145203410
Test: Didn't see denials while dumping and appending prereboot info.
Change-Id: Ic08408b9bebc3648a7668ed8475f96a5302635fa
2020-02-07 10:22:47 +08:00
Nikita Ioffe
44f5ffca15 Add userspace_reboot_log_prop
This properties are used to compute UserspaceRebootAtom and are going to
be written by system_server. Also removed now unused
userspace_reboot_prop.

Test: builds
Bug: 148767783
Change-Id: Iee44b4ca9f5d3913ac71b2ac6959c232f060f0ed
2020-02-07 01:57:55 +00:00
Jeffrey Huang
041d4de616 Merge "Allow system server to add StatsHal" 2020-02-06 23:36:22 +00:00
Jeffrey Huang
b481e320a1 GpuService binder call StatsManagerService
This binder call is needed because we want to migrate
libstatspull to use StatsManagerService instead of Statsd

The binder call to statsd can be removed after the migration.

Test: m -j
Bug: 148641240
Change-Id: Id1387a2cbe74ba8d84f4973c6e4d17c5e0b88009
2020-02-06 11:54:33 -08:00
Automerger Merge Worker
4b669dd17a Merge "Make platform_compat discoverable everywhere" am: c79be18ddd am: 20d98449ac am: bcd4ef9fcf
Change-Id: I69e75e90af15b496a8cb29e00ad4cfd8ebbb5c4f
2020-02-06 14:18:16 +00:00
Andrei-Valentin Onea
c79be18ddd Merge "Make platform_compat discoverable everywhere" 2020-02-06 13:40:34 +00:00
Automerger Merge Worker
2c6ac32b05 Merge "net_dns_prop: neverallow most access" am: 9788ca1738 am: 0bbe440a69 am: 45b34f9bc3
Change-Id: Ic3de14b1fb43a0dd3bb07ffdd18a7d5bdf88b459
2020-02-06 13:06:34 +00:00
Jeffrey Vander Stoep
9788ca1738 Merge "net_dns_prop: neverallow most access" 2020-02-06 12:16:22 +00:00
Andrei Onea
25b39acefe Make platform_compat discoverable everywhere
The binder's methods are protected by signature
permissions (LOG_COMPAT_CHANGE, READ_COMPAT_CHANGE_CONFIG and
OVERRIDE_COMPAT_CHANGE_CONFIG).

This is a re-landing of https://r.android.com/1210143, which was
reverted due to http://b/142942524. The actual fix was done in
http://ag/10234812.

Bug: 142650523
Test: atest PlatformCompatGatingTest
Change-Id: Ibddac8933ea58d44457a5d80b540347e796ebe71
2020-02-06 12:11:37 +00:00
Automerger Merge Worker
17fb4281f2 Merge "sepolicy: Relabel wifi. properties as wifi_prop" am: 15d70fec33 am: 557f360d29 am: 63b4bf379b
Change-Id: Iae2bd1e7e565628c45824d7587941bb9f4189496
2020-02-06 03:30:03 +00:00
Automerger Merge Worker
8c414dafa2 Merge "adbd should be able to shutdown shell:unix_stream_socket" am: ca3d3dfa70 am: 49f6767ac7 am: 2e4330a595
Change-Id: I3798b80045dfa3688728a85d7626c5dc122d3039
2020-02-06 02:55:07 +00:00
Treehugger Robot
15d70fec33 Merge "sepolicy: Relabel wifi. properties as wifi_prop" 2020-02-06 02:53:51 +00:00
Automerger Merge Worker
7edd7b8efe Merge "Surfaceflinger binder call StatsManagerService" am: f8ddb83890 am: 8312d3a4f3 am: cb0fba75e2
Change-Id: I01a164e0ba0dfe3dfd1549fa7194a50131db71c9
2020-02-06 02:31:03 +00:00
Treehugger Robot
ca3d3dfa70 Merge "adbd should be able to shutdown shell:unix_stream_socket" 2020-02-06 02:17:31 +00:00
Howard Ro
f8ddb83890 Merge "Surfaceflinger binder call StatsManagerService" 2020-02-06 01:52:40 +00:00
Jeffrey Huang
dd1ce53b27 Allow system server to add StatsHal
Bug: 148794952
Test: m -j
Change-Id: I14cc282bb262f1ec62ab3473d9229763c1a02e21
Merged-In: I14cc282bb262f1ec62ab3473d9229763c1a02e21
2020-02-05 17:24:48 -08:00
Josh Gao
b9c7001837 adbd should be able to shutdown shell:unix_stream_socket
adbd started calling shutdown and waiting for EOF before closing
sockets in commit 74b7ec72, because closing a TCP socket while you have
pending data to read is specified to send a TCP RST to the other end,
which can result in data that we've written into the socket to be
prematurely thrown away on the other end. Not being able to do so on a
Unix domain socket is benign, aside from the denial showing up in the
log.

Fixes the following selinux denial when installing a package:

  avc: denied { shutdown } for scontext=u:r:adbd:s0 tcontext=u:r:shell:s0 tclass=unix_stream_socket permissive=0

Test: manual
Change-Id: I266092a8323ac02bfe96738a8f4a8021f3a10387
2020-02-05 17:24:46 -08:00
Automerger Merge Worker
871bbfbce0 Merge "GpuStats: sepolicy change for using new statsd puller api" am: 231b89410f am: d8f11b4663 am: b03f768cd0
Change-Id: I7bf9249884d7864ec344e1b3fe0b69ea12ca0584
2020-02-05 23:48:17 +00:00
Automerger Merge Worker
e43596c420 Merge "Only write snapshotctl_log when debug" am: df701f3e45 am: e9f40bc112 am: 6882ef2e47
Change-Id: I9641405215be04f6daeddf81038a0d072aba180d
2020-02-05 23:22:50 +00:00
Jeffrey Huang
225850bd0c Surfaceflinger binder call StatsManagerService
This binder call is needed because we want to migrate
libstatspull to use StatsManagerService instead of Statsd

The binder call to statsd can be removed after the migration.

Test: m -j
Bug: 148641240
Change-Id: If6cf7eb77aa229751c44e5291d49f05177dbb8dd
2020-02-05 14:40:40 -08:00
Jeffrey Huang
4f23084a67 Allow system server to add StatsHal
Bug: 148794952
Test: m -j
Change-Id: I14cc282bb262f1ec62ab3473d9229763c1a02e21
2020-02-05 14:00:10 -08:00
Treehugger Robot
231b89410f Merge "GpuStats: sepolicy change for using new statsd puller api" 2020-02-05 21:58:42 +00:00
Yifan Hong
df701f3e45 Merge "Only write snapshotctl_log when debug" 2020-02-05 21:23:11 +00:00
Jeff Vander Stoep
5afd6d788c net_dns_prop: neverallow most access
Prepare for these properties to be completely removed.

Bug: 33308258
Test: build
Change-Id: Ie22918247db1d6e85a36e0df958916b6752629d0
2020-02-05 09:55:30 +01:00
Automerger Merge Worker
a306e61a58 Merge "Create new mediaprovider_app domain." am: 164359b952 am: c4f463d17e am: 8d8af4cb20
Change-Id: I92d3f612d7c8b7c75de6d6aebf2d54f26aa36689
2020-02-05 08:34:58 +00:00
Martijn Coenen
164359b952 Merge "Create new mediaprovider_app domain." 2020-02-05 07:58:54 +00:00
Yifan Hong
b6b35b7c46 Only write snapshotctl_log when debug
Only write snapshotctl_log_data_file for userdebug_or_eng.

Test: boot, still see log
Bug: 148818798
Change-Id: I03e979efd65e3992bd8ef30e6408768a14aa1de2
2020-02-04 17:15:06 -08:00
Yiwei Zhang
dbbe3bd7d8 GpuStats: sepolicy change for using new statsd puller api
Bug: 148421389
Test: statsd_testdrive 10054
Change-Id: Icf1a4bf809b1413c0e413290bbeadd987faff710
2020-02-04 15:55:59 -08:00
Automerger Merge Worker
db98e40689 Merge "snapshotctl better logging" am: 28d5e87d39 am: 1c26630767 am: 3a51d8330c
Change-Id: Ibed854e6236336395f562f06e67c6f20d00d412a
2020-02-04 22:46:54 +00:00
Yifan Hong
28d5e87d39 Merge "snapshotctl better logging" 2020-02-04 22:18:33 +00:00
Automerger Merge Worker
a8339939c0 Merge "Allow system_server to attach bpf programs to tracepoints" am: d90d4aa2bb am: d7ffd9d1e0 am: fe191e802c
Change-Id: I1f0bb9de8134019933733639fc06a6ec6a43cc4c
2020-02-04 21:49:05 +00:00
Connor O'Brien
d90d4aa2bb Merge "Allow system_server to attach bpf programs to tracepoints" 2020-02-04 21:11:47 +00:00
Yifan Hong
589bb6f369 snapshotctl better logging
Test: snapshotctl merge --log-to-file
Bug: 148818798
Change-Id: I0e9c8ebb6632a56670a566f7a541e52e0bd24b08
2020-02-04 10:09:24 -08:00
Automerger Merge Worker
7720b7cb7f Merge "[selinux] properly labeling dirs under /data/incremental" am: 37b87fc793 am: 01d09f9d1d am: 797924fab7
Change-Id: Ic3ebd731276afbdbbdfd20e9f76be3375fc93a6c
2020-02-04 17:53:45 +00:00
Martijn Coenen
e3f1d5a314 Create new mediaprovider_app domain.
This is a domain for the MediaProvider mainline module. The
MediaProvider process is responsible for managing external storage, and
as such should be able to have full read/write access to it. It also
hosts a FUSE filesystem that allows other apps to access said storage in
a safe way. Finally, it needs to call some ioctl's to set project quota
on the lower filesystem correctly.

Bug: 141595441
Test: builds, mediaprovider module gets the correct domain
Change-Id: I0d705148774a1bbb59c927e267a484cb5c44f548
2020-02-04 16:53:18 +01:00
Ryan Savitski
21f6ae6a8a perfetto: allow producers to supply shared memory
This concerns the data transfer between an untrusted producer process,
and the tracing service (traced daemon). They communicate over a
combination of a unix socket and shared memory.

Normally, the service creates the shared memory region, and hands it off
to the producer process (see perfetto_producer() macro). This patch
allows for an alternative scheme, where the producer process is allowed
to create the shared memory region, which will then be adopted by the
tracing service. The service already inherently doesn't trust the
producer, so it'll validate that the shared memory is appropriately
sealed before using it.

The immediate use-case is chrome's go/perfetto-startup-tracing-v2. But
this mode has advantages (e.g. being able to write to the shared memory
before connecting) for other producer domains as well.

Bug: 148841422
Change-Id: I90f864b900958792553f0208f4a0041dbf2892cc
2020-02-04 13:47:42 +00:00
Songchun Fan
f09db16c56 [selinux] properly labeling dirs under /data/incremental
Setting files and dirs under /data/incremental as apk_data_file, so that
they will have the same permissions as the ones under /data/app.

Current layout of the dirs:
1. /data/incremental/[random]/mount -> holds data files (such as base.apk) and
control files (such as .cmd). Its subdirectory is first bind-mounted to
/data/incremental/tmp/[random], eventually bind-mounted to
/data/app/~~[randomA]/[packageName]-[randomB].

2. /data/incremental/[random]/backing_mount -> hold incfs backing image.

3. /data/incremental/tmp/[random] -> holds temporary mountpoints (bind-mount targets)
during app installation.

Test: manual
Change-Id: Ia5016db2fa2c7bad1e6611d59625731795eb9efc
2020-02-03 14:28:37 -08:00
Connor O'Brien
e3f0b2ca13 Allow system_server to attach bpf programs to tracepoints
In order to track time in state data using eBPF, system_server needs
to be able to attach BPF programs to tracepoints, which involves:
- calling perf_event_open and the PERF_EVENT_IOC_SET_BPF ioctl
- running BPF programs
- reading tracepoint ids from tracefs

Grant system_server the necessary permissions for these tasks

Test: modify system_server to try to attach programs; check for
denials
Bug: 138317993
Change-Id: I07dafd325a9c57d53767a09d4ca7b0fb2dd2d328
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-01-31 19:47:24 -08:00
Automerger Merge Worker
536df1194d Merge changes I179c05b3,Ia529ede4 am: 2b44078cac am: b79b7ff9dc am: 9ef35db69c
Change-Id: Ib2e6f97672ea4bcfe5159149d9e88e57c4bbca77
2020-01-31 17:13:06 +00:00
Automerger Merge Worker
0967becec1 Merge "Add getattr access on tmpfs_zygote files for webview_zygote." am: 89946d7e1b am: 06c548de85 am: 84b0dae577
Change-Id: I3541c7231555a085470200753ad60a9a90f952e1
2020-01-31 17:12:45 +00:00
Automerger Merge Worker
17dc061cba Merge "Revert^2 "Move aidl_lazy_test_server to system_ext"" am: 499e0173b5 am: 09a23d1f6d am: f0e61489be
Change-Id: Ib1c712e1768c496fedb2bbf1982d62ae18d1eabf
2020-01-31 17:12:12 +00:00
Automerger Merge Worker
fcc1bffb23 Merge "Revert "Make platform_compat discoverable everywhere"" am: 606f3d7fcf am: 208cf1d042 am: 79615bcc08
Change-Id: Ib584e4e08e4611d4468722437d6ab30d45412dee
2020-01-31 16:47:12 +00:00
Oli Lan
2b44078cac Merge changes I179c05b3,Ia529ede4
* changes:
  Add dac_read_search to apexd to prevent spurious denials.
  Allow apexd to execute toybox for snapshot & restore.
2020-01-31 10:05:21 +00:00
Nicolas Geoffray
89946d7e1b Merge "Add getattr access on tmpfs_zygote files for webview_zygote." 2020-01-31 08:09:05 +00:00
Jon Spivack
499e0173b5 Merge "Revert^2 "Move aidl_lazy_test_server to system_ext"" 2020-01-31 00:04:08 +00:00
Andrei-Valentin Onea
606f3d7fcf Merge "Revert "Make platform_compat discoverable everywhere"" 2020-01-30 22:37:03 +00:00
Andrei-Valentin Onea
8a40e7c132 Revert "Make platform_compat discoverable everywhere"
Revert "Add new permissions to test"

Revert submission 1210143-platformcompat-permissions

Reason for revert: http://b/142942524
Reverted Changes:
I3601b12d5: Add new permissions to test
I65d425aac: Make platform_compat discoverable everywhere
I1c8cbb656: Add permissions for using PlatformCompat methods

Change-Id: I356c1d1c4d1213eea6e5585b23faa40722b1a01a
2020-01-30 21:38:35 +00:00
Nicolas Geoffray
80aaf85eed Add getattr access on tmpfs_zygote files for webview_zygote.
webview_zygote inherits tmpfs files from zygote and needs to stat
them after fork.

Bug: 138851227
Test: run walleye_jitzygote config, fork webview_zygote.
Change-Id: I092b942c0426f3f5731536ae9f2f5886a9196d3d
2020-01-30 21:29:19 +00:00
Oli Lan
7e346c98fc Add dac_read_search to apexd to prevent spurious denials.
As apexd now has dac_override, it should also have dac_read_search to
avoid spurious denials.

Bug: 141148175
Test: Build, run apex installation, check denials.
Change-Id: I179c05b36ae0fe62d943ca59ee7f8158507f1f10
2020-01-30 19:06:30 +00:00
Oli Lan
1a775e077b Allow apexd to execute toybox for snapshot & restore.
This allows apexd to execute "cp" to perform snapshot and
restore operations.

Other rules for this were added in aosp/1217340, but this one was
missed.

Bug: 141148175
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_DeSys
Change-Id: Ia529ede468578bfadc87e049a2c0ab4f87e1c43d
2020-01-30 16:54:42 +00:00
Jon Spivack
988e381b6b Revert^2 "Move aidl_lazy_test_server to system_ext"
4eae75c9d4

Reason for revert: This undoes the previous reversion, which was made to fix b/148282665.

Change-Id: I70d6e60a0468abea19f5efd7fde10207a251cf61
2020-01-29 02:09:34 +00:00
Automerger Merge Worker
11f655b8c1 Merge "Grant vold, installd, zygote and apps access to /mnt/pass_through" am: 5119becf5d am: 89f83d100c am: 86a194b6e7
Change-Id: I1833f8057b632355788e74a676b0b7860fa0610b
2020-01-28 23:07:34 +00:00
Automerger Merge Worker
c2884c46f6 Merge "Change selinux path config for oat files" am: b3ed1d4245 am: f91ec95c08 am: fd65a8daf1
Change-Id: Ib4a07a1087707327a8cb7c9fb87cfb433ceac173
2020-01-28 22:43:50 +00:00
Zimuzo Ezeozue
5119becf5d Merge "Grant vold, installd, zygote and apps access to /mnt/pass_through" 2020-01-28 22:26:58 +00:00
Songchun Fan
b3ed1d4245 Merge "Change selinux path config for oat files" 2020-01-28 22:05:48 +00:00
Zim
fcf599c89c Grant vold, installd, zygote and apps access to /mnt/pass_through
/mnt/pass_through was introduced to allow the FUSE daemon unrestricted
 access to the lower filesystem (or sdcardfs).

At zygote fork time, the FUSE daemon will have /mnt/pass_through/0
bind mounted to /storage instead of /mnt/user/0. To keep /sdcard
(symlink to /storage/self/primary) paths working, we create a
'self' directory  with an additional 'primary' symlink to
/mnt/pass_through/0/emulated/0 which is a FUSE mount point.

The following components need varying sepolicy privileges:

Vold: Creates the self/primary symlink and mounts the lower filesystem
on /mnt/pass_through/0/emulated. So needs create_dir and mount access
+ create_file access for the symlink

zygote: In case zygote starts an app before vold sets up the paths.
This is unlikely but can happen if the FUSE daemon (a zygote forked app)
is started before system_server completes vold mounts.
Same sepolicy requirements as vold

installd: Needs to clear/destroy app data using lower filesystem
mounted on /mnt/pass_through so needs read_dir access to walk
/mnt/pass_through

priv_app (FUSE daemon): Needs to server content from the lower
filesystem mounted on /mnt/pass_through so needs read_dir access to
walk /mnt/pass_through

Bug: 135341433
Test: adb shell ls /mnt/pass_through/0/self/primary
Change-Id: I16e35b9007c2143282600c56adbc9468a1b7f240
2020-01-28 20:56:36 +00:00
Songchun Fan
7de88d73b6 Change selinux path config for oat files
We are updating apps' apk path to have a two-level structure.
Default apk path of an installed app:
Before: /data/app/[packageName]-[randomString]/base.apk
After: /data/app/[randomStringA]/[packageName]-[randomStringB]/base.apk

As a result, the oat files will be two levels below /data/app.

Test: manual
BUG: 148237378
Change-Id: If8e1fed46096f2e5f4150f6eedf74af76ac9d4b4
2020-01-28 10:33:13 -08:00
Automerger Merge Worker
db9794f0ed Merge "rebootescrow: allow use of block file" am: ebbc1b43cc am: d0cb7bf39a am: 9f707e3c15
Change-Id: I93247f43f6b6ecd448d606a8bba2c620b41ba91b
2020-01-28 17:46:23 +00:00
Automerger Merge Worker
90613dcf1f Merge "untrusted_app: disallow bind RTM_ROUTE socket" am: 31ddf45500 am: 6b63f6a414 am: 1349b7ca19
Change-Id: I9dc599314e3a9330c07b5d5fcaa7d5ae3c611f2f
2020-01-28 17:44:17 +00:00
Kenny Root
ebbc1b43cc Merge "rebootescrow: allow use of block file" 2020-01-28 17:10:37 +00:00
Jeffrey Vander Stoep
31ddf45500 Merge "untrusted_app: disallow bind RTM_ROUTE socket" 2020-01-28 16:30:18 +00:00
Automerger Merge Worker
99214670e8 Merge "Make platform_compat discoverable everywhere" am: 88da0687fb am: 0c50c7e219 am: 953b994864
Change-Id: I6f9865411391f7548cc403abac83195adbc146ce
2020-01-28 12:35:20 +00:00
Andrei-Valentin Onea
88da0687fb Merge "Make platform_compat discoverable everywhere" 2020-01-28 12:04:43 +00:00
Automerger Merge Worker
2c78e57491 Merge "Add sepolicy rules to allow apexd to perform snapshot and restore." am: ca6ffc2854 am: f07b9e9a0e am: 26f8590fec
Change-Id: Ia30a518542e311567b8228592b1a93448304ea28
2020-01-28 10:30:19 +00:00
Oli Lan
ca6ffc2854 Merge "Add sepolicy rules to allow apexd to perform snapshot and restore." 2020-01-28 09:58:02 +00:00
Jeff Vander Stoep
b38a1d8804 untrusted_app: disallow bind RTM_ROUTE socket
Bug: 141455849
Change-Id: I27a8735626a5c3c8aad49e8a68de166f3a10cfde
Test: CtsSelinuxTargetSdkCurrentTestCases
Test: atest bionic-unit-tests-static
Test: atest NetworkInterfaceTest
2020-01-28 10:49:50 +01:00
Automerger Merge Worker
4246a5b8ca Merge "priv_app: Remove permissions for config_gz" am: 9baf6d6609 am: 91d4d574f1 am: 61e2d83c76
Change-Id: Id3dc3ab16468ad7102d4c7d73c445edd8245f876
2020-01-27 23:32:08 +00:00
Treehugger Robot
9baf6d6609 Merge "priv_app: Remove permissions for config_gz" 2020-01-27 22:44:13 +00:00
Kenny Root
960f73b75b rebootescrow: allow use of block file
pmem uses a block file while access_ramoops uses a char file. Allow both for
now until we can unify on pmem.

Additionally allow the reading of vendor properties so it can read the
path to the character or block device to open.

Test: atest VtsHalRebootEscrowTargetTest
Bug: 146400078
Change-Id: Ief61534e0946480a01c635ce1672579959ec8db5
2020-01-27 12:28:44 -08:00
Oli Lan
335d704c77 Add sepolicy rules to allow apexd to perform snapshot and restore.
This adds rules required for apexd to perform snapshot and restore
of the new apex data directories.

See go/apex-data-directories for more information on the feature.

See the chain of CLs up to ag/10169468 for the implementation of
snapshot and restore.

Bug: 141148175
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_DeSys
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_DeUser
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_Ce
Change-Id: I1756bbc1d80cad7cf9c2cebcee9bee6bc261728c
2020-01-27 18:21:29 +00:00
Ashwini Oruganti
5ab5e8ad20 priv_app: Remove permissions for config_gz
Looking at go/sedenials, we see this permission being used by
MediaProvider once like so:

type=1400 audit(0.0:569759): avc: granted { getattr } for comm=4173796E635461736B202331 path="/proc/config.gz" dev="proc" ino=4026532157 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:config_gz:s0 tclass=file app=com.google.android.providers.media.module

This permission should not be granted to all priv-apps now that GMS core
has been split out into its own domain. This change removes the
permission for the priv_app domain and the corresponding auditallow.

Bug: 147833123
Test: TH
Change-Id: I4f60daefcbdd4991c5d2c32330e907a03bfe6fe5
2020-01-27 10:03:22 -08:00
Automerger Merge Worker
40362d1eeb Merge "Revert "Move aidl_lazy_test_server to system_ext"" am: 5f11b2e0ed am: 62ce810826 am: 0123408525
Change-Id: I5796ff8a811f87aa986ee2f360d9c5cef9454e29
2020-01-26 00:28:32 +00:00
Jon Spivack
5f11b2e0ed Merge "Revert "Move aidl_lazy_test_server to system_ext"" 2020-01-25 21:29:45 +00:00
Jon Spivack
4eae75c9d4 Revert "Move aidl_lazy_test_server to system_ext"
Revert submission 1209453-aidl-lazy-presubmit

Reason for revert: b/148282665. A test has begun to fail on git_stage-aosp-master, and I need to verify whether these changes are responsible.

Reverted Changes:
Ib09a2460e: Add aidl_lazy_test to general-tests
Ib08989356: Move aidl_lazy_test_server to system_ext
I694e6ad35: Add aidl_lazy_test_server to Cuttlefish
I65db12c63: Add aidl_lazy_test to presubmit
I7ec80a280: Dynamically stop services with multiple interfaces...

Change-Id: I55f6b0f7800f348259787f62c6faa19a90f8bdcc
2020-01-25 02:55:04 +00:00
Automerger Merge Worker
b1804f17e4 Merge "Whitelisting window_manager_native_boot system property" am: b9b2acff99 am: 622e779b7a am: b848357c5f
Change-Id: I213f33b122e7453988496615d7773445085763c5
2020-01-24 21:32:06 +00:00
Treehugger Robot
b9b2acff99 Merge "Whitelisting window_manager_native_boot system property" 2020-01-24 19:52:07 +00:00
Andrei Onea
59da5e821f Make platform_compat discoverable everywhere
The binder's methods are protected by signature
permissions (READ_COMPAT_CHANGE_CONFIG and
OVERRIDE_COMPAT_CHANGE_CONFIG).

Bug: 142650523
Test: atest PlatformCompatTest
Test: atest CompatConfigTest
Test: atest OverrideValidatorImplTest
Change-Id: I65d425aacb120c6481076431151cf43ecab2509f
2020-01-24 17:01:37 +00:00
Automerger Merge Worker
0d8bc0ce28 Merge "Move aidl_lazy_test_server to system_ext" am: 65028a3609 am: de87bc5c0f am: e6dd4b2bb4
Change-Id: Ic9a8213482619bfc9cdd9911ea6c7d95ff21c82e
2020-01-24 07:57:56 +00:00
Automerger Merge Worker
174478593a Merge "Allow incidentd to parse persisted log" am: 9db478bb86 am: 46761bbc6a am: f0c476d135
Change-Id: I9df10b36396698260b40982723d55fbf5eb82e9c
2020-01-24 01:48:51 +00:00
Jon Spivack
65028a3609 Merge "Move aidl_lazy_test_server to system_ext" 2020-01-24 01:30:49 +00:00
Mike Ma
9db478bb86 Merge "Allow incidentd to parse persisted log" 2020-01-24 01:04:03 +00:00
Automerger Merge Worker
506fab058f Merge "Support for more binder caches" am: edd4726300 am: a0a4772d9f am: 73c9243d74
Change-Id: I6fc7b0b3a23eb046cf642cf7584e5117cc2be285
2020-01-23 16:15:31 +00:00
Automerger Merge Worker
cb1b85b022 Merge changes I8630c20e,I4aa482cf am: a67cd2333e am: 73391bf5ce am: a4bafa6f1d
Change-Id: Id6a842c83beaab632e55ce99fef48301555aeb32
2020-01-23 15:51:17 +00:00
Lee Shombert
edd4726300 Merge "Support for more binder caches" 2020-01-23 15:44:39 +00:00
Jon Spivack
eb57c756c2 Move aidl_lazy_test_server to system_ext
This allows it to be installed and run during presubmit.

Bug: 147380480
Test: aidl_lazy_test
Change-Id: Ib08989356d02f2bf041d0780ec6c5bf65899c597
2020-01-22 17:36:05 -08:00
Automerger Merge Worker
366f2e9619 Merge "Add rules for Lights AIDL HAL" am: 0545b44e40 am: 7ad4e6350f am: eb9e2be0c5
Change-Id: I64c70d288f47c8339543e2f0902eff5bce47c740
2020-01-22 22:07:27 +00:00
Ryan Savitski
845569e2e5 debug builds: allow perf profiling of most domains
As with heapprofd, it's useful to profile the platform itself on debug
builds (compared to just apps on "user" builds).

Bug: 137092007
Change-Id: I8630c20e0da9c67e4927496802a4cd9cacbeb81a
2020-01-22 22:04:02 +00:00
Ryan Savitski
67a82481f8 initial policy for traced_perf daemon (perf profiler)
The steps involved in setting up profiling and stack unwinding are
described in detail at go/perfetto-perf-android.

To summarize the interesting case: the daemon uses cpu-wide
perf_event_open, with userspace stack and register sampling on. For each
sample, it identifies whether the process is profileable, and obtains
the FDs for /proc/[pid]/{maps,mem} using a dedicated RT signal (with the
bionic signal handler handing over the FDs over a dedicated socket). It
then uses libunwindstack to unwind & symbolize the stacks, sending the
results to the central tracing daemon (traced).

This patch covers the app profiling use-cases. Splitting out the
"profile most things on debug builds" into a separate patch for easier
review.

Most of the exceptions in domain.te & coredomain.te come from the
"vendor_file_type" allow-rule. We want a subset of that (effectively all
libraries/executables), but I believe that in practice it's hard to use
just the specific subtypes, and we're better off allowing access to all
vendor_file_type files.

Bug: 137092007
Change-Id: I4aa482cfb3f9fb2fabf02e1dff92e2b5ce121a47
2020-01-22 22:04:01 +00:00
Ivailo Karamanolev
0545b44e40 Merge "Add rules for Lights AIDL HAL" 2020-01-22 21:34:34 +00:00
Ivailo Karamanolev
254d757289 Add rules for Lights AIDL HAL
Test: manual; yukawa and cuttlefish; adb logcat | grep -i avc
Bug: 142230898
Change-Id: I9f576511d1fc77c5f0ad3cf1b96b038b301773d7
2020-01-22 20:33:42 +01:00
Lee Shombert
097f9794f4 Support for more binder caches
Bug: 140788621

This adds keys for several planned binder caches in the system server
and in the bluetooth server.  The actual cache code is not in this
tree.

Test: created a test build that contains the actual cache code and ran
some system tests.  Verified that no protection issues were seen.

Change-Id: Ibaccb0c0ff8b127d14cf769ea4156f7d8b024bc1
2020-01-22 08:21:08 -08:00
Automerger Merge Worker
b196561251 Merge "reland: untrusted_app_29: add new targetSdk domain" am: db60355f94 am: 1a0201f032 am: 3bfc8f3858
Change-Id: I736145f84fc7860512156c7401f4f67bee1b1202
2020-01-22 15:25:42 +00:00
Jeffrey Vander Stoep
db60355f94 Merge "reland: untrusted_app_29: add new targetSdk domain" 2020-01-22 14:43:36 +00:00
Jeff Vander Stoep
1f7ae8ee3f reland: untrusted_app_29: add new targetSdk domain
Enforce new requirements on app with targetSdkVersion=30 including:
- No RTM_GETLINK on netlink route sockets.

Remove some of the repetitive descriptions in each untrusted_app_N.te
file, and instead refer to the description in
public/untrusted_app.te.

Bug: 141455849
Test: CtsSelinuxTargetSdkCurrentTestCases
Test: libcore.java.net.NetworkInterfaceTest#testGetNetworkInterfaces
Change-Id: I89553e48db3bc71f229c71fafeee9005703e5c0b
2020-01-22 09:47:53 +00:00
Automerger Merge Worker
27599308a9 Merge "Update linkerconfig to generate APEX binary config" am: fa8bcd3d29 am: acfb6c7a1a am: 9ad5c5c93f
Change-Id: Id2e43c896fdc2d80c36d5c95f771aba1515209ef
2020-01-22 08:28:36 +00:00
Kiyoung Kim
fa8bcd3d29 Merge "Update linkerconfig to generate APEX binary config" 2020-01-22 07:58:43 +00:00
Automerger Merge Worker
f202905ef2 Merge "priv_app: Remove permissions for selinuxfs" am: ffd496776a am: 6277ff1c53 am: be2679723d
Change-Id: Icc05020aa43cbb839a5c162422ec5042a9c52c31
2020-01-22 02:11:37 +00:00
Ashwini Oruganti
db553aa416 priv_app: Remove permissions for selinuxfs
Looking at go/sedenials, we see this permission being used by
MediaProvider like so:

type=1400 audit(0.0:3651): avc: granted { getattr } for comm=4173796E635461736B202331 path="/sys/fs/selinux/class/tipc_socket/perms/recvfrom" dev="selinuxfs" ino=67111391 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:selinuxfs:s0 tclass=file app=com.google.android.providers.media.module

... and numerous other directories, apparently from a filesystem walk.

It appears that this permission should not be granted to all priv-apps
now that GMS core has been split out into its own domain. This change
removes the permission for the priv_app domain and the corresponding
auditallow.

Bug: 147833123
Test: TH
Change-Id: I88146785c7ac3a8c15fe9b5f34f05d936f08ea48
2020-01-21 15:30:12 -08:00
Valerie Hau
7b2a2dff0c Whitelisting window_manager_native_boot system property
Bug: 147096935
Test: build, boot

Change-Id: Iadeefa3cfc9bb17eb19b60dbd18de047fa01b673
2020-01-21 22:54:49 +00:00
Automerger Merge Worker
9c853aebbf Merge "Allow isolated_app to use TCP and UDP sockets brokered over IPC." am: 3689c1481a am: 72fc061517 am: 6951ed98f3
Change-Id: I74992fff78fa7e9af2472be634f4c322f716b7bb
2020-01-21 22:43:29 +00:00
Automerger Merge Worker
a31d2c4b54 Merge "More neverallows for default_android_service." am: 64c8ddb123 am: 41e8d29253 am: 771c280d2b
Change-Id: I6a0f371a6fc11470bb3440afc3eb1ada24c1595f
2020-01-21 22:42:02 +00:00