Commit Graph

236 Commits

Author SHA1 Message Date
Lee Shombert
2af7e0a1fb Merge "Rename the binder cache key for hasSystemFeature()" 2020-01-17 15:24:59 +00:00
Justin Yun
291d6b379d Use vndk_prop for old vndk properties
For vndk related properties, use vndk_prop context.
vndk_prop can be defined by 'init' and 'vendor_init', but free to
read by any processes.

Bug: 144534640
Test: check boot to see if the VNDK properties are readable
Change-Id: Ifa2bb0ce6c301ea2071e25ac4f7e569ea3ce5d83
2020-01-17 00:24:20 +00:00
Lee Shombert
d3625cdcec Rename the binder cache key for hasSystemFeature()
The code that uses the property has not been committed, so this change
has no impact on the codebase.

Bug: 140788621

Test: build an image that combines this change with the client code
and boot a phone.  Verify that there are no policy violations.

Change-Id: Ie6c1a791578c61adae5b71a38e61a2f5b20bb817
2020-01-16 14:56:27 -08:00
Collin Fijalkovich
8496548b38 Configure SELinux for PowerManager Caches
Setup SELinux to allow the world to read, and system_server to write, a
property used as an indicator that we need to refresh local caches
for PowerManager.isPowerSaveMode and PowerManager.isInteractive.

Bug: 140788621
Test: Flashed build and tested that phone boots and does not crash
as PowerManager operations take place.

Change-Id: I3e7e513756c8d881295721c2729cd37ad3bec8b8
2020-01-13 14:01:11 -08:00
Lee Shombert
bafd0c762a SELinux changes for the hasSystemFeature() binder cache property.
The binder_cache_system_server_prop context allows any user to read the
property but only the system_server to write it.  The only property with
this context is currently binder.cache_key.has_system_feature but users
will be added.

Bug: 140788621

Test: this was tested on an image with a binder cache implementation.  No
permission issues were found.  The implementation is not part of the current
commit.

Change-Id: I4c7c3ddf809ed947944408ffbbfc469d761a6043
2020-01-13 10:21:54 -08:00
Nikita Ioffe
0b099c801d Merge "Add userspace_reboot_config_prop property type" 2020-01-09 10:05:18 +00:00
Nikita Ioffe
f596cc859b Add userspace_reboot_config_prop property type
This property type will be used for read-only userspace reboot related
properties that are used to configure userspace reboot behaviour, e.g.:
* timeout for userspace reboot watchdog;
* timeout for services to terminate;
* timeout for services to shutdown;
* etc.

Since all this configuration is device specific, vendor_init should be
able to set these properties.

Test: build/soong/soong_ui.bash \
  --make-mode \
  TARGET_PRODUCT=full \
  TARGET_BUILD_VARIANT=eng \
  droid \
  dist DIST_DIR=/tmp/buildbot/dist_dirs/aosp-master-linux-full-eng/funwithprops \
  checkbuild
Bug: 135984674
Bug: 147374477

Change-Id: I1f69980aea6020e788d5d2acaf24c0231939907c
2020-01-08 22:43:57 +00:00
Anton Hansson
b84133555a Rename sdkext sepolicy to sdkextensions
The module is getting renamed, so rename all the policy
relating to it at the same time.

Bug: 137191822
Test: presubmit
Change-Id: Ia9d966ca9884ce068bd96cf5734e4a459158c85b
Merged-In: Ia9d966ca9884ce068bd96cf5734e4a459158c85b
(cherry picked from commit 6505573c36)
2020-01-08 11:41:18 +00:00
Robin Lee
cbfe879fe6 vendor_init can set config.disable_cameraservice
This had been settable by vendors up to and including Q release by
making config_prop avendor_init writeable. We don't allow this any
more. This should be a real vendor settable property now.

Bug: 143755062
Test: adb logcat -b all | grep cameraservice
Test: atest CtsCameraTestCases
Change-Id: Id583e899a906da8a8e8d71391ff2159a9510a630
2020-01-07 06:57:42 +00:00
Justin Yun
ed0a8ebe50 Revert "Revert "Define sepolicy for ro.product.vndk.version""
This reverts commit f536a60407.

Reason for revert: Resubmit the CL with the fix in vendor_init.te

Bug: 144534640
Test: lunch sdk-userdebug; m sepolicy_tests
Change-Id: I47c589c071324d8f031a0f7ebdfa8188869681e9
2020-01-06 15:12:14 +09:00
Justin Yun
f536a60407 Revert "Define sepolicy for ro.product.vndk.version"
This reverts commit 59e3983d1f.

Reason for revert: postsubmit fails in aosp/master

