Commit Graph

29801 Commits

Author SHA1 Message Date
Chris Fries cbd8d9d4f5 Merge "libsparse: Fix odd-sized input files total_blks" am: 652ce94f40
am: ab74c778df

Change-Id: I5bc6a0df02d86fa0f56f866ebdcb18314858634a
2017-04-19 19:24:26 +00:00
Chris Fries ab74c778df Merge "libsparse: Fix odd-sized input files total_blks"
am: 652ce94f40

Change-Id: I4f942ca03bb06c716d9cebbb648b114107c86cf7
2017-04-19 19:22:57 +00:00
Treehugger Robot 652ce94f40 Merge "libsparse: Fix odd-sized input files total_blks" 2017-04-19 19:14:47 +00:00
Tom Cherry 0a4ff0fb31 Merge "init: add warning that `start` is not synchronous" am: 06039e58d8
am: 2b78f9c0a9

Change-Id: Ifbbfc587a926ec343e166018c2a0f9fa914ed591
2017-04-19 18:20:22 +00:00
Tom Cherry 2b78f9c0a9 Merge "init: add warning that `start` is not synchronous"
am: 06039e58d8

Change-Id: Ie90e08c41d22c4fcb2e6f98150b1331467423709
2017-04-19 18:18:21 +00:00
Tom Cherry 06039e58d8 Merge "init: add warning that `start` is not synchronous" 2017-04-19 18:12:41 +00:00
Keun-young Park 7536c043fc Merge "run e2fsck -f selectively with mount retry" am: 380a3bb4c2
am: 3794d11454

Change-Id: Iee0919e925286cb5a5bbe474eb1b2c599dbe9de0
2017-04-19 17:18:18 +00:00
Keun-young Park 3794d11454 Merge "run e2fsck -f selectively with mount retry"
am: 380a3bb4c2

Change-Id: I3411d17aa175b608172dbc7cec253f66bc157536
2017-04-19 17:16:16 +00:00
Keun-young Park 380a3bb4c2 Merge "run e2fsck -f selectively with mount retry" 2017-04-19 17:09:51 +00:00
Mark Salyzyn 925a895266 Merge "init.rc: move load_system_props to beginning of 'on fs'" am: 798ac73dcf
am: 03393e6f63

Change-Id: Ic10bc005281b72110afea2d6916a438038f00547
2017-04-19 16:45:45 +00:00
Mark Salyzyn 03393e6f63 Merge "init.rc: move load_system_props to beginning of 'on fs'"
am: 798ac73dcf

Change-Id: I0bf0a8ca7b88ca827a9ded5d33b482fa25cb31a2
2017-04-19 16:43:45 +00:00
Treehugger Robot 798ac73dcf Merge "init.rc: move load_system_props to beginning of 'on fs'" 2017-04-19 16:35:23 +00:00
Mark Salyzyn e4223e034c Merge "liblog: __android_logger_property_bool svelte+eng default" am: 8b318d0c26
am: f58558d6b9

Change-Id: I69168cf8ef5294dfb00742b5fc871c8f269cd6bb
2017-04-19 16:19:31 +00:00
Mark Salyzyn f58558d6b9 Merge "liblog: __android_logger_property_bool svelte+eng default"
am: 8b318d0c26

Change-Id: I57810f41f8eff2cdbf943613d1fb5acbbcc53469
2017-04-19 16:09:39 +00:00
Chris Fries 3738968ed8 libsparse: Fix odd-sized input files total_blks
If the input file isn't a multiple of block_size, count the trailing
bit as a block in the output, otherwise bootloader will try to write
past the last declared block in the sparse file.

