Commit graph

29398 commits

Author SHA1 Message Date
Yo Chiang
dd7e2b891b Merge "Add se_compat_cil module" am: ec92ea5890
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1671537

Change-Id: I855014a3ace33eda6efb790b54778606817e7759
2021-04-13 09:45:07 +00:00
Maciej Żenczykowski
755faacde2 Merge "network_stack - dontaudit getopt on key_socket" 2021-04-13 09:11:32 +00:00
Yo Chiang
ac94a46634 Merge changes I5275e9ce,I2fb9b10b
* changes:
  Change $(ver).compat.cil from prebuilt_etc to se_compat_cil
  Add system_ext_$(ver).compat.cil
2021-04-13 08:29:52 +00:00
Yo Chiang
ec92ea5890 Merge "Add se_compat_cil module" 2021-04-13 08:24:41 +00:00
Jooyung Han
b62be12176 Allow apexd to access a new dev_type: virtual disk
In microdroid, apexd activates apexes which are passed as a virtual disk
to share apexes with host Android.

Bug: 184605708
Test: apexd running in microdroid can read /dev/block/vdb2
  when a disk image is passed to crosvm via --disk= option.
Change-Id: Ie27774868a0e0befb4c42cff795d1531b042654c
2021-04-13 15:46:16 +09:00
Nikita Ioffe
17bd4dda4a Allow adbd to pull apexes from /data/apex/active
Test: adb pull /data/apex/active/com.android.apex.cts.shim@v2.apex
Bug: 184886365
Change-Id: Ibaac390a99e65a8b388d3c62761d96ec8f8e0846
2021-04-12 23:34:31 +00:00
David Anderson
f51e323abd Merge "Allow update_engine to scan /sys/fs and /sys/fs/f2fs." am: 29e51c2095
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1668412

Change-Id: Ie2b1c43a6e4f50e3cf1db01175d9a69bfa9766f1
2021-04-12 21:49:40 +00:00
David Anderson
29e51c2095 Merge "Allow update_engine to scan /sys/fs and /sys/fs/f2fs." 2021-04-12 21:04:08 +00:00
Yi-Yo Chiang
a22511269f Change $(ver).compat.cil from prebuilt_etc to se_compat_cil
Use the new se_compat_cil module type to install compatibility cil
files.

Bug: 183362912
Test: Presubmit; Noop in terms of build artifact.
Change-Id: I5275e9ce524185ce2d228133763456df43834093
2021-04-13 02:58:21 +08:00
Yi-Yo Chiang
41c34d6a70 Add se_compat_cil module
Installs backwards compatibility cil files.

Bug: 183362912
Test: Presubmit
Test: Add a $(ver).compat.cil under SYSTEM_EXT_PRIVATE_SEPOLICY_DIR and
  verify the file is installed under /system_ext/etc/selinux/mapping/
Change-Id: I5e2c6b8dfa8df431edfe96f29daae463b130367f
2021-04-13 02:58:21 +08:00
Yi-Yo Chiang
8be93c00b1 Add system_ext_$(ver).compat.cil
These are the system_ext counterpart of $(ver).compat.cil. They would
contain device specific compat rules that compliment $(ver).compat.cil,
which are the platform specific compat rules.

Bug: 183362912
Test: Add a $(ver).compat.cil under SYSTEM_EXT_PRIVATE_SEPOLICY_DIR and
  verify the file is installed under /system_ext/etc/selinux/mapping/
Change-Id: I2fb9b10bb3bcf112e33f504964fb705e3b63782b
2021-04-13 02:58:21 +08:00
Roshan Pius
2a1610b4e0 Uwb: Create a new Uwb system service
This service will intercept all UwbManager API calls and then perform
necessary permission checks before forwarding the call to the vendor
UWB service. Adding sepolicy permissions for exposing the service that
handles all public API's.

Bug: 183904955
Test: atest android.uwb.cts.UwbManagerTest
Change-Id: Icce4d2f586926421c06e8902a91533002c380b8d
2021-04-12 10:26:24 -07:00
Yi-Yo Chiang
40073d4c7f Remove references to BOARD_PLAT_{PUBLIC,PRIVATE}_SEPOLICY_DIR
These variables are deprecated.

Bug: 183362912
Test: Presubmit; Noop
Change-Id: I80db5342044a06feb1451fbe661989fe4d191e74
2021-04-12 20:01:35 +08:00
Yi-Yo Chiang
694ab79207 Allow shell to read default fstab
CTS module CtsFsMgrTestCases (gtest) needs to read fstab.

Fixes: 184850580
Test: CtsFsMgrTestCases on user build
Change-Id: I0f04bb021d8732a1c5f987ba2984da2c98f40653
2021-04-12 04:46:06 +00:00
Wei Wang
c8ee9a85e9 Merge "Rename hint service into performance_hint service" am: 4ea9b0b9df
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1672505