Change-Id: Icb10402ccdb6cff942a91adef341fe8f867f308a
2020-01-06 05:28:37 +00:00
Justin Yun
59e3983d1f Define sepolicy for ro.product.vndk.version
Define a new property_context vndk_prop for ro.product.vndk.version.
It is set by init process but public to all modules.

Bug: 144534640
Test: check if ro.product.vndk.version is set correctly.
Change-Id: If739d4e25de93d9ed2ee2520408e07a8c87d46fe
2020-01-06 11:08:23 +09:00
Nikita Ioffe
2848fa4d8b Revert "Reland: "Add userspace_reboot_config_prop property type""
This reverts commit 7b53803b53.

Reason for revert: breaks build
Exempt-From-Owner-Approval: revert to fix broken build
Change-Id: Ic26ee0a8b0a54b86034970e2b18edf0b5f4ec46f
2019-12-26 16:14:45 +00:00
Nikita Ioffe
7b53803b53 Reland: "Add userspace_reboot_config_prop property type"
Only difference with
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1198254
is userspace_reboot_config_prop is now system_restricted_prop.

Marking it as system_internal_prop breaks build:
neverallow check failed at out/target/product/generic/obj/ETC/built_plat_sepolicy_intermediates/built_plat_sepolicy:11968 from system/sepolicy/public/property.te:230
(neverallow base_typeattr_210 base_typeattr_467 (file (ioctl read write create setattr lock relabelfrom append unlink link rename open watch watch_mount watch_sb watch_with_perm watch_reads)))
<root>
allow at out/target/product/generic/obj/ETC/built_plat_sepolicy_intermediates/built_plat_sepolicy:13021
(allow vendor_init base_typeattr_502 (file (read getattr map open)))

Test: flash && adb shell getprop ro.init.userspace_reboot.is_supported
Test: m checkbuild
Bug: 135984674
Change-Id: I6f54dcff8d9b62224f315452e9c320648422b5db
2019-12-24 12:44:36 +00:00
Jayachandran Chinnakkannu
3bd8767540 Revert "Add userspace_reboot_config_prop property type"
This reverts commit 8b570f0c60.

Reason for revert: b/146792618 multiple build breaks

Change-Id: Ieab05ce56826d2fc84d46940935705abd2e1a55f
2019-12-23 19:01:13 +00:00
Nikita Ioffe
8b570f0c60 Add userspace_reboot_config_prop property type
This type will be used for read-only properties used to configure
userspace reboot behaviour (e.g. whenever device supports it, watchdog
timeout, etc.).

Test: adb shell getprop ro.init.userspace_reboot.is_supported
Bug: 135984674
Change-Id: I387b2f2f6e3ca96c66c8fa3e6719d013d71f76c7
2019-12-23 15:10:40 +00:00
Nikita Ioffe
8351252c69 Add ro.init.userspace_reboot.is_supported property
Devices that support userspace reboot are required to set this property
to true.

Test: builds
Bug: 135984674
Change-Id: I6cbff586e8813cf0a44d2ff8d6a2cf6dbdc295f0
2019-12-19 12:57:42 +00:00
Anton Hansson
5ebc4dc792 Add ro.build.version.extensions. policy
Public-readable int sysprops for the extension versions
will be in this bucket, e.g. ro.build.version.extensions.r

Bug: 137191822
Bug: 143937447
Test: boot and getprop ro.build.version.extensions.r
Change-Id: I200165d8903221b2d5b824e4eea77ef933919b74
2019-12-11 14:52:55 +00:00
Treehugger Robot
fa7898c3b6 Merge "Set odm and vendor build.version.incremental to be publicly readable" 2019-12-11 03:50:54 +00:00
Treehugger Robot
ecb84f87d8 Merge "Add property to skip idle for zram writeback" 2019-12-07 00:12:04 +00:00
Tomasz Wasilczyk
e7f2a17b2e Merge "Allow vendor-init selecting Vehicle HAL instance to use." 2019-12-06 16:55:48 +00:00
Srinivas Paladugu
7e31e9e541 Add property to skip idle for zram writeback
Vendors should be able set this property

Bug: 141756630
Test: Device boots up and zram writeback works
Change-Id: I0618df43579b3b63510df84e88bbcfd5e00abb16
2019-12-06 08:34:04 -08:00
Tomasz Wasilczyk
d9999bebc9 Allow vendor-init selecting Vehicle HAL instance to use.
Bug: 143779011
Test: added PRODUCT_PROPERTY_OVERRIDES for ro.vehicle.hal
Change-Id: I01ec302f3aedae0b021aa34952805e764d45f431
2019-12-05 08:49:49 -08:00
Victor Hsieh
8b65b0b12d sepolicy: allow rules for apk verify system property
ro.apk_verity.mode was introduced in P on crosshatch. This change
changes the label from default_prop to a new property, apk_verity_prop.

