Commit graph

29360 commits

Author SHA1 Message Date
Hridya Valsaraju
e95e0ec0a5 Revert "Add neverallows for debugfs access"
Revert submission 1668411

Reason for revert: Suspect for b/186173384
Reverted Changes:
Iaa4fce9f0:Check that tracefs files are labelled as tracefs_t...
I743a81489:Exclude vendor_modprobe from debugfs neverallow re...
I63a22402c:Add neverallows for debugfs access
I289f2d256:Add a neverallow for debugfs mounting

Change-Id: I9b7d43ac7e2ead2d175b265e97c749570c95e075
2021-04-23 16:38:20 +00:00
Hridya Valsaraju
231c04b2b9 Revert "Exclude vendor_modprobe from debugfs neverallow restrictions"
Revert submission 1668411

Reason for revert: Suspect for b/186173384
Reverted Changes:
Iaa4fce9f0:Check that tracefs files are labelled as tracefs_t...
I743a81489:Exclude vendor_modprobe from debugfs neverallow re...
I63a22402c:Add neverallows for debugfs access
I289f2d256:Add a neverallow for debugfs mounting

Change-Id: I04f8bfdc0e5fe8d2f7d6596ed7b840332d611485
2021-04-23 16:38:20 +00:00
Hridya Valsaraju
a00863e4d8 Revert "Check that tracefs files are labelled as tracefs_type"
Revert submission 1668411

Reason for revert: Suspect for b/186173384
Reverted Changes:
Iaa4fce9f0:Check that tracefs files are labelled as tracefs_t...
I743a81489:Exclude vendor_modprobe from debugfs neverallow re...
I63a22402c:Add neverallows for debugfs access
I289f2d256:Add a neverallow for debugfs mounting

Change-Id: I398e7ecb0403c2044027c3145438d02b9ffaeb8a
2021-04-23 16:38:20 +00:00
Treehugger Robot
f02af9d91c Merge "Revert^3 "Build userdebug_plat_sepolicy.cil with Android.bp"" 2021-04-23 13:09:24 +00:00
Inseob Kim
a46d61cd3f Revert^3 "Build userdebug_plat_sepolicy.cil with Android.bp"
e10ceab330

Change-Id: Ia1b38d6b709edb0e819ea4700e70ba68b1b61332
2021-04-22 23:14:58 +00:00
Andrew Walbran
3b6a385137 Merge "Add crosvm domain and give virtmanager and crosvm necessary permissions." 2021-04-22 18:57:15 +00:00
Treehugger Robot
005ae599cd Merge changes from topic "debugfs_neverallow"
* changes:
  Check that tracefs files are labelled as tracefs_type
  Exclude vendor_modprobe from debugfs neverallow restrictions
  Add neverallows for debugfs access
  Add a neverallow for debugfs mounting
2021-04-22 16:41:06 +00:00
Florian Mayer
2b525c5ca3 Merge "Revert^2 "Build userdebug_plat_sepolicy.cil with Android.bp"" 2021-04-22 16:40:24 +00:00
Florian Mayer
e10ceab330 Revert^2 "Build userdebug_plat_sepolicy.cil with Android.bp"
0177004c7f

Change-Id: I40aa5025d487922decd9909c0d35c9e3a6b8dd61
2021-04-22 16:38:47 +00:00
Treehugger Robot
714864cc24 Merge "Revert "Build userdebug_plat_sepolicy.cil with Android.bp"" 2021-04-22 15:28:06 +00:00
Treehugger Robot
e0646ba15b Merge "sepolicy: Give access to ahal to flinger standby prop" 2021-04-22 02:36:46 +00:00
Bowgo Tsai
0177004c7f Revert "Build userdebug_plat_sepolicy.cil with Android.bp"
This reverts commit 57b64bd282.

Because it breaks the usage of boot-debug.img and
vendor_boot-debug.img.

Bug: 185970130
Bug: 185990198
Test: make bootimage_debug
Change-Id: I2c7c4f9954540a9be301b3ed0a6c2f0af2019803
2021-04-22 09:55:21 +08:00
David Massoud
47b6227134 Merge "Allow traced_probes to read devfreq" 2021-04-22 00:18:35 +00:00
Yurii Zubrytskyi
b382f02bf4 [incfs] Allow everyone read the IncFS sysfs features
Every process needs to be able to determine the IncFS features
to choose the most efficient APIs to call

Bug: 184357957
Test: build + atest PackageManagerShellCommandTest
Change-Id: Ia84e3fecfd7be1209af076452cc27cc68aefd80d
2021-04-21 15:15:40 -07:00
Hridya Valsaraju
fde9b8f069 Check that tracefs files are labelled as tracefs_type
Bug: 184381659
Test: make
Change-Id: Iaa4fce9f02d85f2657f2331b68ae5af318d0820f
2021-04-21 14:13:54 -07:00
Hridya Valsaraju
4b6d50dcb4 Exclude vendor_modprobe from debugfs neverallow restrictions
vendor_modprobe loads kernel modules which may create files in
debugfs during module_init().

