Commit graph

23246 commits

Author SHA1 Message Date
Michael Ryleev
d66e05c6c4 Merge "trusty: storageproxyd: use upstream kernel headers" am: ed01d17e1b
am: 420d64de7b

* commit '420d64de7b3406b3493e42bff8a5ac2631ec3314':
  trusty: storageproxyd: use upstream kernel headers

Change-Id: Iecda534cbd181f9e9f4bf4d28917fe2f8c17d565
2016-05-25 15:50:50 +00:00
Michael Ryleev
420d64de7b Merge "trusty: storageproxyd: use upstream kernel headers"
am: ed01d17e1b

* commit 'ed01d17e1bf54edad1989c2da7505e0efb673a9b':
  trusty: storageproxyd: use upstream kernel headers

Change-Id: Ia527c3f104caaced60b0a1597951358861019be1
2016-05-25 15:47:55 +00:00
Michael Ryleev
ed01d17e1b Merge "trusty: storageproxyd: use upstream kernel headers" 2016-05-25 15:40:05 +00:00
Elliott Hughes
f7571ca418 resolve merge conflicts of f0d4f38 to nyc-dev
am: 1265fd4934

* commit '1265fd493471b6e94cc4e9853d9307d7fde2fe98':
  Fix scanf %s in lsof.

Change-Id: I4d02e7733851aa23f1eadb496b3a7db3652cd9bc
2016-05-25 05:01:17 +00:00
Elliott Hughes
1265fd4934 resolve merge conflicts of f0d4f38 to nyc-dev
Change-Id: Ibce10a3c66560c10c67bd51f5b568552f43825f2
2016-05-24 17:22:51 -07:00
Elliott Hughes
f0d4f38773 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee am: ad0c2bf5f3 am: a17f2802b1 am: 20b1e79563 am: c443a447b2
am: 5538f8bb63

* commit '5538f8bb63c79d1b9de6e809e085bd78b1027f9c':
  Fix scanf %s in lsof.

Change-Id: I09d37fb2798e6038bb00fb8e210b9d3c5348a4e4
2016-05-24 23:11:36 +00:00
Elliott Hughes
5538f8bb63 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee am: ad0c2bf5f3 am: a17f2802b1 am: 20b1e79563
am: c443a447b2

* commit 'c443a447b2f6e950b03fe472c5f7cb6c54e9ba61':
  Fix scanf %s in lsof.

Change-Id: Ia66e81641532cf7bca669fb52095aeca90158807
2016-05-24 23:08:36 +00:00
Elliott Hughes
c443a447b2 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee am: ad0c2bf5f3 am: a17f2802b1
am: 20b1e79563

* commit '20b1e795637686d3a18c79413cccbba16881e295':
  Fix scanf %s in lsof.

Change-Id: Ic63528dee82e3045020b527c093b9b4fffaf5530
2016-05-24 23:05:55 +00:00
Elliott Hughes
20b1e79563 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee am: ad0c2bf5f3
am: a17f2802b1

* commit 'a17f2802b153b2ee361fea9a6cc37da0613a2e55':
  Fix scanf %s in lsof.

Change-Id: I088944d9c376de58705698bfe7d417a10c708909
2016-05-24 23:02:26 +00:00
Elliott Hughes
a17f2802b1 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee
am: ad0c2bf5f3

* commit 'ad0c2bf5f345a4cdb53a3e4f690db842e8df1685':
  Fix scanf %s in lsof.

Change-Id: I51f630de4cb5ce667ac856a1848206c368816aea
2016-05-24 22:59:18 +00:00
Elliott Hughes
ad0c2bf5f3 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6
am: 1a98776aee

* commit '1a98776aee4d02c33d922bbbe3ffdd54099840a9':
  Fix scanf %s in lsof.

Change-Id: I1af0d93d03631f257b1372a08aad158508f652ea
2016-05-24 22:56:38 +00:00
Elliott Hughes
1a98776aee resolve merge conflicts of 7f5da85 to lmp-dev
am: de529e72b6

* commit 'de529e72b63c135053711ceb27a043f8d80e308c':
  Fix scanf %s in lsof.

Change-Id: I4dc617bbe052059b04296e4213fb778fbf3cf8eb
2016-05-24 22:53:55 +00:00
Elliott Hughes
de529e72b6 resolve merge conflicts of 7f5da85 to lmp-dev
Change-Id: I7a7547426a229ac99d187ec8bfabd49c4da51907
2016-05-24 15:23:48 -07:00
Elliott Hughes
7f5da85015 Fix scanf %s in lsof. am: 008efb756f
am: 491dfb11b7

* commit '491dfb11b762f44dc9848496d5d30514082aab64':
  Fix scanf %s in lsof.

