Commit graph

20176 commits

Author SHA1 Message Date
Yifan Hong
bb9d64da64 Merge "super_block_device -> super_block_device_type" am: 93b81f30ae am: f0e9c939cc
am: 150f84e06c

Change-Id: Iaf25b3ca37135972e0552996b36bc709bb7defb0
2019-03-28 14:03:12 -07:00
Yifan Hong
150f84e06c Merge "super_block_device -> super_block_device_type" am: 93b81f30ae
am: f0e9c939cc

Change-Id: I3ac061c2bd24a0ab7af067bfcdcb8ca38bb0daca
2019-03-28 13:51:29 -07:00
Yifan Hong
f0e9c939cc Merge "super_block_device -> super_block_device_type"
am: 93b81f30ae

Change-Id: I274da84cce7985f97db2b3918c60f53304d999d8
2019-03-28 13:38:11 -07:00
Yifan Hong
93b81f30ae Merge "super_block_device -> super_block_device_type" 2019-03-28 19:55:44 +00:00
Florian Mayer
491701f6e9 Merge "Allow heapprofd to read test files." am: eda65027c7 am: b3f934c382
am: 512ff44523

Change-Id: I1f2fc791bfef9b00f81702159ac8fedef0010f33
2019-03-28 12:03:54 -07:00
Florian Mayer
512ff44523 Merge "Allow heapprofd to read test files." am: eda65027c7
am: b3f934c382

Change-Id: I96f2c358aae4eeeb15ffead648228586499ee075
2019-03-28 11:46:08 -07:00
Florian Mayer
b3f934c382 Merge "Allow heapprofd to read test files."
am: eda65027c7

Change-Id: Ia98a1657e11d7fe93710b7ad2f7b4d9e73b955cd
2019-03-28 11:37:46 -07:00
Florian Mayer
eda65027c7 Merge "Allow heapprofd to read test files." 2019-03-28 18:21:10 +00:00
Yifan Hong
ab85caaa56 super_block_device -> super_block_device_type
Domains that access super_block_device should instead
access super_block_device_type, which includes appropriate
block devices for retrofit DAP devices.

Test: boots (sanity)
Test: manual OTA
Bug: 128991918
Change-Id: Ie025b1e3c17e82330042aaa4a3e2e4a02ec1265b
2019-03-28 18:08:19 +00:00
Florian Mayer
36b29c5e6f Merge "Relabel /data/system/packages.list to new type." am: 7145b25226 am: 1d0b6aed97
am: ba385e3116

Change-Id: Ibaa89cd23dcb95d34d333ede5b13de5af205a1e4
2019-03-28 10:56:04 -07:00
Florian Mayer
ba385e3116 Merge "Relabel /data/system/packages.list to new type." am: 7145b25226
am: 1d0b6aed97

Change-Id: I6c9b389f5e5120080a80afbdb77759bc3842714b
2019-03-28 10:52:00 -07:00
Florian Mayer
1d0b6aed97 Merge "Relabel /data/system/packages.list to new type."
am: 7145b25226

Change-Id: Iaaaf871eddfdbee0f9d7adeb222965e17d1d17d2
2019-03-28 10:47:56 -07:00
Florian Mayer
7145b25226 Merge "Relabel /data/system/packages.list to new type." 2019-03-28 17:36:36 +00:00
YH_Lin
021c29b0ac Merge "sepolicy: add sepolicy rules for vold to write sysfs gc_urgent" am: a2186d08ca am: d155e2c768
am: 8dd0afad0d

Change-Id: Ie47df919a7727c3cd58d430fe08a48daf1fe5ca1
2019-03-28 07:36:43 -07:00
YH_Lin
8dd0afad0d Merge "sepolicy: add sepolicy rules for vold to write sysfs gc_urgent" am: a2186d08ca
am: d155e2c768

Change-Id: I73538ae26a6543b88f3ae2c92375d8eb949ad02c
2019-03-28 07:32:19 -07:00
YH_Lin
d155e2c768 Merge "sepolicy: add sepolicy rules for vold to write sysfs gc_urgent"
am: a2186d08ca