Test: Run sparse_test
Bug: 37339998
Change-Id: Iec143107d15795c6a6f4d3ea7b7515f6f16adcae
2017-04-19 10:32:45 -05:00
Mark Salyzyn 3510359a3c init.rc: move load_system_props to beginning of 'on fs'
ro.logd.kernel, ro.config.low_ram, ro.logd.timestamp and ro.debuggable
need to be retrieved prior to logd start in order for the service to
behave in a configured manner.  Other essential services are also
dependent on these system properties as well, so it just makes sense
to pick them all up first in 'on fs'.

Test: smoke test
Bug: 37425809
Change-Id: I33ad185f397ee527ed3c84cc2bcb40ff8ca785b5
2017-04-19 14:55:35 +00:00
Mark Salyzyn 8b318d0c26 Merge "liblog: __android_logger_property_bool svelte+eng default" 2017-04-19 14:55:20 +00:00
Keun-young Park 40db04d640 run e2fsck -f selectively with mount retry
- Do not use -f if it was cleanly shutdown.
- For unclean shutdown or other operation failures like
  mount, tune2fs failure, run full check.
- Still old image will run full check once in 5 reboots
  while new image will not run full check unless something
  fails.
- Add retry for final mount. If mount fails once, run full fsck
  once and try again.

bug: 32246772
bug: 35366616
Test: many reboots
Change-Id: I86949732ffe1955636ac179d553c91e52910f73e
2017-04-18 19:28:55 -07:00
Tom Cherry 19866bf19f init: add warning that `start` is not synchronous
Bug: 36571736
Bug: 37481363
Change-Id: I5d360cbb3635f00453a492ee4e3650fb80f390f5
2017-04-19 00:46:44 +00:00
Mark Salyzyn b0bf71f166 Merge "logd: report log reader instantiation" am: 0ca7eec9b0
am: 7a8a048f56

Change-Id: I00ea9528b2e6104f7728b8f7e93639c273b6c55e
2017-04-18 23:55:15 +00:00
Mark Salyzyn 7a8a048f56 Merge "logd: report log reader instantiation"
am: 0ca7eec9b0

Change-Id: I7e27b80dbbfb096316d6f19204eca429cdebb59e
2017-04-18 23:53:16 +00:00
Treehugger Robot 0ca7eec9b0 Merge "logd: report log reader instantiation" 2017-04-18 23:46:18 +00:00
Jeff Sharkey 93773bd1f0 Merge "Allocate a GID range for external cache files." am: edaed3ed7a
am: 28e0eae769

Change-Id: Ib3fd9c570e3885971b79e76804f440f7ed618bc4
2017-04-18 22:48:54 +00:00
Jeff Sharkey 28e0eae769 Merge "Allocate a GID range for external cache files."
am: edaed3ed7a

Change-Id: I15399bb3ce95bf52e6ab2d0585598bdf7774c480
2017-04-18 22:43:23 +00:00
Mark Salyzyn 9fcaaba85d liblog: __android_logger_property_bool svelte+eng default
When BOOL_DEFAULT_FLAG_ENG and/or BOOL_DEFAULT_FLAG_SVELTE is set for
flags parameter in __android_logger_property_get_bool, they can not be
overridden by a supplied property value.  Reset these two flags if
there is something in the specified property.

Test: gTest liblog-unit-tests, logcat-unit-tests and logd-unit-tests
Bug: 37425809
Change-Id: I5fc2d727e8c30bc1e781f8b365f44ec62dd36b4d
2017-04-18 15:36:36 -07:00
Treehugger Robot edaed3ed7a Merge "Allocate a GID range for external cache files." 2017-04-18 22:34:16 +00:00
Chris Fries 5a07296873 Merge "libsparse: Fix verbose_error string usage" am: 0bdf6539d6
am: 006ea1aebc

Change-Id: I52cec282c5c3459628abab603ea0d7048f854fb7
2017-04-18 22:10:29 +00:00
Chris Fries 006ea1aebc Merge "libsparse: Fix verbose_error string usage"
am: 0bdf6539d6