ro.apk_verity.mode is set by vendor_init per build.prop, in order to
honor Treble split.  It is also read by system_server and installd
currently.

Test: verify functioning without denials in dmesg
Bug: 142494008
Bug: 144164497
Change-Id: I1f24513d79237091cf30025bb7ca63282e23c739
2019-12-03 10:09:35 -08:00
Hsin-Yi Chen
26f34a497b Set odm and vendor build.version.incremental to be publicly readable
VTS and CTS-on-GSI report the device's ro.odm.build.version.incremental
or ro.vendor.build.version.incremental. The properties need to be
readable without root privilege.

Test: adb shell getprop ro.odm.build.version.incremental
Bug: 145255132
Change-Id: Ibb71185888cce022cb3a9be3e6fb2199d5f438d9
2019-11-28 08:41:37 +00:00
Mathieu Chartier
c075ef38d4 Merge "Revert "Remove ability to set profilebootimage and profilesystemserver"" 2019-11-22 22:52:45 +00:00
Nikita Ioffe
a0bba66aac Merge "Add selinux rules for userspace reboot related properties" 2019-11-20 13:04:16 +00:00
Nikita Ioffe
7065e46b5d Add selinux rules for userspace reboot related properties
By default sys.init.userspace_reboot.* properties are internal to
/system partition. Only exception is
sys.init.userspace_reboot.in_progress which signals to all native
services (including vendor ones) that userspace reboot is happening,
hence it should be a system_public_prop.

Only init should be allowed to set userspace reboot related properties.

Bug: 135984674
Test: builds
Test: adb reboot userspace
Change-Id: Ibb04965be2d5bf6e81b34569aaaa1014ff61e0d3
2019-11-19 17:41:28 +00:00
Mathieu Chartier
7e5e99fcf8 Revert "Remove ability to set profilebootimage and profilesystemserver"
The ability to set these properties is required by the
profilebootclasspath Android products.

Also fixed renamed property.

Bug: 139883463
Test: manually verified

This reverts commit 3079462443.

Change-Id: I7e8fceb974f34ea584799dd3e458279adee53e11
2019-11-15 13:20:25 -08:00
Orion Hodson
7b2ee48cd2 Add property contexts for dex2oat cpu-set properties
New properties are:

 dalvik.vm.dex2oat-cpu-set [default compiler thread affinity]
 dalvik.vm.boot-dex2oat-cpu-set [compiler thread affinity for boot]
 dalvik.vm.image-dex2oat-cpu-set [thread affinity recompiling the boot image]

Bug: 141446571
Test: Run installd tests with new properties defined in target mk file.
Change-Id: Idcbb1332aa9c18f6082b827eae0334d063644a41
2019-11-15 13:18:18 +00:00
Paul Crowley
6cbb3368df Merge "Replace "flags" property with "options" with same format as fstab" 2019-10-29 02:00:36 +00:00
Paul Crowley
dddf492468 Replace "flags" property with "options" with same format as fstab
Bug: 143307095
Test: Set override, check policy is as expected with sm set-virtual-disk

Change-Id: I78b36295141db43ae3e910c654696d3e36a24734
2019-10-24 23:26:02 -07:00
Evgenii Stepanov
7b49c478c8 Merge "Property contexts for ro.sanitize.*"
am: 4d067e8bc7

Change-Id: I3e4c7ae4a785dc3654b8f161f6330d1236e82159
2019-10-14 15:00:49 -07:00
Evgenii Stepanov
bc9e5f710e Property contexts for ro.sanitize.*
Bug: 142430632
Test: adb shell getprop ro.sanitize.hwaddress in hwasan build

Change-Id: I8e0fa0e6c865d18b94ffbdb6a0dddb1817adb364
2019-10-11 17:00:26 -07:00
Suren Baghdasaryan
19a44df5ef Merge "Allow vendor to configure new lmkd properties"
am: 2596545a86

Change-Id: I55a028cc5bb4083fe020688840c98c310e7de437
2019-10-11 07:47:09 -07:00
Suren Baghdasaryan
dc727308ed Allow vendor to configure new lmkd properties
Newly added ro.lmk.psi_partial_stall_ms, ro.lmk.psi_complete_stall_ms,
ro.lmk.thrashing_limit and ro.lmk.thrashing_limit_decay should be
configurable by vendors.

Bug: 132642304
Change-Id: Ifd3513c78e75d77be8d7c3594bef48ea27cc80b3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-10-10 10:11:24 -07:00
Pete Bentley
26449951ab Merge "Make ro.boringcrypto.hwrand public readable, vendor init settable."
am: 21c0347803

