Commit graph

1576 commits

Author SHA1 Message Date
Ryan Campbell
2c2595bfef Merge "Include asan options from data partition." am: 5d89e6c7fe am: 725fa57109
am: e817549d2a

Change-Id: Id77b2dd5847e391ef9db0a092ee9d4c4ecd09a2f
2017-08-10 01:19:30 +00:00
Ryan Campbell
725fa57109 Merge "Include asan options from data partition."
am: 5d89e6c7fe

Change-Id: I22bfd9e46cd377b4532e1726522b8c9fdcdfeb04
2017-08-10 01:11:22 +00:00
Ryan Campbell
ce30d07b11 Include asan options from data partition.
Look for asan options under /data/asan so that multi-process coverage
can be enabled on a newly-started remote process without disabling
verity and without forcing it to be always-on.

Test: adb shell echo "include_if_exists=/data/asan/asan.options.%b" >>
/system/asan.options && adb shell echo
"coverage=1\ncoverage_dir=/data/misc/trace" >
/data/asan/asan.options.android.hardware.light@2.0-service && adb shell killall
android.hardware.light@2.0-service
Bug: 64019182

Change-Id: I241ad8478439323681dc1cfde2fa0770f030ae75
2017-08-09 15:32:23 -07:00
Elliott Hughes
54f2e52ab5 Merge "Add comments to "public.libraries.*.txt"." am: e7b8fc22af am: 601e5ac55b
am: 3cdb21a8c7

Change-Id: I049c98243b522b8c3fcb64d917ff64a1e6d576c0
2017-08-02 19:52:26 +00:00
Elliott Hughes
601e5ac55b Merge "Add comments to "public.libraries.*.txt"."
am: e7b8fc22af

Change-Id: I8519a128238758433d194f35f6090633aeb85f0a
2017-08-02 19:43:01 +00:00
Treehugger Robot
e7b8fc22af Merge "Add comments to "public.libraries.*.txt"." 2017-08-02 19:34:26 +00:00
Elliott Hughes
bd0ad88202 Add comments to "public.libraries.*.txt".
Folks don't know how to add public native API. Point them in the right
direction.

Bug: 63905942
Test: boots
Change-Id: I5e1f04fb852348255a2f7f87aa961948c41c47fd
2017-07-28 18:07:44 -07:00
Joel Galenson
4de04ccb6b Merge "Move chmod of /sys/kernel/debug/tracing to fix tracing." am: 13c3a582de am: c4f2163954
am: 68e79940ea

Change-Id: Ie2ca46038cef82d7a63bed3473656c17e94bb503
2017-07-28 16:17:53 +00:00
Joel Galenson
c4f2163954 Merge "Move chmod of /sys/kernel/debug/tracing to fix tracing."
am: 13c3a582de

Change-Id: I63ca85ffce7aead567c34069135fb066c5a026de
2017-07-28 16:12:23 +00:00
Joel Galenson
d48c4cf234 Move chmod of /sys/kernel/debug/tracing to fix tracing.
This is a temporary fix, since we're still not sure exactly what the
bug is.

Bug: 62547086
Test: Built, flashed, and booted Sailfish.  Verified that the file has
the correct permission and that wifi and atrace work.

Change-Id: I43275e974a11754eca274f1b77d15cdd03a3b365
(cherry picked from commit 62962dd5b7)
2017-07-27 18:06:40 -07:00
Siqi Lin
e5fa38c731 Merge "rootdir: record last build fingerprint"
am: 4e8227420e

Change-Id: I59664c816a8fbf4d7776270b28f4673418d30bcb
2017-07-27 14:33:02 +00:00
Siqi Lin
94aeecea3b rootdir: record last build fingerprint
am: b9b76de6ff

Change-Id: Ie1c4444c147969dd74a51ca5acd9fe86825f8e3a
2017-07-27 01:22:57 +00:00
Siqi Lin
16bb36197b rootdir: record last build fingerprint
We can't copy /default.prop so just write the value of
$(ro.build.fingerprint) to /data/misc/recovery/ro.build.fingerprint
and rotate it after reboot instead.

Bug: 62793047
Test: manual - reboot phone and check /data/misc/recovery
Change-Id: I130a4b7a01d9e1bfe9baecde2781626eb72e768b
(cherry picked from commit b9b76de6ff)
2017-07-26 16:45:10 -07:00
Siqi Lin
b9b76de6ff rootdir: record last build fingerprint
We can't copy /default.prop so just write the value of
$(ro.build.fingerprint) to /data/misc/recovery/ro.build.fingerprint
and rotate it after reboot instead.

Bug: 62793047
Test: manual - reboot phone and check /data/misc/recovery
Change-Id: I130a4b7a01d9e1bfe9baecde2781626eb72e768b
2017-07-26 13:40:15 -07:00
Jiyong Park
7847934b8a Add [test] section for /data/[nativetest|benchmarktest]
am: c034a43d44

