Commit graph

20065 commits

Author SHA1 Message Date
Mark Salyzyn
ad575e04a1 init: watchdog restarted during shutdown fsck
Bug: 27506425
Change-Id: I40967068d18ce1a8cbaf0b750e7a7af6eab3e4e8
2016-04-05 11:31:14 -07:00
Elliott Hughes
0d6bb55a39 Merge "Fix Condition::waitRelative." 2016-04-05 16:43:25 +00:00
Elliott Hughes
fd376b97f7 Fix Condition::waitRelative.
HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE has never been defined for LP64,
so let's have everyone use the same code path.

Also fix the possible overflow.

Bug: http://b/26944282
Bug: http://b/27918161
Change-Id: I51fc0ebb1f6b860dc62d721f8ebfbcf724ce66e7
2016-04-04 14:51:21 -07:00
Mark Salyzyn
ba6de23e97 Merge "logcat: -f <non-existent-directory>/<filename> segfaults" 2016-04-01 19:51:43 +00:00
Mark Salyzyn
c18c2130d0 logcat: -f <non-existent-directory>/<filename> segfaults
- Check if the result of opendir is NULL in lastLogTime
- Cleanup: alphabetically sorted long options, reserved
  an alias for --regex
- Add a unit test, non existent directory should return
  gracefully with an exit(1) and not SIGSEGV.

NB: This failure was with eng/debug feature logpersist
    turned on, /data/misc/logd/ directory was missing,
    deleted, or temporarily inaccessible.

Bug: 27954627
Change-Id: I60246a53b02fdd7e5490fe458b02ad7b14843584
2016-04-01 09:42:32 -07:00
Mark Salyzyn
0858071cc4 Merge "liblog: suppress pmsg on user builds" 2016-03-31 20:57:36 +00:00
Erik Kline
d709914773 Merge "Set IFA_BROADCAST during IPv4 RTM_NEWADDRs" 2016-03-31 06:58:27 +00:00
Mark Salyzyn
a8ee1a3c61 Merge "logcat: add --print flag" 2016-03-30 23:30:59 +00:00
Mark Salyzyn
6dcecd9d1c Merge "logcat: posixize and extend long arguments" 2016-03-30 23:29:18 +00:00
Mark Salyzyn
c81205788c Merge "logcat: support --regex on binary buffers as-is" 2016-03-30 23:27:56 +00:00
Mark Salyzyn
df1d03e5dc Merge "logcat: do not assign 0 or NULL to global variables" 2016-03-30 23:18:30 +00:00
Mark Salyzyn
c9202777cf logcat: add --print flag
To be used in combination with --regex and --max-count flags
to allow all prints to pass through, but still stop when
max-count is hit.

Bug: 27706081
Change-Id: Idaa9f0b44586a885b9d9f367824b0072c0853227
2016-03-30 16:11:37 -07:00
Mark Salyzyn
d85f6461b6 logcat: posixize and extend long arguments
- change _ to - for long arguments
- added --tail as hidden undocumented alias for -t
- added --head as hidden undocumented alias for --max-count

Bug: 27706081
Change-Id: I614cc83ae56b305b267f64ed05dc3ed3027dabd4
2016-03-30 16:11:37 -07:00
Mark Salyzyn
aa730c1145 logcat: support --regex on binary buffers as-is
- Do not restrict regex on LOG_ID_EVENTS or LOG_ID_SECURITY.
- some logcat_panic messages need to incorporate a newline.
- deal with some coding standards issues.

