Commit graph

43486 commits

Author SHA1 Message Date
Tom Cherry
f2e4c4d2a7 Merge "init: clarify some text/README about 'critical' services"
am: ce27a5bc0f

Change-Id: Ic6e336d622c20a711ce54720e7bcc2858226ed06
2018-10-16 09:52:03 -07:00
Tom Cherry
ce27a5bc0f Merge "init: clarify some text/README about 'critical' services" 2018-10-16 16:38:42 +00:00
Yao Chen
3462059598 Merge "Reset statsd writer to init state after close"
am: 379bd47301

Change-Id: I4ea40602e3eb5a8f6b359073ec397fd8d6c58e70
2018-10-15 21:21:30 -07:00
Julien Desprez
dfd0db42f6 Merge "Add adb_integration_test_device to general-tests"
am: 42a2e9eb27

Change-Id: Ib81e9e180570232ec823589ec421f5d6e0ff6c13
2018-10-15 21:20:45 -07:00
Daniel Rosenberg
e0a5a58bed Merge "Call markBootAttempt when serice manager available"
am: 8e842dd365

Change-Id: I20a708d026bb140198ca43987143d6013c6224fc
2018-10-15 21:19:43 -07:00
Treehugger Robot
379bd47301 Merge "Reset statsd writer to init state after close" 2018-10-16 02:29:27 +00:00
Treehugger Robot
42a2e9eb27 Merge "Add adb_integration_test_device to general-tests" 2018-10-16 02:26:57 +00:00
Elliott Hughes
4b8e3bde92 Merge "rootdir: add ccross to OWNERS."
am: 1ffe0ccc70

Change-Id: I609899faeecc842b94fd6eb85cf5f04dda830b16
2018-10-15 19:08:38 -07:00
Ryan Prichard
50b0e1de48 Merge "Change ZipArchiveHandle from void* to ZipArchive*"
am: c394f7f7ac

Change-Id: I59e9163e3c9c2a0baf21de1ccc9703406a687965
2018-10-15 19:06:32 -07:00
Treehugger Robot
8e842dd365 Merge "Call markBootAttempt when serice manager available" 2018-10-16 01:45:51 +00:00
Treehugger Robot
1ffe0ccc70 Merge "rootdir: add ccross to OWNERS." 2018-10-16 00:24:41 +00:00
Tom Cherry
ad9e7eaf2d init: clarify some text/README about 'critical' services
'Critical' services have rebooted into bootloader, like all other
catastrophic init crashes, for years now.  Update the text to match.

Test: n/a
Change-Id: Icfc41bf3e383958f14ecfaab9ca187e2c3dc7fd9
2018-10-15 17:21:48 -07:00
Ryan Prichard
c394f7f7ac Merge "Change ZipArchiveHandle from void* to ZipArchive*" 2018-10-15 23:23:29 +00:00
Yao Chen
763e3aee42 Reset statsd writer to init state after close
Bug: 117796113
Test: locally tested and verified stats logs can write to statsd again.
Change-Id: I33b006199d23f851ff1a6e49445fb16d74223062
2018-10-15 16:12:48 -07:00
Daniel Rosenberg
6156b9b8ba Call markBootAttempt when serice manager available
This causes adds a call the fucntion to decrement the
checkpoint's retry count as soon as service manager is
available.

Test: vdc setCheckpoint 2 then reboot 3 times checking state
Bug: 112901762
Change-Id: Ie0a78b1eb05b340718e76175509d1ebefae68017
2018-10-15 22:16:19 +00:00
Steven Moreland
d6525b7107 Merge "init: clarify multiple 'interface' keyword use"
am: 83093e7ef8

Change-Id: I8f779801b2ba2245b8a4386898ec00f8f96514da
2018-10-15 14:32:50 -07:00
Elliott Hughes
4b38722c12 rootdir: add ccross to OWNERS.
Bug: N/A
Test: N/A
Change-Id: I285f66a69fa86e03cfc213abc2fe85e938f849df
2018-10-15 14:18:04 -07:00
Treehugger Robot
83093e7ef8 Merge "init: clarify multiple 'interface' keyword use" 2018-10-15 21:10:43 +00:00
Nick Kralevich
3542b03267 Merge "llkd: Do not check apexd by default for stack"
am: 0df9231dfd

Change-Id: Iccb481247092549ba63f3fb4949715ced7e47562
2018-10-15 13:50:39 -07:00
Treehugger Robot
0df9231dfd Merge "llkd: Do not check apexd by default for stack" 2018-10-15 20:33:42 +00:00
Suren Baghdasaryan
c95bfa5e9e Merge "lmkd: Implement pid purge command to clear old pids when zygote restarts"
am: 79e5b550ce

