Commit Graph

34411 Commits

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

Change-Id: I22bfd9e46cd377b4532e1726522b8c9fdcdfeb04
2017-08-10 01:11:22 +00:00
Treehugger Robot 5d89e6c7fe Merge "Include asan options from data partition." 2017-08-10 01:05:44 +00:00
Tom Cherry 2a978d32d2 init: move property_service.cpp to libinit
service.cpp, which is part of libinit, references symbols in
property_service.cpp, which causes the linker to complain when linking
libinit.a in some situations.

Therefore, we move property_service.cpp to libinit.

Separately, this will make it easier to write tests for
property_service.cpp, which we will want to do in the future.

Test: build, init unit tests
Change-Id: If1cffa8510b97e9436efed3c8ea0724272383eba
2017-08-09 17:13:21 -07:00
Tom Cherry 45a9d67cec init: statically link libselinux to init_tests
The shared libselinux library does not export all of the symbols that
we use in init and the linker is now complaining about this, so let's
use the static libselinux library in init_tests to match init itself.

Test: build, init unit tests
Change-Id: I9011a959a7c49446b3529740e606140a4ee8c32d
2017-08-09 17:09:04 -07:00
Christopher Ferris 188072f6a4 Merge "Small clean ups"
am: 5cd87d39d7

Change-Id: I4eea11359afef8c377c646e613733ddb4cc02776
2017-08-09 23:26:44 +00:00
Mark Salyzyn b5a69e8e70 Merge "logcat: transition to Android.bp"
am: ad7f1bc0b3

Change-Id: I689b94aad609a4fd9734b159f305868eae5764ea
2017-08-09 23:26:24 +00:00
Christopher Ferris 5cd87d39d7 Merge "Small clean ups" 2017-08-09 23:22:22 +00:00
Mark Salyzyn ad7f1bc0b3 Merge "logcat: transition to Android.bp" 2017-08-09 23:18:00 +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
Mark Salyzyn c3ad75be84 bootstat: switch from root.root to system.log
bootstat does not need root uid and root gid permissions to perform
its tasks.  It appears that system uid and log gid are adequate and
appropriate.

Test: manual
Bug: 63736262
Change-Id: I094c2cb054e441562fa8717a4d3dc0086fb70a7a
2017-08-09 15:08:21 -07:00
Christopher Ferris 3b4b075fea Small clean ups
- Remove redundant map_info checks.
- Initialize fde_count_ to zero.

Bug: 23762183

Contributed-By: Ivan Maidanski <i.maidanski@samsung.com>

Test: Builds, run backtrace_test modifying CreateNew to Create and vice-versa.
Change-Id: I6e9cdfa99734f8cc2d9915cc32c66a1455e79f1b
2017-08-09 14:22:12 -07:00
Mark Salyzyn 507f69f80e logcat: transition to Android.bp
Switch logcat, logcatd and liblogcat to use Android.bp.

Test: compile
Change-Id: I01c0d8cbc6a713ad5b4b413677574e3c6463afcb
2017-08-09 13:30:03 -07:00
Mark Salyzyn 94984cf4bd Merge "logcat: fix error propagation."
am: 2d1d8812cc

Change-Id: I0676572a6ff6e9591afb7f4e99cc64b92147dfef
2017-08-09 00:59:33 +00:00
Treehugger Robot 2d1d8812cc Merge "logcat: fix error propagation." 2017-08-09 00:45:20 +00:00
Mark Salyzyn 210e43c354 logcat: fix error propagation.
Fix some _serious_ error propagation issues discovered with
additional warning flags (-Wextra).

Test: compile
Change-Id: I5148550092e4ecb6cafba91229c350c516e7e244
2017-08-08 15:49:21 -07:00
Tom Cherry 3df3ec34e4 Merge "ueventd: add test to ensure selabel_lookup() is thread safe"
am: 2c3a2a8c5c

Change-Id: I57b1fb1906671950a4374f515438349f368f7cad
2017-08-08 22:48:04 +00:00
Tom Cherry 2c3a2a8c5c Merge "ueventd: add test to ensure selabel_lookup() is thread safe" 2017-08-08 22:00:26 +00:00
Tom Cherry 57ef66b6fa ueventd: add test to ensure selabel_lookup() is thread safe
selabel_lookup() must be threadsafe, but had failed in the past.

Bug: 63861738
Test: this newly added test
Change-Id: I78bdb8e555433e8217ac6d4be112ba91de9f03bb
2017-08-08 13:11:44 -07:00
David Zeuthen 9ef86681a1 Merge "fastboot: Add --disable-verity and --disable-verification options."
am: 24c39f0b4c