Change-Id: I145b45b8fc4e6f665cba259ba65523bc5d99e941
2021-04-09 23:59:25 +00:00
Wei Wang
4ea9b0b9df Merge "Rename hint service into performance_hint service" 2021-04-09 23:07:51 +00:00
Wei Wang
7b039717a9 Rename hint service into performance_hint service
Bug: 158791282
Test: Compiles, boots
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I1bd2757f90c040353a176f2dfd0142222753cf8f
2021-04-09 12:35:10 -07:00
Yabin Cui
fcdbb8c1f8 Merge "Add permissions in profcollectd to parse kernel etm data." am: 006c740746
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1646266

Change-Id: I8c13782b40c0c2af0dc4f8556f239e2079e49f42
2021-04-09 17:48:45 +00:00
Yabin Cui
006c740746 Merge "Add permissions in profcollectd to parse kernel etm data." 2021-04-09 17:15:26 +00:00
Orion Hodson
7c6b3eb963 Add odrefresh_data_file for odrefresh metrics
Metrics are written to /data/misc/odrefresh by odrefresh during early
boot, then native code in ART system_server initialization passes them
to statsd and deletes the metrics files. This hand-off is necessary
because statsd does not start until after odsign and odrefresh have run.

Bug: 169925964
Test: manual
Change-Id: I8054519a714907819886dd6e5e78f3b5796d0898
2021-04-09 15:50:28 +01:00
Maciej Żenczykowski
e70c300908 network_stack - dontaudit getopt on key_socket
W droid.tethering: type=1400 audit(0.0:10): avc: denied { getopt } for scontext=u:r:network_stack:s0 tcontext=u:r:network_stack:s0 tclass=key_socket permissive=0

Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia761911feb875554e5563f44a44dd3702ade41ea
2021-04-09 07:31:09 -07:00
Kalesh Singh
7274929f08 Merge "Revert "gmscore_app: Don't audit memtrack hal denials"" am: d6924e587e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1670328

Change-Id: I6d12774dcf918a3f10d25ea06326bab6a01f6f71
2021-04-09 02:28:59 +00:00
Kalesh Singh
d6924e587e Merge "Revert "gmscore_app: Don't audit memtrack hal denials"" 2021-04-09 02:03:50 +00:00
Kalesh Singh
7de79540fb Revert "gmscore_app: Don't audit memtrack hal denials"
This reverts commit cdf7b0f374.

Reason for revert: libmemtrack now uses a memtrackproxy_service, which allows app access

Change-Id: Id3858a0b813b822fc17f77e14d46525942048066
2021-04-09 00:04:53 +00:00
Yabin Cui
bd4c9e8530 Add permissions in profcollectd to parse kernel etm data.
To parse etm data for kernel and kernel modules, add below permissions
to profcollectd:
1. Get kernel start address and module addresses from /proc/kallsyms
and /proc/modules.
2. Get kernel build id from /sys/kernel/notes.
3. Read kernel module files in vendor dir.

Bug: 166559473
Test: run profcollectd.

Change-Id: I2e0b346379271fadc20e720722f7c9a687335ee2
2021-04-08 16:03:59 -07:00
David Anderson
5a0d5ccdf7 Allow update_engine to scan /sys/fs and /sys/fs/f2fs.
When a bug causes us to leak a file descriptor or resource in the OTA
path, it can cause unremovable device-mapper devices. The companion CL
in this topic attempts to diagnose such problems by performing a quick
scan for things depending on an unremovable block device: mounts, loop
devices, and other device-mapper nodes.

To detect mounts it would normally be enough to scan /proc/mounts, but
with MNT_DETACH the filesystem may still be mounted but not visible to
update_engine. This is exactly what happened in b/184715543.

To scan for such cases, we look for /sys/fs/ext4/<name> or
/sys/fs/f2fs/<name> where <name> is the block device. To make this work,
we grant update_engine r_dir_perms to sysfs and sysfs_f2fs_dir. It
doesn't actually need to read the contents of any files, the presence of
the inode is good enough.

Bug: N/A
Test: manual test
Change-Id: Ib085c9c814180b360e2170135011261bbb7e35b6
2021-04-08 13:50:50 -07:00
Yabin Cui
c9bacaceed Merge "Add vendor_kernel_modules type to public." am: 49806a1067
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1660545

Change-Id: I6b5f6f7576263b0e59c35bfb0d4403167ec135d4
2021-04-08 18:40:30 +00:00
Yabin Cui
49806a1067 Merge "Add vendor_kernel_modules type to public." 2021-04-08 17:49:16 +00:00
Satya Tangirala
65ece1165d Merge "Keystore 2.0: sepolicy changes for vold to use keystore2" am: 10c2ed4e47
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1647387

Change-Id: I3ac55ed9dd794cc28571026daea1c1b82ba750d8
2021-04-08 00:52:35 +00:00
Treehugger Robot
337ff24c83 Merge "Define ro.board.api_level property" am: c73f064573
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1666539

