Commit Graph

53888 Commits

Author SHA1 Message Date
Treehugger Robot 8578a8a8ec Merge "trusty-ut-ctrl: link statically to libtrusty" 2019-10-31 23:03:54 +00:00
Treehugger Robot 9495cda53b Merge "Update OWNERS based on Trusty team membership" 2019-10-31 22:40:33 +00:00
Matthew Maurer d35f685a7c Update OWNERS based on Trusty team membership
Change-Id: Iafad614b6568e53209752b1c45f0f0209c95684b
2019-10-31 13:32:20 -07:00
Elliott Hughes 4645210097 Merge "Remove Mac/Windows quick_exit() implementation." 2019-10-31 14:44:20 +00:00
Tom Cherry 0ae1272269 Merge changes from topic "logcatd-shell"
* changes:
  logcat: fix logpersist.stop and logpersist.clear
  logcat: fix logcatd / logpersist
2019-10-31 13:45:21 +00:00
Tom Cherry 2249b07eb8 logcat: fix logpersist.stop and logpersist.clear
Test: these work
Change-Id: Ib0b0b5408c93a05f39d1b585256a2c7c34736e7e
2019-10-31 06:43:47 -07:00
Tom Cherry 98c6c3304a logcat: fix logcatd / logpersist
Removing the rest of liblogcat broke logcatd since LogcatPanic() now
actually calls exit(), whereas logcatd relied on it to return
normally.

We can achieve the expected behavior with a small shell script, so
this change does that as well.

Test: logcatd / logpersist work
Change-Id: Icde36a4811a0db987a801978485e1af1dfc3d38c
2019-10-31 06:43:47 -07:00
Treehugger Robot e88b568442 Merge "COW device initialized by zeroing the whole first chunk" 2019-10-31 11:19:56 +00:00
Paul Crowley 7df60cee92 Merge "fs_mgr: Add stable_inodes flag to encrypted ext4" 2019-10-31 03:17:23 +00:00
David Anderson c399ccb345 Merge "fastboot: Implement helper commands for Virtual A/B." 2019-10-31 01:11:49 +00:00
David Anderson ab8f466107 fastboot: Implement helper commands for Virtual A/B.
This introduces two new commands to the fastboot protocol:

  - getvar snapshot-update-status - Return "none", "snapshotted", or
    "merging" depending on the current status set by the boot control
    HAL.
  - snapshot-update [cancel] - Cancel any pending snapshot-based updates
    via the boot control HAL. After this, the HAL should return
    MergeStatus::CANCELLED and "update-merge-status" should be "none".
    If no argument is specified, the snapshot-update-status is returned
    via an INFO response.

Bootloaders are expected to implement this in a manner consistent with
the boot control HAL.

Fastboot-based tooling should expect wipes of userdata to fail when
update-merge-status returns "merging". Thus, the force flag now cancel
any pending snapshots.

Bug: 139154945
Test: fastboot getvar snapshot-update-status
      fastboot snapshot-update cancel
      fastboot snapshot-update

Change-Id: Idc423fe7656b212e929e64eb0e6b85b453e0e8dc
2019-10-31 01:11:16 +00:00
Paul Crowley 7160fc1139 fs_mgr: Add stable_inodes flag to encrypted ext4
Also put libfscrypt into fs_mgr via whole_static_libs
since it's now a dependency.

Bug: 143307095
Test: we can use the inline policy on it
Change-Id: I82d7d5330abef76ce82accea25d2663748e87a8b
2019-10-30 13:35:48 -07:00
Elliott Hughes f16a98165b Merge "unzip: add -Z for "zipinfo mode"." 2019-10-30 18:45:57 +00:00
Treehugger Robot 33eecb8f82 Merge "libmodprobe: Do not reload modules previously instantiated" 2019-10-30 18:31:35 +00:00
Alessio Balsini 3ab9f1f85b COW device initialized by zeroing the whole first chunk
To be compliant with lvm, instead of just zeroing the first 32 bit of
the COW device, force to zero the whole first chunk.
Also switch to std::vector to store the zeroes, reducing the stack
growth.

Test: libsnapshot_test
Bug: 139202197
Change-Id: I2d98549528a222d6c27bb566c68477b5ec3add20
Signed-off-by: Alessio Balsini <balsini@google.com>
2019-10-30 17:50:59 +00:00
Christopher Ferris 2ff3c44304 Merge "Fix potential bad info in eh_frame_hdr." 2019-10-30 17:18:59 +00:00
Tom Cherry e901d3a3ee Merge "logcat: modernize the code" 2019-10-30 15:56:45 +00:00
Mark Salyzyn 8c1051918e libmodprobe: Do not reload modules previously instantiated
For modprobe operation.

For an interlocking driver set of about 50 modules, the impact of
their dependencies resulted in a 30 second impact in boot time
trying to load previously loaded modules. This impact is handily
eliminated by keeping a list of modules paths that have been loaded
and skipping them proactively.