Change-Id: Ife17fa56f125dfec08d0d4b0c5c368bdae51106e
2016-05-24 22:13:03 +00:00
Elliott Hughes
491dfb11b7 Fix scanf %s in lsof.
am: 008efb756f

* commit '008efb756fea8a9e66a1825b546e9dc392c72bec':
  Fix scanf %s in lsof.

Change-Id: I608ae2094649617308b45571df1b649724ec8ac3
2016-05-24 22:10:19 +00:00
Michael Ryleev
462461bd28 trusty: storageproxyd: use upstream kernel headers
Force usage of upstream kernel headers to pull in
definition of rpmb related structures.

This change is required until b/25567964 is resolved.

Change-Id: Ic710d32281dcdd093f6308b82ee937143b692613
Bug: 25567964
2016-05-24 14:52:38 -07:00
Michael Ryleev
1abb40cf43 Merge changes I40c9ea47,I593aeed5 am: c7878469be
am: 5cf2f5946c

* commit '5cf2f5946c5e9d09d9325a5286fe472b4e75f841':
  trusty: storage: add tests
  trusty: storage: add client lib for testing

Change-Id: I39d2c1b49e92b15190fb92b66aa20e8586716957
2016-05-24 19:45:30 +00:00
Michael Ryleev
5cf2f5946c Merge changes I40c9ea47,I593aeed5
am: c7878469be

* commit 'c7878469be6be610a38da4e41ae1fe1d63d431eb':
  trusty: storage: add tests
  trusty: storage: add client lib for testing

Change-Id: I74fb708a0cf211202eb50b1f5e097a9cd587a88d
2016-05-24 19:37:30 +00:00
Michael Ryleev
c7878469be Merge changes I40c9ea47,I593aeed5
* changes:
  trusty: storage: add tests
  trusty: storage: add client lib for testing
2016-05-24 19:23:50 +00:00
Dimitry Ivanov
fcd4ee48a4 Merge "Remove target_sdk_version parameter" into nyc-dev
am: 07f46c84e6

* commit '07f46c84e614e2635e8072403dce8f17cc9285ba':
  Remove target_sdk_version parameter

Change-Id: Idf4bca526e7a40064518ad0e5ccc5aa1f63dbe75
2016-05-24 17:15:12 +00:00
TreeHugger Robot
07f46c84e6 Merge "Remove target_sdk_version parameter" into nyc-dev 2016-05-24 16:59:12 +00:00
Dimitry Ivanov
94ee4e690d Remove target_sdk_version parameter
Since linker-namespaces are enabled for all target_sdk_versions
and there is no longer need in workarounds in libnativeloader -
remove unused target_sdk_version parameter for internal calls.

This also brings libnativeloader closer to aosp/master

Bug: http://b/26040253
Change-Id: I7d6f6ac31be0dca5f3c3f6ea20e6cc87ce3a3c7f
2016-05-24 08:40:38 -07:00
Hans Boehm
d797b5cb8b Merge "Fix SharedBuffer. Remove aref." into nyc-dev
am: 5668b84f99

* commit '5668b84f99e3fc467721b45184aedca70f8e6da4':
  Fix SharedBuffer. Remove aref.

Change-Id: I2ffe414bcdc7272b0c7d642bff9d33bffaf2d50e
2016-05-24 04:14:31 +00:00
Hans Boehm
5668b84f99 Merge "Fix SharedBuffer. Remove aref." into nyc-dev 2016-05-24 04:10:29 +00:00
Yabin Cui
e8b1cfe7d4 Merge "adb: close ep0 on disconnection." am: 18013f2083
am: 3082ca20a0

* commit '3082ca20a0260967febfed6ec69c0b63f3cdae61':
  adb: close ep0 on disconnection.

Change-Id: I9cd0502456e167d2586cb707bfa2da5bdb40977a
2016-05-24 02:42:52 +00:00
Yabin Cui
3082ca20a0 Merge "adb: close ep0 on disconnection."
am: 18013f2083

* commit '18013f2083d9372cc03d9c9281bc3a168e049da9':
  adb: close ep0 on disconnection.

Change-Id: I3d65b981a568ec606c09e35874474a5179f10e6c
2016-05-24 02:40:28 +00:00
Treehugger Robot
18013f2083 Merge "adb: close ep0 on disconnection." 2016-05-24 02:32:57 +00:00
Yabin Cui
8fc9d25841 Merge "adb: close ep0 on disconnection." into nyc-dev
am: fcab9a8507

* commit 'fcab9a85076c83e5b6808935db0f89e4f10dda87':
  adb: close ep0 on disconnection.

