Commit graph

44107 commits

Author SHA1 Message Date
Tom Cherry
151a17f015 fs_mgr: convert parse_flags over to C++
Fixes a bug where verify= and a path is not respected.
Keeps the default value of -1 for swap_prio, zram_size, and the vold
managed partition number in the case of not being able to parse their
values.

Test: fs_mgr unit tests, boot
Change-Id: I41bd92a7a2f9165d62134704cb7a1209d76a2071
2019-01-25 16:03:39 -08:00
Tom Cherry
7e34f75075 fs_mgr: store file_contents_mode and file_names_mode directly
It doesn't really make sense to have extra logic to convert these
strings to enums then back again to strings for usage, especially
since with the C++ fstab, these strings are small enough to fall into
the small string optimization of std::string.

This will help make future changes cleaner as well.
Test: boot, fs_mgr_test

Change-Id: I5669ed10f2fc3eafdb137747446a2e93c24d55c4
2019-01-25 11:14:29 -08:00
Neil Fuller
e41489a9a1 Merge "Move APEX symlink creation to alternative module" 2019-01-25 18:42:12 +00:00
Treehugger Robot
4830ba0fd1 Merge "Convert Android.mk file to Android.bp" 2019-01-25 18:17:54 +00:00
Tri Vo
6600f978a4 Merge "Read selinux_denial_metadata from /vendor" 2019-01-25 17:51:48 +00:00
Tom Cherry
afa0d88eea Merge "Update fs_mgr tests for new fstab format and add to TEST_MAPPING" 2019-01-25 17:25:58 +00:00
Suren Baghdasaryan
1bcb634958 Merge changes from topic "re-revert move sched_policy functions"
* changes:
  DO NOT MERGE: Revert "Revert "Add dependencies on libprocessgroup for sched_policy users""
  DO NOT MERGE: Revert "Revert "libcutils: Move sched_policy functions into libprocessgroup""
  DO NOT MERGE: Revert "Revert "Add libprocessgroup into VNDK""
2019-01-25 17:09:02 +00:00
Elliott Hughes
cdd0aaa3ae Merge "Remove dead code." 2019-01-25 17:01:27 +00:00
Suren Baghdasaryan
9491078300 DO NOT MERGE: Revert "Revert "Add dependencies on libprocessgroup for sched_policy users""
This reverts commit 1bef8c550c.

Reason for revert: AOSP is fixed with new vendor image

Change-Id: Ib341ac80e2f88c13a7815a490ea2d9422ebdf55f
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-25 16:49:18 +00:00
Suren Baghdasaryan
1bd127b72e DO NOT MERGE: Revert "Revert "libcutils: Move sched_policy functions into libprocessgroup""
This reverts commit b5394db682.

Reason for revert: AOSP is fixed with new vendor image

Change-Id: Ie1a2e0200600214a65f4fe2250c903c8e8ce0a29
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-25 16:49:09 +00:00
Suren Baghdasaryan
7bf4381a82 DO NOT MERGE: Revert "Revert "Add libprocessgroup into VNDK""
This reverts commit c4a02d25a9.

Reason for revert: AOSP is fixed with new vendor image

Change-Id: Ifc1c4d51aa1b168ef62cf58275b908d98b9a04bf
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-25 16:48:58 +00:00
Treehugger Robot
1420c1371f Merge "Populate header size for boot image header version 2 correctly" 2019-01-25 16:24:58 +00:00
Treehugger Robot
c6792c3643 Merge "vndk: workaround for building ld.config.<ver>.txt" 2019-01-25 15:41:49 +00:00
Justin Yun
5579bf14f6 vndk: workaround for building ld.config.<ver>.txt
ld.config.27.txt requires additional search paths for vendor
processes. Substitute '#VNDK27#' when building ld.config.<ver>.txt.
If <ver> equals 27, remove '#VNDK27#'. Otherwise, remove whole line
that starts with '#VNDK27#'.

Bug: 123209911
Bug: 123390078
Test: build ld.config.27.txt
Change-Id: Ie3a284ab39f17fa2f9a3285e080b2ba0da3663dc
2019-01-25 19:49:19 +09:00
Nicolas Geoffray
0e964ad1e8 Merge "Add APEX namespaces in ld.config.legacy.txt." 2019-01-25 09:44:20 +00:00
Treehugger Robot
6a92b5c9c3 Merge "give media apex access to libmediametrics" 2019-01-25 08:22:19 +00:00
Sasha Smundak
3a62fc44e8 Convert Android.mk file to Android.bp
See build/soong/README.md for more information.