Change-Id: I054cc48a4f9106f0a4e9f313bf997facac9c1b1e
2018-10-15 13:07:28 -07:00
Suren Baghdasaryan
79e5b550ce Merge "lmkd: Implement pid purge command to clear old pids when zygote restarts" 2018-10-15 19:47:54 +00:00
Tom Cherry
c2547d4a39 Merge "logd: rework logic for LogTimeEntry"
am: 6e52c23a3e

Change-Id: Id91a62c222ffc3765cff2cfabd09b4ed5512d420
2018-10-15 11:09:58 -07:00
Steven Moreland
48aed8f02d init: clarify multiple 'interface' keyword use
This keyword can (and should) be used multiple times when multiple
services are served together. I've documented this here.

Bug: N/A
Test: N/A
Change-Id: Ie986c9cac486db346555f359e9ccbed93d8d1d22
2018-10-15 18:00:36 +00:00
Tom Cherry
6e52c23a3e Merge "logd: rework logic for LogTimeEntry" 2018-10-15 17:57:06 +00:00
Suren Baghdasaryan
e3b6047e0d lmkd: Implement pid purge command to clear old pids when zygote restarts
lmkd keeps a list of pids registered by ActivityManager, however on rare
occasions when framework restarts and lmkd survives that list has to be
purged. Implement a command that can be used to clear the pid list.

Bug: 116801366
Test: locally by killing zygote process
Change-Id: I71d6012f86bb83a73edd5b687e05a0848e0569b1
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-10-15 16:22:17 +00:00
Nick Kralevich
5390b9add4 llkd: Do not check apexd by default for stack
apexd is now blocked by sepolicy, so skip checking it to
prevent an avc warning.

See system/sepolicy commit ac097ac4c7718f8593f2b6b96a93a776984ec7c4

Addresses the following SELinux denial:

type=1400 audit(0.0:386): avc: denied { ptrace } for comm="llkd" scontext=u:r:llkd:s0 tcontext=u:r:apexd:s0 tclass=process permissive=0

Test: manual
Change-Id: Iad24447c8200e915ac8397a8f84923feebc20613
2018-10-15 09:17:40 -07:00
Christopher Ferris
96139a5da1 Merge "Fix up the definition of Elf::GetInfo."
am: 6853a187e3

Change-Id: I8d8baba1bb2106b1ac6f9a367e42041bc52f60d0
2018-10-13 11:03:29 -07:00
Christopher Ferris
19009e036a Merge "Fix problem adding too many frames."
am: 9074871af2

Change-Id: I36a0e16389ebfa9c39193ac983bfaaff11f312ae
2018-10-13 11:02:48 -07:00
Christopher Ferris
6853a187e3 Merge "Fix up the definition of Elf::GetInfo." 2018-10-13 17:47:18 +00:00
Christopher Ferris
9074871af2 Merge "Fix problem adding too many frames." 2018-10-13 17:47:12 +00:00
Tom Cherry
4f22786cc9 logd: rework logic for LogTimeEntry
LogTimeEntry's lifecycle is spread out in various locations.  It
further seems incomplete as there is logic that assumes that its
associated thread can exit while the underlying LogTimeEntry remains
valid, however it doesn't appear that that is actually a supported
situation.

This change simplifies this logic to have only one valid state for a
LogTimeEntry: it must have its thread running and be present in
LastLogTimes.  A LogTimeEntry will never be placed into LastLogTimes
unless its thread is running and its thread will remove its associated
LogTimeEntry from LastLogTimes before it has exited.

This admittedly breaks situations where a blocking socket gets issued
multiple commands with different pid filters, tail lines, etc,
however, I'm reasonably sure that these situations were already
broken.  A check is added to close the socket in this case.

Test: multiple logcat instances work, logd.reader.per's are cleaned up
Change-Id: Ibe8651e7d530c5e9a8d6ce3150cd247982887cbe
2018-10-12 18:28:59 -07:00
Christopher Ferris
9d0ad238ca Fix problem adding too many frames.
When adding a frame with a dex pc, two frames will be added total. However,
if there is only enough room for a single frame, two get added any way.

Only add a single frame in this case, and add a unit test for this case.

Test: Passes unit tests.
Change-Id: If320584b126967a042c623d8fdf3f51dbc1c2251
2018-10-12 16:36:35 -07:00
Evgenii Stepanov
44ab3697fb Merge "Export HWASAN_OPTIONS when SANITIZE_TARGET:=hwaddress"
am: b3bc842750