Change-Id: I2597ec4471378b341ef92b6aa0362511e09ac3ac
2016-05-24 00:23:39 +00:00
Yabin Cui
638420ef31 adb: close ep0 on disconnection.
adbd on device kicks the usb connection when usb IO fails. But to notify
adb on host to reconnect it, adbd needs to close ep0 to reset the usb
connection. Otherwise, adb on host cann't connect the device unless the
usb cable is reconnected or adb host server is restarted.

This can be tested by using `adb reconnect device` command.

Bug: 25935458

Change-Id: I80979d6029e60b9cfd218f7b9b5201810238ec07
(cherry picked from commit 69e97e4bee)
2016-05-23 17:17:46 -07:00
Yabin Cui
fcab9a8507 Merge "adb: close ep0 on disconnection." into nyc-dev 2016-05-24 00:15:27 +00:00
Hans Boehm
12f788e763 Merge "Fix SharedBuffer. Remove aref." am: 069517574e
am: 1e081a8c5f

* commit '1e081a8c5f2d6e6cb55658bb289db1f0b4f5774a':
  Fix SharedBuffer. Remove aref.

Change-Id: I5849137bb49d727d1c1d245f0f61d11c4ee10859
2016-05-23 22:22:18 +00:00
Hans Boehm
54828dc739 Fix SharedBuffer. Remove aref.
Add comment that SharedBuffer is deprecated.

Both aref and SharedBuffer had memory ordering bugs.  Aref has no
clients.

SharedBuffer had several bugs, which are fixed here:

mRefs was declared neither volatile, not atomic, allowing the
compiler to, for example, reuse a stale previously loaded value.

It used the default android_atomic release memory ordering, which
is insufficient for reference count decrements.

It used an ordinary memory read in onlyOwner() to check whether
an object is safe to deallocate, without any attempt to ensure
memory ordering.

Comments claimed that SharedBuffer was exactly 16 bytes, but
this was neither checked, nor correct on 64-bit platforms.

This turns mRef into a std::atomic and removes the android_atomic
dependency.

Bug: 28826227
Change-Id: I39fa0b4f70ac0471b14ad274806fc4e0c0802e78
(cherry picked from commit 3e4c076ef2)
2016-05-23 15:19:53 -07:00
Hans Boehm
1e081a8c5f Merge "Fix SharedBuffer. Remove aref."
am: 069517574e

* commit '069517574eede4fa8fd69a0e1bc4e5d70c18149c':
  Fix SharedBuffer. Remove aref.

Change-Id: I32fda0aee04aa890fa03b1e56fefbebab3d50531
2016-05-23 22:18:07 +00:00
Hans Boehm
069517574e Merge "Fix SharedBuffer. Remove aref." 2016-05-23 22:11:02 +00:00
Hans Boehm
3e4c076ef2 Fix SharedBuffer. Remove aref.
Add comment that SharedBuffer is deprecated.

Both aref and SharedBuffer had memory ordering bugs.  Aref has no
clients.

SharedBuffer had several bugs, which are fixed here:

mRefs was declared neither volatile, not atomic, allowing the
compiler to, for example, reuse a stale previously loaded value.

It used the default android_atomic release memory ordering, which
is insufficient for reference count decrements.

It used an ordinary memory read in onlyOwner() to check whether
an object is safe to deallocate, without any attempt to ensure
memory ordering.

Comments claimed that SharedBuffer was exactly 16 bytes, but
this was neither checked, nor correct on 64-bit platforms.

This turns mRef into a std::atomic and removes the android_atomic
dependency.

Bug: 28826227
Change-Id: I39fa0b4f70ac0471b14ad274806fc4e0c0802e78
2016-05-23 17:28:52 +00:00
Yabin Cui
bb89e7e6b5 Merge "adb: check return value of register_socket_transport." am: 3d981c87c9
am: 1a78ec8f65

* commit '1a78ec8f6525e7101cb8f7d75f42955bbdbbd98e':
  adb: check return value of register_socket_transport.

Change-Id: I94be64825d5908d52d930125808f431fd6b96503
2016-05-21 01:27:05 +00:00
Yabin Cui
1a78ec8f65 Merge "adb: check return value of register_socket_transport."
am: 3d981c87c9

* commit '3d981c87c929ec4946ce53d2aaa3503c86886eb1':
  adb: check return value of register_socket_transport.

Change-Id: I3b0983e1ccda4c0c29d1f971ba3402ec384ef2a8
2016-05-21 01:24:28 +00:00
Yabin Cui
3d981c87c9 Merge "adb: check return value of register_socket_transport." 2016-05-21 01:12:35 +00:00
Hans Boehm
bf3c130cde Fix memory order and race bugs in Refbase.h & RefBase.cpp
am: 70a46d674a

* commit '70a46d674a04e95da633a5914abd7a55a46e2b3e':
  Fix memory order and race bugs in Refbase.h & RefBase.cpp

