Commit graph

19973 commits

Author SHA1 Message Date
Pirama Arumuga Nainar
922e151ba2 Merge "Update BacktraceOffline for LLVM rebase to r256229." 2016-03-18 21:54:51 +00:00
Elliott Hughes
f3f7d64035 Merge "Enable multiple consoles" 2016-03-18 01:07:48 +00:00
Josh Gao
6a7ddbd37d Merge "debuggerd: don't apply timeout when wait_for_gdb is on." 2016-03-17 23:05:55 +00:00
Dimitry Ivanov
a86d846ab7 Merge "Move list of public libraries to a config file" 2016-03-17 22:53:58 +00:00
Josh Gao
676a756b7b debuggerd: don't apply timeout when wait_for_gdb is on.
Change-Id: Ic632dde4a0510c212a4b1c01890df9a41e9771c9
2016-03-17 15:29:00 -07:00
Josh Gao
1371c0562c Merge "debuggerd: don't send SIGSTOP to crashing processes." 2016-03-17 21:07:48 +00:00
Josh Gao
b17f228ff6 debuggerd: don't send SIGSTOP to crashing processes.
This was actually nonfunctional until f5e8f0b, because it was using kill
after privileges were dropped. This doesn't seem necessary after the
changes to the sibling thread ptrace logic, though.

Bug: http://b/27427439
Change-Id: I6bffbc14e0cf5e377bbfa39c945518e0d436c223
2016-03-17 13:47:48 -07:00
Josh Gao
b45800afa3 Merge "debuggerd: fix stupid typo." 2016-03-17 20:22:58 +00:00
Josh Gao
1b301836bb debuggerd: fix stupid typo.
Change-Id: Icd9a25a71e1e8580a200fe68bce0b17d09c51642
2016-03-17 13:21:56 -07:00
Josh Gao
e21e3c65b0 Merge changes I5a5da1f1,I6294ff68
* changes:
  debuggerd: monitor the worker process for failure.
  debuggerd: fork the signal sender once.
2016-03-17 20:00:00 +00:00
Viorel Suman
caafe5c620 Enable multiple consoles
This CL allows enabling of multiple consoles. The expected format
of "androidboot.console" kernel parameter is a list of available
consoles, as follows:

  androidboot.console=tty0:ttyS0

A service can be mapped to a specific console by providing the
optional argument, IE "tty0", to "console" service attribute as follows:

service fbconsole /system/bin/sh
    class core
    console tty0
    disabled
    user shell
    group shell log readproc
    seclabel u:r:shell:s0

Bug: None
Change-Id: I3f8556425c8651bd121995869700f18b23365d55
Tracked-On: https://jira01.devtools.intel.com/browse/BP-289
2016-03-17 21:00:15 +02:00
Josh Gao
630bc80e18 debuggerd: monitor the worker process for failure.
Use sigtimedwait on SIGCHLD to watch our forked worker processes for
failure, so that we can guarantee that we always resume/kill the target
process if libunwind crashes.

Bug: http://b/27427439
Change-Id: I5a5da1f1abd7dc9d01223f5b3778e946e2d47d20
2016-03-17 11:43:55 -07:00
Josh Gao
f5e8f0b9cd debuggerd: fork the signal sender once.
Bug: http://b/27427439
Change-Id: I6294ff68a150bc9950a300264c31d2141307ac66
2016-03-17 11:27:31 -07:00
Dimitry Ivanov
d1fdb98830 Move list of public libraries to a config file
This list contains libraries that should directly or indirectly
be accessible to apps for the platform. Note that this list is
not device specific but rather device class specific.

For now we have 2 separate lists; one for Android Phones and Tablets,
and another one for Android Wear devices.

Bug: http://b/27546414
Bug: http://b/22548808
Change-Id: I83de5e3cf67392d0e9af66f70123898bd5997146
(cherry picked from commit 4b0e963872)
2016-03-17 10:54:19 -07:00
Josh Gao
371e7ea170 Merge "debuggerd: kill crashing processes with the signal they died with." 2016-03-16 23:15:51 +00:00
Josh Gao
561497c0a8 debuggerd: kill crashing processes with the signal they died with.
Bug: http://b/27675306
Change-Id: I951c5d7e54c35d88c65c5dc856e0b9d5a93d47b2
2016-03-16 16:10:48 -07:00
Mark Salyzyn
c040600baf Merge changes I7cbc8fda,Ibb7cf4b1
* changes:
  liblog: test: security buffer is allowed to be denied
  liblog: test: do not LOG in signal handler
