Commit graph

19612 commits

Author SHA1 Message Date
Mark Salyzyn
ba6523a449 Merge "libcutils: ashmem print error message for invalid fd"
am: 9c551a1bec

* commit '9c551a1bece6624bdbdfca40badc07b40b28ec1c':
  libcutils: ashmem print error message for invalid fd
2016-02-03 23:35:23 +00:00
Mark Salyzyn
c1003c78b7 Merge "libcutils: ashmem check fd validity"
am: 1a84f47794

* commit '1a84f47794168e80975eae31c665d03367929f66':
  libcutils: ashmem check fd validity
2016-02-03 23:35:10 +00:00
Mark Salyzyn
9c551a1bec Merge "libcutils: ashmem print error message for invalid fd" 2016-02-03 23:30:29 +00:00
Mark Salyzyn
1a84f47794 Merge "libcutils: ashmem check fd validity" 2016-02-03 23:30:06 +00:00
Elliott Hughes
0f242b2dbf Merge "Fix the version number in the fastboot documentation."
am: 80e88a1274

* commit '80e88a12748dbae715adcd5fed79b7774b723f92':
  Fix the version number in the fastboot documentation.
2016-02-03 23:18:10 +00:00
Elliott Hughes
80e88a1274 Merge "Fix the version number in the fastboot documentation." 2016-02-03 23:10:46 +00:00
Mark Salyzyn
e37111d751 libcutils: ashmem print error message for invalid fd
NB: We decided to not sniff for the constant saved __ashmem_rdev in
the early error path; requiring either the use of atomic operations,
or acquiring a lock to do it correctly. The heroics are not worth it.

Bug: 26871259
Change-Id: I46249838850ae32063eb5b7d08c731c5bb0fbf6b
2016-02-03 15:06:45 -08:00
Elliott Hughes
d505cd8db2 Fix the version number in the fastboot documentation.
Bug: https://code.google.com/p/android/issues/detail?id=65414
Change-Id: Ia52101f7c8d59e79583fd9658e001648ff545c66
2016-02-03 14:30:01 -08:00
David Pursell
6e2adac0c7 Merge "fastboot: add TCP protocol."
am: 80dc9d8584

* commit '80dc9d85849b681280f963bc952f5f41c6dbfe59':
  fastboot: add TCP protocol.
2016-02-03 22:04:23 +00:00
David Pursell
80dc9d8584 Merge "fastboot: add TCP protocol." 2016-02-03 21:59:31 +00:00
David Pursell
2ec418a4c9 fastboot: add TCP protocol.
This CL implements a TCP protocol for use with fastboot. Protocol
description is given in fastboot_protocol.txt, some examples of
expected behavior can also be found in tcp_test.cpp.

Usage is:
  fastboot -s tcp:<hostname>[:port] <command>

Bug: http://b/26558551
Change-Id: If53a514a534489c617db32c4fea8819949121282
2016-02-03 13:57:45 -08:00
Colin Cross
b6ad690e17 Merge "liblog: remove strdup from logging calls"
am: a2dd73424f

* commit 'a2dd73424f17c09e6a4482f085b40fddc6de83b3':
  liblog: remove strdup from logging calls
2016-02-03 21:53:40 +00:00
Colin Cross
a2dd73424f Merge "liblog: remove strdup from logging calls" 2016-02-03 21:48:37 +00:00
Mark Salyzyn
1186f3a5ad libcutils: ashmem check fd validity
- collect st_rdev on open, or when required, for /dev/ashmem.
- check in all cases if fd is a character device and matches rdev.
- requires that we have open, read and write access to /dev/ashmem
  to check, assumption being that if we can not, then we have no
  right playing with the associated misdirected file descriptor.

NB: ashmem libcutil library entry points can no longer be called in
    signal context.

Bug: 26871259
Change-Id: I9a17e33317a9be795131473a51c16f761b5f7407
2016-02-03 13:05:22 -08:00
Steve Fung
b4111adeea Merge "crash_reporter: Fix paths for kernel panic collection"
am: da1a9a277d

* commit 'da1a9a277d6331d7663d7b0f68e1fd296950d499':
  crash_reporter: Fix paths for kernel panic collection
2016-02-03 20:34:18 +00:00
Steve Fung
da1a9a277d Merge "crash_reporter: Fix paths for kernel panic collection" 2016-02-03 20:30:58 +00:00
David Pursell
91b4e68738 Merge "fastboot: fix SocketMock send failures."
am: e54ea1c12d

* commit 'e54ea1c12d7d793dceff2f8afdb9bf6461462d92':
  fastboot: fix SocketMock send failures.
