Commit Graph

1182 Commits

Author SHA1 Message Date
Yueyao Zhu
42d5bf7c24 USB: HAL: run as user root, group root system
This allows USB HAL to write USB sysfs nodes.

Bug: 38352281
Change-Id: Iaf8f1bad1a0394e553996b7a42bc34745b769b16
2017-07-24 19:49:17 -07:00
Max Bires
182cbac7e0 Merge "Removing TODO upon bug resolution and fixing boot denial" into oc-dr1-dev 2017-07-24 17:09:53 +00:00
TreeHugger Robot
ebe5119b1f Merge "Remove non-safe mode boot vibration." into oc-dr1-dev 2017-07-24 12:46:14 +00:00
TreeHugger Robot
28a893290d Merge "Fixing a perfd denial on bootup" into oc-dr1-dev 2017-07-24 04:59:42 +00:00
Max Bires
360c1974e1 Fixing a perfd denial on bootup
denied { read } for pid=834 comm="perfd" name="clkscale_enable"
dev="sysfs" ino=37814 scontext=u:r:perfd:s0 tcontext=u:object_r:sysfs:s0
tclass=file

Test: no perfd denials on boot
Bug: 63944830
Change-Id: I08cd03725ae412ae985dcdf0b943003872a97b67
2017-07-23 14:16:16 -07:00
TreeHugger Robot
64e0268253 Merge "init.hardware.rc: disable bus-dcvs during boot" into oc-dr1-dev 2017-07-22 08:14:36 +00:00
Wei Wang
1dcf62a310 init.hardware.rc: disable bus-dcvs during boot
This CL will save 100ms towards system_server_ready and 200ms towards
BootComplete,  and also reduces the fluctuation per experiment.

- Enable powersaving in charger mode
- Enable bus-dcvs in boot_complete but not during boot
- Start perfd after init.power.sh completes
- Enable powerhint after perfd is started

Before
starting_zygote               : 3.4446  0.24937
nonencrypted                  : 3.678   0.23805
SystemServer_start            : 4.8719  0.25874
SystemUi_start                : 6.3992  0.36695
system_server_ready           : 6.7353  0.34765
BootAnimStopRequest           : 7.5966  0.3806
BootAnimEnd                   : 9.5259  0.399
BootComplete                  : 9.6221  0.42225

After:
starting_zygote               : 3.4261  0.22712
nonencrypted                  : 3.665   0.22334
SystemServer_start            : 4.8406  0.23445
SystemUi_start                : 6.2765  0.23754
system_server_ready           : 6.6392  0.23679
BootAnimStopRequest           : 7.7449  0.25752
BootAnimEnd                   : 9.2631  0.43299
BootComplete                  : 9.409   0.44021

Bug: 63644084
Test: 10 boot with packages/services/Car/tools/bootanalyze/bootanalyze.py
Change-Id: I975974dedea0cce23f74f15d842e7308e9797868
2017-07-21 22:23:54 -07:00
TreeHugger Robot
cb6458173f Merge "Allow sensors daemon to read hardware version files" into oc-dr1-dev 2017-07-22 01:10:38 +00:00
Max Bires
a92bd32a1d Removing TODO upon bug resolution and fixing boot denial
denied { read } for pid=708 comm="vold" name="/" dev="sda4" ino=2
scontext=u:r:vold:s0 tcontext=u:object_r:persist_file:s0 tclass=dir

Bug: 35810138
Test: Above denial no longer appears on boot, vold works under enforcing
Change-Id: I78add787fa732e0cf20a3e205f866554d17d0e18
2017-07-21 21:55:07 +00:00
TreeHugger Robot
6e4663fc05 Merge "wahoo: add launch hint to atrace" into oc-dr1-dev 2017-07-21 21:52:04 +00:00
TreeHugger Robot
5cf711293d Merge "Run sensors daemon as system user instead of root" into oc-dr1-dev 2017-07-21 21:11:25 +00:00
TreeHugger Robot
6b071f8e13 Merge "init.hardware.rc: Fix file permissions in persist" into oc-dr1-dev 2017-07-21 19:41:57 +00:00
Brian Duddie
b5e50bed86 Allow sensors daemon to read hardware version files
Permit the sensors daemon to read files in /sys/devices/soc0, which is
used to identify the hardware revision it is running on, so it can
properly handle registry variations.

Addresses these denials (and more which would occur if only the blocked
operations were permitted):

