Commit graph

23536 commits

Author SHA1 Message Date
Robert Shih
b60b51d352 Merge "Allow drm hals to access allocator hal" 2020-04-13 22:27:18 +00:00
Nikita Ioffe
bbdf8e4d95 Merge "Add init.userspace_reboot.started.timeoutmillis property" 2020-04-13 19:14:56 +00:00
Robert Shih
0ade37909c Allow drm hals to access allocator hal
Bug: 150468341
Test: atest VtsHalDrmV1_3TargetTest
Change-Id: Iea8934567cda343dedf17f75cb0807a68742764d
2020-04-13 17:30:18 +00:00
Nikita Ioffe
7947d580e3 Add init.userspace_reboot.started.timeoutmillis property
This property controls how much userspace reboot watchdog will wait for
userspace reboot to start before falling back to hard reboot.

Test: builds
Bug: 152803929
Change-Id: I6955e8c94708e7e4161e4f334b03c052d42c0f9f
2020-04-11 02:00:01 +01:00
Ytai Ben-Tsvi
d107a05402 Allow system_server to set audio properties
Defined a new signal intended to allow the system to reboot
the audio/soundtrigger HAL process.

Fixes: 153461865
Test: See main change in topic
Change-Id: I1e4a770670bb1274fa6a23cd0641f2554d4679f7
2020-04-10 15:58:51 -07:00
Steven Moreland
000ec93900 treble_sepolicy_tests.py: require recognized loc
Before, we were silently ignoring unrecognized paths.

Bug: 152813275
Test: m (runs this test)
Test: reproduce every error I've added
Change-Id: I4a0b8fb9fff070d16126caa1499590693a6d2895
2020-04-08 23:17:16 +00:00
Inseob Kim
3f5a7d247a Rename exported and exported2 vold prop
This is a subtask to clean up bad context names "exported*_prop".

Bug: 152469526
Test: m
Change-Id: Ie2d4046732e9d6562294fa664dcd7f019aa7c229
2020-04-07 12:56:23 +09:00
Paul Crowley
b9021fcd80 Merge "Vendors may choose dm-default-key options format" 2020-04-07 03:23:57 +00:00
Florian Mayer
6549757914 Merge "Refactor sepolicy to support central mode on user." 2020-04-06 18:39:31 +00:00
Paul Crowley
c115da5968 Vendors may choose dm-default-key options format
Bug: 150761030
Test: setting to 1 in device/google/cuttlefish/shared/device.mk
    causes "default-key: Not enough arguments" as expected.
Change-Id: I73262efff0be15f0295d23168049ed9e3721a7f7
2020-04-06 08:46:08 -07:00
Florian Mayer
356b98d552 Refactor sepolicy to support central mode on user.
Functionally this is a no-op change.

Bug: 152976928
Change-Id: If4c0c6c74e60cc84f4adedfd430b385795cd15eb
2020-04-06 12:33:43 +00:00
Treehugger Robot
bb693183a0 Merge "build/file_utils: Newline for mapping files" 2020-04-03 19:39:47 +00:00
Steven Moreland
a531789459 Merge "Remove treble coredomain whitelist." 2020-04-03 17:41:20 +00:00
Steven Moreland
a00530b07c Remove treble coredomain whitelist.
Seems that this is no longer needed, except for vendor_init.

Bug: 152813275
Test: m (runs this test)
Change-Id: I773053cbe1a84911684cc2ff15904ee7ddf7a73e
2020-04-02 16:02:54 -07:00
Treehugger Robot
15ac2abfd7 Merge "Create surfaceflinger_prop and migrate props" 2020-04-02 22:38:42 +00:00
Robin Lee
e58b2d4cae Allow blank_screen to make binder calls to the servicemanager
blank_screen can not find and use the lights HAL if it cannot use the servicemanager. This
broke turning off the display during shutdown.