Bug: 179760914
Test: build
Change-Id: I743a81489f469d52f94a88166f8583a7d797db16
2021-04-21 14:13:41 -07:00
Hridya Valsaraju
a0b504a484 Add neverallows for debugfs access
Android R launching devices and newer must not ship with debugfs
mounted. For Android S launching devices and newer, debugfs must only be
mounted in userdebug/eng builds by init(for boot time initializations)
and dumpstate(for grabbing debug information from debugfs using the
dumpstate HAL).

This patch adds neverallow statements to prevent othe processes
being provided access to debugfs when the flag PRODUCT_SET_DEBUGFS_RESTRICTIONS
is set to true.

Test: make with/without PRODUCT_SET_DEBUGFS_RESTRICTIONS
Bug: 184381659
Change-Id: I63a22402cf6b1f57af7ace50000acff3f06a49be
2021-04-21 14:13:22 -07:00
Hridya Valsaraju
1c3d898d87 Add a neverallow for debugfs mounting
Android R launching devices and newer must not ship with debugfs
mounted. For Android S launching devices and newer, debugfs must only be
mounted in userdebug/eng builds by init(for boot time initializations)
and dumpstate(for grabbing debug information from debugfs). This patch
adds a neverallow statement that prevents processes other than init
from being provided access to mount debugfs in non-user builds
when the flag PRODUCT_SET_DEBUGFS_RESTRICTIONS is set to true.

Test: make with/without PRODUCT_SET_DEBUGFS_RESTRICTIONS
Bug: 184381659
Change-Id: I289f2d25662a78678929e29f83cb31cebd8ca737
2021-04-21 14:13:02 -07:00
Steven Moreland
7534762861 Merge "sepolicy: allow BINDER_ENABLE_ONEWAY_SPAM_DETECTION for all processes" 2021-04-21 16:42:26 +00:00
Treehugger Robot
c78b80667c Merge "Make suspend_prop system_vendor_config_prop" 2021-04-21 00:28:12 +00:00
Benjamin Schwartz
c171a1d9b6 Make suspend_prop system_vendor_config_prop
Bug: 185810834
Test: adb shell getprop suspend.short_suspend_threshold_millis
Change-Id: I270057e5f81b220b7168573b516dd102650f11e1
2021-04-20 09:13:02 -07:00
Seth Moore
84742a3d92 Merge "Enable pull metrics from keystore" 2021-04-20 16:00:46 +00:00
Treehugger Robot
98dc738b57 Merge "Move install_recovery.sh file_contexts mapping" 2021-04-20 11:18:35 +00:00
Jeff Vander Stoep
bf49a89ba5 Move install_recovery.sh file_contexts mapping
The type is declared in vendor policy, so the mapping should live
there as well.

Fixes: 185288751
Test: TH
Change-Id: Ia446d7b5eb0444cdbd48d3628f54792d8a6b2786
2021-04-20 11:32:24 +02:00
Hang Lu
a251b7ed65 sepolicy: allow BINDER_ENABLE_ONEWAY_SPAM_DETECTION for all processes
BINDER_ENABLE_ONEWAY_SPAM_DETECTION is used to enable/disable oneway
spamming detection in binder driver, and can be set per-proc.

Bug: 181190340
Change-Id: Id799b19ee5a74b458e286dc29122c140a047bdad
2021-04-20 14:07:56 +08:00
Treehugger Robot
f5ec134342 Merge "Add a property to enable runtime debugfs restrictions in non-user builds" 2021-04-20 06:07:53 +00:00
Yo Chiang
9c66e3dfa3 Merge "Allow health storage HAL to read default fstab" 2021-04-20 02:36:06 +00:00
Xusong Wang
c4e559e04f Allow NN HAL service to read files from apk data files
This allows NNAPI users to pass in model data from the asset folder.

Bug: 184880878
Test: nnapi demo app with model data from asset file
Test: NNAPI benchmark CTS
Change-Id: I79ded4e9f35eb15e1f9f0d91308840e8b318d218
2021-04-19 16:39:49 -07:00
Treehugger Robot
644639584b Merge "Add permission checker service" 2021-04-19 16:54:46 +00:00
Treehugger Robot
e2133c2f3a Merge "Add existing ro.hdmi sysprops to sepolicy" 2021-04-19 08:29:45 +00:00
Paul Hu
78a7b56656 Merge "Amend networkstack sepolicy for testing" 2021-04-19 02:41:12 +00:00
Svet Ganov
214a65213a Add permission checker service
bug: 158792096

Test: atest CtsPermission5TestCases

Change-Id: I9dbbf2fe84131ba38ac70e7171e3bd826c150640
2021-04-17 23:41:50 +00:00
Nicolas Geoffray
6b393c128c Merge "Allow odrefresh to update the boot animation status." 2021-04-16 12:26:33 +00:00
David Massoud
c50fecd8ef Allow traced_probes to read devfreq
- Add dir read access to /sys/class/devfreq/
- Add file read access to /sys/class/devfreq/$DEVICE/cur_freq