type=1400 audit(2017551.030:4): avc: denied { getattr } for pid=805
comm="sensors.qcom" path="/sys/devices/soc0/hw_platform" dev="sysfs"
ino=50525 scontext=u:r:sensors:s0 tcontext=u:object_r:sysfs_soc:s0
tclass=file permissive=0

Bug: 63857630
Bug: 63901499
Test: confirm denials do not appear on boot, sanity check all sensors
provide data, run sensors CTS
Change-Id: I2ba59a21b22d09af03226d5993d80e1d868bf607
2017-07-21 11:49:52 -07:00
Brian Duddie
b04b13e976 Run sensors daemon as system user instead of root
Grant capabilities and change file permissions to allow the sensors.qcom
daemon to start up as the system user/group, rather than running as
root.

Fixes: 63775281
Test: monitor logcat after reboot, confirm no file open errors. Run
QSensorTest, confirm all sensors provide sane data. Confirm that
IMU calibration can read + write its saved settings. Run sensors CTS.
Change-Id: Ib80ea21900d6af6cd34c82c4a63f50c7e0ac18ff
2017-07-21 11:49:42 -07:00
TreeHugger Robot
220b681c4c Merge "tango_core.te: Allow shell data file access to tango" into oc-dr1-dev 2017-07-21 18:19:36 +00:00
TreeHugger Robot
144a1962a9 Merge "sensors: address selinux denial" into oc-dr1-dev 2017-07-21 18:02:42 +00:00
Tim Murray
bc778abc97 wahoo: add launch hint to atrace
Adds some tracing for the launch hint in the power HAL.

Test: extra trace data confirmed
bug 63913311

Change-Id: I6a207e4a0134650f9d339648a1058ddf5b2e7d9c
2017-07-21 10:37:51 -07:00
Jeff Vander Stoep
a7f3c18a08 init.hardware.rc: Fix file permissions in persist
The following files are new and need their permissions fixed up:
/persist/rfs/msm/slpi
/persist/rfs/mdm/slpi
/persist/rfs/mdm/tn

Addresses:
avc: denied { dac_override } for comm="tftp_server" capability=1
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability
avc: denied { dac_read_search } for comm="tftp_server" capability=2
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability
avc: denied { dac_override } for comm="tftp_server" capability=1
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability
avc: denied { dac_read_search } for comm="tftp_server" capability=2
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability
avc: denied { dac_override } for comm="tftp_server" capability=1
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability
avc: denied { dac_read_search } for comm="tftp_server" capability=2
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability

Bug: 63921446
Test: Build and flash. Verify file permissions are correct now.
Change-Id: Id4cbafc345c9019530ce3c6fe4147186947c5c76
2017-07-21 10:32:53 -07:00
Michael Wright
9000a6ecd1 Remove non-safe mode boot vibration.
Ding, dong the BZZZZT is dead.

Bug: 22414771
Test: Manual.
Change-Id: I211898192af37dbaad9c0a10c773ee7786b1e084
2017-07-21 16:40:16 +01:00
TreeHugger Robot
38f652ec50 Merge "Force off display state after doze states." into oc-dr1-dev 2017-07-21 14:53:40 +00:00
Michael Plass
ac26db3405 Merge "Adjust wifi RSSI thresholds for 2017 devices" into oc-dr1-dev 2017-07-21 04:48:28 +00:00
TreeHugger Robot
4e3275a9b7 Merge "init.hardware.rc: set ioprio to realtime for rmt_storage" into oc-dr1-dev 2017-07-21 03:49:40 +00:00
Ranjith Kagathi Ananda
6935ce7f07 tango_core.te: Allow shell data file access to tango
avc: denied { search } for name="tmp" dev="sda45" ino=6782978
scontext=u:r:tango_core:s0:c512,c768
tcontext=u:object_r:shell_data_file:s0 tclass=dir permissive=1

avc: denied { read } for name="includes.txt" dev="sda45" ino=6782980
scontext=u:r:tango_core:s0:c512,c768
tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=1

avc: denied { open } for path="/data/local/tmp/ajur/includes.txt"
dev="sda45" ino=6782980 scontext=u:r:tango_core:s0:c512,c768
tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=1

BUG=63124901
Test: Tested tango cts

Change-Id: Idb6f1f37070652922924f7f948e7c05d4609f010
2017-07-20 17:06:37 -07:00
Siqi Lin
fc754502a7 Merge changes Id97d7cdf,I8743a2bb into oc-dr1-dev
* changes:
  Allow init.power.sh to change printk console_suspend
  Remove no_console_suspend=1 from kernel command line