Test: Confirmed device boot and 50 module set of drivers functions.
Test: libmodprobe_tests
Bug: 142938937
Bug: 140827934
Change-Id: Iccd11399d6043b38cbd5f93578ee202022e7770c
2019-10-30 07:20:18 -07:00
Treehugger Robot f77c98a780 Merge "Revert "Revert "Revert "Revert "Use com.android.vndk.current variant for vndk list""""" 2019-10-30 04:29:37 +00:00
Elliott Hughes d3aee6653f unzip: add -Z for "zipinfo mode".
But don't document it because it's a silly idea. Just call zipinfo
directly if you want zipinfo!

There are multiple uses of `unzip -Z` in the AOSP build, though, so we
may as well support it if people are already using it.

Test: manual
Change-Id: I04b05795badf63febe1210fbeaa96e3bd27237f1
2019-10-29 20:47:16 -07:00
Treehugger Robot 9786fbb9d3 Merge "Fixes typos for adb shell stop/start." 2019-10-30 01:54:51 +00:00
Christopher Ferris 4ca98e18a4 Fix potential bad info in eh_frame_hdr.
Due to a bug, an elf can have FDEs with a length of zero, while still
having another FDE for the same pc with a non-zero length. The
eh_frame_hdr can sometimes point to the zero length FDE, but it should
have pointed to the non-zero length FDE. In order to fix this, if the
eh_frame_hdr points at the zero length FDE then try and find the real FDE
directly from eh_frame.

The change cleans up and removes unused variables from DwarfEhFrameWithHdr
and changes the objects so that all of the DwarfSection objects and
DwarfEhFrameWithHdr object inherit from the same class.

Add new unit tests to verify this functionality.

Bug: 142483624

Test: Unit tests all pass.
Change-Id: I128a916e3ba378931de7d44ee15e57e24d4073df
2019-10-29 18:39:30 -07:00
Tom Cherry 6f061e8d64 logcat: modernize the code
1) Use libbase parsing functions instead of our own versions
2) Remove log_device_t, as it's an unneeded wrapper around log buffers
3) Do not report 'unexpected' if we get a log from a buffer that we
   didn't reqest.  I checked and I don't see any references to this
   happening in practice, so the code is mostly superfluous.  It seems
   reasonable enough to report the actual buffer name instead of
   'unexpected' in any case.
4) Print all buffers that experience an error, not just the first one
   seen.

Test: logcat works, logcat-unit-tests
Change-Id: Ic50074cfb716f63f3eda261f1cd236d7afaf453a
2019-10-29 16:07:51 -07:00
Elliott Hughes c70a73d057 Merge "zipinfo: support DOS attributes." 2019-10-29 20:50:54 +00:00
Elliott Hughes 2d70aad034 Remove Mac/Windows quick_exit() implementation.
This was added with the intention of using it in adb, but then the
change that would have used it
(https://android-review.googlesource.com/c/platform/system/core/+/273824)
was abandoned.

Remove the corresponding (never used) implementation.

Bug: http://b/31468413
Test: treehugger
Change-Id: I42322d079c175b7c6fbd12940e5bc022bd9ebd1c
2019-10-29 13:30:43 -07:00
Daniel Norman 7171458a30 Fixes typos for adb shell stop/start.
Test: n/a
Change-Id: Idaad0bfbf3c9d3fd7fc768940746c78528116a13
2019-10-29 11:05:45 -07:00
Elliott Hughes d50952587d zipinfo: support DOS attributes.
golang doesn't include Unix mode by default.

Also show all the deflate variants ("defN" versus "defX").

Cope better with being called directly rather than via symlink.

Test: manual
Change-Id: I23b441c847ce9a557ea866b3c43bdf0542b26f10
2019-10-29 07:55:16 -07:00
Treehugger Robot ff60db1bb1 Merge "COW partition creator uses DmSnapshotCowSizeCalculator" 2019-10-29 10:42:29 +00:00
Nikita Ioffe 6aa1b01316 Merge changes I7a3c181a,I72c60ec8
* changes:
  Add a test asserting that default fstab has /data entry
  Add fs_mgr_unit_test to CTS
2019-10-29 09:17:04 +00:00
Treehugger Robot a1015599d3 Merge changes from topic "batt_mon_2_1_types"
* changes:
  healthd: partially fill in health 2.1 HAL fields
  [REFACTOR] healthd: BatteryMonitor use health 2.1 types
2019-10-29 03:52:54 +00:00
Paul Crowley 51c41e94d9 Merge "fs_mgr: Don't parse encryption options, just keep string" 2019-10-29 02:00:36 +00:00
Treehugger Robot 6b9971c55f Merge "Fixed fs_mgr#fs_mgr_read_fstab_file_proc_mounts test" 2019-10-29 01:01:23 +00:00
Yifan Hong e78ca07631 Merge "fs_mgr: retrofit VAB update after A/B calc COW space." 2019-10-29 00:35:57 +00:00
Yifan Hong 2c74292038 Merge "libsnapshot: Add EnsureMetadataMounted" 2019-10-29 00:35:44 +00:00
Tri Vo 8b1e934555 trusty-ut-ctrl: link statically to libtrusty
Removes the need to push libtrusty.so to run trusty-ut-ctrl binary.

Test: m trusty-ut-ctrl
Change-Id: I19c2957d3eb1dc165e13f2ce5560fe31ea9a2469
2019-10-28 14:54:06 -07:00
Treehugger Robot 85f5a4449c Merge "pragma once for header file" 2019-10-28 21:34:01 +00:00
Jooyung Han e5811e8967 Revert "Revert "Revert "Revert "Use com.android.vndk.current variant for vndk list""""
This reverts commit 3cb19a74f2.