Resolves the following denials:
W traced_probes: type=1400 audit(0.0:8):
avc: denied { read } for name="devfreq" dev="sysfs"
ino=28076 scontext=u:r:traced_probes:s0
tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0

W traced_probes: type=1400 audit(0.0:226):
avc: denied { read } for name="cur_freq" dev="sysfs"
ino=54729 scontext=u:r:traced_probes:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

See ag/14187061 for device specific sysfs_devfreq_cur labels

Bug: 181850306
Test: ls -Z, record perfetto trace
Change-Id: I23cebb16505313160e14b49e82e24da9b81cad70
2021-04-16 20:02:06 +08:00
Treehugger Robot
2678cacb3f Merge "Mark ro.kernel properties as deprecated" 2021-04-16 08:48:23 +00:00
Nicolas Geoffray
efef689e36 Allow odrefresh to update the boot animation status.
Test: m
Bug: 160683548
Change-Id: Ic7d3fe64a0ee54d6989e2a1b67e9eb0f6666b3a1
2021-04-16 09:26:38 +01:00
Roman Kiryanov
08f51ea1c0 Mark ro.kernel properties as deprecated
emulator migrated to `ro.boot`

Bug: 182291166
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I9cd443801ff7120ebb628acdc811f0eb339a02c9
2021-04-15 22:46:40 -07:00
Hridya Valsaraju
8403ed70de Add a property to enable runtime debugfs restrictions in non-user builds
This patch adds ro.product.enforce_debugfs_restrictions to
property_contexts. When the property is set to true in non-user builds,
init mounts debugfs in early-init to enable boot-time debugfs
initializations and unmounts it on boot complete. Similarly dumpstate
will mount debugfs to collect information from debugfs during bugreport
collection via the dumpstate HAL and unmount debugfs once done. Doing
so will allow non-user builds to keep debugfs disabled during runtime.

Test: make with/without PRODUCT_SET_DEBUGFS_RESTRICTIONS, adb shell am
bugreport
Bug: 184381659

Change-Id: Ib720523c7f94a4f9ce944d46977a3c01ed829414
2021-04-15 22:38:23 -07:00
Treehugger Robot
1c996021a5 Merge "Allow apexd to access a new dev_type: virtual disk" 2021-04-16 00:54:40 +00:00
Robert Horvath
8504938690 Add bootanim property context, ro.bootanim.quiescent.enabled property
Add property & property context to configure whether the bootanimation
should be played in a quiescent boot.

Bug: 185118020
Test: Set property through PRODUCT_PRODUCT_PROPERTIES
Test: Read property from bootanimation process
Change-Id: Ib9e88444da7f5e8000d7367199f5230f1e4d26d9
2021-04-15 14:56:17 +00:00
Treehugger Robot
6a864fd0b5 Merge "Label ro.boot.qemu" 2021-04-15 09:33:17 +00:00
Orion Hodson
cb0627099e Merge "Add odrefresh_data_file for odrefresh metrics" 2021-04-15 08:51:01 +00:00
Roman Kiryanov
640a58d3c1 Label ro.boot.qemu
This is an Android Studio Emulator (aka ranchu)
specific property, it is used for emulator
specific workarounds.

Bug: 182291166
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I2b8daf7c8ddb05b4082e4229f7b606c6ad4e717e
2021-04-14 23:51:11 -07:00
Treehugger Robot
8d2bfafcf5 Merge "Build userdebug_plat_sepolicy.cil with Android.bp" 2021-04-15 05:22:35 +00:00
Yi-Yo Chiang
2b708a2725 Allow health storage HAL to read default fstab
Fixes: 184797681
Bug: 181110285
Test: Presubmit
Test: atest VtsHalHealthStorageV1_0TargetTest
Change-Id: I87510bc82d742cd209846161cb73543308edcb09
2021-04-15 12:44:24 +08:00
Yo Chiang
1bb00f0d81 Merge "Allow shell to read default fstab" 2021-04-15 03:34:50 +00:00
Treehugger Robot
e40879c3b5 Merge "Allow mediaprovider to find the camera server." 2021-04-15 03:13:31 +00:00
Treehugger Robot
955362bfd0 Merge "Add keystore2 namespace for LocksettingsService." 2021-04-15 02:53:43 +00:00
Krzysztof Kosiński
a04ecbfd3e Allow mediaprovider to find the camera server.
Fixed SELinux denials when trying to render the camera preview
to a texture in an internal test app. See the bug for additional
information.

Bug: 183749637
Test: Ran the internal test app, doesn't crash anymore.
Change-Id: I8fb62be424cd91c46cada55bb23db1624707997d
2021-04-14 18:41:28 -07:00
Treehugger Robot
f40c8b67ca Merge "traced: move traced_tmpfs to public policy" 2021-04-14 23:40:03 +00:00