2017-07-20 22:37:00 +00:00
Jeff Vander Stoep
d209d46ba1 sensors: address selinux denial
avc: denied { search } for name="soc0" dev="sysfs" ino=49978
scontext=u:r:sensors:s0 tcontext=u:object_r:sysfs_soc:s0 tclass=dir
permissive=0

Bug: 63901499
Test: build and boot. Verify denial no longer occurs
Change-Id: I623b742ec68552921685d18f986ca32d71c090a8
2017-07-20 13:54:12 -07:00
TreeHugger Robot
de5bf7bd6f Merge "label persist partition and grant e2fsck access" into oc-dr1-dev 2017-07-20 20:14:55 +00:00
Siqi Lin
2e0ef591c3 Allow init.power.sh to change printk console_suspend
Bug: 63856769
Test: boot with serial console enabled / disabled
Change-Id: Id97d7cdf6e3093f2b6caaa2c7cd9bfa64a282a98
2017-07-20 13:05:21 -07:00
Siqi Lin
14983536bf Remove no_console_suspend=1 from kernel command line
console_suspend defaults to Y in the kernel and we want
to control it in an init script where we set
console_suspend = Y if serial console is enabled and
console_suspend = N if serial console is disabled.

Bug: 63857173
Test: boot with serial console enabled / disabled
Change-Id: I8743a2bbda0d09596d46b9376c901e854677a0e5
2017-07-20 13:05:21 -07:00
Michael Plass
b36ad11b48 Adjust wifi RSSI thresholds for 2017 devices
Use the same values as for the 2016 devices for now.

Bug: 63892929
Test: manual
Change-Id: Iffa21671249028ff51e114dae12deea77c16ffda
2017-07-20 11:22:56 -07:00
Jeff Vander Stoep
05c1a7083a label persist partition and grant e2fsck access
avc:  denied  { read write } for  p)9 cgLe=2bs`+" name<sda `V=
945(qcg text=u:r:Frck:s0tbkntdpt=u:lb

Bug: 63874026
Test: build and flash, verify no new denials
Change-Id: I4aba660643323f2401963addd73bf674509f8ee0
2017-07-20 10:47:03 -07:00
Michael Wright
2c45c171d8 Force off display state after doze states.
Bug: 63531607
Test: manual
Change-Id: I4f3a863709a970f0fc8682c0a0c3547886e1fd0f
2017-07-20 18:22:02 +01:00
Jeff Vander Stoep
64f5ed4100 init.hardware.rc: set ioprio to realtime for rmt_storage
Setting ioprio to realtime within rmt_stroage requires unnecessarily
granting CAP_SYS_ADMIN, which is a highly privileged superuser
capability.

Having init set ioprio at service launch removes the need for
granting this capability and keeps rmt_storage unprivileged.

Addresses the following errors:
07-20dd 14:21:03.867   824   824 W rmt_storage: type=1400 audit(0.0:4):
avc: denied { sys_admin } for capability=21 scontext=u:r:rmt_storage:s0
tcontext=u:r:rmt_storage:s0 tclass=capability permissive=0
07-20 14:21:03.874   824   824 E rmt_storage: Error setting io priority
to CLASS_RT (1)

Test 1 and 2 below verify that my change results in the intended
behavior. Test 3 is a sanity check to show the state without
granting CAP_SYS_ADMIN and to demonstrate that my change results
in the intended state.

Test: original code with CAP_SYS_ADMIN granted
    # ionice -p <rmt_storage pid>
    Realtime: prio 0
Test: ioprio_set moved to init.rc script
    # ionice -p <rmt_storage pid>
    Realtime: prio 0
Test: original code without CAP_SYS_ADMIN granted (sanity check)
    # ionice -p <rmt_storage pid>
    unknown: prio 0

Bug: 63074582
Change-Id: I9bc660aaca72f3df562e8010bc23c9731f648a9e
2017-07-20 08:17:34 -07:00
Jayachandran C
9882d1d7a6 AU293 drop rebase for IMS and radio related changes
1) Explicitly specify uid, gid and groups needed for cnd Add
CAP_BLOCK_SUSPEND
2) Move sys.ims properties to vendor.ims
3) Remove imscmservice from init as its not used on Pixel

Bug: 63850865
Bug: 63804057
Change-Id: Ie8f0eefa96a21605a63ae5a73e59270866704ed7
2017-07-19 23:49:55 -07:00
Nick Desaulniers
fd52eb310c Revert "init: restart qseecomd once /data is mounted"
This reverts commit 134f509da1.

I'm not sure if the start time of qseecomd has been moving around, but
it seems that this is no longer necessary.