Change-Id: I1fd796f55b15bd7a9f06b4a4f7c792565a117f86
2017-08-08 20:07:39 +00:00
Treehugger Robot 24c39f0b4c Merge "fastboot: Add --disable-verity and --disable-verification options." 2017-08-08 20:01:16 +00:00
Robert Quattlebaum 4ff32084d5 Merge "Add AID for LoWPAN subsystem"
am: f602dd4ced

Change-Id: Idd091e64fd9cab58f38da67e0b32e0aa9c98fb7d
2017-08-07 23:55:19 +00:00
Treehugger Robot f602dd4ced Merge "Add AID for LoWPAN subsystem" 2017-08-07 23:50:02 +00:00
David Zeuthen b6ea435a20 fastboot: Add --disable-verity and --disable-verification options.
This can be used to disable verity and/or verification when flashing a
build to a device. It works with both 'fastboot flashall' and
'fastboot flash vbmeta /path/to/vbmeta.img'.

Bug: 62903976
Test: Manually tested.
Change-Id: Iad22d42a9dd5befd70ecd0224803721a10a28d90
2017-08-07 16:52:55 -04:00
Robert Quattlebaum 01f7576a3e Add AID for LoWPAN subsystem
Bug: b/64399805
Change-Id: Ida6aa60d8beee9151a723826d99c1e9044dc05be
2017-08-04 16:19:34 -07:00
Chih-hung Hsieh 18f9c66823 Merge "Fix clang-tidy performance warnings in system/core."
am: 69ff5009c7

Change-Id: I74373e9f0e7f83c9280f4700ea55b387c3384c2c
2017-08-04 21:14:30 +00:00
Chih-hung Hsieh 69ff5009c7 Merge "Fix clang-tidy performance warnings in system/core." 2017-08-04 21:05:51 +00:00
Tom Cherry 0908ca721a Merge "init: more unique_fd, less goto"
am: 401c9cb330

Change-Id: If621924a00686b41889d4e75ad360c3c3d3d4a85
2017-08-04 20:26:57 +00:00
Tom Cherry 401c9cb330 Merge "init: more unique_fd, less goto" 2017-08-04 20:13:10 +00:00
Tom Cherry 7c4609cfb3 init: more unique_fd, less goto
Test: boot bullhead
Change-Id: I3c31ca045538d9c9dbbf9c8f27f63033344627fd
2017-08-04 20:12:56 +00:00
Earl Ou 08d9cc3744 Merge "libcutils: write trace event into socket in container"
am: 59b33cb01c

Change-Id: Ie59769f5820a8bb5991ba3dca53df83c5e90f795
2017-08-04 01:04:15 +00:00
Treehugger Robot 59b33cb01c Merge "libcutils: write trace event into socket in container" 2017-08-04 00:50:59 +00:00
Jocelyn Bohr efea269a75 Merge "Return correct error code when finish input length is too long."
am: 90657bbeab

Change-Id: I96ea16c713efcc51533b9aafab3624b0070b3dc3
2017-08-03 23:44:35 +00:00
Treehugger Robot 90657bbeab Merge "Return correct error code when finish input length is too long." 2017-08-03 23:35:05 +00:00
Jocelyn Bohr f1e5edf765 Return correct error code when finish input length is too long.
Bug: 63745895
Change-Id: I465bf9138a0a21363f89f2c6074f7108ee33af70
2017-08-03 13:59:10 -07:00
Chih-Hung Hsieh e5d975c7cc Fix clang-tidy performance warnings in system/core.
* Use const reference parameter type to avoid unnecessary copy.
* Use more efficient overloaded string methods.

Bug: 30407689
Bug: 30411878
Test: build with WITH_TIDY=1
Change-Id: Ia5a00581e718d412255d6177e5a7c286cdfbec11
2017-08-03 13:58:05 -07:00
Christopher Ferris 0d35dffc18 Merge "Add support for the new unwind method."
am: 172b1d0008

Change-Id: Ia42e055e36053f8618dc0e2c13c2cc84bc1a148d
2017-08-03 20:34:51 +00:00
Yifan Hong 6c2d927c34 Merge changes from topic 'libcutils_private_headers'
am: 472808a570

Change-Id: Ia4963b1b2c50bdcc3d9ccc6a954a465cbf9b5de0
2017-08-03 20:34:31 +00:00
Christopher Ferris 172b1d0008 Merge "Add support for the new unwind method." 2017-08-03 19:08:34 +00:00
Yifan Hong 472808a570 Merge changes from topic 'libcutils_private_headers'
* changes:
  Remove private headers from libcutils.vendor
  Move android_filesystem_config.h => fs_config.h
