Commit graph

20415 commits

Author SHA1 Message Date
Josh Gao
43c058e51a Merge "adb: use asocket\'s close function when closing."
am: 684d543922

* commit '684d543922465538dd233c99c0cf492f1f24233c':
  adb: use asocket's close function when closing.

Change-Id: Icb05f95c2cb16800dd114f52e6f301dae72ad654
2016-05-19 00:13:12 +00:00
Treehugger Robot
684d543922 Merge "adb: use asocket's close function when closing." 2016-05-19 00:11:03 +00:00
Chih-Hung Hsieh
fa7569c921 Merge "Fix misc-macro-parentheses warnings in adb, debuggerd, libbacktrace."
am: dab7d9de03

* commit 'dab7d9de03369feeb099be6c8f7748df3f466bd3':
  Fix misc-macro-parentheses warnings in adb, debuggerd, libbacktrace.

Change-Id: I6fc423fc3eb08c6e44a3d7261ae0e1b87ce0e993
2016-05-19 00:02:55 +00:00
Treehugger Robot
dab7d9de03 Merge "Fix misc-macro-parentheses warnings in adb, debuggerd, libbacktrace." 2016-05-18 23:54:40 +00:00
Josh Gao
71c062f40a Merge changes I5e56f17f,Ie3748b6c,I4e1d56a8
am: cea14958d2

* commit 'cea14958d2903f136f8874238ccff4da1b0d38d9':
  adb: switch the socket list mutex to a recursive_mutex.
  adb: clang-format sockets.cpp.
  adb: add implementations of mutex, recursive_mutex.

Change-Id: I8ec365c99dbc1dc402d62a8401df937ae6ae3a6b
2016-05-18 23:19:42 +00:00
Treehugger Robot
cea14958d2 Merge changes I5e56f17f,Ie3748b6c,I4e1d56a8
* changes:
  adb: switch the socket list mutex to a recursive_mutex.
  adb: clang-format sockets.cpp.
  adb: add implementations of mutex, recursive_mutex.
2016-05-18 23:14:42 +00:00
Chih-Hung Hsieh
67867dbd79 Fix misc-macro-parentheses warnings in adb, debuggerd, libbacktrace.
Bug: 28705665
Change-Id: I469b2a882f6d1f399bfc22c75a26da245991fc33
2016-05-18 15:53:15 -07:00
Josh Gao
53eb31d87c adb: use asocket's close function when closing.
close_all_sockets was assuming that all registered local sockets used
local_socket_close as their close function. However, this is not true
for JDWP sockets.

Bug: http://b/28347842
Change-Id: I40a1174845cd33f15f30ce70828a7081cd5a087e
2016-05-18 14:21:53 -07:00
Josh Gao
9b587dec6d adb: switch the socket list mutex to a recursive_mutex.
sockets.cpp was branching on whether a socket close function was
local_socket_close in order to avoid a potential deadlock if the socket
list lock was held while closing a peer socket.

Bug: http://b/28347842
Change-Id: I5e56f17fa54275284787f0f1dc150d1960256ab3
2016-05-18 14:21:53 -07:00
Josh Gao
52bd8526aa adb: clang-format sockets.cpp.
Bug: http://b/28347842
Change-Id: Ie3748b6c803d4e8056e9d7abd065a8b99d945a5b
2016-05-18 14:21:53 -07:00
Josh Gao
903b749f78 adb: add implementations of mutex, recursive_mutex.
Our version of mingw doesn't support std::mutex or
std::recursive_mutex, so implement our own using the Windows primitives.

Bug: http://b/28347842
Change-Id: I4e1d56a89bc5fcb5f859bf5014343697a4a85b77
2016-05-18 14:21:53 -07:00
Mark Salyzyn
0a7dec432c Merge "liblog: log reader validate headers"
am: 0321476fe2

* commit '0321476fe2aedf9a0b960508b52681ee5f1d555e':
  liblog: log reader validate headers