2016-03-16 16:02:48 +00:00
Sami Tolvanen
9fc2cd20a6 Merge "mkbootimg: add os_version" 2016-03-15 16:46:31 +00:00
Sami Tolvanen
d162828814 mkbootimg: add os_version
Adds operating system version and security patch level to the boot
image header. This change take into use one of the existing unused
fields to preserve compatibility.

Note: All information is packed into a single field, because there
are a lot of existing devices that break if the first unused field
is set to a non-zero value.

Bug: 27498078
Bug: 22914603
Change-Id: I24953129e06019b95014a050e916fe4f5c199286
2016-03-15 09:38:36 -07:00
Mattias Nissler
ff03857437 Merge "[core][trusty] Implement Trusty NVRAM HAL module." 2016-03-15 14:43:29 +00:00
James Hawkins
42aab0a789 Merge "bootstat: Disambiguate boot time on encrypted devices." 2016-03-14 18:59:55 +00:00
Elliott Hughes
bf6c67f234 Merge "init-debug.rc: mount debugfs" 2016-03-14 17:57:16 +00:00
Mark Salyzyn
00c8dd8e6f Merge "liblog: truncate logtags that overflow prefixBuf" 2016-03-14 16:40:37 +00:00
Mark Salyzyn
29e70a98fe liblog: test: security buffer is allowed to be denied
Bug: 27405083
Change-Id: I7cbc8fda326a2aea3bef5dabee9d3290cc818b24
2016-03-14 09:18:55 -07:00
Mark Salyzyn
50af7f8b1d liblog: test: do not LOG in signal handler
- We actually are logging in a signal handler, the title is bluster
  to remind developers. It is not a reliable path though as it can
  lock up. Our goal is to minimize the chances of a lockup regardless
  in the name of stability only. The test remains to catch regression
  in the name of code quality and reliability. Expected to be
  >99.999% reliable.
- Add a new _correct_ duplicate test that uses signal to release a
  semaphore to a thread that performs the task. This path is expected
  to be 100% reliable.

Bug: 27405083
Change-Id: Ibb7cf4b13e34ebfac2db2af8724b7db7a27f81a8
2016-03-14 09:18:38 -07:00
Mark Salyzyn
2f83d679dd liblog: truncate logtags that overflow prefixBuf
Bug: 27585978
Change-Id: If2f45e8787b05b46491a771702746cfc248b9ccd
2016-03-14 09:12:24 -07:00
Janis Danisevskis
b9c0788806 Merge "Leftovers of the SELinux policy update mechanism" 2016-03-13 14:47:23 +00:00
James Hawkins
c08e996ac8 bootstat: Disambiguate boot time on encrypted devices.
This change introduces new metrics to discern boot time on encrypted devices:
* post_decrypt_time_elapsed
* boot_decryption_complete
* boot_complete_post_decrypt
* boot_complete_no_encryption

Bug: 27497357
Change-Id: I8d3a411029bd6a45f80589ff67c408593e133a87
2016-03-11 15:50:39 -08:00
Janis Danisevskis
3d1dff2231 Leftovers of the SELinux policy update mechanism
Remove references to SELinux policy files in /data/security
from libselinux/android.c. In the process all code that is
apparently related to handling an alternate policy and/or
reloading the policy has been removed.

Bug: 26544104
Change-Id: I47bf76ac3c26c5d71f92a21ffac2b17ba14262ea
2016-03-11 17:47:30 +00:00
Elliott Hughes
1f13c1a208 Merge "Fix buffer overrun in adb wait-for-device." 2016-03-11 16:53:26 +00:00
Mattias Nissler
32ac6aafa4 [core][trusty] Implement Trusty NVRAM HAL module.
This adds an NVRAM HAL module implementation which interfaces with the
Trusty NVRAM app.

BUG: 23524282
Change-Id: Ibfee13baccc2c5369786a078f2feffcd4eb7a139
2016-03-11 16:07:05 +01:00
Elliott Hughes
34e560b9a1 Fix buffer overrun in adb wait-for-device.
Bug: http://b/27444063
Change-Id: I72339d7215aae28069484b9796d71fe0c53dff96
2016-03-10 17:59:17 -08:00
Prathmesh Prabhu
a680117bb5 Merge "emulator: Use distinct serial names for simultaneous qemu pipes." 2016-03-11 00:51:44 +00:00
Sami Tolvanen
4d25e6664f Merge "Revert "mkbootimg: add version and patch level"" 2016-03-11 00:11:25 +00:00
Sami Tolvanen
3253092718 Revert "mkbootimg: add version and patch level"
This reverts commit 3edc43234a.