Change-Id: I6aff1cb71f805637abc79493ba2574143c5cf7cf
Test: adb root; adb shell setenforce 1; adb shell setprop ctl.start blank_screen
Test: adb logcat -b all | grep 'denied'
Bug: 151363454
2020-04-02 18:40:11 +02:00
Treehugger Robot
fcdb7145c1 Merge "Reduce graphics logspam" 2020-04-02 13:06:35 +00:00
Jeff Vander Stoep
67896eef07 Reduce graphics logspam
There is no change in behavior. These denials were already
being blocked.

Bug: 79617173
Test: build
Change-Id: Iffd1e5ba42854615eeea9490fe9150678ac98796
2020-04-02 13:43:26 +02:00
Inseob Kim
94bae860a9 Create surfaceflinger_prop and migrate props
This is a subtask of removing exported*_prop.

Bug: 152468529
Test: m && boot crosshatch
Change-Id: I9d6ec7ade96a3a53288f23d155cc829c2107bb6f
2020-04-02 11:21:14 +00:00
Jeff Vander Stoep
8c9826ec21 Track another instance of b/77870037
Bug: 77870037
Test: build
Change-Id: I77f5888aaf0fedd07635e301dbc642e3f8749688
2020-04-02 10:17:22 +02:00
Treehugger Robot
cb4138129a Merge "Rename exported2_config_prop to systemsound_config_prop" 2020-04-02 00:24:28 +00:00
Treehugger Robot
d7d59798d0 Merge "iorapd: Allow dumpstate (bugreport) to dump iorapd" 2020-04-01 19:32:40 +00:00
Collin Fijalkovich
25e9ff9ddc Merge "Allow Traceur record the mm_event trace event." 2020-04-01 16:57:09 +00:00
Inseob Kim
fd2d6ec3bc Rename exported2_config_prop to systemsound_config_prop
Fixing bad names (exported*_prop) on property contexts.

Bug: 152468650
Test: m sepolicy_tests
Change-Id: Ie98212ee0fa89966e70faa83322b65b613f3b3f5
2020-04-01 18:23:39 +09:00
Florian Mayer
487bf1c5ff Allow incidentd to attach perfetto traces on user.
Bug: 151140716
Change-Id: I821d1a504e6ffcea3a52e2c76bf2290e7b382a48
2020-04-01 10:41:14 +02:00
Igor Murashkin
e67fad5deb iorapd: Allow dumpstate (bugreport) to dump iorapd
Bug: 152616197
Test: adb bugreport
Change-Id: I36e3b6d847341ddd84792ccc3f2c2c620e1c3f7b
Merged-In: I36e3b6d847341ddd84792ccc3f2c2c620e1c3f7b
2020-03-31 13:48:47 -07:00
Felix
0d6864aebd build/file_utils: Newline for mapping files
Previous behaviour:
Test: Set `PRODUCT_PUBLIC_SEPOLICY_DIRS`, causing
      `product_sepolicy.cil` and `product_mapping_file` to
      be generated. Do not use any `type` declarations that
      would require a mapping in product sepolicy, e.g. only
      define macros.
      Run `make selinux_policy`, observe error:
```
FAILED: out/target/product/mydevice/obj/ETC/plat_pub_versioned.cil_intermediates/plat_pub_versioned.cil
/bin/bash -c "(out/host/linux-x86/bin/version_policy -b out/target/product/mydevice/obj/FAKE/sepolicy_neverallows_intermediates/pub_policy.cil -t out/target/product/mydevice/obj/FAKE/sepolicy_neverallows_intermediates/pub_policy.cil -n 10000.0 -o out/target/product/mydevice/obj/ETC/plat_pub_versioned.cil_intermediates/plat_pub_versioned.cil ) && (out/host/linux-x86/bin/secilc -m -M true -G -N -c 30 		out/target/product/mydevice/obj/ETC/plat_sepolicy.cil_intermediates/plat_sepolicy.cil  out/target/product/mydevice/obj/ETC/product_sepolicy.cil_intermediates/product_sepolicy.cil out/target/product/mydevice/obj/ETC/plat_mapping_file_intermediates/10000.0.cil  out/target/product/mydevice/obj/ETC/product_mapping_file_intermediates/10000.0.cil out/target/product/mydevice/obj/ETC/plat_pub_versioned.cil_intermediates/plat_pub_versioned.cil -o /dev/null -f /dev/null )"
Failure reading file: out/target/product/mydevice/obj/ETC/product_mapping_file_intermediates/10000.0.cil
```
This is caused by `secilc.c` trying to read the empty file:
```
rc = fread(buffer, file_size, 1, file);
```