Change-Id: Ib068a73923a167f46368ea2adda9ff6625c7fcee
2017-07-20 17:34:29 +00:00
Jiyong Park
c034a43d44 Add [test] section for /data/[nativetest|benchmarktest]
We have both system and vendor tests in the same directory
/data/nativetest. Since we can't distinguish system and vendor tests at
runtime, we choose to run all of them with the legacy namespace
configuration where /system/lib and /vendor/lib are both accessible
without any restriction. Furthermore, /system/lib/vndk-sp is added to
the list of accessible directories for tests since some libs (such as
libion.so) exist only in the directory but not in /system/lib.

This will change in the future when we install system and vendor tests
into different directories (vendor tests goes into ./vendor subdir).
Then, we will run the tests with [system] or [vendor] configurations
depending on their paths.

Bug: 63597267
Test: run bionic-unit-tests
Test: run linker-unit-tests
Change-Id: I810003b2da0b30335200c130f484ea7b041f9f80
2017-07-20 15:28:00 +09:00
Jiyong Park
df13c1473d Merge "/data/nativetest[64] processes are running with the new ns config" into oc-dr1-dev
am: c5aba9702e

Change-Id: Icf29b590738b6e3287b3635d352fe2c01d185fd8
2017-07-19 00:29:51 +00:00
Jiyong Park
9d1e50b809 /data/nativetest[64] processes are running with the new ns config
Native tests under /data/nativetest[64] directory is now running with
the same linker namespace configuration as /system/bin/* processes.

This allows us to stop mimicing the linker namespace configuration of the
/system/bin/* processes using LD_LIBRARY_PATH.

Bug: 63597267
Test: run bionic-unit-tests
Test: run linker-unit-tests
Change-Id: If8e2ed0b8016e4e07bf6829735b8e02f952042d0
2017-07-18 16:45:05 +09:00
Mark Salyzyn
3ec9aa4a91 rootdir: record last build signature and kernel version
(cherry pick from commit 93394034a2)

Rotate /default.prop and /proc/version into /data/misc/recovery/
as an aid in determining the vintage of the LAST_LOGCAT and
LAST_DMESG in the bugreport collection.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: manually confirm content rotation through reboots
Bug: 62793047
Change-Id: Ibbe546c76041f20e308e58e5548939afac75db97
2017-07-14 14:49:50 -07:00
Mark Salyzyn
77bf7449b2 Merge "rootdir: record last build signature and kernel version" am: 91a17a41f6 am: 97e90c6bb8
am: a62497c189

Change-Id: Ieaddd4f3b02c7b67fd2b98e9874b037af77a0702
2017-07-14 21:27:50 +00:00
Mark Salyzyn
97e90c6bb8 Merge "rootdir: record last build signature and kernel version"
am: 91a17a41f6

Change-Id: I86afacf1540ad02f5e70c08f39a5c76f98d47c4e
2017-07-14 21:20:22 +00:00
Mark Salyzyn
93394034a2 rootdir: record last build signature and kernel version
Rotate /default.prop and /proc/version into /data/misc/recovery/
as an aid in determining the vintage of the LAST_LOGCAT and
LAST_DMESG in the bugreport collection.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: manually confirm content rotation through reboots
Bug: 62793047
Change-Id: Ibbe546c76041f20e308e58e5548939afac75db97
2017-07-14 11:39:14 -07:00
Robert Benea
6a4482a438 Merge "Use mem cgroups in libprocessgroup if they're available" am: 3c7f566495 am: 92ad7c02d4
am: 43c6c844de

Change-Id: I9c2976886372f5c6e1ae008872cacc0f01fc282f
2017-07-11 22:08:11 +00:00
Robert Benea
92ad7c02d4 Merge "Use mem cgroups in libprocessgroup if they're available"
am: 3c7f566495

Change-Id: I7b50c83c5ba053faf6be62200570738744dd1e7b
2017-07-11 22:01:09 +00:00
Robert Benea
3280e48847 Use mem cgroups in libprocessgroup if they're available
Use mem cgroups if the kernel is built with CONFIG_MEMCG=y,
additionally add system group.

test: verified on both kernel with/without memcg enabled
Change-Id: Ia2ae89efa3905e9da68fa77adac1225c667864d1
2017-07-11 12:48:10 -07:00
Tim Murray
2c0f9c3a72 Merge "Revert "Use mem cgroups in libprocessgroup if they're available"" am: e8a75e8f76 am: 7f857bb9ff
am: ac68c7fc8c

Change-Id: I19e5d24a936e992bb634fd589ce04416dbf07c21
2017-07-08 01:50:20 +00:00
Tim Murray
7f857bb9ff Merge "Revert "Use mem cgroups in libprocessgroup if they're available""
am: e8a75e8f76

Change-Id: Iec01b90ae7d49d1eaf4a6e0c5324749a358db5d6
2017-07-08 01:45:50 +00:00
Treehugger Robot
e8a75e8f76 Merge "Revert "Use mem cgroups in libprocessgroup if they're available"" 2017-07-08 01:41:19 +00:00
Tim Murray
fc10e3d5e5 Revert "Use mem cgroups in libprocessgroup if they're available"
This reverts commit 32375c2328.

bug 63164307

Change-Id: I3336bbf7c2f3297b231c5b0a1ef538faff9513fd
2017-07-08 00:04:42 +00:00
Wei Wang
cea7028cf4 Merge "init: Support custom shutdown actions" into oc-dr1-dev 2017-07-06 22:36:47 +00:00
Wei Wang
5d4d6f7269 init: Support custom shutdown actions
We have been seeing panics and errors during shutdown sequence in
some vendor's platform, and it is required to disable error handling
during shutdown.

This CL separates the shutdown request to execute another "shutdown"
trigger at the beginning of shutdown stage. And vendor can use this
trigger to add custom commands needed for shutting down gracefully.

Bug: 38203024
Bug: 62084631
Test: device reboot/shutdown
Change-Id: I3fac4ed59f06667d86e477ee55ed391cf113717f
(cherry picked from commit eeab491efd)
2017-07-06 02:30:14 +00:00
Keun-young Park
bedc5faea7 Merge "add "shutdown critical" to service" am: b3915d113d am: a4ad5d0328
am: 19ec8e7bcf

Change-Id: Ide84d7f87a9884068ebc1cc9680c997507727af3
2017-07-06 01:13:19 +00:00
Keun-young Park
d266d37e4c add "shutdown critical" to service
- "shutdown critical" prevents killing the service during
  shutdown. And the service will be started if not running.
- Without it, services will be killed by SIGTERM / SIGKILL during shutdown.
- Even services with "shutdown critical" will be killed if shutdown
  times out.
- Removes ueventd and vold from hard coded list. Each service's rc will
  be updated to add "shutdown critical". watchdogd is still kept in the list.

bug: 37626581
Test: reboot and check last kmsg

(cherry picked from commit cccb34fce8)

Change-Id: I3c6aeb7151e64beca4b435f843ae64455217262d
2017-07-06 00:54:02 +00:00
Keun-young Park
a4ad5d0328 Merge "add "shutdown critical" to service"
am: b3915d113d

Change-Id: I25b6f42478efda7077e00141042a427245393d28
2017-07-06 00:46:31 +00:00
Treehugger Robot
b3915d113d Merge "add "shutdown critical" to service" 2017-07-06 00:40:55 +00:00
Wei Wang
2a38e6d119 Merge "init: Support custom shutdown actions" am: c1bc4241f8 am: 5b89535442
am: b39890048c

Change-Id: I57a0422f47094cc061163510138e9562648fdd98
2017-07-05 23:58:51 +00:00
Wei Wang
5b89535442 Merge "init: Support custom shutdown actions"
am: c1bc4241f8

Change-Id: I6bb1789dbc5edbb10f2f4d712e9ca83e6302fdf4
2017-07-05 23:54:56 +00:00
Keun-young Park
cccb34fce8 add "shutdown critical" to service
- "shutdown critical" prevents killing the service during
  shutdown. And the service will be started if not running.
- Without it, services will be killed by SIGTERM / SIGKILL during shutdown.
- Even services with "shutdown critical" will be killed if shutdown
  times out.
- Removes ueventd and vold from hard coded list. Each service's rc will
  be updated to add "shutdown critical". watchdogd is still kept in the list.

bug: 37626581
Test: reboot and check last kmsg

Change-Id: Ie8cc699d1efbc59b9a2561bdd40fec64aed5a4bb
2017-07-05 14:55:22 -07:00
Wei Wang
eeab491efd init: Support custom shutdown actions
We have been seeing panics and errors during shutdown sequence in
some vendor's platform, and it is required to disable error handling
during shutdown.

This CL separates the shutdown request to execute another "shutdown"
trigger at the beginning of shutdown stage. And vendor can use this
trigger to add custom commands needed for shutting down gracefully.

Bug: 38203024
Bug: 62084631
Test: device reboot/shutdown
Change-Id: I3fac4ed59f06667d86e477ee55ed391cf113717f
2017-07-05 14:49:57 -07:00
Logan Chien
b0bff4a55c Revert "Move libz to vndk-sp"
am: f499bcdde7

Change-Id: I7f641efd4c8e88289496507c7f940db9ea60f745
2017-07-05 13:16:22 +00:00
Logan Chien
f499bcdde7 Revert "Move libz to vndk-sp"
This commit removes libz.so from the exported libs of "vndk" linker
namespace and export libz.so from "default" linker namespace instead.

We have to remove libz.so from vndk-sp because we don't have a good
mechanism to stop "classloader" linker namespace from loading
/system/lib[64]/vndk-sp/libz.so.  Other alternatives require significant
changes to dynamic linker or CTS test cases.

Let's temporarily revert the commit to fix b/62195853 for oc-dr1-dev.
The long-term solution will be discussed in b/37617391.

This reverts commit 63226400f3.

Bug: 62195853
Bug: 37617391
Test: Boot sailfish to home screen.
Change-Id: I4a97819b080f7091b633152d4a11353b24c463ee
2017-07-05 11:18:13 +08:00
Robert Benea
888d9e198b Merge "Use mem cgroups in libprocessgroup if they're available" am: d3afc124b6 am: 46706e6824
am: 74c02e7b58

Change-Id: Iba2c643286063a9ffa22f3917f8acbcca1d77ef3
2017-06-30 02:41:24 +00:00
Robert Benea
46706e6824 Merge "Use mem cgroups in libprocessgroup if they're available"
am: d3afc124b6

Change-Id: Idd72671eb144343a73a02bfbde8603265ca78650
2017-06-30 02:32:24 +00:00
Robert Benea
32375c2328 Use mem cgroups in libprocessgroup if they're available
Use mem cgroups if the kernel is built with CONFIG_MEMCG=y,
additionally add system group.

test: verified on both kernel with/without memcg enabled
Change-Id: Ib9d1c8e3c797e75f160e0e92edf3f11c9d8e9f17
2017-06-29 23:49:00 +00:00
Mark Salyzyn
872206fd80 Merge changes Ibe1feb39,I05be83e4,If1422e4d am: a4f086ab20 am: 3a156e6c2b
am: ca0c0bb96e

Change-Id: I21636d01cf0cb0bd581104d2bfb5624877bfaf6a
2017-06-27 21:57:34 +00:00
Mark Salyzyn
3a156e6c2b Merge changes Ibe1feb39,I05be83e4,If1422e4d
am: a4f086ab20

Change-Id: I7e5d431c992f9860ca7b42ca81edfbfd1d8e0a1c
2017-06-27 21:52:06 +00:00
Mark Salyzyn
4eb0ba058c init.rc: setup console-ramoops-0
On later kernels /sys/fs/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: Ibe1feb39ef9081b1ab2316510674bf181bdc7b0c
2017-06-27 09:32:38 -07:00
Logan Chien
735a32e30e ld-config: Export android.hidl.memory@1.0-impl
am: fb2a4f0874

Change-Id: Ib23a91581514f275642cb05afddbfc5324bca3bb
2017-06-23 05:07:34 +00:00
Logan Chien
fb2a4f0874 ld-config: Export android.hidl.memory@1.0-impl
This commit exports android.hidl.memory@1.0-impl.so from default linker
namespace to vndk (VNDK-SP) linker namespace.  This fixes
libhidlmemory.so failure.

Note: Exposing android.hidl.memory@1.0-impl.so from default linker
namespace to vndk (VNDK-SP) linker namespace shall be fine because its
APIs are frozen and won't be changed in the future.

Note: android.hidl.memory@1.0-impl.so is NOT exported to sphal linker
namespace.

Bug: 35107583
Bug: 62778280
Test: Write a test SP-HAL lib which links libhidlmemory.so, load that
SP-HAL lib into system executable, and make sure mapMemory() works.
Test: sailfish boots w/o problems.

Merged-In: Ia36350dcf1f8c8dc6d7bf2c7a6ae65e0ebaef578
Merged-In: Iddb723558c3a814a905cd42797594a707bc651da
Change-Id: I69034595b2cd355e786ce7943fed7dddf1b12525
(cherry picked from commit bd7503dae7)
(cherry picked from commit 3251e582f2)
2017-06-22 20:13:01 +08:00
Logan Chien
bd7503dae7 ld-config: Export android.hidl.memory@1.0-impl
This commit exports android.hidl.memory@1.0-impl.so from default linker
namespace to vndk (VNDK-SP) linker namespace.  This fixes
libhidlmemory.so failure.

Note: Exposing android.hidl.memory@1.0-impl.so from default linker
namespace to vndk (VNDK-SP) linker namespace shall be fine because its
APIs are frozen and won't be changed in the future.

Note: android.hidl.memory@1.0-impl.so is NOT exported to sphal linker
namespace.

Bug: 35107583
Bug: 62778280
Test: Write a test SP-HAL lib which links libhidlmemory.so, load that
SP-HAL lib into system executable, and make sure mapMemory() works.
Test: sailfish boots w/o problems.

Change-Id: Ia36350dcf1f8c8dc6d7bf2c7a6ae65e0ebaef578
2017-06-22 20:12:21 +08:00