Change-Id: I9073b91afeed049b683cdeb7a6d71a9d554052cd
2019-03-28 07:27:55 -07:00
Treehugger Robot
a2186d08ca Merge "sepolicy: add sepolicy rules for vold to write sysfs gc_urgent" 2019-03-28 14:19:20 +00:00
Hector Dearman
54b6bc207e Merge "Fix typos in genfs_contexts" am: 2d4894323c am: 2344a6732c
am: 9bb344c5f3

Change-Id: Ied6a03001747a99d812803be7310a1d8f767b061
2019-03-28 04:09:42 -07:00
Hector Dearman
9bb344c5f3 Merge "Fix typos in genfs_contexts" am: 2d4894323c
am: 2344a6732c

Change-Id: I54ecd8076d523edbadaa24f5ba3bc25436b4926b
2019-03-28 04:05:34 -07:00
Hector Dearman
2344a6732c Merge "Fix typos in genfs_contexts"
am: 2d4894323c

Change-Id: I5eecc86b004df23f527257accd3c8e78c325677b
2019-03-28 04:01:29 -07:00
Hector Dearman
2d4894323c Merge "Fix typos in genfs_contexts" 2019-03-28 10:51:03 +00:00
Florian Mayer
4ab64c940f Relabel /data/system/packages.list to new type.
Conservatively grant access to packages_list_file to everything that had
access to system_data_file:file even if the comment in the SELinux
policy suggests it was for another use.

Ran a diff on the resulting SEPolicy, the only difference of domains
being granted is those that had system_data_file:dir permissiosn which
is clearly not applicable for packages.list

diff -u0 <(sesearch --allow -t system_data_file ~/sepolicy | sed 's/system_data_file/packages_list_file/') <(sesearch --allow -t packages_list_file ~/sepolicy_new)
--- /proc/self/fd/16	2019-03-19 20:01:44.378409146 +0000
+++ /proc/self/fd/18	2019-03-19 20:01:44.378409146 +0000
@@ -3 +2,0 @@
-allow appdomain packages_list_file:dir getattr;
@@ -6 +4,0 @@
-allow coredomain packages_list_file:dir getattr;
@@ -8 +5,0 @@
-allow domain packages_list_file:dir search;
@@ -35 +31,0 @@
-allow system_server packages_list_file:dir { rename search setattr read lock create reparent getattr write relabelfrom ioctl rmdir remove_name open add_name };
@@ -40 +35,0 @@
-allow tee packages_list_file:dir { search read lock getattr ioctl open };
@@ -43,3 +37,0 @@
-allow traced_probes packages_list_file:dir { read getattr open search };
-allow vendor_init packages_list_file:dir { search setattr read create getattr write relabelfrom ioctl rmdir remove_name open add_name };
-allow vold packages_list_file:dir { search setattr read lock create getattr mounton write ioctl rmdir remove_name open add_name };
@@ -48 +39,0 @@
-allow vold_prepare_subdirs packages_list_file:dir { read write relabelfrom rmdir remove_name open add_name };
@@ -50 +40,0 @@
-allow zygote packages_list_file:dir { search read lock getattr ioctl open };

Bug: 123186697

Change-Id: Ieabf313653deb5314872b63cd47dadd535af7b07
2019-03-28 10:27:43 +00:00
David Anderson
ebce1b0546 Add sepolicy for installing GSIs to external storage. am: 6557d87b0f am: 9ca965a943
am: d25ee0ab07

Change-Id: Ibfac4341dad1571ba10100a4bb4e15314f1006cb
2019-03-28 03:22:13 -07:00
David Anderson
d25ee0ab07 Add sepolicy for installing GSIs to external storage. am: 6557d87b0f
am: 9ca965a943

Change-Id: I493057b61079511383a4da11c6b95c3223ca77a5
2019-03-28 03:08:53 -07:00
David Anderson
9ca965a943 Add sepolicy for installing GSIs to external storage.
am: 6557d87b0f