Bug: 27580174
Change-Id: I42dac32eb7a70498accf2b8b4fde1ed0d221ca0b
2016-03-11 00:08:42 +00:00
Mark Salyzyn
8c8acccd88 Merge "liblog: audit declare LIBLOG_ABI_PUBLIC" 2016-03-10 22:28:23 +00:00
Christopher Ferris
3f9c22c34c Merge "Add error reporting mechanism for failing Unwind." 2016-03-10 22:12:35 +00:00
Mark Salyzyn
be1d3c21b5 liblog: audit declare LIBLOG_ABI_PUBLIC
- replace <sys/cdefs.h> with local "log_cdefs.h" which
  fortifies and expands definitions, adding LIBLOG_ABI_PUBLIC,
  LIBLOG_HIDDEN, LIBLOG_ABI_PRIVATE and LIBLOG_WEAK.
- clearly tag each interface as LIBLOG_ABI_PUBLIC, LIBLOG_HIDDEN,
  LIBLOG_ABI_PRIVATE, LIBLOG_WEAK or static depending on scope
- Add -fvisibility=hidden to ensure nothing else leaks
- some code standard adjustments

Bug: 27566046
Change-Id: Ic14033c4e6d833d973beb035ddc1c6134fb35a3f
2016-03-10 13:49:38 -08:00
Christopher Ferris
206a3b9798 Add error reporting mechanism for failing Unwind.
Remove the logging of an error if a thread disappears before the unwind
can begin. This can happen, so allow the caller to determine if this
is really a problem worth logging.

Bug: 27449879
Change-Id: Ie81718d53fb0e519fa0a7db9fd5f314b72bfa431
2016-03-10 12:39:15 -08:00
Prathmesh Prabhu
d387acc9b8 emulator: Use distinct serial names for simultaneous qemu pipes.
ADB local transport for the emulator based on qemu pipes uses a socket
transport. Before this CL, multiple connection requests accepted by the
qemu pipe device would result in ADB transport with the same serial.
The register function would fail as a result, and all subsequent
connections would fail.

Test:
while true; do adb kill-server; adb devices; done
Doesn't fail for > 10 minutes.

This CL replaces an earlier CL
(I0fdcf2694516151c5f8f8e1580648b940679c981) that was unsafe for real
devices.

BUG=27441661

Change-Id: I7d801b175f3bee10fc7e0ab1b12d5623984371b9
2016-03-10 09:26:49 -08:00
Josh Gao
76ffa683fc Merge "debuggerd: make sure that we kill the process after dumping." 2016-03-10 00:00:54 +00:00
Josh Gao
f0c8723bdd debuggerd: make sure that we kill the process after dumping.
Bug: http://b/27367422
Change-Id: Icd704b1effd558904975cfc524714b51917a653f
2016-03-09 15:59:27 -08:00
James Hawkins
a347cde386 Merge "bootstat: Add more debug logging metrics to RecordFactoryReset." 2016-03-09 16:34:25 +00:00
James Hawkins
1c7e3bd629 Merge "bootstat: Add more strings to the bootreason mapping." 2016-03-09 16:25:18 +00:00
Calin Juravle
44095c6dbe Merge "Add Mips64 Runtime ISA type." 2016-03-09 10:53:57 +00:00
Ruchi Kandoi
ed608b30b5 Merge "healthd: Check if battery device exists instead of charger drivers before setting fake properties." 2016-03-09 02:35:02 +00:00
James Hawkins
45ead35222 bootstat: Add more strings to the bootreason mapping.
Bug: 27555866
Change-Id: Ieebacaa9369a744d0968b3483c4302ed47bdf9f6
2016-03-08 16:42:07 -08:00
James Hawkins
0660b307b8 bootstat: Add more debug logging metrics to RecordFactoryReset.
In an effort to track down the source of some wonky data being reported.

Bug: 27550578
Change-Id: I1f08447c0203e7982d1b44bc04b531e96358c223
2016-03-08 16:18:15 -08:00
Michael Ryleev
feaa3cecb2 Merge changes I7aca7c7c,If9582ae6
* changes:
  trusty: tipc_test: fix for building with -Wformat-security flag
  trusty: tipc_test: add tests for readv/writev APIs
2016-03-08 23:26:35 +00:00
Ruchi Kandoi
fabd490f58 healthd: Check if battery device exists instead of charger drivers before
setting fake properties.

healthd used to check for registered charger drivers to determine if the
device is an always-plugged device with no battery. This patch changes
it to check for battery instead.

Change-Id: Ie4ff5d3f21dc1a83a780a41eb0c929f66b86d631
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-03-08 22:28:25 +00:00