2017-08-03 18:24:04 +00:00
Christopher Ferris 6f3981c181 Add support for the new unwind method.
Also add a comment to the GetElf function to indicate that it never returns
nullptr.

Also needed to add this library to the a million and one places that the vndk
has hard-coded this data.

Bug: 23762183

Test: Built, nothing uses the new code.
Test: However, I did run backtrace_test using this code, and all tests pass.
Change-Id: Ib270665dcb7a7607075e36d88be76dbde6e2faa8
(cherry picked from commit dc4104b720)
2017-08-03 10:15:44 -07:00
Earl Ou e4030384c4 libcutils: write trace event into socket in container
When Android is running in a container, ftrace trace_marker may be
disabled, e.g. Chrome OS verified mode. To enable trace, a socket is
created for everyone to send trace event.

Modify libcutils so apps using it can write trace to the socket.

To achieve this goal without touching code for normal device,
trace-container.c is created for code specific to container. Shared
code between trace-dev.c and trace-container.c is moved to local
trace-dev.h.

Note that to avoid sharing FDs across different processes, Zygote closes
FD and reopen it to /dev/null if it is a socket. Therefore, we need to
manually close FD and reopen it again after forking. This is done in
the atrace_set_tracing_enabled as Zygote also use it to clear flags
during forking.

Related change:
- http://crrev.com/2400163003 (Chromium)
- http://ag/2028075 (Android system/core)
- http://ag/1738271 (Android device/google/cheets2)

Bug: 29776474, 62410809
Test: run chrome://tracing and see data from the host side.
Change-Id: I3fe969e284b972c28e4f32f23cd948aaea61a043
2017-08-03 15:16:44 +08:00
George Burgess IV f5a677a7d3 Merge "cutils: update property_get to use diagnose_if."
am: 5c655991f5

Change-Id: I7dff3fb2ff288800d72d9c632617639fa7e6bf9e
2017-08-03 02:23:30 +00:00
Elliott Hughes 0915192d8b Merge "Stop asking for old versions of C++ in system/core."
am: e61e2fcf21

Change-Id: I9c424e8bb99c7f03baefc794e4b095b8d29db3bb
2017-08-03 02:23:09 +00:00
Treehugger Robot 5c655991f5 Merge "cutils: update property_get to use diagnose_if." 2017-08-03 02:15:54 +00:00
Treehugger Robot e61e2fcf21 Merge "Stop asking for old versions of C++ in system/core." 2017-08-03 02:14:45 +00:00
Elliott Hughes 15d565bbca Merge "Fix reference to out of scope local in adb_thread_setname."
am: b31ca1a64f

Change-Id: Idc5b3208b7868a2636b7c335c48db57dd48e8b83
2017-08-03 00:15:37 +00:00
Treehugger Robot b31ca1a64f Merge "Fix reference to out of scope local in adb_thread_setname." 2017-08-02 23:57:57 +00:00
Yifan Hong b6807125df Remove private headers from libcutils.vendor
Bug: 63135587
Test: m -j
Test: BOARD_VNDK_VERSION=current m -j
Test: mma -j
Test: BOARD_VNDK_VERSION=current mma -j

Change-Id: I9eecf23c4c311bd8336a5bfaaeb2afb3b51c6513
Merged-In: I9eecf23c4c311bd8336a5bfaaeb2afb3b51c6513
2017-08-02 16:40:36 -07:00
Josh Gao 9560524455 Merge "Revert "base: work around thread safety analysis bug.""
am: b5c90e9d6b

Change-Id: Ieda68e652c9784990dd7d03c4101b5a9ed18d98a
2017-08-02 23:32:58 +00:00
Yifan Hong 09c89672b6 Move android_filesystem_config.h => fs_config.h
The non AID_ things in android_filesystem_config.h are moved
to fs_config.h. For libcutils.vendor and libcutils_headers.vendor,
fs_config.h is not exported.

An empty system/core/include/private/fs_config.h is placed to
appease the dependency from certain modules (logd, etc.)
that includes system/core/include/private/android_filesystem_config.h
directly.

Test: m -j
Test: BOARD_VNDK_VERSION=current m -j
Bug: 63135587
Change-Id: I95dfb874a426941022b100c0ca26a0576b0f4aa3
Merged-In: I95dfb874a426941022b100c0ca26a0576b0f4aa3
2017-08-02 16:31:19 -07:00