Bug: 37589340
Test: enroll new fingerprints and authenticate with them. FDR should not
  have problems upon reboot.
Change-Id: I0b817143de5f3aa13ac5baabfe3c8a59f0341710
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2017-07-20 06:31:43 +00:00
TreeHugger Robot
4e102dfdcb Merge "THERMAL HAL API 1.0 impl for Wahoo" into oc-dr1-dev 2017-07-20 01:47:09 +00:00
TreeHugger Robot
9f50e56a0d Merge "usb: add idVendor value for configfs" into oc-dr1-dev 2017-07-20 01:38:53 +00:00
Wei Wang
a81f5612fe THERMAL HAL API 1.0 impl for Wahoo
Thermal HAL 1.0 implementation for wahoo

Bug: 36458508
Test: VtsHalThermalV1_0TargetTest pass
Test: Check thermalHAL log
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I88831aec5c388269cb78f8cbd966ecae55f1cff2
2017-07-19 12:44:17 -07:00
Brian Duddie
27efdfcceb Run CHRE daemon as system user instead of root
Bug: 63818298
Test: confirm CHRE starts up, and HAL can communicate with it via
monitoring logcat and running lshal debug
Change-Id: I72f74d66f98266ba1bcd417e5ec61ace4ddb780c
2017-07-18 16:24:14 -07:00
Jie Song
c088662d68 Merge "Add SELinux rules for MDS app" into oc-dr1-dev 2017-07-18 21:41:11 +00:00
Yueyao Zhu
ffb13f69f0 Move AB_OTA_PARTITION vendor to vendor makefiles
Bug: 63802619
Change-Id: Ic67a9c02f6343d0154b7f95cbe7dd5b909ebe25d
2017-07-18 11:36:55 -07:00
Jie Song
b05fb1bb1e Add SELinux rules for MDS app
Bug: 63147021
Test: Verify app can run and access diag interface
Change-Id: I6aaadd5af6508aee8229968636e4f76c8c957d5e
(cherry picked from commit a48092ad06)
2017-07-18 17:00:50 +00:00
TreeHugger Robot
ac31ae9116 Merge "add atfwd service and related policy." into oc-dr1-dev 2017-07-18 14:54:03 +00:00
TreeHugger Robot
d16dc52f4c Merge "Enable console suspend if UART is not enabled" into oc-dr1-dev 2017-07-17 23:35:42 +00:00
TreeHugger Robot
b415efa7a0 Merge "usb: disable L1 LPM" into oc-dr1-dev 2017-07-17 22:30:34 +00:00
seokjeong.hong
19bb7891bf usb: add idVendor value for configfs
From a qualcomm diag composition has idVendor 0x05c6,
the other Google USB composition change does not work properly
That's because this configfs.rc file change only idProduct.

Add Google's vendor id 0x18d1 to each composition.

Bug: 63056085

Change-Id: I2e45fe2176ad4601b23b33edeb5d6dbee5111242
Signed-off-by: seokjeong.hong <seokjeong.hong@lge.com>
2017-07-17 15:20:54 -07:00
Patrick Tjin
f594698be6 Enable console suspend if UART is not enabled
Test: walleye with console enabled -> console_suspend = N
Change-Id: Iea28573dd953408b78787ea17841a80fbdbe9657
2017-07-17 21:28:41 +00:00
Annie Chin
d11be48a17 Merge "Pre-grant READ_EXTERNAL_STORAGE for soundpicker" into oc-dr1-dev 2017-07-17 21:20:34 +00:00
Badhri Jagan Sridharan
82880d2bc2 usb: disable L1 LPM
NAK'ed OUT transfers never complete once the usb controller enters
L1 LPM. The issue was rootcaused to the usb controller not performing
remote wakeup when it enters L1 and a trasaction is queued.
Since, this is entirely controlled by controller's hardware,
disable L1 lpm to prevent transfer failure.

Also, init already has the required sepolicy to write to sysfs nodes.

Bug: 62038982
Test: Transfers happen with Broadwell chromebooks
Change-Id: Ibb13b5b79e1aa6a5d35ddcaffece4ef4942920b7
2017-07-17 20:17:11 +00:00
TreeHugger Robot
cd3b139506 Merge "manifest.xml(wahoo): Add wifi 1.1 package" into oc-dr1-dev 2017-07-17 20:10:45 +00:00
TreeHugger Robot
096c529776 Merge "Restore Camera to perfd communication" into oc-dr1-dev 2017-07-17 19:21:30 +00:00