Change-Id: I9769a91fac4a3acf4e3e1c7b02b896217c6d9d3d
2017-04-18 22:00:48 +00:00
Mark Salyzyn fa3add3364 logd: report log reader instantiation
Helpful instrumentation to determine who is waiting for logger data.

Test: manual
Bug: 37274132
Bug: 37378309
Change-Id: I14fb1d9d15ae413930121048b770852359f06682
2017-04-18 14:59:46 -07:00
Treehugger Robot 0bdf6539d6 Merge "libsparse: Fix verbose_error string usage" 2017-04-18 20:45:09 +00:00
Tom Cherry 8972f887d2 Merge "init: handle sys.powerctl immediately" am: 14ed55bae8
am: e6bfb53196

Change-Id: Ibdcbfdd15957d4ca64ef2f1f084768e9241da27f
2017-04-18 18:27:45 +00:00
Tom Cherry e6bfb53196 Merge "init: handle sys.powerctl immediately"
am: 14ed55bae8

Change-Id: Ide932edcca1b076665448e465a785abfc1a1cb4c
2017-04-18 18:22:14 +00:00
Tom Cherry 14ed55bae8 Merge "init: handle sys.powerctl immediately" 2017-04-18 18:14:18 +00:00
Chris Fries a7eeb22efb libsparse: Fix verbose_error string usage
Switch vnsprintf to StringPrintf to avoid off-by-one, and switch
sparse_read.c to cpp.

Test: fastboot flash normal image with smaller sparse limit

Change-Id: Ia399b167625deb271bfd0ee3273071306d71c4d4
2017-04-18 10:53:49 -05:00
Steven Moreland ae4c956012 Merge "libcutils: compile with BOARD_VNDK_VERSION current" am: f358bed624
am: dd9a91f109

Change-Id: I6006b664c42faa2d135e040321e9cd48589e2710
2017-04-18 14:59:54 +00:00
Steven Moreland dd9a91f109 Merge "libcutils: compile with BOARD_VNDK_VERSION current"
am: f358bed624

Change-Id: Idc1ad70ec01687eb23f2eff584751088f122e59f
2017-04-18 14:54:52 +00:00
Treehugger Robot f358bed624 Merge "libcutils: compile with BOARD_VNDK_VERSION current" 2017-04-18 14:46:27 +00:00
Mark Salyzyn 732f30ee8e Merge changes Iec369a50,I3f9f8d56,I78959464,I72ea858e am: 6ad16cda19
am: 7b45da1006

Change-Id: I5969bd70c30e1f4f4e7fbff337a4a1e16ed03176
2017-04-18 14:29:21 +00:00
Mark Salyzyn 7b45da1006 Merge changes Iec369a50,I3f9f8d56,I78959464,I72ea858e
am: 6ad16cda19

Change-Id: I3e44fdd82fb5ec8a1beffa759df82a67556ea16a
2017-04-18 14:23:53 +00:00
Mark Salyzyn 6ad16cda19 Merge changes Iec369a50,I3f9f8d56,I78959464,I72ea858e
* changes:
  logd: instrument tests better for failure
  liblog: log_time add explicit to some constructors.
  logd: iterator corruption paranoia
  logd: regression in handling watermark boundary.
2017-04-18 14:17:12 +00:00
Tom Cherry 98ad32a967 init: handle sys.powerctl immediately
Currently if a process sets the sys.powerctl property, init adds this
property change into the event queue, just like any other property.
The actual logic to shutdown the device is not executed until init
gets to the action associated with the property change.

This is bad for multiple reasons, but explicitly causes deadlock in
the follow scenario:

A service is started with `exec` or `exec_start`
The same service sets sys.powerctl indicating to the system to
shutdown
The same service then waits infinitely

In this case, init doesn't process any further commands until the exec
service completes, including the command to reboot the device.

This change causes init to immediately handle sys.powerctl and reboot
the device regardless of the state of the event queue, wait for exec,
or wait for property conditions.

Bug: 37209359
Bug: 37415192

