Commit Graph

30208 Commits

Author SHA1 Message Date
Colin Cross f572b91c4f libmemunreachable: track kernel binder references
The kernel can hold references to binder objects that have no userspace
references.  Allow libmemunreachable to call into libbinder and
libhwbinder to get lists of kernel references.  Use undefined weak
symbols so that libmemunreachable will continue to work in processes
that do not have libbinder.

Test: memunreachable_binder_test
Bug: 28275695
Change-Id: I9eae73f2a51a49a7025ffe6309ccdc2693a2391b
2017-07-12 14:59:11 -07:00
Treehugger Robot f42d02830d Merge "Add vendor_available to liblog_headers." 2017-07-12 21:07:26 +00:00
Steven Moreland c30f248cd4 Add vendor_available to liblog_headers.
Renamed NDK headers to "liblog_ndk_headers"
(these names aren't used anywhere).

libutils_headers now properly export liblog_headers.

Test: with BOARD_VNDK_VERSION=current
Merged-In: I3a85385f588b84393c57fd6d1bcac620f708f0f1
Change-Id: I3a85385f588b84393c57fd6d1bcac620f708f0f1
2017-07-12 12:59:30 -07:00
Tom Cherry 08678e1f8b Remove ALOGD_IF_SLOW
ALOGD_IF_SLOW isn't intuitively implemented as it cannot handle
temporaries used as its parameters.  Since there are so few users of
it already and since it's just sugar on top of 2 otherwise trivial
lines, we opt to remove it entirely.

Bug: 62820330
Test: Build

Change-Id: Ie91b40cdaf650154203ccf0ca70e029cc097b350
Merged-In: Ie91b40cdaf650154203ccf0ca70e029cc097b350
2017-07-12 17:59:12 +00:00
Christopher Ferris 0c22c5646e Merge "A few cleanups." 2017-07-12 17:44:03 +00:00
Treehugger Robot 5607f36e01 Merge "libutils: liblog export headers" 2017-07-12 05:42:10 +00:00
Christopher Ferris f6d5431273 A few cleanups.
- Cleanup the blueprint file a bit.
- Fix the formatting in DwarfMemoryTest.cpp.
- Fix the misnamed test MemoryBuffer.cpp to MemoryBufferTest.cpp.
- Add a function to find the location of the test files so it's not
  necessary to run the test in the same directory as the test files.

Bug: 23762183

Test: Builds and unit tests pass.
Change-Id: I5666972bd01f14b8ee47c518f1840f8aeb7fd08b
2017-07-11 19:10:34 -07:00
Treehugger Robot 5aee3ff22a Merge "Remove old LOG_EVENT_* code from libsysutils" 2017-07-12 00:11:50 +00:00
Baligh Uddin 97ba18ed7f Merge "Fix mips build." 2017-07-11 23:07:43 +00:00
Yifan Hong 087f3b74af Remove old LOG_EVENT_* code from libsysutils
As a side effect, this change fixes
libbsysutils => liblog dependencies. LOG_EVENT_*
macros are not defined for liblog.vendor.

Test: BOARD_VNDK_VERSION=current mma
Bug: 33241851
Bug: 63034227
Change-Id: I3df700d97481ec9aa59cf1796da1e991af28bdf5
2017-07-11 15:14:26 -07:00
Christopher Ferris 3517fe0413 Fix mips build.
Don't build for mips, none of this is supported on mips.

Bug: 23762183

Test: Mips build passes.
Change-Id: Iba89466a7bc13856f8fcd59ca0708a30f417b6c6
2017-07-11 15:06:19 -07:00
Robert Benea 3c7f566495 Merge "Use mem cgroups in libprocessgroup if they're available" 2017-07-11 21:52:39 +00:00
Christopher Ferris 1add237c8d Merge "Add full support for initing registers." 2017-07-11 21:17:48 +00:00
Robert Benea 3280e48847 Use mem cgroups in libprocessgroup if they're available
Use mem cgroups if the kernel is built with CONFIG_MEMCG=y,
additionally add system group.

test: verified on both kernel with/without memcg enabled
Change-Id: Ia2ae89efa3905e9da68fa77adac1225c667864d1
2017-07-11 12:48:10 -07:00
Christopher Ferris 2a25c4aab5 Add full support for initing registers.
- Fixes a few bugs in untested functionality.
- Add tests for the way the register handling code is used.
- Fix a few tests that were not reaping child processes.

Bug: 23762183

Test: Ran unit tests on host (32 bit and 64 bit).
Test: Ran unit tests on angler (32 bit and 64 bit).
Change-Id: I573d6617b4f1561f6e8494d7213c52086d112d97
2017-07-11 12:15:54 -07:00
Tom Cherry 896297b2ef Merge "Move Timer from init to libbase" 2017-07-10 18:23:29 +00:00
Tom Cherry ede0d53850 Move Timer from init to libbase
Test: boot bullhead
Test: new libbase unit tests

Change-Id: Ic398a1daa1fe92c10ea7bc1e6ac3f781cee9a5b5
2017-07-10 09:28:24 -07:00
Ian Elliott 11b91e7c28 Merge "Use void instead of no parameters in 2 function declarations." 2017-07-10 12:01:51 +00:00
Luca Stefani 0870514d29 logcat: Add missing newline to read failure
Change-Id: I468b3bd00f1effa43eb139a3c514ba042ae3dff7
2017-07-08 17:51:27 +02:00
Treehugger Robot e8a75e8f76 Merge "Revert "Use mem cgroups in libprocessgroup if they're available"" 2017-07-08 01:41:19 +00:00
Tim Murray fc10e3d5e5 Revert "Use mem cgroups in libprocessgroup if they're available"
This reverts commit 32375c2328.

bug 63164307

Change-Id: I3336bbf7c2f3297b231c5b0a1ef538faff9513fd
2017-07-08 00:04:42 +00:00
Ian Elliott 58e06c5f94 Use void instead of no parameters in 2 function declarations.
In compiling some code with a picky "Android.mk" file, it is not happy
with a function declaration that looks like:

    void foo();

It requires:

    void foo(void);

This commit changes that for 2 functions in "log.h".

Test: Build both Android and the code with a picky "Android.mk".
Change-Id: Icd624df34db57e642fe6b1c7da77be9b05936936
2017-07-07 16:11:32 -06:00
Christopher Ferris 32ac9bfd09 Merge "Add missing test files to compile." 2017-07-07 21:26:30 +00:00
Christopher Ferris 9744fb2b54 Add missing test files to compile.
Bug: 23762183

Test: Ran unit tests.
Change-Id: I8ac43517231d88c68c288800d8ed286daa57bce1
2017-07-07 12:25:23 -07:00
Christopher Ferris 2d07f72961 Merge "Init .gnu_debugdata in GetElf()." 2017-07-07 18:56:56 +00:00
Treehugger Robot f444650d0d Merge "bootstat.cpp: update help message for --record_boot_complete" 2017-07-07 17:27:05 +00:00
Yongqin Liu 78b2b94d1d bootstat.cpp: update help message for --record_boot_complete
add description about --record_boot_complete in the help

Test: manually with HiKey

Change-Id: I521d6f5b9d98113c006fc6ab146b6c353ce2390c
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2017-07-07 15:27:10 +00:00
Treehugger Robot a6bee4a29e Merge "Add test config for memunreachable_test" 2017-07-07 04:11:22 +00:00
Treehugger Robot 48d610ab18 Merge "Remove reference to deleted gzip module" 2017-07-07 01:34:40 +00:00
Colin Cross b9e74ba400 Add test config for memunreachable_test
Test: none
Change-Id: Ieb297a2fcece6365a074cd470b3ca56e2baea926
2017-07-07 01:07:05 +00:00
Treehugger Robot 508e0b8b34 Merge "Move libnativebridge headers into the module." 2017-07-06 23:36:34 +00:00
Steven Moreland 58b3c79034 libutils: liblog export headers
- make liblog dependency for all library builds (this is required
    for files like String8.cpp)
- export liblog headers (because they are used in many header files).

Test: less libraries fail with BOARD_VNDK_VERSION := current
Merged-In: Iecb9cd00deb3a9056ea63c4a087afdb80a51a2b8
Change-Id: Iecb9cd00deb3a9056ea63c4a087afdb80a51a2b8
2017-07-06 22:57:08 +00:00
Treehugger Robot ae590fe723 Merge "System/core: Remove include/ziparchive" 2017-07-06 22:42:39 +00:00
Colin Cross 73c2ef4b87 Remove reference to deleted gzip module
The gzip module was removed and replaced with an implementation in
toybox.  Remove the required modules reference.

Bug: 63400769
Change-Id: I032d7ddc59105b3c6fb87084983266655772756a
Test: m -j checkbuild
2017-07-06 22:33:22 +00:00
Eric Biggers e9811f36e5 fs_mgr: set ext4 encryption flag with tune2fs when needed
Upstream kernels (v4.9+, v4.4.67+) have started to enforce that
encryption policies cannot be set on ext4 directories unless
EXT4_FEATURE_INCOMPAT_ENCRYPT is set in the filesystem superblock, as
was the original design.  Since Android's userspace was not setting this
flag, it was not possible to use "file-based encryption" (FBE) on
devices whose kernels enforce this constraint.  Fix this by updating
fs_mgr to set the flag if needed, similar to how it enables the quota
feature if needed.

Note that it would, eventually, be simpler to set this flag at mkfs
time.  But that seems infeasible for now, given the many different ways
the userdata filesystem can be formatted --- including via 'fastboot',
which I believe is expected to still be compatible with old devices
whose kernel and/or e2fsprogs don't support the 'encrypt' flag.

Bug: 36231741
Change-Id: Ibafb9a7116fc853b62f8ee074a78499399f290a6
2017-07-06 13:31:30 -07:00
Eric Biggers 8d3bcd4b6a fs_mgr: refactor pre-mount logic into prepare_fs_for_mount()
There were several duplications in the code that runs before a
filesystem is mounted.  This made it difficult to start running tune2fs
to set the encryption feature flag.  Refactor to deduplicate the logic,
and improve the log messages.

Bug: 36231741
Change-Id: I90846dad9c5ec85b3c5460615dec4cc19cb7e198
2017-07-06 13:31:30 -07:00
Steven Moreland b2b88e35ea Move libnativebridge headers into the module.
Test: links
Change-Id: I2e19d1ba7845b4b3d3fee934fcb1c90151fd7192
2017-07-06 11:23:16 -07:00
Treehugger Robot c31963b5c2 Merge "Libziparchive: Export headers in defaults" 2017-07-06 06:51:29 +00:00
Andreas Gampe d201b292fd System/core: Remove include/ziparchive
Remove the now unnecessary link.

Partially reverts commit cdf7ff8e20.

Bug: 37342627
Test: m
Change-Id: Ia44df234923c798618d7dc79d8f9f9432fbfada9
2017-07-05 22:03:44 -07:00
Andreas Gampe a10a7e7114 Libziparchive: Export headers in defaults
libziparchive-host needs to include the headers correctly, too.

Bug: 37342627
Test: mmma system/core/libziparchive
Change-Id: I88a6d38ff9e494273040f9b913c71bccdda117ad
2017-07-05 22:03:44 -07:00
Treehugger Robot 6a9d56775f Merge "init: add info logs in first stage mount if we have to poll" 2017-07-06 04:46:05 +00:00
Treehugger Robot 4ca2a30368 Merge "fs_mgr: Adding logs when failing to wait for a device file" 2017-07-06 04:19:00 +00:00
Tom Cherry 0f4fb5497a Merge "ueventd: don't double fork firmware handlers" 2017-07-06 02:02:33 +00:00
Jinguang Dong 9d344969b0 fs_mgr: Adding logs when failing to wait for a device file
During mount operations, fs_mgr_wait_for_file() is invoked to
ensure the device file exists before starting to mount it. Adding
logs when the wait fails and also skip mounting as it won't be
successful. Also merge fs_mgr_test_access() and wait_for_file()
as fs_mgr_wait_for_file().

Test: Boot device and manually trigger the timeout issue
Test: Check and confirm whether timeout log info is inside ksmg.

Change-Id: Ide6d7fdca41e03e169e4400f91b7dea327985aaf
2017-07-06 09:51:02 +08:00
Treehugger Robot b3915d113d Merge "add "shutdown critical" to service" 2017-07-06 00:40:55 +00:00
Treehugger Robot cd0c2d8962 Merge "fs_mgr: allow no verity metadata when the device is unlocked." 2017-07-06 00:29:47 +00:00
Treehugger Robot 69542edfbe Merge "Backtrace: Add libziparchive dependency" 2017-07-05 23:55:43 +00:00
Treehugger Robot c1bc4241f8 Merge "init: Support custom shutdown actions" 2017-07-05 23:49:41 +00:00
Tom Cherry 0f296e06d6 ueventd: don't double fork firmware handlers
ueventd may be asked to handle firmware during the time critical
coldboot process.  If we double fork to avoid needing to reap the
firmware handler, then we may add significant delay to this process,
as the first child may not get scheduled quickly enough for waitpid()
to complete without delay.

Bug: 63081260
Test: boot bullhead and sailfish, check that firmwares are loaded,
      no zombie ueventd processes remain, and no new errors are shown
Change-Id: I2bac3b1fbc3a58557a00326e491c104656db27ae
2017-07-05 16:41:11 -07:00
Tom Cherry f3ae82f57f Merge "ueventd: remove character device symlinks (/dev/usb/*)" 2017-07-05 22:41:55 +00:00