Change-Id: I21832a3908161e489a04a127508e2339e7f29bce
2016-05-18 14:25:26 +00:00
Mark Salyzyn
0321476fe2 Merge "liblog: log reader validate headers" 2016-05-18 14:19:04 +00:00
Dimitry Ivanov
3457aba394 Merge "Set parent namespace for linker-namespaces"
am: ac50d0cc57

* commit 'ac50d0cc5789d8462fcd2d9f6cb225e0edf9a12f':
  Set parent namespace for linker-namespaces

Change-Id: I832b3f228873e93a8b9a00e365af561f10b41eb2
2016-05-17 22:58:45 +00:00
Josh Gao
4e1149bb15 Merge "adb: replace failing exits in adbd with abort()."
am: eb62619ff9

* commit 'eb62619ff9211ecee2a5c6ce4475b7d6baf9cb0e':
  adb: replace failing exits in adbd with abort().

Change-Id: I6b5b5b61c18b6afb2e1e96cab6ba8704d9115bcc
2016-05-17 22:58:38 +00:00
Josh Gao
32045567be Merge "adb: add track-jdwp and track-devices commands."
am: f8f40a1e2e

* commit 'f8f40a1e2e6162b7f334f83a10f6a5d9ef44f75f':
  adb: add track-jdwp and track-devices commands.

Change-Id: I96e185b1235aaa2c82371a53415fa44c57444dac
2016-05-17 22:58:34 +00:00
Treehugger Robot
ac50d0cc57 Merge "Set parent namespace for linker-namespaces" 2016-05-17 22:43:01 +00:00
Josh Gao
eb62619ff9 Merge "adb: replace failing exits in adbd with abort()." 2016-05-17 22:33:44 +00:00
Josh Gao
f8f40a1e2e Merge "adb: add track-jdwp and track-devices commands." 2016-05-17 22:33:30 +00:00
Mark Salyzyn
8fd1faa596 liblog: log reader validate headers
Ensure len and hdr_size fields are valid and match the return value.
Truncate or zero content as necessary, but do not drop the message.

Bug: 28610769
Change-Id: I10785fa5b03aa3da7d07b368188e3f7c36a84b4f
2016-05-17 13:54:42 -07:00
Elliott Hughes
e2c741ce0f Merge "Don\'t include <machine/cpu-features.h>."
am: 9b0eb7cdf4

* commit '9b0eb7cdf4ac4650fc3f476c2f5a91c50a18e524':
  Don't include <machine/cpu-features.h>.

Change-Id: Ie2b744b8dc414b7dc8568dae77eeb3babf7df3a8
2016-05-17 03:13:07 +00:00
Elliott Hughes
9b0eb7cdf4 Merge "Don't include <machine/cpu-features.h>." 2016-05-17 03:10:05 +00:00
Dimitry Ivanov
24db75c1ce Set parent namespace for linker-namespaces
This change allows applications to share RTLD_GLOBAL
native libraries between namespaces associated with
different classloaders.

The rule is - if a library is GLOBAL within namespace
associated with parent classloader, it is shared
with namespace associated with this classloader

Note that the sharing happens on create_namespace
event, which is tied to createClassloader in case of
application classloaders created by the framework, for
custom application classloaders it is tied to first
loadLibrary() event.

Bug: http://b/28560538
Bug: https://code.google.com/p/android/issues/detail?id=208458
Change-Id: I7ee701166f8ec5eff033b7acc0f80c7aa4ec5bda
2016-05-16 18:13:49 -07:00
Dimitry Ivanov
f7d2b8276a Merge "Pass permitted_path to the linker as is."
am: a214a769f9

* commit 'a214a769f9a98b0962e62bd716575a05cf6f9f59':
  Pass permitted_path to the linker as is.