Change-Id: I46cea2b9701ecf12d365ed71d2e38c77bb90ce16
2019-10-08 11:59:28 -07:00
Pete Bentley
21c0347803 Merge "Make ro.boringcrypto.hwrand public readable, vendor init settable." 2019-10-08 18:42:21 +00:00
Pete Bentley
aa3aee5f03 Make ro.boringcrypto.hwrand public readable, vendor init settable.
https://boringssl-review.googlesource.com/c/boringssl/+/38024 will
introduce a feature allowing vendors finer grained control over
BoringSSL's random source by setting a system property.

The property needs to be settable from vendor init and readable by all
processes on the device.

As BoringSSL will be in a mainline module, we need to provide a
non-source code way of allowing vendor customisations.

Bug: 142129238
Test: Observe property is settable from /vendor/default.prop and
      readable by non-root, non-vendor processes.

Change-Id: I4c20349f1b2ab2f51ac11ec552b99b1e15b14dd8
2019-10-08 16:42:48 +01:00
Eric Biggers
6c8a49e1d4 Merge changes from topic "fscrypt-key-mgmt-improvements"
am: 0c8a90693a

Change-Id: I7b47cb2251dc2d8db8898b2d4bfe205b288e8558
2019-10-07 12:27:04 -07:00
Eric Biggers
53c3a1171f Export vold ro.crypto.volume.flags property
Allow vendor-init to set the new property ro.crypto.volume.flags so that
vendors can configure file-based encryption on adoptable storage to use
v2 encryption policies.  This is analogous to the existing properties
ro.crypto.volume.contents_mode and ro.crypto.volume.filenames_mode.

Bug: 140500999
Test: see If64028d8580584b2c33c614cabd5d6b93657f608
Change-Id: Ibde73e0556b6a08e2653149c1cdbf39cdcae6112
2019-09-30 13:11:52 -07:00
Paul Crowley
fa2cc0539e Merge "Export vold FDE algorithm properties"
am: 8cb6460058

Change-Id: I912cca35978e934dfc1458cee946f0f0c24760f5
2019-09-25 10:02:47 -07:00
yuguoxu
a894a1aa66 Export vold FDE algorithm properties
ro.crypto.fde_algorithm
ro.crypto.fde_sector_size
ro.crypto.volume.contents_mode

These properties were not added to sepolicy export2vold. vold can't access
crypto algorithm type when flashing a GSI image and when the properties are in
/vendor/build.prop. This prevents FDE from working.

Bug: 141518844
Change-Id: I234bda439f6be7a2211a194856baf75800396232
Signed-off-by: yuguoxu <yuguoxu@allwinnertech.corp-partner.google.com>
2019-09-25 16:29:54 +00:00
Steven Thomas
f98c3902c2 Allow access to the "refresh_rate_switching" system property
Bug: 136592946
Bug: 138261472

Test: Ran with the patch applied, confirmed surface flinger can access
the system property.

Change-Id: I259a488399c5e698de384322852ea81ea1a96e7d
Merged-In: I259a488399c5e698de384322852ea81ea1a96e7d
2019-09-11 18:30:50 -07:00
Steven Thomas
cdd812679f Allow access to the "refresh_rate_switching" system property
Bug: 136592946
Bug: 138261472

Test: Ran with the patch applied, confirmed surface flinger can access
the system property.

Change-Id: I259a488399c5e698de384322852ea81ea1a96e7d
Merged-In: I259a488399c5e698de384322852ea81ea1a96e7d
Exempt-From-Owner-Approval: Approved internally
2019-09-11 17:09:17 -07:00
TreeHugger Robot
fbcaf4380d Merge "Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master" into stage-aosp-master 2019-09-11 20:31:38 +00:00
Mathieu Chartier
3079462443 Remove ability to set profilebootimage and profilesystemserver
These properties should no longer be specified in the vendor rom.

Bug: 139883463
Test: manual

(cherry picked from commit 1f6eda4111)

Exempt-From-Owner-Approval: Cherry-pick from master
Merged-In: I510c917fa3c60dcbd3f104ebe619f34c69c821e6
Change-Id: I8b7cf03d7a2faceb03b83edcb47e831fbc8c8918
2019-09-09 19:49:10 +00:00
Xin Li
36edee480d Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master
Bug: 135460123
Change-Id: Ie43761a96540ce489b65d9ba467ebdfa2dfe6066
Merged-In: I87a1ce741a77f5bd3a4ea81f1c519f7c1955a3c6
2019-09-08 13:07:03 -07:00
Paul Lawrence
31e6fa2075 Merge "Fix ext4/metadata/udc problem"
am: 4d40aefa4b

Change-Id: I6d445070b533d3353a714fb043102c0be00cc883
2019-08-27 08:44:48 -07:00
Paul Lawrence
4d40aefa4b Merge "Fix ext4/metadata/udc problem" 2019-08-27 15:21:58 +00:00