Commit Graph

1623 Commits

Author SHA1 Message Date
Wei Wang
d621cbbb07 Merge "init.hardware.rc: disable bus-dcvs during boot" into oc-dr1-dev
am: 64e0268253

Change-Id: I4227453b5b234febe7b20c3cec71943b1ddd921e
2017-07-22 08:19:26 +00: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
Brian Duddie
5bd122d85e Merge "Allow sensors daemon to read hardware version files" into oc-dr1-dev
am: cb6458173f

Change-Id: I6961aaa64e89ba95c57525c52ef3d25b64f53a4e
2017-07-22 01:16:30 +00: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
Tim Murray
9fcc365d03 Merge "wahoo: add launch hint to atrace" into oc-dr1-dev
am: 6e4663fc05

Change-Id: I91b786b6840718c450f9b48be4552be9f0e1c03f
2017-07-21 21:58:47 +00:00
TreeHugger Robot
6e4663fc05 Merge "wahoo: add launch hint to atrace" into oc-dr1-dev 2017-07-21 21:52:04 +00:00
Brian Duddie
a8986eb259 Merge "Run sensors daemon as system user instead of root" into oc-dr1-dev
am: 5cf711293d

Change-Id: Ibaa42c4a1c4a1a7158dc76100f7894b37fcd6cc0
2017-07-21 21:17:44 +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
Jeff Vander Stoep
0912eeea46 Merge "init.hardware.rc: Fix file permissions in persist" into oc-dr1-dev
am: 6b071f8e13

Change-Id: I8a579f7026d86aa55c792c389d3a625a3a74ddab
2017-07-21 19:50:03 +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
Ranjith Kagathi Ananda
06b97200f6 Merge "tango_core.te: Allow shell data file access to tango" into oc-dr1-dev
am: 220b681c4c

Change-Id: I246c8856dd592039ac8bc646538d40c9fe87515f
2017-07-21 18:23:33 +00: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
Jeff Vander Stoep
b05203e0d1 Merge "sensors: address selinux denial" into oc-dr1-dev
am: 144a1962a9

Change-Id: I7998b510f934b14e940c400285f9a2161a37d776
2017-07-21 18:12:02 +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
e7627ccd4a Merge "Force off display state after doze states." into oc-dr1-dev
am: 38f652ec50

Change-Id: I9277de3ffed3d70ce99dcfd1a455eb7d8e9a041c
2017-07-21 14:58:00 +00: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
9eefdac627 Merge "Adjust wifi RSSI thresholds for 2017 devices" into oc-dr1-dev
am: ac26db3405

Change-Id: Idfc0b053731d918cb8a931717b4d599525e21a10
2017-07-21 04:54:59 +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
Jeff Vander Stoep
226c5cb19c Merge "init.hardware.rc: set ioprio to realtime for rmt_storage" into oc-dr1-dev
am: 4e3275a9b7

Change-Id: Ie46f0a96d2c7e5bf94c7b96bf7de0a411114e98a
2017-07-21 03:51:17 +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
0c64a4f1ab Merge changes Id97d7cdf,I8743a2bb into oc-dr1-dev
am: fc754502a7

Change-Id: I9d7efde780cebdd7b90a6d93bbb5836dd3cd139e
2017-07-20 22:44:18 +00: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
Jeff Vander Stoep
c196ac9792 Merge "label persist partition and grant e2fsck access" into oc-dr1-dev
am: de5bf7bd6f

Change-Id: I69b90912e03944dce10b7e19a556ad4d7fca74c5
2017-07-20 20:26:53 +00: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
7cbea8ea82 AU293 drop rebase for IMS and radio related changes
am: 9882d1d7a6

Change-Id: Iba4690a386d97b281769f48b38b1354c13fb6a1e
2017-07-20 10:21:54 +00:00
Nick Desaulniers
abfd71d1fc Revert "init: restart qseecomd once /data is mounted"
am: fd52eb310c

Change-Id: I99caf2748c0afeb26e62ef9bd1ece75e53ad11fc
2017-07-20 08:36:22 +00: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
Wei Wang
9a6d0c71dd Merge "THERMAL HAL API 1.0 impl for Wahoo" into oc-dr1-dev am: 4e102dfdcb
am: 842e224d44

Change-Id: I4a0d4c55aecedaf1100799429b59a44c47ce49f4
2017-07-20 01:54:58 +00:00
Wei Wang
842e224d44 Merge "THERMAL HAL API 1.0 impl for Wahoo" into oc-dr1-dev
am: 4e102dfdcb

Change-Id: I9d5aee0ca59f1e50cf6c8cd5a59147879bfdccfd
2017-07-20 01:52:12 +00:00
seokjeong.hong
0351d8c021 Merge "usb: add idVendor value for configfs" into oc-dr1-dev am: 9f50e56a0d
am: bd7d504a9d

Change-Id: I00bc9e16fe25441860c9d77cb7133608ecd9b7bb
2017-07-20 01:48:57 +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
seokjeong.hong
bd7d504a9d Merge "usb: add idVendor value for configfs" into oc-dr1-dev
am: 9f50e56a0d

Change-Id: Ie1edfe0ad94253cb17f873cc009d9d88338c4b93
2017-07-20 01:45:57 +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
9b503e0b13 Run CHRE daemon as system user instead of root am: 27efdfcceb
am: 95a3f00706

Change-Id: Iee323a578d39890eed928afc0c06f7a4732aa050
2017-07-19 01:50:11 +00:00
Brian Duddie
95a3f00706 Run CHRE daemon as system user instead of root
am: 27efdfcceb

Change-Id: I3119d0e09e019fcbcc87f635685d247901c11d52
2017-07-19 01:44:23 +00:00