Commit graph

2043 commits

Author SHA1 Message Date
Elliott Hughes
73d363bbc1 Merge \"Make klog_fd thread-safe and make klog_init a no-op.\"
am: 588b770063

Change-Id: I884276a8f8b8209f6e956c5fb410e8265184e1b5
2016-07-08 17:05:25 +00:00
Elliott Hughes
588b770063 Merge "Make klog_fd thread-safe and make klog_init a no-op." 2016-07-08 17:01:13 +00:00
Erik Kline
fcf3ed51dc Merge \"Add UIDs for system DNS and tethering DNS\"
am: c4dc4f3fc2

Change-Id: I40d246a3d4c293797ae5204cebd61b50c4021205
2016-07-08 08:48:11 +00:00
Treehugger Robot
c4dc4f3fc2 Merge "Add UIDs for system DNS and tethering DNS" 2016-07-08 08:43:55 +00:00
Mark Salyzyn
b13d0ce160 Merge \"logcat: format verbs and adverbs\"
am: 82fb012a03

Change-Id: I1f897abc493f63195fff505c37746ee9e82cfac1
2016-07-06 20:27:29 +00:00
Mark Salyzyn
9cfd1c6ebc logcat: format verbs and adverbs
Bug: 29916087
Change-Id: I039c95b9dc0aa88f1219121513899934381453ae
2016-07-06 11:16:07 -07:00
Erik Kline
d63cf7d85a Add UIDs for system DNS and tethering DNS
Bug: 29420831
Bug: 29881876
Change-Id: I7a48f980f0e52a3d322c4c02988d48fc6df643ca
2016-07-06 11:13:59 +09:00
Elliott Hughes
171a829c39 Make klog_fd thread-safe and make klog_init a no-op.
I'll come back and remove klog_init when I've removed other calls to it.

Change-Id: Iad7fd26d853b4ddc54e9abd44516b6f138cbbfcb
Test: booted N9, looked at "adb shell dmesg" output.
2016-06-29 16:16:41 -07:00
David 'Digit' Turner
1c01bae82a Merge \"[qemu]: Move qemu_pipe.h from include/system/ directory.\"
am: 44b7339aa2

Change-Id: I59b9a896058dea76f69b9ba757890d4a42952a66
2016-06-21 08:05:18 +00:00
David Turner
44b7339aa2 Merge "[qemu]: Move qemu_pipe.h from include/system/ directory." 2016-06-21 07:38:02 +00:00
Elliott Hughes
a1d9edfbf3 Merge \"Use __ with attribute __noreturn__ to avoid colliding with noreturn.\"
am: e0dfd2a00e

Change-Id: I93779cd1785db5d277df21dffe1896edd40df7fb
2016-06-21 02:02:25 +00:00
Treehugger Robot
e0dfd2a00e Merge "Use __ with attribute __noreturn__ to avoid colliding with noreturn." 2016-06-21 01:52:04 +00:00
Elliott Hughes
665051ca63 Use __ with attribute __noreturn__ to avoid colliding with noreturn.
Change-Id: I5a73ec69b580b2e70b2c68177078fa56b8353c19
2016-06-20 17:21:59 -07:00
Josh Gao
88347e1430 Merge changes from topic \'debuggerd_client\'
am: abf88685e3

Change-Id: I2a61e4e8b5ec5a4ab6566ab4f8eb31653255fbc5
2016-06-20 20:47:18 +00:00
Treehugger Robot
abf88685e3 Merge changes from topic 'debuggerd_client'
* changes:
  adb: use libdebuggerd_client.
  debuggerd: add libdebuggerd_client.
2016-06-20 20:22:18 +00:00
Christopher Ferris
e1eb2272d6 Merge \"Fix race condition updating local map data.\"
am: 863d8e11b9

Change-Id: I00899ce500c2ae8bc58b6eb42c01d8688dd232c0
2016-06-18 00:05:26 +00:00
Josh Gao
9c02dc5916 debuggerd: add libdebuggerd_client.
Bug: http://b/24414818
Change-Id: I079c534d2c952b6975bf0428eb86cc7a55525737
2016-06-17 13:11:29 -07:00
David 'Digit' Turner
c7b098ceb5 [qemu]: Move qemu_pipe.h from include/system/ directory.
The <hardware/qemu_pipe.h> header isn't related to any loadable
hardware module, this patch thus relocates it to <system/qemu_pipe.h>
which is a much more logical location.

Note the following changes:

  - The pipe name must begin with the 'pipe:' prefix to avoid an
    un-necessary snprintf() and buffer copy.

  - Does not probe for the obsolete /dev/goldfish_pipe device, i.e.
    only use /dev/qemu_pipe instead.

  - Use QEMU_PIPE_DEBUG() instead of D() as the debugging macro.