Bug: 122332380
Test: treehugger
Change-Id: I39a69c722922cfb19059d10ff37132442f0337ba
2019-01-24 21:16:39 -08:00
Treehugger Robot
8306597e8f Merge "Fix crash in libunwindstack." 2019-01-25 04:29:30 +00:00
Ray Essick
baa0ce3785 give media apex access to libmediametrics
Bug: 112555455
Test: build, ctsmedia
Change-Id: I5455449533a6647fb2b4f617728ae693b2156fb9
2019-01-24 19:45:00 -08:00
Hridya Valsaraju
a057a33e68 Populate header size for boot image header version 2 correctly
Bootimage header size for header version 2 was being populated
incorrectly. Also, throw an error when an unsupported boot header
version is passed in as an argument.

Test: can see correct header size using unpack_bootimg.py
Bug: 111136242
Change-Id: Ia4ed7b2469a5296546627c91f441c496d67f5ce3
2019-01-24 16:48:51 -08:00
Florian Mayer
c479e4e789 Fix crash in libunwindstack.
Bug: 122657596

Test: New unit test that crashes without this change.
Change-Id: I5d978530a833345def94a58805d7ee93b23382bb
2019-01-24 16:29:36 -08:00
Tri Vo
9ffdf5945d Merge "selinux: account for /product hash" 2019-01-25 00:04:34 +00:00
Treehugger Robot
4c1798b6c1 Merge "libunwindstack: Move DwarfOp callback table to rodata section" 2019-01-24 23:44:29 +00:00
David Anderson
10b0a155ee Merge "Don't error on block size mismatches." 2019-01-24 22:20:18 +00:00
Josh Gao
b42946a6d3 Merge "adbd: compile for host." 2019-01-24 21:53:26 +00:00
Nicolas Geoffray
ad12560306 Add APEX namespaces in ld.config.legacy.txt.
Used by chrome-os and potentially automotive.

Test: m
Bug: 123092860
Bug: 123303398
Change-Id: I21d166d5866da2049aa5383ce856df329332e2a8
2019-01-24 21:20:47 +00:00
Elliott Hughes
d2962c8a15 Remove dead code.
If this was strlcpy16 it wouldn't be such a bad idea, but strncpy16 is
just an accident waiting to happen...

Test: N/A
Change-Id: Id296fdeadfb9f1f70ddc8fb6d31b3b6b5178a12c
2019-01-24 13:07:18 -08:00
Vic Yang
cc8009ff04 libunwindstack: Move DwarfOp callback table to rodata section
There are currently two copies of DwarfOp callback tables in
data.rel.ro section, and that is 16KB of dirty memory per process on a
64-bit platform.

To reduce memory usage, we introduce a layer of indirection so that
all instances of DwarfOp can share a single callback table.  We also
get rid of the pointers for op names in the callback table so that the
entire table can be placed in rodata section.

Test result shows 1MB saving on cuttlefish, and 750KB saving on a Go
device (32-bit ARM).

Bug: 112073665
Test: Boot on cuttlefish and a Go device.
Change-Id: Idf90a513f37534ab1ef30d5742a9d3ea779f3661
2019-01-24 11:11:15 -08:00
Yabin Cui
c87d1ed611 Merge "Add setuid/setgid capabilities to simpleperf_app_runner." 2019-01-24 18:39:13 +00:00
Treehugger Robot
c1a6554391 Merge "meminfo: Add support to track working set with idle page tracking." 2019-01-24 18:25:10 +00:00
Treehugger Robot
be38989da0 Merge "fs_mgr: overlayfs: test: test mount -o rw,remount command" 2019-01-24 16:26:58 +00:00
Treehugger Robot
8dd6e5922b Merge "libfs_avb: support loading vbmeta structs from any partition" 2019-01-24 16:16:13 +00:00
Christopher Ferris
3c1d6b836a Merge "Fix memory leak in UnwinderFromPid object." 2019-01-24 15:23:09 +00:00
Neil Fuller
48a92d715d Move APEX symlink creation to alternative module
Move APEX symlink creation to alternative module, one that
is targeted at /system not /. Also added comments to reflect
the tenuous connection between the module chosen and the
symlink creation.

Tested with:
rm -rf out/target/product/taimen/system \
  && make droid \
  && ls -l out/target/product/taimen/system/usr

Test: See above
Bug: 122985829
Bug: 123333111
Change-Id: I841dd42827ac2e082505ebf039f40fd394514e54
2019-01-24 13:01:38 +00:00
Treehugger Robot
6b6259a083 Merge "Add search paths for asan build" 2019-01-24 12:23:36 +00:00
Treehugger Robot
24a2c1a70c Merge "Do SetUpDmVerity only once for the same mount point" 2019-01-24 11:06:03 +00:00
Neil Fuller
792fd03955 Merge "Add a symlink for the ICU .dat file" 2019-01-24 10:02:26 +00:00
Bowgo Tsai
278749d74c libfs_avb: support loading vbmeta structs from any partition
This commits adds the following two public functions into
class AvbHandle, and verified by 'libfs_avb_test':