Reason for revert: Fix b/143374795

Change-Id: I21dae5ff3c9bf05ac15ac26210d7c8d7f9c46e1c
2019-10-28 21:08:04 +00:00
Paul Crowley 4fa841350f fs_mgr: Don't parse encryption options, just keep string
We now defer parsing encryption options to the fscrypt library. To avoid
adding a dependency, we simply record the options string in the fstab
and defer parsing until it's needed.

Bug: 143307095
Test: cuttlefish still boots
Change-Id: Ied13ea2f731c63b0524aed11db6983a86dab9fa1
2019-10-28 13:41:00 -07:00
Elliott Hughes 23a3dceaa5 Merge "libziparchive: add zipinfo(1)." 2019-10-28 19:45:32 +00:00
Alessio Balsini 14d1394a7e COW partition creator uses DmSnapshotCowSizeCalculator
Instead of using heuristics on the calculation of the COW size, use the
class representing the internal structure of the COW device as generated
by the Linux kernel.
This simplifies the forecast of the required COW device size depending
on the write operations performed on the associated snapshot device.

Created also an additional test case for the COW size calculation.

Change-Id: If147001544988716430b36a4c75dfa7f34b4c8d9
Bug: 140835698
Test: libsnapshot_test
Signed-off-by: Alessio Balsini <balsini@google.com>
2019-10-28 18:59:45 +00:00
Greg Kaiser b6a3d3f9d3 Merge "Revert "Revert "Revert "Use com.android.vndk.current variant for vndk list"""" 2019-10-28 17:12:33 +00:00
Tom Cherry 20d02ca458 Merge "logcat: remove the rest of liblogcat" 2019-10-28 17:01:58 +00:00
Nikita Ioffe 3f334dcaa4 Add a test asserting that default fstab has /data entry
When aosp/1149619 is merged, userspace reboot will start to depend on
the fact that default fstab has an entry for /data, hence this test
to make sure that this is the case.

Bug: 135984674
Test: atest CtsFsMgrTestCases
Change-Id: I7a3c181a6b27a7b4dfc344ff04be712f3fe3376e
2019-10-28 16:47:47 +00:00
Alessio Balsini 70f0be3811 pragma once for header file
Add missing "#pragma once" to header file.

Bug: none
Test: build
Change-Id: I9ea248686dc2affc8ba093c58a2660505f5cc8de
Signed-off-by: Alessio Balsini <balsini@google.com>
2019-10-28 16:38:35 +00:00
Nikita Ioffe 8a603a7f9b Merge "Userspace reboot: Support remounting userdata for f2fs" 2019-10-28 16:28:23 +00:00
Nikita Ioffe 607cbbf1e8 Add fs_mgr_unit_test to CTS
Test: atest --rebuild-module-info CtsFsMgrTestCases
Bug: 135984674
Change-Id: I72c60ec8acdcb3539da091abb4f84e0bc3c6743b
2019-10-28 16:28:02 +00:00
Nikita Ioffe e93b12847f Fixed fs_mgr#fs_mgr_read_fstab_file_proc_mounts test
It was failing with:
Expected equality of these values:
mnt_opts
Which is: { "data=ordered", "discard", "noatime", "nodev", "nosuid", "rw", "seclabel", "sync" }
fs_options
Which is: { "data=ordered", "discard", "noatime", "nodev", "nosuid", "rw", "seclabel" }

Test: atest fs_mgr_unit_test
Change-Id: I3bb084d62e81fda8948a100515bdaad62d18bb54
2019-10-28 14:42:01 +00:00
Jooyung Han 3cb19a74f2 Revert "Revert "Revert "Use com.android.vndk.current variant for vndk list"""
This reverts commit 74f23d7ae6.

Reason for revert: b/143374795

Change-Id: I35cb387b87d3eb2eb0963b669e359ff538c28c90
2019-10-28 05:07:46 +00:00
Xin Li f71ca37df4 Merge "Merge Coral/Flame into AOSP master" 2019-10-27 04:44:29 +00:00
Yifan Hong 02f2c1b75a fs_mgr: retrofit VAB update after A/B calc COW space.
When applying retrofit VAB update on a regular A/B device,
if device is at version Android R, update_engine may run
a virtual A/B update directly. In this case, partitions
with suffix B in slot 0 (current slot) should not be treated
as unusable space by CoW.

Fixes: 143323939
Test: libsnapshot_test

Change-Id: Ic845374e519885d21e021e97cb32fab9f5d56a63
2019-10-25 15:54:00 -07:00