Change-Id: Ida5d6d99774a1909cbf05e69d35306cd03e6c0eb
2016-05-20 00:54:28 +00:00
Hans Boehm
70a46d674a Fix memory order and race bugs in Refbase.h & RefBase.cpp
Convert to use std::atomic directly.

Consistently use relaxed ordering for increments, release ordering
for decrements, and an added acquire fence when the count goes to
zero.

Fix what looks like another race in attemptIncStrong:
It seems entirely possible that the final adjustment for
INITIAL_STRONG_VALUE would see e.g. INITIAL_STRONG_VALUE + 1,
since we could be running in the middle of another initial
increment.

Attempt to somewhat document what this actually does, and
what's expected from the client. Hide the documentation in
the .cpp file for now.

Remove a confusing redundant test in decWeak. OBJECT_LIFETIME_STRONG
and OBJECT_LIFETIME_WEAK are the only options, in spite of some
of the original comments.

It's conceivable that either of these issues has resulted in
actual crashes, though I would guess the probability is small.
It's hard enough to reason about this code without the bugs.

Bug: 28705989
Change-Id: I4107a56c3fc0fdb7ee17fc8a8f0dd7fb128af9d8
(cherry picked from commit e263e6c633)
2016-05-19 16:18:26 -07:00
Chih-Hung Hsieh
daa13eaa92 resolve merge conflicts of 3252d11 to nyc-dev-plus-aosp
Change-Id: I2973439a194a3048d009159d75572a5366021f21
2016-05-19 16:02:22 -07:00
Chih-Hung Hsieh
3252d11498 Merge "Fix misc-macro-parentheses warnings in lmkd."
am: 86ed22cf27

* commit '86ed22cf27193e5d64f617ec68c8016166c7e4f4':
  Fix misc-macro-parentheses warnings in lmkd.

Change-Id: Id5772ecec918e9ad3c8952ddfcd23e13dbf3122a
2016-05-19 22:55:44 +00:00
Treehugger Robot
86ed22cf27 Merge "Fix misc-macro-parentheses warnings in lmkd." 2016-05-19 22:42:26 +00:00
Hans Boehm
fdad5af164 Merge "Fix memory order and race bugs in Refbase.h & RefBase.cpp" am: 62212954ef
am: d657e639cf

* commit 'd657e639cf74e0ee5a32d0f67efe0097c3df17a1':
  Fix memory order and race bugs in Refbase.h & RefBase.cpp

Change-Id: I79106bb0399e7699d51d526235843504ab52708b
2016-05-19 22:12:01 +00:00
Hans Boehm
d657e639cf Merge "Fix memory order and race bugs in Refbase.h & RefBase.cpp"
am: 62212954ef

* commit '62212954efc9cd4ddfa91f100ec4ecec27315e42':
  Fix memory order and race bugs in Refbase.h & RefBase.cpp

Change-Id: I4b17f76ec7162090deb84b5ec83b3e765dddb186
2016-05-19 22:09:14 +00:00
Hans Boehm
62212954ef Merge "Fix memory order and race bugs in Refbase.h & RefBase.cpp" 2016-05-19 22:01:41 +00:00
Josh Gao
11082d3a6e Merge changes I40a11748,I5e56f17f,Ie3748b6c,I4e1d56a8 into nyc-dev
am: d4af0d64de

* commit 'd4af0d64de042b0425bbae1f91d1720eebcf95a3':
  adb: use asocket's close function when closing.
  adb: switch the socket list mutex to a recursive_mutex.
  adb: clang-format sockets.cpp.
  adb: add implementations of mutex, recursive_mutex.

Change-Id: Ida004443ba8cc7d41a2b81d77c7abb9917e08ff9
2016-05-19 19:50:19 +00:00
Josh Gao
d4af0d64de Merge changes I40a11748,I5e56f17f,Ie3748b6c,I4e1d56a8 into nyc-dev
* changes:
  adb: use asocket's close function when closing.
  adb: switch the socket list mutex to a recursive_mutex.
  adb: clang-format sockets.cpp.
  adb: add implementations of mutex, recursive_mutex.
2016-05-19 19:36:36 +00:00
Elliott Hughes
9110eaab41 resolve merge conflicts of 847d963 to nyc-dev-plus-aosp
Change-Id: Ib97f56112bff71e2997116f969fd6d3e30e72f26
2016-05-18 21:26:35 -07:00
Dmitry Shmidt
6cf91d1c4d Merge "HACK: libnetutils: Remove parameters from dhcpcd service call" am: 97da9225d9
am: 7fd1c0750f  -s ours

* commit '7fd1c0750f5082bab57b5ddaac4fb5c7986e2323':
  HACK: libnetutils: Remove parameters from dhcpcd service call

Change-Id: Icb6b21e909dbb75323330459415f4a40dbebd8b6
2016-05-19 01:20:03 +00:00