Change-Id: Ic4d8e6a67ca069319d872e6f3dcb76e857162093
2016-05-17 01:13:29 +00:00
Treehugger Robot
a214a769f9 Merge "Pass permitted_path to the linker as is." 2016-05-17 01:05:01 +00:00
Elliott Hughes
a1b9bd901f Don't include <machine/cpu-features.h>.
We're not using it.

Change-Id: Ic128cf9297e1627c839c48f1954c19d7070654d7
2016-05-16 17:55:27 -07:00
Dimitry Ivanov
b31caa95ec Pass permitted_path to the linker as is.
Now that we have the fixed list of whitelisted libraries
there is no longer need to check if java_permitted_path is nullptr.
In fact checking it prevents custom classloaders created by apps
from loading libraries using absolute path.

Bug: http://b/28659864
Change-Id: I1bfc16a573b090f70f078ecccd0e4016939a5dc0
2016-05-16 17:08:06 -07:00
Josh Gao
881b440b7a Merge "adb/base: allow use of unique_fd inside adb."
am: 210fdc2742

* commit '210fdc2742d3cadaa2f8255ad22b4a2b7bdbf743':
  adb/base: allow use of unique_fd inside adb.

Change-Id: Ic7d36d38343f46a541452ca6f6b622f3c5c74c26
2016-05-16 21:56:56 +00:00
Treehugger Robot
210fdc2742 Merge "adb/base: allow use of unique_fd inside adb." 2016-05-16 21:42:02 +00:00
Winter Wang
b61ecb5213 Merge "init: usb: disable usb function switch until adbd is ready"
am: 2a26c2a836

* commit '2a26c2a836af9109ce4aa6cf8128a385d14878d3':
  init: usb: disable usb function switch until adbd is ready

Change-Id: I406d35a4c6a18e2d84d49450a72a1bc3be7233ee
2016-05-16 19:41:31 +00:00
Badhri Jagan Sridharan
2a26c2a836 Merge "init: usb: disable usb function switch until adbd is ready" 2016-05-16 19:34:51 +00:00
Greg Hackmann
6d28bd81f5 Merge "SystemClock: elapsedRealtimeNano() should use clock_gettime() on Linux"
am: e3ff256228

* commit 'e3ff25622840e8b79e30f7f8bda4715a103afb67':
  SystemClock: elapsedRealtimeNano() should use clock_gettime() on Linux

Change-Id: Id5a10854412308fb096a037977eea5e80931e1f8
2016-05-16 18:21:23 +00:00
Greg Hackmann
a91a1a990f Merge "SystemClock: add test"
am: 282e8fb037

* commit '282e8fb037031fa8de02dd3ea5a6944c5d24f4d8':
  SystemClock: add test

Change-Id: Id45600a898ae89ae7a1be262f5655f30eed22205
2016-05-16 18:21:22 +00:00
Treehugger Robot
e3ff256228 Merge "SystemClock: elapsedRealtimeNano() should use clock_gettime() on Linux" 2016-05-16 18:18:57 +00:00
Treehugger Robot
282e8fb037 Merge "SystemClock: add test" 2016-05-16 18:18:30 +00:00
Jeremy Compostella
30c9aed0be Merge "fs_mgr: update block device reference in verity metadata"
am: 4cefb91611

* commit '4cefb91611912dd7a3f8059ee2b993cec2d0b9bb':
  fs_mgr: update block device reference in verity metadata

Change-Id: Ia734c90ea25168060fc20b13f8b88de11d5e7568
2016-05-16 18:11:23 +00:00
Badhri Jagan Sridharan
4cefb91611 Merge "fs_mgr: update block device reference in verity metadata" 2016-05-16 18:06:38 +00:00
Elliott Hughes
ed95190b69 Merge "Don\'t expose ashmem constants on the host."
am: 54fed512b9

* commit '54fed512b9846a024332deb8bdffe0ee5ce784e0':
  Don't expose ashmem constants on the host.