Fix: Append a newline to make sure any file processed by
`filter_out` is still readable by secilc.

After:
Test: `make selinux_policy` with same preconditions.

Signed-off-by: Felix <google@ix5.org>
Change-Id: I6dcfcccdfa83121bbdc09632f7a2b609ef932fc9
2020-03-31 17:56:49 +02:00
Treehugger Robot
cdc1a840ea Merge "Ignore the denial when system_other is erased" 2020-03-31 11:52:32 +00:00
Bowgo Tsai
35c2f102f2 Ignore the denial when system_other is erased
This CL addresses the following denial, when the system_other
partition is erased. This happens when 1) the device gets an
OTA update and 2) factory reset to wipe userdata partition.

Note that the system_other partition will be mounted under
/postinstall only in the first boot after factory reset.
Also, system_other.img is only included in the factory ROM and
is absent in the OTA package. When it is absent and userdata
is wiped, the mount will fail and triggers the following denials
when both cppreopts.sh and preloads_copy.sh access /postinstall dir.

SELinux denials to address:
  avc: denied { search } for comm="find" name="postinstall" dev="dm-5"
  ino=44 scontext=u:r:preloads_copy:s0
  tcontext=u:object_r:postinstall_mnt_dir:s0 tclass=dir permissive=0

  avc: denied { search } for comm="cppreopts.sh" name="postinstall" dev="dm-5"
  ino=44 scontext=u:r:cppreopts:s0
  tcontext=u:object_r:postinstall_mnt_dir:s0 tclass=dir permissive=0

Bug: 152453231
Test: fastboot erase system_other (e.g., system_b) and fastboot -w
Change-Id: Ie67f02467d5da51b0caba6e8fda56bc2c6bbc944
2020-03-31 13:58:11 +08:00
Collin Fijalkovich
2d1e4ce577 Allow Traceur record the mm_event trace event.
Bug: 150130660
Test: Took a trace with Traceur and verified mm_event records
were included when the memory category was enabled.

Change-Id: Iea39467d0d37d12a78fbde57b8d9649fad45b652
2020-03-30 16:23:32 -07:00
Peter Collingbourne
e432c093b7 Merge "Update sepolicy to account for crash_dump move." 2020-03-30 19:03:42 +00:00
David Anderson
8d0e599fb4 Merge "fastbootd: Allow flashing the cache partition." 2020-03-27 23:48:13 +00:00
Treehugger Robot
d30653d84b Merge "Allow audio HAL to access application shared memory" 2020-03-27 08:26:42 +00:00
Howard Chen
c79439f729 Merge "Allow developer settings to query gsid status" 2020-03-27 08:07:12 +00:00
Roman Kiryanov
f7e86d40e1 Merge "Label android.hardware.lights-service.example as hal_light_default_exec" 2020-03-27 00:39:38 +00:00
Ram Muthiah
d145478876 Merge "Update core sepolicy with neuralnetwork hal" 2020-03-26 23:41:23 +00:00
Ytai Ben-Tsvi
d09bf56664 Allow audio HAL to access application shared memory
Bug: 151190218
Change-Id: I430ebe60e192803a3cc699477db83d1a33f8c62e
2020-03-26 16:02:39 -07:00
Roman Kiryanov
e0cc8b0f63 Label android.hardware.lights-service.example as hal_light_default_exec
Bug: 152544844
Test: ls -Z /vendor/bin/hw/android.hardware.lights-service.example
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I32a6a443c57986b37fdcca788bfe01bf0cdd3e07
2020-03-26 14:32:15 -07:00
Treehugger Robot
1beea32dab Merge "Implement sysprop type checker" 2020-03-26 21:22:26 +00:00
Ram Muthiah
14f1a7f47e Update core sepolicy with neuralnetwork hal
Bug: 152338071
Bug: 145388549
Test: Forrest
Change-Id: I8224c04806db829ef20156d656755f7fc5874e3e
2020-03-26 13:21:46 -07:00
David Anderson
91f28e0c2c fastbootd: Allow flashing the cache partition.
This fixes the following denial:
  avc:  denied  { write } for  pid=332 comm="fastbootd" name="mmcblk0p35" dev="tmpfs" ino=11234 scontext=u:r:fastbootd:s0 tcontext=u:object_r:cache_block_device:s0 tclass=blk_file permissive=0
  avc:  denied  { ioctl } for  pid=294 comm="fastbootd" path="/dev/block/mmcblk0p35" dev="tmpfs" ino=6953 ioctlcmd=0x1277 scontext=u:r:fastbootd:s0 tcontext=u:object_r:cache_block_device:s0 tclass=blk_file permissive=0