Change-Id: I7ba21262575141cf1e16a8db82ec36cd1dd44408
2018-10-12 15:02:04 -07:00
Evgenii Stepanov
b3bc842750 Merge "Export HWASAN_OPTIONS when SANITIZE_TARGET:=hwaddress" 2018-10-12 21:45:56 +00:00
Suren Baghdasaryan
8950a02d10 Merge "lmkd: Fix an invalid access to a pointer after it's freed"
am: 1f149d8d2a

Change-Id: I3bd979baf13d574b0f3f6eef1236512d9342640e
2018-10-12 14:39:28 -07:00
Suren Baghdasaryan
1f149d8d2a Merge "lmkd: Fix an invalid access to a pointer after it's freed" 2018-10-12 21:22:38 +00:00
Julien Desprez
618f0e11d6 Add adb_integration_test_device to general-tests
Run some more tests for adb.

Test: tradefed.sh run template/local_min --template:map test=atest --include-filter adb_integration_test_device --log-level VERBOSE --log-level-display verbose
Bug: 112104122
Change-Id: I44b5a2aed8d86ab2dca62081d5b3b05f6e01cabd
2018-10-12 13:48:14 -07:00
David Anderson
612c390937 Merge changes Ib244a98f,Ib173f251
am: 0730260a6a

Change-Id: Icc596f4928e1855d850445014064e3d65e47825a
2018-10-12 13:41:38 -07:00
Treehugger Robot
0730260a6a Merge changes Ib244a98f,Ib173f251
* changes:
  liblp: Don't store BlockDeviceInfo separately in MetadataBuilder.
  liblp: Move backup sectors to the start of the partition.
2018-10-12 20:28:37 +00:00
Mark Salyzyn
3646a4ca5e Merge "fs_mgr: overlay drop redundant check"
am: 5c61dbd12c

Change-Id: Ia94b5c86c50e78fa3a315c38e1eb4699321b61c0
2018-10-12 13:09:39 -07:00
David Anderson
a520c5e28b liblp: Don't store BlockDeviceInfo separately in MetadataBuilder.
There's no reason to do this, since the fields are already in
LpMetadataGeometry. Removing this also simplifies multiple-block-device
support.

Bug: 116802789
Test: liblp_test gtest
Change-Id: Ib244a98fdd9d36c94a2dffd81bef68a1d5644ab9
2018-10-12 13:05:12 -07:00
David Anderson
06f7a967be liblp: Move backup sectors to the start of the partition.
Previously, metadata backups were stored at the end of the partition to
make them easy to locate. On older devices where the super partition
could span system/vendor partitions, we may want to leave the end of
each partition free to store an AVB footer. To allow this, we now store
geometry and metadata backups near the start of the partition instead.
They are still positioned at a fixed offset.

Bug: 116802789
Test: device boots after flashing new metadata
Change-Id: Ib173f251a4a13e290adcc4ac5cfbeb030eacda30
2018-10-12 13:05:11 -07:00
Treehugger Robot
5c61dbd12c Merge "fs_mgr: overlay drop redundant check" 2018-10-12 19:51:11 +00:00
Christopher Ferris
a2f38f1bde Fix up the definition of Elf::GetInfo.
The function should have returned a bool, so now it does.
Also use a different lighter weight function for validating the elf
in one place that didn't need to keep the max size value.

Test: Unit tests pass.
Change-Id: Ibde674e608091ba04abf22fad2fdc4dbdb2c6e73
2018-10-12 11:29:06 -07:00
Suren Baghdasaryan
0106327486 lmkd: Fix an invalid access to a pointer after it's freed
pid_remove() frees a structure representing registered process and the
pointer can't be used anymore. This change fixes an instance when pointer
was used after it was freed. pid_remove() is moved to the end of the
function and comments are added to prevent similar situation in the future.

Bug: 117625315

Change-Id: I6a922952a31232497b3f9caf87d5a21bd402db94
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-10-12 11:28:33 -07:00
Rajeev Kumar
ab0cfea162 Merge "Read memory stats from /proc/pid/stat file." into stage-aosp-master 2018-10-12 17:50:15 +00:00
David Anderson
2b46ad6b6e Merge "liblp: Add a gtest for sparse image creation."
am: c53a0e9158

Change-Id: I05b827963a6364071599e16122d5c03559ac9a27
2018-10-12 08:26:36 -07:00
Treehugger Robot
c53a0e9158 Merge "liblp: Add a gtest for sparse image creation." 2018-10-12 15:18:47 +00:00
Minchan Kim
cd38ee36a4 Merge "export dumpstatez into stable_properties"
am: d37dd4a6f0

Change-Id: I4ddf4a5bc6a6df8ea416c242c4eb0b170d627c13
2018-10-12 00:30:28 -07:00