2016-02-03 18:58:00 +00:00
David Pursell
e54ea1c12d Merge "fastboot: fix SocketMock send failures." 2016-02-03 18:54:27 +00:00
David Pursell
2c094f7983 fastboot: fix SocketMock send failures.
Fixes SocketMock::ExpectSendFailure() to allow unit testing of errors
during send, and adds tests for ExpectSendFailure() and
AddReceiveFailure().

Also adds missing tests to make sure ReceiveAll() continues to read
until failure or all bytes have been read.

Bug: http://b/26157893
Change-Id: I67e7d6de8e8ec4a3b62a6b7d7217f7530862edf7
2016-02-03 10:43:01 -08:00
David Pursell
ef0e01c346 Merge "libcutils/fastboot: improve multi-buffer write."
am: f6f800ef3c

* commit 'f6f800ef3c4f7caef65f75bd6365a2045be488ea':
  libcutils/fastboot: improve multi-buffer write.
2016-02-03 18:09:24 +00:00
David Pursell
f6f800ef3c Merge "libcutils/fastboot: improve multi-buffer write." 2016-02-03 18:03:00 +00:00
David Pursell
b34e4a06ee libcutils/fastboot: improve multi-buffer write.
Fixes libcutils multi-buffer write interface to be more friendly and
hooks into it from the fastboot Socket class.

Bug: http://b/26558551
Change-Id: Ibb3a8428fc379755602de52722c1260f9e345bc0
2016-02-03 10:01:38 -08:00
Mark Salyzyn
d8e0e52099 Merge "init.rc: too many start logd"
am: 989daeaf5b

* commit '989daeaf5b2f50d96da69ad476adf434522e35e7':
  init.rc: too many start logd
2016-02-03 15:51:31 +00:00
Mark Salyzyn
989daeaf5b Merge "init.rc: too many start logd" 2016-02-03 15:24:32 +00:00
Steve Fung
2bedc74553 crash_reporter: Fix paths for kernel panic collection
Fix the paths to the pstore mount and run data within
the kernel collector.

BUG=26774830

Change-Id: I68be0a28201cb73c3420166b2f4da77a1e586ca2
2016-02-02 16:14:52 -08:00
Mark Salyzyn
0604f6fbae init.rc: too many start logd
Bug: 26934873
Change-Id: Ia00da6253a50bedc8ba825df1cf641b86cdebeed
2016-02-02 16:01:17 -08:00
Elliott Hughes
de0af89c82 Merge "init: Fix load_firmware error"
am: f330e5462d

* commit 'f330e5462d200080d1694834282afadc018060e1':
  init: Fix load_firmware error
2016-02-02 22:47:36 +00:00
Elliott Hughes
f330e5462d Merge "init: Fix load_firmware error" 2016-02-02 22:44:01 +00:00
Colin Cross
7a106f7c12 liblog: remove strdup from logging calls
strdup to a static pointer is unnecessary, strlcpy into a static buffer
instead.  Avoids allocations in the ALOG* path, allowing liblog to be
used by libmemleak.

Change-Id: Ie0986da27c1fc5eb8ce4ebb076b513be8e1ee676
2016-02-02 13:55:42 -08:00
Mark Salyzyn
a9bb866861 Merge "libcutils: ashmem fortify and comply with Android coding standard"
am: 0e0a4628f6

* commit '0e0a4628f6af7dc5f39d745098143699257dfbe6':
  libcutils: ashmem fortify and comply with Android coding standard
2016-02-02 21:38:19 +00:00
Mark Salyzyn
0e0a4628f6 Merge "libcutils: ashmem fortify and comply with Android coding standard" 2016-02-02 21:31:01 +00:00
Elliott Hughes
1ef5b78a2f Merge "Start debuggerd as soon as logd is up."
am: 1b729b3e04

* commit '1b729b3e04b210d096ee2d447945f6b2c53b6029':
  Start debuggerd as soon as logd is up.
2016-02-02 21:10:47 +00:00
Elliott Hughes
1b729b3e04 Merge "Start debuggerd as soon as logd is up." 2016-02-02 21:05:56 +00:00
Elliott Hughes
2f74a5dae5 Start debuggerd as soon as logd is up.
Makes debugging early boot crashes easier.

Bug: http://b/26918597
Change-Id: I5bb883f1350ea5f7a545cb0e9f1034ecfcf47cdb
2016-02-02 13:03:41 -08:00
Mark Salyzyn
c2d8aad8d7 libcutils: ashmem fortify and comply with Android coding standard
- sort header order and in groups
- remove all tabs, use only spaces
- use TEMP_FAILURE_RETRY in system calls
- preserve errno for -1 return