Change-Id: I3b8f5bf53841c94222c90f0cc2c4aebb9b9b4fb2
2019-03-28 03:00:02 -07:00
David Anderson
6557d87b0f Add sepolicy for installing GSIs to external storage.
To install GSIs on external storage (such as sdcards), gsid needs some
additional privileges:
 - proc_cmdline and device-tree access to call ReadDefaultFstab().
   This is ultimately used to check whether system's dm-verity has
   check_at_most_once enabled, which is disallowed with sdcards.
 - vfat read/write access to write files to the sdcard. Note that
   adopted sdcards are not supported here.
 - read access to the sdcard block device. To enable this without
   providing access to vold_block_device, a new sdcard_block_device
   label was added. Devices must apply this label appropriately to
   enable gsid access.
 - FIBMAP access for VFAT filesystems, as they do not support FIEMAP.
   This only appears to work by granting SYS_RAWIO.

Bug: 126230649
Test: adb shell su root gsi_tool install --install_dir=/mnt/media_rw/...
      works without setenforce 0

Change-Id: I88d8d83e5f61d4c0490f912f226fe1fe38cd60ab
2019-03-27 17:12:51 -07:00
Steven Moreland
10f471afcd Merge "private: allow zygote mnt_expand_file:dir getattr;" am: 180ffccc8f am: b2267841db
am: 83849d94b6

Change-Id: I8a438eb71b729206275c3c50a0f54fee9a83220a
2019-03-27 16:50:08 -07:00
Steven Moreland
83849d94b6 Merge "private: allow zygote mnt_expand_file:dir getattr;" am: 180ffccc8f
am: b2267841db

Change-Id: If01d4a27c0baf5303df789f4c00d4bb0c4505860
2019-03-27 16:32:35 -07:00
Steven Moreland
b2267841db Merge "private: allow zygote mnt_expand_file:dir getattr;"
am: 180ffccc8f

Change-Id: Id82efff8a08d6bc48c78544879e35ac736f0fe62
2019-03-27 16:18:40 -07:00
Steven Moreland
180ffccc8f Merge "private: allow zygote mnt_expand_file:dir getattr;" 2019-03-27 22:59:49 +00:00
Victor Hsieh
05db7d5400 Merge "Move fs-verity key loading into fsverity_init domain" am: 3337a33609 am: db2334d3aa
am: 0f94ee2784

Change-Id: I1350caf6c1ab61c14b69dbb31cfa132d0c7b7b76
2019-03-27 13:51:36 -07:00
Victor Hsieh
0f94ee2784 Merge "Move fs-verity key loading into fsverity_init domain" am: 3337a33609
am: db2334d3aa

Change-Id: Id0a00d3931fa4690c4d0c5b91e9d906cd060d409
2019-03-27 13:47:20 -07:00
Victor Hsieh
db2334d3aa Merge "Move fs-verity key loading into fsverity_init domain"
am: 3337a33609

Change-Id: I7e4847dbfcce72ec80089a4150fce67782b049aa
2019-03-27 13:40:45 -07:00
Treehugger Robot
3337a33609 Merge "Move fs-verity key loading into fsverity_init domain" 2019-03-27 20:31:19 +00:00
Nick Kralevich
5cfd4ab951 Merge "Revert "Temporarily hide denial to fix tests."" am: 76a1a76b35 am: fb9e32b288
am: 2b8292302c

Change-Id: Icdcf74dfe3512dca1c7a305d98672371772d3788
2019-03-27 10:26:31 -07:00
Nick Kralevich
2b8292302c Merge "Revert "Temporarily hide denial to fix tests."" am: 76a1a76b35
am: fb9e32b288

Change-Id: Ibac930e2366334083825a46e8dc64669a5fc6b8e
2019-03-27 10:17:23 -07:00
Nick Kralevich
fb9e32b288 Merge "Revert "Temporarily hide denial to fix tests.""
am: 76a1a76b35

Change-Id: Id243cfaf04cafdfaf17837645f73d8640bd49cc4
2019-03-27 10:12:07 -07:00
Hector Dearman
714b917411 Fix typos in genfs_contexts
Each tracing event is listed twice in this file, once in
debugfs and once in tracefs:

genfscon debugfs /tracing/events/sched/sched_switch/
genfscon tracefs /events/sched/sched_switch/

Some of the debugfs entries are missing the required leading
/tracing/ prefix, probably a copy paste error from when they were
added.