Change-Id: I5550cd35693a6c7d6e68880018b2acbc9caa90a6
2016-05-16 17:31:06 +00:00
Elliott Hughes
54fed512b9 Merge "Don't expose ashmem constants on the host." 2016-05-16 17:23:52 +00:00
Jeremy Compostella
dfd2478bd1 fs_mgr: update block device reference in verity metadata
The dm-verity metadata contains the block device path that is given to
the dm-android-verity driver.  If the device is using slot A/B, this
path is missing the slot suffix.

This patch makes fs_mgr replace all the block device path reference
with the one including the active slot suffix.

Change-Id: Ib624d0d18b12a8a287cac7f15605a2e0fb7c97c6
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
2016-05-16 16:37:24 +00:00
Josh Gao
4abdeee073 adb: replace failing exits in adbd with abort().
This makes it possible to get a core dump from adbd when it decides to
exit.

Bug: http://b/28347842
Change-Id: I4cfe5f273f62b2c32e61232d3c39881ecdd6b582
2016-05-14 18:52:46 -07:00
Josh Gao
b463baf610 adb: add track-jdwp and track-devices commands.
Expose these to the command line client to make it easier to poke
around.

Bug: http://b/28347842
Change-Id: Ia939b3a41eb8201365d50cd2996b83d884e42b64
2016-05-14 18:35:44 -07:00
Josh Gao
13ea01db45 adb/base: allow use of unique_fd inside adb.
adb implements its own file descriptor emulation layer on Windows,
which requires the use of adb_close instead of close throughout the
codebase. Add a template argument to unique_fd that allows for this.

Bug: http://b/28347842
Change-Id: I6397261f4973d49f2f8e04257bf67b348585bb63
2016-05-14 18:25:51 -07:00
Rob Herring
0da9f42f2c Merge "init: support matching sysfs class paths in ueventd.rc"
am: faa14b94d5

* commit 'faa14b94d5a6d0c3d429516bf226b9836f65da91':
  init: support matching sysfs class paths in ueventd.rc

Change-Id: Icb642a52ec834d450b2f7357b63370021986a06e
2016-05-13 21:52:06 +00:00
Elliott Hughes
427c605b2a Don't expose ashmem constants on the host.
Change-Id: I86bf58841645114e382300228be7be69a555e76b
2016-05-13 14:47:30 -07:00
Treehugger Robot
faa14b94d5 Merge "init: support matching sysfs class paths in ueventd.rc" 2016-05-13 21:38:12 +00:00
Rob Herring
6de783af07 init: support matching sysfs class paths in ueventd.rc
Currently, ueventd.rc files only support /sys/devices/... paths
and don't support symlinked paths, specifically /sys/class/...
Supporting the class paths is necessary to have non-hardware
dependent paths. Some subsystems like IIO use /sys/bus/iio/, so
support that as well.

Change-Id: I29f3bf67b41664d1d75ac1820c46e13afe336d56
Signed-off-by: Rob Herring <robh@kernel.org>
2016-05-13 13:46:46 -07:00
Rob Herring
e7028e3d38 Merge "init: rework fixup_sys_perms to use perm_path_matches"
am: 0504a94cd9

* commit '0504a94cd9a1f6f5788051fceba6fb2d4bcc3615':
  init: rework fixup_sys_perms to use perm_path_matches

Change-Id: Ibfc3562cbc32326faa4e857e9b3a52b4a359c5c0
2016-05-13 20:30:52 +00:00
Treehugger Robot
0504a94cd9 Merge "init: rework fixup_sys_perms to use perm_path_matches" 2016-05-13 20:23:44 +00:00
Mohamad Ayyash
b44077d8bf Merge "Move canned_fs_config into libcutils"
am: e62cec6e39

* commit 'e62cec6e39839c1dc71ec7be6e5b361e3514c388':
  Move canned_fs_config into libcutils

Change-Id: I3e47664218061a5a6268db9de6a669d6b5e58b03
2016-05-13 18:22:48 +00:00