Change-Id: Ib05e6eee5f51c11b636e495a58db5ff814ff26fb
2021-04-08 00:51:33 +00:00
Satya Tangirala
10c2ed4e47 Merge "Keystore 2.0: sepolicy changes for vold to use keystore2" 2021-04-08 00:48:19 +00:00
Treehugger Robot
c73f064573 Merge "Define ro.board.api_level property" 2021-04-08 00:15:06 +00:00
Kalesh Singh
abdb06eec4 Merge "Sepolicy for mm_events" am: df4b04571b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1662143

Change-Id: Ibf510686fd5475f3a64c8cb5ea54a3b86374217c
2021-04-07 16:00:28 +00:00
Kalesh Singh
df4b04571b Merge "Sepolicy for mm_events" 2021-04-07 15:22:40 +00:00
Satya Tangirala
a999004528 Keystore 2.0: sepolicy changes for vold to use keystore2
Vold needs to be able to search for keystore2 and keystore2 maintenance
services, and call methods provided by those services.

Bug: 181910578
Change-Id: I6e336c3bfaabe158b850dc175b6c9a942dd717be
2021-04-07 02:14:33 -07:00
Kalesh Singh
326fc27064 Sepolicy for mm_events
Allow mm_events to periodically arm the mm_events
perfetto trace config if mm_events is enabled.

Bug: 183037386
Test: boot; setprop persist.mm_events.enabled true; No avc denials
Change-Id: Ia9760001e7fb591f18e3e816a63281167a658c74
2021-04-06 22:46:32 -04:00
Hung-ying Tyan
d83ab03f70 Merge "Add sepolicy for installd check sdcardfs usage property" am: 794b7d83ec
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1660037

Change-Id: I798984b2fc9511a955a42173a527cb18b9c82474
2021-04-07 01:14:17 +00:00
Hung-ying Tyan
794b7d83ec Merge "Add sepolicy for installd check sdcardfs usage property" 2021-04-07 00:49:28 +00:00
Justin Yun
02e5045a87 Define ro.board.api_level property
ro.board.api_level shows the current vendor api level under GRF.
It can be manually defined by setting BOARD_API_LEVEL. Unless
BOARD_API_LEVEL is defined, the ro.board.api_level property will be
defined automatically based on BOARD_SHIPPING_API_LEVEL and
PLATFORM_SDK_VERSION.

Bug: 176950752
Test: getprop ro.board.api_level
Change-Id: I03eeec8d8206abdd0565423d1b6a507d86d9b168
2021-04-07 09:02:44 +09:00
Yabin Cui
2e2df6b3a7 Add vendor_kernel_modules type to public.
Bug: 166559473
Bug: 183135316
Test: build and boot
Change-Id: Idc9f6235a1b69236ce274d9b3173f6d39ee04c82
Merged-In: Idc9f6235a1b69236ce274d9b3173f6d39ee04c82
(cherry picked from commit 3b23f17eae)
2021-04-06 14:28:36 -07:00
Treehugger Robot
54873f4d24 Merge "Allow derive_classpath to read /apex." am: 8fa9b428c7
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1662194

Change-Id: I15793824fee6537a1d02a7b7af22ddae3f1c68da
2021-04-06 19:28:44 +00:00
Treehugger Robot
8fa9b428c7 Merge "Allow derive_classpath to read /apex." 2021-04-06 19:06:56 +00:00
Wei Wang
9d42156d64 Merge "Add SEpolicy for HintManagerService" am: a02227bd7a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1664996

Change-Id: Ifcce2ee8dfb3d83b24934c796f8820697ce8a621
2021-04-06 17:35:50 +00:00
Wei Wang
a02227bd7a Merge "Add SEpolicy for HintManagerService" 2021-04-06 16:49:26 +00:00
Jenny Ho
42b0191e33 Add support for test_harness property am: e0efb683a7
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1665339

Change-Id: I6555520c2f720c229330ce1bb66662e9d184aeda
2021-04-06 16:02:11 +00:00
Artur Satayev
4c6d3081fd Allow derive_classpath to read /apex.
Individual apexes may contribute jars to BOOTCLASSPATH and friends.
Configuration for these contributions are in /apex/foo/etc/ files that
derive_classpath service reads and processes.

Bug: 180105615
Test: presubmit && DeviceBootTest
Change-Id: I61379e55f2ad55e1c65956b854e5a9b8872c61df
2021-04-06 15:14:19 +01:00
Jenny Ho
e0efb683a7 Add support for test_harness property
Bug: 180511460
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I796b29528522a615c8b15b0d7e53bb1903f1d965
2021-04-06 10:21:01 +00:00
Wei Wang
4b98ddfee4 Add SEpolicy for HintManagerService
Bug: 158791282
Test: Compiles, boots
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I76ad7858076b47990e5ddf3acb880443d0074e42
2021-04-06 00:01:57 -07:00
Yo Chiang
2fc844f5e8 Merge "Add rules for calling ReadDefaultFstab()" am: 0b4677c566
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1645115

Change-Id: I1adffb4e5710871737d7d3c893fa905f4f364c3f
2021-04-06 04:20:12 +00:00
Yo Chiang
0b4677c566 Merge "Add rules for calling ReadDefaultFstab()" 2021-04-06 03:37:58 +00:00