Bug: 26871259
Change-Id: I94fffbcaeba01fcc18a3ed07c02389c06c54d3b7
2016-02-02 12:38:06 -08:00
Dimitry Ivanov
819da66bec Merge "Include icu4c libraries to the list of public libs"
am: 17e33647f0

* commit '17e33647f0df458cd02e81751bd2e9eaac922009':
  Include icu4c libraries to the list of public libs
2016-02-02 20:08:08 +00:00
Dimitry Ivanov
17e33647f0 Merge "Include icu4c libraries to the list of public libs" 2016-02-02 20:03:28 +00:00
David Pursell
fe12d889e4 Merge "fastboot: socket testing improvements."
am: f971b6a24b

* commit 'f971b6a24b2d785187cf98cb002b9aee9ab6b2a7':
  fastboot: socket testing improvements.
2016-02-02 19:41:21 +00:00
David Pursell
f971b6a24b Merge "fastboot: socket testing improvements." 2016-02-02 19:36:44 +00:00
David Pursell
c3a466960f fastboot: socket testing improvements.
(This code was originally part of a huge fastboot CL but has been split
out to try to make the CLs a little more manageable).

More prep for fastboot TCP and UDP implementations. This CL adds a
SocketMock class that makes it easy to mock out network behavior so we
can unit test the TCP and UDP protocols.

Also uses the new libcutils socket_get_local_port() to avoid hardcoding
a server port in unit tests.

Bug: http://b/26157893.
Change-Id: I1ba10f31e98d7349313fc15f240383d63378a8db
2016-02-02 11:29:10 -08:00
David Pursell
d56499b21d Merge "libcutils: add multi-buffer socket send."
am: d95ecfc432

* commit 'd95ecfc432206d5408738bb7cbc6eb15e5827d91':
  libcutils: add multi-buffer socket send.
2016-02-02 19:23:51 +00:00
David Pursell
d95ecfc432 Merge "libcutils: add multi-buffer socket send." 2016-02-02 19:20:07 +00:00
David Pursell
9875e6c7e3 Merge "libcutils: add socket_get_local_port()."
am: d90adbc45b

* commit 'd90adbc45b905dcf3e5cddcd2908b9307fc2a332':
  libcutils: add socket_get_local_port().
2016-02-02 19:19:27 +00:00
David Pursell
8385fb299f libcutils: add multi-buffer socket send.
Unix and Windows both have functions to write multiple buffers to a
socket with a single call but they have very different signatures. This
CL creates some cross-platform functions to be able to perform these
operations in a uniform way, which will be required for upcoming
fastboot functionality.

This CL also fixes some inconsistent spacing in the touched files.

Bug: http://b/26558551
Change-Id: I8f14d52d3a1de1f3b464267666d6cd3b54263238
2016-02-02 11:18:56 -08:00
Dimitry Ivanov
c24ca894f5 Include icu4c libraries to the list of public libs
Note that with this change the linker will ignore
icu libraries provided by an app because public
libraries are always provided by system. At this point
it does not affect any apps because before Marshmallow
all of them were getting platform version of icu4c
libs anyways (they will be getting their own copy of the
library only in Marshmallow release).

Bug: http://b/26217329
Bug: http://b/26929349
Change-Id: I681cab43c9f28ec22319d9f0424bd3df00743a5f
2016-02-02 11:06:31 -08:00
David Pursell
d90adbc45b Merge "libcutils: add socket_get_local_port()." 2016-02-02 19:06:02 +00:00
David Pursell
756e1c81e8 libcutils: add socket_get_local_port().
Tests that require a local server currently hardcode a test value,
which can run into conflicts depending on what's currently running on
the machine.

This CL adds socket_get_local_port(), which lets us pass 0 so the
system picks an open port and we can query which port it chose.

Bug: http://b/26236380
Change-Id: I01d1558884e7636081d9a357db6faa86929934f6
2016-02-02 09:52:02 -08:00
Yabin Cui
2abff32d30 Merge "Fix for host simpleperf \'gettid\' unsat."
am: 650f6809a3

* commit '650f6809a39d8116f8f13f527c65372b80070f5e':
  Fix for host simpleperf 'gettid' unsat.
2016-02-02 02:10:22 +00:00
Yabin Cui
650f6809a3 Merge "Fix for host simpleperf 'gettid' unsat." 2016-02-02 02:06:22 +00:00
Mark Salyzyn
1f26d0b73e Merge "logd: security buffer only AID_SYSTEM reader"
am: ef68c867ac

* commit 'ef68c867ac220f21e86a44fda9f501359425cae5':
  logd: security buffer only AID_SYSTEM reader
2016-02-01 22:36:47 +00:00