Bug: 27706081
Change-Id: Ie647fd62d027b01004177559d68b8e5a346705e6
2016-03-30 16:11:37 -07:00
Mark Salyzyn
c6d6652df5 logcat: do not assign 0 or NULL to global variables
Bug: 27706081
Change-Id: If29d8d688ca7cce9b22227eeff1e9b500e728a50
2016-03-30 16:11:37 -07:00
Josh Gao
3d0a87bd5b Merge "debuggerd: set the name of the signal sender." 2016-03-30 17:52:05 +00:00
Dan Austin
b2cb35ef96 Merge "Address const issues in preparation for libcxx rebase." 2016-03-30 17:40:15 +00:00
Dan Austin
a2a13e3267 Merge "Address const issue in preparation for libcxx rebase." 2016-03-30 17:40:01 +00:00
James Hawkins
a348dfcd65 Merge "bootstat: Two changes to aid in debugging TimeSinceFactoryReset." 2016-03-30 17:13:42 +00:00
Erik Kline
06cb8e9203 Set IFA_BROADCAST during IPv4 RTM_NEWADDRs
Bug: 27194345
Bug: 27732412
Bug: 27786864
Change-Id: I5a5b41422bbaab4582c268c213b788f61cb0e169
2016-03-30 20:06:36 +09:00
Nick Kralevich
b3cf2e0f3d Merge "init/builtins.cpp: Switch to finit_module" 2016-03-30 02:07:09 +00:00
Sami Tolvanen
adbe06db48 Merge "mkbootimg: use int for os_version and os_patch_level" 2016-03-30 01:25:28 +00:00
Josh Gao
f3dde2f869 debuggerd: set the name of the signal sender.
Change-Id: I6bff938e229d2368250d4b5c268fa24bd4badea0
2016-03-29 17:56:47 -07:00
Nick Kralevich
124a9c97e9 init/builtins.cpp: Switch to finit_module
Switch insmod from using init_module to finit_module. From
"man finit_module":

  The finit_module() system call is like init_module(), but reads the
  module to be loaded from the file descriptor fd. It is useful when the
  authenticity of a kernel module can be determined from its location in
  the file system; in cases where that is possible, the overhead of
  using cryptographically signed modules to determine the authenticity
  of a module can be avoided.

finit_module is preferred over init_module because it allows LSMs, such
as SELinux, to perform a permission check on kernel module loads based on
the file from which the module is loaded. This functionality is not yet
implemented in the Linux kernel, but is on the SEAndroid TODO list.
See https://bitbucket.org/seandroid/wiki/wiki/ToDo

Bug: 27824855
Change-Id: Id0ea88cd1930393c8c73ce38e63d5b2eeadf946a
2016-03-29 16:53:08 -07:00
James Hawkins
fff95ba5dd bootstat: Two changes to aid in debugging TimeSinceFactoryReset.
* Also log to the BootEventRecordStore to check lossiness.
* Log factory_reset_current_time_failure separately.

Bug: 27550578
Change-Id: Id3d579a74a59ac28290cb7d6048765519f9ba59b
2016-03-29 16:13:49 -07:00
Sami Tolvanen
294eb9dac3 mkbootimg: use int for os_version and os_patch_level
The parse_int function attempts to interpret the string to detect
base, which leads to it assuming strings starting with 0 are base
8. This obviously fails for certain dates, so use int instead.

Bug: 27498078
Bug: 22914603
Change-Id: I50b1fb3d7876f2ec17d00649cc9a2d23af2aec2b
2016-03-29 16:06:37 -07:00
Mark Salyzyn
7ef5249afa liblog: suppress pmsg on user builds
- add optimized & cached LIBLOG_HIDDEN __android_log_is_debuggable()
- check when writing, either LOG_ID_SECURITY, SafetyNet or
  debuggable when pushing content to the pmsg buffer.

Bug: 27566046
Change-Id: I85f1b55ec329b38e00f4183836b6ed53046c323d
2016-03-29 13:52:21 -07:00
Mark Salyzyn
fbdbf100cb Merge "liblog: gate write on log id available" 2016-03-29 19:52:32 +00:00
Mark Salyzyn
c33103c440 liblog: gate write on log id available
- Secure LOG_ID_KERNEL in writer
- Secure LOG_ID_SECURITY in reader and writer
- if writer transport says not available, do not write to that log id