Test: Init reboots normally
Test: Update verifier can reboot the system
Change-Id: Iff2295aed970840f47e56c4bacc93001b791fa35
2017-04-17 16:40:06 -07:00
Mark Salyzyn 24aa9a41e1 logd: instrument tests better for failure
Failure to open socket misbehaved and told us nothing.

Test: gTest logd-unit-tests
Bug: 37378309
Change-Id: Iec369a50ccb1027e96947465e90d9572c9f4047f
2017-04-17 15:10:26 -07:00
Mark Salyzyn d87d47f7dd liblog: log_time add explicit to some constructors.
Add explicit to constructors, to prevent implicit conversions.

Test: compile
Bug: 37378309
Change-Id: I3f9f8d561e84c492eafa6528db7c238da072dad8
2017-04-17 15:10:26 -07:00
Mark Salyzyn 3614a0c5d4 logd: iterator corruption paranoia
Add checking for impossible(tm) scenarios within LogBuffer::flushTo:

1) When iterating through the log entries, check if the iterator
   returns two identical element references and break out of the loop.
2) Cap the maximum number of log entries we will skip while holding
   the iterator lock at 4194304, break out of the loop.

We print a message to the kernel logs if we hit these cases.

ToDo: Remove this paranoia at some future date.

Test: gTest liblog-unit-tests logcat-unit-tests and logd-unit-tests
Bug: 37378309
Change-Id: I789594649db14093238828b9f6d1daeca8b780c2
2017-04-17 15:10:26 -07:00
Mark Salyzyn 5836379b21 logd: regression in handling watermark boundary.
Deal with a regression introduced in commit
5a34d6ea43 (logd: drop mSequence from
LogBufferElement) where log_time was compared against nsec() time
miscalculating the watermark boundary.  When dealing with logcat
-t/-T, or any tail reading, add a margin to prune to back off by a
period of 3 seconds (pruneMargin).

Test: gTest liblog-unit-tests logcat-unit-tests and logd-unit-tests
Bug: 37378309
Change-Id: I72ea858e4e7b5fa91741ea84c40d2e7c3c4aa031
2017-04-17 15:10:26 -07:00
Tom Cherry b7ef4726ff Merge "ueventd: create classes for dev and sys permissions" am: ffa38cfc1e
am: e29fa61725

Change-Id: Ia0f7ea669fe7ee948b1572fd923fab041cf630c2
2017-04-17 21:46:46 +00:00
Steven Moreland d73be1b96b libcutils: compile with BOARD_VNDK_VERSION current
- moved __android_log_is_debuggable to a new public header
    (log_properties.h)
- vendor version of sched_policy uses ALOG* instead SLOG*

Test: (sanity) liblog-unit-tests
Test: (sanity) libcutils_test (noting b/b/32972117, two tests continue
  to fail)
Test: system/core as a whole makes with BOARD_VNDK_VERSION := current
  now with no problems.
Test: boots/works on internal marlin
Bug: 33241851

(cherry picked from commit 1f83aa424f)

Merged-In: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
Change-Id: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
2017-04-17 14:44:17 -07:00
Tom Cherry e29fa61725 Merge "ueventd: create classes for dev and sys permissions"
am: ffa38cfc1e

Change-Id: Idc3ecf436d5750564de4ba16f0811c1d76cc609d
2017-04-17 21:42:11 +00:00
Tom Cherry ffa38cfc1e Merge "ueventd: create classes for dev and sys permissions" 2017-04-17 21:34:12 +00:00
Jeff Sharkey fa16473921 Allocate a GID range for external cache files.
We can't reuse the GID range for internal cache files, otherwise
we don't have a way to tease apart the difference when deciding if
it's safe to move apps.

Test: builds, boots
Bug: 37193650
Change-Id: I22c4e575cd557636e74c5c73035adb1d4dcbb7f7
2017-04-17 14:50:27 -06:00