+ Update ADB to use the newest <system/qemu_pipe.h>

+ Add qemu_pipe_frame_send() and qemu_pipe_frame_recv() utility
  functions which replace the obsolete qemud_channel_send() and
  qemud_channel_recv() from the defunct <hardware/qemud.h>
  header.

BUG=25875346

Change-Id: Ic290a5b79d466c2af64b49bd9134643277c11bfd
2016-06-17 09:21:59 +02:00
Christopher Ferris
3a14004c7f Fix race condition updating local map data.
If the underlying local map changes, it's possible for multiple
threads to try and modify the map data associated with the UnwindLocalMap
object. Add a lock when generating the local map to avoid this problem.

In addition, add a read lock whenever any caller gets the maps iterator.
Updated all iterator callers to make this lock.

Bug: 29387050
Change-Id: Ie34822c3d8fd3bdb3dd126aeeb399969c36508c1
2016-06-16 23:28:11 -07:00
Josh Gao
771c1ed582 Merge "cutils: don\'t fortify property_get on clang." am: 310da0b990
am: 2a1f209245

* commit '2a1f20924516b41e22adb766b6751869fb5c3af4':
  cutils: don't fortify property_get on clang.

Change-Id: Idd7402dca16633fa19e2110b6d74b005b3e519f9
2016-06-03 19:46:05 +00:00
Treehugger Robot
310da0b990 Merge "cutils: don't fortify property_get on clang." 2016-06-03 19:29:12 +00:00
Josh Gao
74ebdf3c8e cutils: don't fortify property_get on clang.
clang doesn't do the frontend inlining/dead code elimination needed for
the fortified implementation to work. Therefore, turn it off.

Bug: http://b/28381737
Change-Id: Ie8dd970e3908b1daaa587ad2bd041e8f6e2089db
2016-06-02 15:29:11 -07:00
Calin Juravle
65d7c4722c Merge "Add utility to prepare files in a similar way to directories" into nyc-dev
am: 6a29fe931d

* commit '6a29fe931d9fd3bf7f2aad3713dc70c080970763':
  Add utility to prepare files in a similar way to directories

Change-Id: I288024d55e8cead1c902950938b03bfa8dcc3df3
2016-06-02 10:24:54 +00:00
Calin Juravle
9812105b20 Add utility to prepare files in a similar way to directories
Bug: 28785119
Bug: 28625993
Change-Id: I505eb4deca0a89f64fe4505dd6729fe6a48bc1aa
2016-05-24 18:19:12 +01: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
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
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
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
62212954ef Merge "Fix memory order and race bugs in Refbase.h & RefBase.cpp" 2016-05-19 22:01:41 +00:00
Elliott Hughes
847d963598 Remove a dead header (<netutils/dhcp.h>).
9c07eb9dd8 removed the implementation, but
missed the header file.

Bug: http://b/27192644
Change-Id: I809a3eb0081b05783b70dbca0274cdde6b1b31a6
2016-05-18 14:22:15 -07:00
Hans Boehm
e263e6c633 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
2016-05-17 16:11:11 -07:00
Elliott Hughes
cb4abee6ca Merge "Don\'t expose ashmem constants on the host." am: 54fed512b9
am: ed95190b69

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

Change-Id: I930dd0b72e88647b1e94694e5fb183431c7d75c6
2016-05-16 17:34:13 +00:00
Michael Wright
2a9a993af9 Merge commit '8b452b876b90dcfff1dab9012b65b5e67c4531a4' into manual_merge_8b452b8
Change-Id: Iacdc2d521f669661b4979c03b0476512abdb37c7
2016-05-16 15:06:22 +01:00
Elliott Hughes
427c605b2a Don't expose ashmem constants on the host.
Change-Id: I86bf58841645114e382300228be7be69a555e76b
2016-05-13 14:47:30 -07:00
Mohamad Ayyash
8374276bfa Move canned_fs_config into libcutils
It's no longer specific to make_ext4fs, will be used for mksquashfs as
well.

BUG: 27467028
Change-Id: I41b8c2b168ada45c8378dee522391edfb8f6b9a6
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
BUG: 28704419
2016-05-12 18:44:13 -07:00
Michael Wright
5bacef33c9 Add String16#contains and strstr16 methods.
These are needed for aapt to find javadoc comments that contain
"@removed" in order to skip them when printing styleable docs.