Bug: 27566046
Bug: 27896341
Change-Id: If63a78a56fb94adfbf9979454c4cadb81af45c19
2016-03-29 12:29:04 -07:00
Yabin Cui
d8c88fc5e3 Merge "libbacktrace_offline: support unwinding of shared libraries in apk file." 2016-03-29 18:18:47 +00:00
Dan Austin
b4cff495a1 Address const issues in preparation for libcxx rebase.
Change-Id: I4eccc1b5a70da9dd325e1a7e10ab0a3fe588c03f
2016-03-29 17:17:51 +00:00
Elliott Hughes
c8e179c094 Merge "Add operator int() to unique_fd." 2016-03-29 15:15:35 +00:00
Dan Austin
80fd4549e3 Address const issue in preparation for libcxx rebase.
Change-Id: I80c3349ee93d2b3f16c6fadc7f34b2bf4f2cc0d3
2016-03-28 23:28:48 +00:00
Dan Austin
7f84a0700c Merge "Address const issues in preparation for libcxx rebase." 2016-03-28 22:35:51 +00:00
Dan Austin
dce9b61d25 Merge "Fix const issues in preparation for libcxx rebase." 2016-03-28 21:41:10 +00:00
Dan Austin
60b976db85 Address const issues in preparation for libcxx rebase.
Change-Id: If9bf6c3ee57c3476a5661401853506551e2150cb
2016-03-28 14:22:12 -07:00
Dan Austin
a27bbd2728 Fix const issues in preparation for libcxx rebase.
Change-Id: Id57474eb63334873ee5383f61eb918941dbb0984
2016-03-28 13:43:15 -07:00
Elliott Hughes
2c5d1d7cd9 Add operator int() to unique_fd.
Change-Id: I7512559be7befbb8772d5529e06550267a2f1543
2016-03-28 12:15:36 -07:00
Yabin Cui
b791a76ed7 libbacktrace_offline: support unwinding of shared libraries in apk file.
Bug: 26962895
Change-Id: I009080f26e7323247c3ab24eea614eec4432ca6a
2016-03-26 16:06:23 -07:00
Elliott Hughes
3761365735 Merge "Fix <android-base/*.h> header guards." 2016-03-26 16:08:59 +00:00
Elliott Hughes
19388fc312 Merge "Copy the good comment and warn_unused_result from ScopedFd to unique_fd." 2016-03-26 15:53:20 +00:00
James Hawkins
68af348312 Merge "Revert "Revert "bootstat: Handle v1 record files which do not contain file contents.""" 2016-03-25 22:06:10 +00:00
Casey Dahlin
5c8b99da1a Merge changes Ie52ddf30,Idfa637f6
* changes:
  logcat: Add --max-count option
  logcat: Add --regex option
2016-03-25 21:41:27 +00:00
James Hawkins
c0dc139b4a Revert "Revert "bootstat: Handle v1 record files which do not contain file contents.""
This reverts commit 756b6a53a7.

The change is updated to use utimes (instead of futimens) since only
support for seconds resolution is required.

Bug: 27836969
Change-Id: I7134f759fb643e1a149158fcf6e20f76538b57d3
2016-03-25 14:26:13 -07:00
Casey Dahlin
6ac498d4bb logcat: Add --max-count option
This new option causes logcat to quit after it prints N messages.

Test: New unit test passes
Bug: 27706081
Change-Id: Ie52ddf300160a041e68a6bac0ae7ade68bb28a7c
2016-03-25 13:55:29 -07:00
Casey Dahlin
dc42a8734e logcat: Add --regex option
You can now filter log output by a regex on the messages.

Test: New unit test passes
Bug: 27706081
Change-Id: Idfa637f62a25fb1b92e9b49b89572dff0fec6e08
2016-03-25 13:55:29 -07:00
James Hawkins
5d47ab5a3a Merge "Revert "bootstat: Handle v1 record files which do not contain file contents."" 2016-03-25 18:24:37 +00:00
James Hawkins
756b6a53a7 Revert "bootstat: Handle v1 record files which do not contain file contents."
Breaks the darwin-x86 build.

This reverts commit 84fda19c83.

Change-Id: Ia55b5ba756ec2ba4195f493ea505d05f68a9c37e
2016-03-25 18:21:58 +00:00
Daniel Cashman
bb296fdaec Merge "Revert "Set mmap_rnd_bits to maximum value."" 2016-03-25 17:50:47 +00:00
Daniel Cashman
c8f026fc9c Revert "Set mmap_rnd_bits to maximum value."
Prebuilt kernels have not been updated with the requisite patches.

This reverts commit c819e78e7f.

Change-Id: I8e63373a9b8a1e5adcb2471dfe43bde28e3f8e65
2016-03-25 10:45:20 -07:00