Commit Graph

48255 Commits

Author SHA1 Message Date
Mathieu Chartier 856544f8b1 Merge "Re-make showmap host supported" 2019-07-17 23:50:05 +00:00
Christopher Ferris 481e8379d3 Add cause message when stack overflow is detected.
Test: Ran new unit tests.
Test: Ran crasher stack-overflow, crasher64 stack-overflow and verified
Test: stack overflow cause is shown.
Test: Ran stack overflow app and verified tombstone includes stack-overflow
Test: message.
Change-Id: I9bb01186dff5ed81c77d84b6aaedb5332ddd7256
2019-07-17 14:14:26 -07:00
Christopher Ferris a74aae8033 Move to the libc++ demangler.
The previous versions of the libc++ demangler crashed on bad input.
However, the new version passes a fuzzer and has a lot of tests. Since
it's more complete than the local demangler, use it instead.

Modified the expected output of an offline test since the new demangler
handles a case that didn't work before.

Verified that the time it takes for the check_for_leak tests did not
change after this.

Bug: 136138882

Test: Ran the unit tests.
Test: Verified the __cxa_demangle function passes the fuzzer when run for
Test: hours. Both the 32 bit and 64 bit version of __cxa_demangle were
Test: fuzzed using external/libcxxabi/fuzz.
Change-Id: I10c06b589d57c36d89dbecba020b1ef2da69634a
2019-07-17 13:49:37 -07:00
Mathieu Chartier c0c28faa97 Re-make showmap host supported
Also fix bugs that made it not compile on host. Motivation is to be
able to analyze smaps files easily on the host.

Test: showmap -f maps.txt
Bug: 137034556

Change-Id: I7b8ca1237ce1ec17d02cd5217c73b62ee978cb05
2019-07-17 12:28:27 -07:00
Treehugger Robot 97c06703f6 Merge "Remove perfprofd reference." 2019-07-17 18:30:37 +00:00
Josh Gao 1f1a0009fc Merge changes I35f8843e,Icd2a94f8,I6c20f3b3
* changes:
  adb: win32: don't shutdown socket when closing.
  adb: win32: silence wine test failure.
  adb: win32: fix adb_test.
2019-07-17 18:04:29 +00:00
Treehugger Robot 6b924d5a97 Merge "libutils: RefBase remove 'basetype' typedefs" 2019-07-17 17:49:28 +00:00
Elliott Hughes ffaabf54ba Remove perfprofd reference.
Dead and gone.

Test: treehugger
Change-Id: I8c08cada5313ddede5ebb4973d61cef2bb8a0a7e
2019-07-17 08:17:44 -07:00
Martijn Coenen 728586f5b2 Ignore class_{reset|start}_post_data on non-updatable APEX.
For devices that use FDE and don't support updatable APEXes, don't
stop and restart all processes - there is no need and it only increases
boot time for these devices.

Additionally, some daemons have never been restarted in the past, and
restarting them exposes certain issues.

Bug: 137251597
Bug: 136777273
Bug: 135627804
Test: verified manually w/ ro.updatable.apex=false
Change-Id: I9590f2c2cdfab0a49f39846896460305d44221ee
2019-07-17 08:49:44 +02:00
Tri Vo e75c6c841b Merge "Set /sys/power/wake_lock permissions on init." 2019-07-17 01:30:45 +00:00
Josh Gao 08bd13eb3d adb: win32: don't shutdown socket when closing.
This appears to be an attempt to do orderly shutdown, but it doesn't
wait until the socket becomes readable, so it doesn't actually work. We
implement orderly shutdown elsewhere already, so delete this so that we
don't accidentally shutdown a duped socket.

Test: wine adb_test
Change-Id: I35f8843e8e6dbc7886fd545f0e43375a005e160f
2019-07-16 15:22:58 -07:00
Josh Gao 2ad4c3696f adb: win32: silence wine test failure.
Wine implements sockets with their own internal socketpair, which
results in the poll disconnect test failing.

Bug: http://b/117568356
Test: wine adb_test.exe
Change-Id: Icd2a94f8297fefd5c02e6517568fe288b168032c
2019-07-16 15:22:51 -07:00
Josh Gao efd8ae2d54 adb: win32: fix adb_test.
At some point between Q and master, adb_test.exe stopped working because
it wasn't being linked with -municode?

Test: wine adb_test.exe
Change-Id: I6c20f3b3241cee2052d31d1ca85b8a9738828f6e
2019-07-16 15:21:59 -07:00
Tri Vo c6a84e873b Set /sys/power/wake_lock permissions on init.
system_suspend need to be an early_hal as it's required before storage
encryption can get unlock on FDE devices.