Test: make
Change-Id: I6e64eac0c2b95b38c4648b92765c748c631348b7
2019-03-27 17:06:39 +00:00
Treehugger Robot
76a1a76b35 Merge "Revert "Temporarily hide denial to fix tests."" 2019-03-27 16:54:12 +00:00
Victor Hsieh
3d4ee1dba5 Move fs-verity key loading into fsverity_init domain
fsverity_init is a new shell script that uses mini-keyctl for the actual
key loading.  Given the plan to implement keyctl in toybox, we label
mini-keyctl as u:object_r:toolbox_exec:s0.

This gives us two benefits:
 - Better compatibility to keyctl(1), which doesn't have "dadd"
 - Pave the way to specify key's security labels, since keyctl(1)
   doesn't support, and we want to avoid adding incompatible option.

Test: Boot without SELinux denial
Test: After boot, see the key in /product loaded
Bug: 128607724
Change-Id: Iebd7c9b3c7aa99ad56f74f557700fd85ec58e9d0
2019-03-27 16:31:01 +00:00
Nick Kralevich
9097360049 Revert "Temporarily hide denial to fix tests."
This reverts commit 94b5fe4af5.

Reason for revert: Obsoleted by https://android-review.googlesource.com/933916

Bug: 129298168
Change-Id: I6b34cfdf76b5094db17ee06831d8a662ea360956
Test: Build.
2019-03-27 13:56:20 +00:00
Florian Mayer
12f7e0e658 Allow heapprofd to read test files.
This is needed to test the unwinding of test binaries.

03-26 19:55:44.311   939   939 W heapprofd: type=1400 audit(0.0:13): avc: denied { search } for name="nativetest" dev="sda45" ino=6815745 scontext=u:r:heapprofd:s0 tcontext=u:object_r:nativetest_data_file:s0 tclass=dir permissive=0

Change-Id: Icfbc6060a8755934f1c3935aac55ce7792dc7d85
2019-03-27 11:07:05 +00:00
Yifan Hong
b9182b37a5 Merge changes from topic "lpdumpd" am: 40f1682ba6 am: 7f891f414f
am: 75117c19c9

Change-Id: I43b884e08059e242830b56e7ddee62c17e6af422
2019-03-26 16:36:36 -07:00
Yifan Hong
75117c19c9 Merge changes from topic "lpdumpd" am: 40f1682ba6
am: 7f891f414f

Change-Id: Id3aea81bb90391b88942cf0f0d318ab040705fb9
2019-03-26 15:35:01 -07:00
Nick Kralevich
c6f4563edf Merge "Temporarily hide denial to fix tests." am: a2b90b5efc am: a95d5e8b03
am: 811e373efb

Change-Id: I6b7002a4576be19a6bad1f9342da3ed6e579bb47
2019-03-26 14:51:30 -07:00
Nick Kralevich
efb3b8bcfd Merge "Don't audit audit_access denials to /dev/binder" am: f3e8dce5d4 am: 83484d2346
am: d644476185

Change-Id: I2a6bd8311b587952e42a6011e8813f9bb1826ff8
2019-03-26 14:45:17 -07:00
Yifan Hong
7f891f414f Merge changes from topic "lpdumpd"
am: 40f1682ba6

Change-Id: I33d21f283f01fbeeda7584b4cee1a91597cc5a71
2019-03-26 14:24:19 -07:00
Yifan Hong
85c7c803f1 Merge "Add super_block_device_type" am: b9be03d63a am: 9d8a33b32b
am: b1a5384b71

Change-Id: I935a288ed4f9f872ed78c9b15dc32496681a73a2
2019-03-26 14:22:33 -07:00
Nick Kralevich
811e373efb Merge "Temporarily hide denial to fix tests." am: a2b90b5efc
am: a95d5e8b03

Change-Id: I23f7accdb14853278c7712978bbad92c49fe8fc4
2019-03-26 13:54:32 -07:00
Nick Kralevich
d644476185 Merge "Don't audit audit_access denials to /dev/binder" am: f3e8dce5d4
am: 83484d2346

Change-Id: I93120a6d1fdfdc0f1d4a8675600e005485901e51
2019-03-26 13:53:57 -07:00