static AvbUniquePtr LoadAndVerifyVbmeta();  // loads inline vbmeta.
static AvbUniquePtr LoadAndVerifyVbmeta(    // loads offline vbmeta.
    const std::string& partition_name, const std::string& ab_suffix,
    const std::string& ab_other_suffix, const std::string& expected_public_key,
    const HashAlgorithm& hash_algorithm, bool allow_verification_error,
    bool load_chained_vbmeta, bool rollback_protection,
    std::function<std::string(const std::string&)> custom_device_path = nullptr);

The first function LoadAndVerifyVbmeta() will be used to replace Open(),
in a separate CL in the future. Many libfs_avb internal utils are added
into avb_util.cpp as well, which are verified by
'libfs_avb_internal_test'.

Bug: 112103720
Bug: 117960205
Test: atest libfs_avb_test
Test: atest libfs_avb_internal_test
Change-Id: I807b8af0b69c9a4511f6f120e9754aca5442830e
2019-01-24 17:43:25 +08:00
Suren Baghdasaryan
7e15ad7ecb Merge changes from topic "revert move sched_policy functions"
* changes:
  DO NOT MERGE: Revert "Add libprocessgroup into VNDK"
  DO NOT MERGE: Revert "libcutils: Move sched_policy functions into libprocessgroup"
  DO NOT MERGE: Revert "Add dependencies on libprocessgroup for sched_policy users"
2019-01-24 06:57:55 +00:00
Sandeep Patil
061b71339c meminfo: Add support to track working set with idle page tracking.
Also adds a tool to make use of this if it exists call 'wsstop'

Bug: 111694435
Test: wsstop -d 3 -n 100 1

Change-Id: I50415f0bdc09c09b5b414cf0e4fff8f2907c5823
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-01-23 22:53:46 -08:00
Jiyong Park
59e355c441 Add search paths for asan build
Bug: 123292626
Test: aosp_cf_x86_pasan boots
Change-Id: Ifdc86285cbb2d7eb2b1e39983981e7b81aec59c9
2019-01-24 15:08:06 +09:00
Treehugger Robot
ed3f1a584a Merge "Modify mkbootimg.py to support boot image header version 2" 2019-01-24 05:33:53 +00:00
Suren Baghdasaryan
c4a02d25a9 DO NOT MERGE: Revert "Add libprocessgroup into VNDK"
This reverts commit dad4749731.

Reason for revert: Broke AOSP

Change-Id: I019e1226a65b31495984cf47ad471771b4880c45
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-23 20:44:47 -08:00
Suren Baghdasaryan
b5394db682 DO NOT MERGE: Revert "libcutils: Move sched_policy functions into libprocessgroup"
This reverts commit facd40d0e1.

Reason for revert: Broke AOSP

Change-Id: Id333417d4970ced800ab801bddfed880cafa056d
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-23 20:44:09 -08:00
Suren Baghdasaryan
1bef8c550c DO NOT MERGE: Revert "Add dependencies on libprocessgroup for sched_policy users"
This reverts commit 02843339f9.

Reason for revert: Broke AOSP

Change-Id: I62f91c0adf440b5da0a145862b04dd27a7016faf
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-23 20:43:28 -08:00
David Anderson
2e1c5ac5fd Don't error on block size mismatches.
liblp treats the term "block size" ambiguously when it compares the logical
hardware block size with the file system block size (which for all
intents and purposes must be 4K). This warning is thus spurious on
devices with say a 512 logical block size. However, liblp's block size
should at least be a multiple of this, so change the check accordingly.

Bug: 123317012
Test: liblp_test gtest
Change-Id: I0f41f6bae60a512ab8d313e487c28606daa661a6
2019-01-23 19:24:03 -08:00
David Anderson
c98b1efd4c Merge "Expose IsFilePinned through FiemapWriter." 2019-01-24 03:14:55 +00:00
Treehugger Robot
e72308c6b1 Merge "vndk: do not use prebuilt ld.config.<ver>.txt" 2019-01-24 02:47:06 +00:00
Treehugger Robot
a8bd23124c Merge "Added a new socket to Zygote init scripts." 2019-01-24 01:11:58 +00:00
LongPing Wei
9f2e84e507 Do SetUpDmVerity only once for the same mount point
SetUpDmVerity won't return true twice for the same partition and it will
leads to failure when verify-boot is enabled on multi-fstab-lines.

Test: make
Change-Id: I5ce35e9c6b2d47fd0f599e36046e1ad2b0a35ffa
2019-01-23 23:30:13 +00:00