/sys/power/wake_lock is a dependency of system_suspend (only in Q and
earlier). Permissions on this file need to be set early enough.

Bug: 136777986
Bug: 133175847
Test: boot blueline
Change-Id: I8a9d3374b327e451fb98d2279d1bac9477a9560d
2019-07-16 14:33:00 -07:00
Steven Moreland 18daa7b5f0 libutils: RefBase remove 'basetype' typedefs
useless/unused

Bug: N/A
Test: N/A
Change-Id: I72462a64411a58d22e071f20e2c950bd99fdffb1
2019-07-16 21:06:28 +00:00
David Anderson eb599db1c5 Merge "Revert "Revert "Remove libfiemap_writer from fs_mgr and move it to gsid.""" 2019-07-16 19:03:09 +00:00
David Anderson 974dadf904 Merge "libdm: Fix race conditions in LoopControl::Attach." 2019-07-16 19:03:09 +00:00
Elliott Hughes 9658fc0823 Remove two more unused utf32 functions.
Test: builds
Change-Id: I6ab2104fc6836e9edb772e8368199e6171e9d87a
2019-07-16 07:56:23 -07:00
Treehugger Robot 8987f061c4 Merge "Add nolint for implicit borrowed_fd constructors" 2019-07-16 04:11:20 +00:00
Treehugger Robot a19f51eccc Merge "Reserve 'init'." 2019-07-16 02:35:29 +00:00
Treehugger Robot 100e8ffbcd Merge "Remove obsolete subdirs entry." 2019-07-16 02:02:40 +00:00
Kiyoung Kim 2f174171d7 Merge "Run linkerconfig from init process" 2019-07-16 00:32:13 +00:00
Ryan Prichard c37f4a4199 Merge changes I5e33e5bf,I64237006
* changes:
  Make android_load_sphal_library thread-safe
  Switch libvndksupport's linker.c to C++
2019-07-16 00:06:21 +00:00
Christopher Ferris 1e7b753c36 Merge "Optimize code that only uses PageMap call." 2019-07-16 00:00:18 +00:00
David Anderson af73ae823f Revert "Revert "Remove libfiemap_writer from fs_mgr and move it to gsid.""
This reverts commit 31656c2c53.

Reason for revert: re-landing

Change-Id: Ibd36267645f24880a7451b63dd22192dfd650f31
2019-07-15 23:56:25 +00:00
David Anderson 4c3d9b2491 Merge "Revert "Remove libfiemap_writer from fs_mgr and move it to gsid."" 2019-07-15 23:55:25 +00:00
David Anderson 31656c2c53 Revert "Remove libfiemap_writer from fs_mgr and move it to gsid."
This reverts commit 20fbf0d672.

Reason for revert: broke build

Change-Id: I6914455ba1f0fd56fbf3572f349242d734281610
2019-07-15 23:52:49 +00:00
Tom Cherry c8620ddafe Merge "init: clean up file / socket descriptor creation" 2019-07-15 23:20:13 +00:00
Tom Cherry 2a0a0810a1 Merge "Add reserved AID ranges for all partitions" 2019-07-15 23:19:41 +00:00
David Anderson 3d5b8bc373 Merge "Remove libfiemap_writer from fs_mgr and move it to gsid." 2019-07-15 22:54:21 +00:00
David Anderson 20fbf0d672 Remove libfiemap_writer from fs_mgr and move it to gsid.
gsid is the only consumer for this library, and it's unlikely to grow
beyond gsid.

Bug: 134536978
Test: gsid builds
Change-Id: Ib632b1dd8de3e29c02d1fe443a1e409af5f1257d
2019-07-15 22:53:39 +00:00
Steven Moreland 4c79df91a9 Remove obsolete subdirs entry.
Change-Id: I3327df74179d2ba1ffd66da59e5196f34dfe3974
Bugs: me
Test: N/A
2019-07-15 15:14:34 -07:00
Steven Moreland ceb36d08f4 Reserve 'init'.
This makes `pathmod init` and `gomod init` work, and it also reserves
the 'init' for potential future usage.

Change-Id: I6990bf421211b93d58d978d84d46474ff243e808
Bugs: me
Test: pathmod init; gomod init
2019-07-15 15:12:56 -07:00
Tom Cherry aa55ee6044 Add nolint for implicit borrowed_fd constructors
bpfloader uses both clang-tidy and this header, so the below lint
warnings are generated:

/work/aosp/system/core/base/include/android-base/unique_fd.h:261:18:
  warning: single-argument constructors must be marked explicit to
  avoid unintentional implicit conversions
  [google-explicit-constructor]
  /* implicit */ borrowed_fd(int fd) : fd_(fd) {}
                 ^
                 explicit

/work/aosp/system/core/base/include/android-base/unique_fd.h:263:18:
  warning: single-argument constructors must be marked explicit to
  avoid unintentional implicit conversions
  [google-explicit-constructor]
  /* implicit */ borrowed_fd(const unique_fd_impl<T>& ufd) : fd_(ufd.get()) {}
                 ^
                 explicit

Add NOLINT to quiet them.

Test: build without this lint warning
Change-Id: I5241938c33070b0fa39888289b8ca67d6d94ac73
2019-07-15 15:00:23 -07:00
Ryan Prichard 8c733615aa Make android_load_sphal_library thread-safe
Also: remove an obsolete comment from linker_test.cpp. The test program is
at /data/nativetest[64]/libvndksupport-tests/libvndksupport-tests, which
may will be in the system or legacy configuration, and either the "sphal"
or "default" namespace will be visible.

Bug: none
Test: run libvndksupport-tests, device boots
Change-Id: I5e33e5bf1402a0368e046b03827c216789b02c96
2019-07-15 13:58:51 -07:00
Ryan Prichard 807d9d62d8 Switch libvndksupport's linker.c to C++
Bug: none
Test: device boots
Change-Id: I64237006a7f903647c8d8f7ca681b1da23ac53a9
2019-07-15 13:43:05 -07:00
Tom Cherry 2e4c85f157 init: clean up file / socket descriptor creation
clang-tidy hinted that some of this code wasn't right.  Looking
deeper, there is really not much related to file and socket
descriptors, except that they're published in similar ways to the
environment.  All of the abstraction into a 'Descriptor' class takes
us further away from specifying what we really mean.

This removes that abstraction, adds stricter checks and better errors
for parsing init scripts, reports sockets and files that are unable to
be acquired before exec, and updates the README.md for the passcred
option.

Test: build, logd (uses files and sockets) works
Change-Id: I59e611e95c85bdbefa779ef69b32b9dd4ee203e2
2019-07-15 12:17:30 -07:00
Mark Salyzyn 91338a6aa2 Merge "bootstat: power_on* handling" 2019-07-15 15:47:04 +00:00
Tom Cherry a8b0517108 Merge "Add noexcept to missing places in expected.h" 2019-07-15 15:12:46 +00:00
David Anderson cd22e3a6f6 Merge "fs_mgr: Remove the timeout parameter to DestroyLogicalPartition." 2019-07-13 18:02:05 +00:00
Christopher Ferris 504d2cce64 Optimize code that only uses PageMap call.
Some code only wants to use PageMap to determine whether pages are
mapped in to memory. Modify the code to optimize this path.

Changes:
- Add a function that doesn't read all of usage stats data for every
  map. This operation is extremely expensive, and some code doesn't
  care about it.
- Optimize the PageMap call to do a single read instead of a single
  read per page.
- Add unit tests for these changes.

Bug: 136245508

Test: Ran new unit tests.
Test: Ran procrank and verified data looks good.
Test: Ran DexDiag art tests.
Change-Id: I37d03f2584551d26cb20be3abacdb958111d4eca
2019-07-12 16:28:09 -07:00
David Anderson c9b797ac25 Merge "libdm: Improve the reliability of dm device paths." 2019-07-12 23:03:41 +00:00
Suren Baghdasaryan e0b729d214 Merge "lmkd: Prevent non-main threads being registered or killed by lmkd" 2019-07-12 20:13:35 +00:00
Tom Cherry 8a779ee959 Merge "init: fix clang-tidy performance issues" 2019-07-12 18:49:49 +00:00
Treehugger Robot bde9fc1787 Merge "fs_mgr: overlay: do not allow sub-mounts to be overridden" 2019-07-12 18:38:39 +00:00
Daniel Norman 4b505fe3a8 Merge "Checks the interface inheritance hierarchy in init_rc files." 2019-07-12 18:01:46 +00:00
Tom Cherry e7a010de01 Merge "init: Write the reason in BCB on "reboot recovery"" 2019-07-12 17:39:32 +00:00
Treehugger Robot 5c296a0003 Merge "init: powerctl support and propagate longer canonical reboot reasons." 2019-07-12 17:37:25 +00:00
Steven Moreland 67a0dd4e27 Merge "libutils: remove references to unimplemented func" 2019-07-12 16:48:04 +00:00
Steven Moreland a1821e13f3 Merge "libadbd_services: remove unused deps" 2019-07-12 16:36:16 +00:00