Bug: 28663748
Change-Id: I8866d2167c41e11d6c2586da369560d5815fd13e
2016-05-09 19:45:07 +01:00
Elliott Hughes
46ae7d36a4 Merge "Remove <utils/ashmem.h>." am: f9f76146a1
am: ee3202563b

* commit 'ee3202563be401328ad318d77d7c6c0622ab0960':
  Remove <utils/ashmem.h>.

Change-Id: I6d076a9097df4969b703fc2833d464a15692835b
2016-05-04 22:04:29 +00:00
Elliott Hughes
6d7823a54e Remove <utils/ashmem.h>.
Not to be confused with <cutils/ashmem.h> or <linux/ashmem.h>, one or other
of which is what you should be using instead.

Change-Id: Ie158530591b28b94c2cda9e2686cae56b7aeb1a3
2016-05-04 13:33:20 -07:00
Treehugger Robot
78440e8689 Merge "Change remaining Android logging macros to use C99 varidaic syntax" am: 3abd032
am: 499cfed

* commit '499cfed160bb3c0893880de7860f2a78394d4a1d':
  Change remaining Android logging macros to use C99 varidaic syntax

Change-Id: I74c5808315835069067dc2f68eac044d74247dc1
2016-04-27 22:49:05 +00:00
Alex Vakulenko
3b0d65ad10 Change remaining Android logging macros to use C99 varidaic syntax
Most of the system/core/include/log/log.h file uses the C99 syntax of
variadic macros (that is, '...' in parameter list and __VA_ARGS__
in arguments). Except for andoid_printLog and android_printAssert
which still uses GCC custom extension syntax.

Switched the remaining macros to use C99 syntax. GCC extension syntax
makes my editor's code parser puke.

BUG: None
Change-Id: Ia6ebc0f2044b64182c425b179da0229c7046be4a
2016-04-27 14:44:40 -07:00
Elliott Hughes
2131fd91a8 Merge "Remove libmincrypt." am: d93e7ca
am: 98ab3c0

* commit '98ab3c0ae7b47318e561f12cc11ebe81a459e62e':
  Remove libmincrypt.

Change-Id: I7f86494922cbc21ffe152dfd5bf1767edfc1468e
2016-04-14 15:29:14 +00:00
Elliott Hughes
6b11c13aed Remove libmincrypt.
Bug: http://b/27287913
Change-Id: Ie85a7d8fecc3577a16c0a79d5f95379ec3ecc15b
2016-04-12 16:20:23 -07:00
Treehugger Robot
85dd9157e1 Merge "binderwrapper: Resolve ambiguous base::Closure reference" am: 979ce0e
am: b0144b5

* commit 'b0144b5b999148de06b091383b40e5f6d12cd977':
  binderwrapper: Resolve ambiguous base::Closure reference

Change-Id: Icea03c86507cc5a4f333ee3644465fbc92a8521c
2016-04-12 22:15:20 +00:00
Christopher Wiley
09910f4baa binderwrapper: Resolve ambiguous base::Closure reference
Disambiguate between base and android::base namespaces.  This matters
when headers from libbase are indirectly included.

Bug: 27804373
Test: Compiles in that referenced situation.

Change-Id: Icb26595bb0013733aa8c03971c9f4a950c8b2ab1
2016-04-12 13:19:29 -07:00
Mohamad Ayyash
fa7c7dd87d Merge "Move canned_fs_config into libcutils" into nyc-dev
am: 3f28318

* commit '3f2831876107ad18422bd67a459e2070c66a3827':
  Move canned_fs_config into libcutils

Change-Id: I88019bfa08603b1df2f2cbe4c79e45f126d83a1b
2016-04-08 17:55:59 +00:00
Mohamad Ayyash
3f28318761 Merge "Move canned_fs_config into libcutils" into nyc-dev 2016-04-08 17:39:05 +00:00
Mohamad Ayyash
8c788588f4 Move canned_fs_config into libcutils
It's no longer specific to make_ext4fs, will be used for mksquashfs as
well.

BUG: 27467028
Change-Id: I41b8c2b168ada45c8378dee522391edfb8f6b9a6
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-04-07 22:44:00 -07:00
Dan Stoza
76a903224f Merge "graphics.h: Add android_hdr_t" into nyc-dev
am: 1dcf560

* commit '1dcf56080f7a396d57a9bd0e2c601f739a4bdf9a':
  graphics.h: Add android_hdr_t

Change-Id: I816d5741dfec2b9f69fd3d1e4426bf00b9b8cee7
2016-04-07 21:41:15 +00:00
Dan Stoza
1dcf56080f Merge "graphics.h: Add android_hdr_t" into nyc-dev 2016-04-07 21:32:53 +00:00