Bug: 150112538
Test: fastboot flash cache on non-A/B device
Test: fastboot erase cache on non-A/B device
Change-Id: Ib2288b42f2bb47e83b1476319669d6c2719db2ec
2020-03-25 20:58:40 -07:00
Hayden Gomes
a010cef7ad Add android.hardware.automotive.audiocontrol@2.0-service to file_contexts
Bug: 148098383
Test: built and ran with new version
Change-Id: I06f8f2cd73dce73111559664871bdd3c9b814d7c
2020-03-25 15:00:10 -07:00
Nikita Ioffe
df8e2672f0 Merge "Use properties for various userspace reboot timeouts" 2020-03-25 20:02:05 +00:00
Zimuzo Ezeozue
c63e10d83c Merge "Grant MediaProvider access to /mnt/media_rw" 2020-03-25 18:40:00 +00:00
Nikita Ioffe
9e6588dc95 Use properties for various userspace reboot timeouts
Test: adb reboot userspace
Bug: 146560409
Change-Id: I62408f0e59622c2dab1245897c3057d02c5716a9
2020-03-25 17:46:45 +00:00
Steven Moreland
91acf22c62 Merge "Add rules for hidl_lazy_test*" 2020-03-25 17:34:50 +00:00
Treehugger Robot
d8f270ef6e Merge "Add android.hardware.dumpstate@1.1-service.example to file_contexts" 2020-03-25 16:54:06 +00:00
Zim
64011ac697 Grant MediaProvider access to /mnt/media_rw
Copied access from the old mediaprovider.te to the new
mediaprovider_app.te.

Test: MediaProvider can create dirs on /mnt/media_rw/<uuid>
Bug: 151981237
Change-Id: Icdb260d2e76a05a15512a5dd00e08f8ae861dce6
2020-03-25 13:36:06 +00:00
Inseob Kim
cd6164933f Implement sysprop type checker
sysprop type checker compares a sysprop_library API file and
property_contexts files, and detects if there are any mismatches of
property types. For example, the following snippets are detected.

// foo.sysprop
prop {
prop_name: "ro.foo.bar"
type: Integer
...
}

// property_contexts
ro.foo.bar u:object_r:foo_prop:s0 exact string

"ro.foo.bar" is an Integer in .sysprop file, but it's a string in
property_contexts file.

Bug: 151879375
Test: sysprop_test
Test: run "m PlatformProperties" and see existing mismatches.
Change-Id: Ieb9965d14b8c90cfc730c3d20d95a28ecaabeba4
2020-03-25 11:13:29 +09:00
Steven Moreland
e4f0ccf29c Add rules for hidl_lazy_test*
eng/userdebug rules added for integration testing of hidl_lazy_test,
similar to aidl_lazy_test.

This is required in sepolicy since the test requires defining a service
in an init.rc file, and so there needs to be sepolicy for init to start
this service.

Bug: 148114689
Test: hidl_lazy_test
Change-Id: Id6549cbb89b62d3f6de1ae2690ce95c3e8656f66
2020-03-24 18:34:58 -07:00