Yabin Cui
a483eae5b1
am 4f8d5b01: Merge "adb: disconnect: fix write-after-free memory corruption and crash."
...
* commit '4f8d5b01281e751168718c7b0a74db34352aaf1e':
adb: disconnect: fix write-after-free memory corruption and crash.
2015-08-27 23:05:43 +00:00
Yabin Cui
4f8d5b0128
Merge "adb: disconnect: fix write-after-free memory corruption and crash."
2015-08-27 22:58:03 +00:00
Yabin Cui
f4b9928563
adb: disconnect: fix write-after-free memory corruption and crash.
...
Transport atransport objects are semi-reference counted: the input and
output threads each hold a reference. The adb disconnect command was
calling transport_unref to release a reference that it never had in the
first place. This meant that the refcount dropped to zero and the object
was deleted before either the input or output thread released its
reference. When that last thread released its reference, it wrote to
freed memory and also sometimes crashed.
This fix is to not release any unheld reference, instead it just kicks
the transport to break remote_read in output_thread. So all transport
close flow goes the following way:
output_thread (exit) -> main thread (offline the transport) ->
input thread (exit) -> main thread (destroy the transport)
Change-Id: Iad1fe718acc8716f3a79c8c22b426a1b2450452c
2015-08-27 14:41:07 -07:00
Duane Sand
c348a88376
android_memset.c: Use sanitized shifts
...
Avoid checks and traps on msb=1 unsigned shifts.
Change-Id: I5203a4290296b5557c0420ce0debad3b60d48233
2015-08-27 14:32:17 -07:00
Nick Kralevich
7815c47ade
am b7699c65: am e6d3cf39: Merge "android_memset.c: Use __attribute__((no_sanitize("integer")))"
...
* commit 'b7699c65508e1e0e98fef946d42214faee740bd4':
android_memset.c: Use __attribute__((no_sanitize("integer")))
2015-08-27 21:02:12 +00:00
Nick Kralevich
b7699c6550
am e6d3cf39: Merge "android_memset.c: Use __attribute__((no_sanitize("integer")))"
...
* commit 'e6d3cf393749556d6bb6b8ea51bb1252cfb061f3':
android_memset.c: Use __attribute__((no_sanitize("integer")))
2015-08-27 20:44:40 +00:00
Nick Kralevich
e6d3cf3937
Merge "android_memset.c: Use __attribute__((no_sanitize("integer")))"
2015-08-27 20:36:08 +00:00
Nick Kralevich
d9eda62875
android_memset.c: Use __attribute__((no_sanitize("integer")))
...
Turn off integer sanitization on android_memset. memset()ing is
expected to be a fast operation.
Avoid the use of the "while (size--) { }" construct, which harmlessly
underflows.
Change-Id: Ia61ff2323c759bf52df7e70b8be2fae0b0366dda
2015-08-27 13:14:36 -07:00
Yabin Cui
f6cee89b63
am 9f91681d: am f3068123: Merge "adb: fix a fake data race on transport:kick reported by tsan."
...
* commit '9f91681d5025a22851d7f666bc574a0a9d445281':
adb: fix a fake data race on transport:kick reported by tsan.
2015-08-27 18:34:50 +00:00
Yabin Cui
9f91681d50
am f3068123: Merge "adb: fix a fake data race on transport:kick reported by tsan."
...
* commit 'f3068123039e81cee85ce9103d01b5b2aceb2ba3':
adb: fix a fake data race on transport:kick reported by tsan.
2015-08-27 18:29:50 +00:00
Yabin Cui
f306812303
Merge "adb: fix a fake data race on transport:kick reported by tsan."
2015-08-27 18:25:02 +00:00
Bertrand Simonnet
03e770e9d4
am 414f6226: am c3f866f6: Merge "metricsd: Use system properties to store build time metadata."
...
* commit '414f6226fc2d5ce8537b696ef0dfa72f7f245db6':
metricsd: Use system properties to store build time metadata.
2015-08-27 18:11:22 +00:00
Nick Kralevich
a2a83a4f4b
am 212e4f1f: am d34f4198: Merge "strdup16to8.c: fix benign integer underflow."
...
* commit '212e4f1fe1c4f8390c3cada607e00bc9d9717eba':
strdup16to8.c: fix benign integer underflow.
2015-08-27 18:11:21 +00:00
Bertrand Simonnet
414f6226fc
am c3f866f6: Merge "metricsd: Use system properties to store build time metadata."
...
* commit 'c3f866f60cedc7eade674a7a8eec740dd938264f':
metricsd: Use system properties to store build time metadata.
2015-08-27 18:01:45 +00:00
Nick Kralevich
212e4f1fe1
am d34f4198: Merge "strdup16to8.c: fix benign integer underflow."
...
* commit 'd34f419826e74640dfe88c50d171a0cd8580eeda':
strdup16to8.c: fix benign integer underflow.
2015-08-27 18:01:44 +00:00
Bertrand Simonnet
c3f866f60c
Merge "metricsd: Use system properties to store build time metadata."
2015-08-27 17:58:23 +00:00
Nick Kralevich
d34f419826
Merge "strdup16to8.c: fix benign integer underflow."
2015-08-27 17:54:32 +00:00
Nick Kralevich
2b98a9eec0
strdup16to8.c: fix benign integer underflow.
...
A size_t value is not allowed to go below zero.
Change-Id: Ic888c6605d911e0b5dbee1a2fe1daf41e616e106
2015-08-27 10:30:50 -07:00
Mark Salyzyn
bc193c53ec
healthd: logd: add timestamp to kernel logged battery messages
...
(cherry pick from commit acb1ddf56c
)
Aid monotonic to realtime logging synchronization correction in
the Android ecosystem by providing a periodic notification. We
now have the following messages in the kernel logs:
- PM: suspend entry %Y-%m-%d %H:%M:%S.%09q UTC
- PM: suspend exit %Y-%m-%d %H:%M:%S.%09q UTC
- Suspended for %s.%03q seconds
- healthd: battery l=100 ... %Y-%m-%d %H:%M:%S.%09q UTC
Alter klogd to resynchronize on healthd messages as well.
NB: Time using strftime format, %q is a reference to fractional
second as introduced into log_time strptime method.
Bug: 21868540
Change-Id: I854afc0a07dff9c7f26d2b2f68990e52bf90e300
2015-08-27 10:14:10 -07:00
Mark Salyzyn
cb19b08dac
logd: refine is_prio
...
(cherry pick from commit 618d0dec50
)
- Heuristics associated with translation of kernel messages to
Android user space logs.
- Limit is_prio to 4 characters, we got false positives on hex
values like <register contents> with no alpha chars.
- x11 and other register definitions are not valid tags, en0 is
- fix some Android coding standard issues
Change-Id: Idc3dcc53a2cb75ac38628c8ef7a5d5b53f12587a
2015-08-27 10:12:49 -07:00
William Luh
3680dc30f8
am a03c55c7: am 001c87c3: Merge "Add macro to call event logger for errors."
...
* commit 'a03c55c7e4960d6b29d0c6dddc2c1bf3eca11c86':
Add macro to call event logger for errors.
2015-08-27 16:34:58 +00:00
William Luh
a03c55c7e4
am 001c87c3: Merge "Add macro to call event logger for errors."
...
* commit '001c87c3cd4676ef14f7c08ade380fbb7870eda6':
Add macro to call event logger for errors.
2015-08-27 16:26:24 +00:00
William Luh
001c87c3cd
Merge "Add macro to call event logger for errors."
2015-08-27 16:22:02 +00:00
Mark Salyzyn
e8e51ecd94
am 928c6124: am 96ac40af: Merge "logd: klogd and Mediatek"
...
* commit '928c6124ee8d3d0f0a9612607a45a01df2299fb8':
logd: klogd and Mediatek
2015-08-27 14:29:21 +00:00
Mark Salyzyn
928c6124ee
am 96ac40af: Merge "logd: klogd and Mediatek"
...
* commit '96ac40afbf9671e3feaaeb09735fcbb65b0ef733':
logd: klogd and Mediatek
2015-08-27 14:23:18 +00:00
Mark Salyzyn
96ac40afbf
Merge "logd: klogd and Mediatek"
2015-08-27 14:15:42 +00:00
Yabin Cui
8b46ad457f
am 860169cb: am 804180b2: Merge "adb: fix a data race in local_socket_event_func."
...
* commit '860169cbf89ca007fd04823110e1157346d146f5':
adb: fix a data race in local_socket_event_func.
2015-08-27 12:40:22 +00:00
Abhishek Arya
8516d89237
am 09f2d36e: (-s ours) am 5b33306d: Merge "libutils: fix overflow in SharedBuffer [DO NOT MERGE]" into mnc-dev
...
* commit '09f2d36e1d2bf5c4de5f21ace5378cc96618686c':
2015-08-27 11:56:24 +00:00
Yabin Cui
cd159ba349
am 4edb97ab: (-s ours) am f03aa667: am fbdd5ee2: Merge "adb: keep all asocket operations in the main thread."
...
* commit '4edb97abb71c1d45214e723ce2b82bff0208ee98':
2015-08-27 11:56:20 +00:00
Nick Kralevich
8955ae5af3
am 3192689b: (-s ours) am 63141512: am 53f11b62: Merge "libcutils: enable LOCAL_SANITIZE := integer"
...
* commit '3192689b2184660c4a896436d66406db24f9132d':
2015-08-27 11:56:17 +00:00
Nick Kralevich
ba8efa2a2f
am 78d632a0: (-s ours) am 38f4a139: am 532e6cde: Merge "libcutils: cleanups for -fsanitize=integer"
...
* commit '78d632a01de2231ef567cf9a6cf32f9895ceb716':
2015-08-27 11:56:15 +00:00
Mark Salyzyn
929a076052
am 86c8be04: (-s ours) am 0c3177c5: am 64393789: Merge "logd: worst uid record watermark part deux"
...
* commit '86c8be04433d178a6cada30dddeb2d31c7d5de7b':
2015-08-27 11:56:13 +00:00
Elliott Hughes
d6551839f4
am 8303f54a: (-s ours) am b6ae989a: am 0ac29519: Merge "Don\'t build 32-bit host libadb."
...
* commit '8303f54a588ba28fb519afe47c6c42d16ef83a2b':
2015-08-27 11:56:11 +00:00
Elliott Hughes
fbd87261ae
am 12e519cc: (-s ours) am 5e2e4fd5: am e2cda953: Merge "Fix missing <stdarg.h>."
...
* commit '12e519cc39c8d9594b9d96b7a799b47e0696af75':
2015-08-27 11:56:09 +00:00
Elliott Hughes
97e4d75407
am c32a4361: (-s ours) am f4603673: am 04b94b25: Merge "Use 64-bit file sizes in fastboot."
...
* commit 'c32a4361cc63b89d4e76c144ca7a1f52c999522d':
2015-08-27 11:56:08 +00:00
Elliott Hughes
bc8c227529
am 1533f95b: (-s ours) am 615af25f: am a421c1e5: Merge "Possible Mac build fix."
...
* commit '1533f95bbaf2a8895b05d146e578e47d8a69dadd':
2015-08-27 11:56:06 +00:00
Elliott Hughes
b3bdac729d
am 4f2015a1: (-s ours) am 9492db23: am 62643302: Merge "Not all filesystems support setting SELinux labels."
...
* commit '4f2015a155175f9da36574a378ce15ed74027ae9':
2015-08-27 11:56:04 +00:00
Ruchi Kandoi
6e845ef631
am 9e8eb993: (-s ours) am 62729a1d: am 565e4c6a: Merge "healthd: Adds cycle_count, current_now and full_charge properties."
...
* commit '9e8eb9930b39638f7a7fff6b02a86906430cb76f':
2015-08-27 11:56:02 +00:00
Sergio Giro
377c094e60
am 361d16e7: (-s ours) am 09a474ac: am ba4e6a80: (-s ours) am bd7dd79e: am 25592fbe: am ca15dfd0: am 3fe40514: (-s ours) am 66b6eb94: [DO NOT MERGE] libutils: fix overflow in SharedBuffer
...
* commit '361d16e7079e4b6e1c27df3f8ccc98b67b74a62f':
2015-08-27 11:56:00 +00:00
Steve Fung
c24ead590e
am f079143b: (-s ours) am c734ac27: am c3d61786: Merge "crash_reporter: Run with supplemental groups"
...
* commit 'f079143b298ea050bcbbb8567e0c41ed89059c92':
2015-08-27 11:55:57 +00:00
Elliott Hughes
401b41a1a2
am 39206a08: (-s ours) am 1ce12d39: am 43f43d87: Merge "Move adb\'s selinux_android_restorecon up and check for failures."
...
* commit '39206a08d8780da3b15eddaf26918db2682b84b6':
2015-08-27 11:55:51 +00:00
Elliott Hughes
afae173360
am e4baae6d: (-s ours) am 12d762e1: am e8e272c5: Merge "EINTR is handled by adb_read/unix_read and friends."
...
* commit 'e4baae6d066c7d39af127a2ba1df5e91475db1a9':
2015-08-27 11:55:49 +00:00
Elliott Hughes
ceb0b50f97
am 9ccf4bfb: (-s ours) resolved conflicts for merge of 068ee4d0
to mnc-dev-plus-aosp
...
* commit '9ccf4bfbde288119e6e90f9ad58351a5d2c59ff9':
2015-08-27 11:55:46 +00:00
Elliott Hughes
d4d2f48fa7
am 9bc8005e: (-s ours) resolved conflicts for merge of 3ecba7f9
to mnc-dev-plus-aosp
...
* commit '9bc8005e079a1062751b5e9d62afeef3f2407dfb':
2015-08-27 11:55:44 +00:00
Elliott Hughes
b62af3eba8
am 478bca2e: (-s ours) resolved conflicts for merge of ba8fc829
to mnc-dev-plus-aosp
...
* commit '478bca2e728c108158fd68b469b3a48e2a432ad9':
2015-08-27 11:55:41 +00:00
Elliott Hughes
d70ddbc520
am 9c24c441: (-s ours) am e55e820e: am e13fd9aa: Merge "lsof fixes."
...
* commit '9c24c4410ce059c87f7dab9160442a340dbd2bbc':
2015-08-27 11:55:39 +00:00
Tom Cherry
e038b24c9d
am fbe3fa84: (-s ours) am 9b2bc347: am 77d634f7: Merge "remove TARGET_PROVIDES_INIT_RC"
...
* commit 'fbe3fa84ff2564b909eaad4f427d4501bf5eb285':
2015-08-27 11:55:37 +00:00
Elliott Hughes
8545944dcf
am e3bbb2ab: (-s ours) am 6c04e9a9: am 42640e52: Merge "Add missing #include <memory> for std::unique_ptr on Windows."
...
* commit 'e3bbb2ab00a117bf749d0c7e3072118276c89564':
2015-08-27 11:55:35 +00:00
Nick Kralevich
b1736207ff
am 2bcb9221: (-s ours) am 7ec4c228: am e80ec0c5: Merge "libutils: Enable LOCAL_SANITIZE := integer"
...
* commit '2bcb9221d492838c95f4eee3cb65589a3e789b09':
2015-08-27 11:55:33 +00:00
Elliott Hughes
6fca44cf22
am 201eaa68: (-s ours) am 5c027334: am 93b9e865: Merge "There are no big endian hosts, grandpa."
...
* commit '201eaa683a5edd79000110e5246353235bb42ab1':
2015-08-27 11:55:31 +00:00