Commit graph

52379 commits

Author SHA1 Message Date
Yifan Hong
cfeb33bca8 Merge "liblp: convert more functions to use string_view"
am: 09963adb21

Change-Id: Iaf3e878281c608e6e40fdd4a106baca625c9d949
2019-08-28 17:20:02 -07:00
Yifan Hong
09963adb21 Merge "liblp: convert more functions to use string_view" 2019-08-28 23:17:32 +00:00
Tom Cherry
71c3ef135d Start serial console at the 'init' trigger
Start the serial console at the 'init' trigger instead of much later
when property triggers happen.  This will help debugging early boot
issues.

Test: serial console starts early for a userdebug build
Test: serial console still doesn't start on a user build
Change-Id: I7112a8e7171c9fa865c8787c9a3d14515bc59478
2019-08-28 14:43:07 -07:00
Yifan Hong
1ada55e42a fs_mgr: Allow to set defaults for CreateLogicalPartitionParams
Test: boots
Change-Id: I6a969a19b9d29e682f50872bd3e9027eaca41512
2019-08-28 13:40:15 -07:00
Paul Crowley
95e7252fd8 Merge "Move layout_version to /data/misc/installd"
am: 24f955155a

Change-Id: Icf3e304aff7e4e1e556c6372be932e3c357d1bbe
2019-08-28 13:35:54 -07:00
David Anderson
6a6f2e9d65 Merge changes I3872dc51,I3b185f68,I37a25ca7
am: 956c204f1e

Change-Id: Ic4b4c289948d7c8e0c6377e9afac30a697532d26
2019-08-28 13:35:27 -07:00
Tom Cherry
3364822d76 Merge "Revert "Reland: "init: run property service in a thread"""
am: 4adbd2905a

Change-Id: Iff4efee2c4ab130c30127e54b58966c2cfe463cf
2019-08-28 13:34:25 -07:00
Ravi Kumar Siddojigari
2a5d0c80ad Merge "init: set SetKptrRestrict before early-init"
am: 88bba95989

Change-Id: I1822bff084659d744190526987abcc220ae58d45
2019-08-28 13:27:14 -07:00
Yifan Hong
2b3a9b2aa8 liblp: convert more functions to use string_view
Test: builds
Change-Id: I464e36b7b909adb3642b82bd98e2c05e11c9287a
2019-08-28 20:17:54 +00:00
Mark Salyzyn
808763e825 fs_mgr: overlayfs: noatime
Should not have used relatime for overlayfs and backing storage
mounts, noatime reduces the wear and tear on the flash device.

This should prevent triggering a falure in the CtsOsTestCases that
tries to spot mounts attached to block storage from updating atime
and resulting in churn.  This statement does not mean we support
performing Cts tests with devices that have deployed
'adb disable-verity' or 'adb remount'.

Post-mortem: relatime was not a 'problem' for overlayfs, copy and
             paste for those flags resulted in the use of relatime
	     for scratch backing storage.

Test: adb-remount-test.sh
Bug: 140014856
Change-Id: Ic97b98ceacaa265094364487ea70cc99b6aee92f
2019-08-28 13:13:13 -07:00
Paul Crowley
24f955155a Merge "Move layout_version to /data/misc/installd" 2019-08-28 19:56:15 +00:00
David Anderson
956c204f1e Merge changes I3872dc51,I3b185f68,I37a25ca7
* changes:
  libsnapshot: Improve how devices are collapsed after merging.
  fastbootd: Cancel snapshots when modifying partitions.
  Clean up update state when snapshots are interrupted or cancelled.
2019-08-28 17:51:20 +00:00
Tom Cherry
4adbd2905a Merge "Revert "Reland: "init: run property service in a thread""" 2019-08-28 17:50:00 +00:00
Tom Cherry
3da2ba6d4a Revert "Reland: "init: run property service in a thread""
This reverts commit 8efca4bbb3.

Reason for revert: Still broken

Change-Id: I3b37b1b00ff4b19f2eec2d8bd72042463d47cee3
2019-08-28 17:47:49 +00:00
Treehugger Robot
88bba95989 Merge "init: set SetKptrRestrict before early-init" 2019-08-28 17:44:55 +00:00
Tom Cherry
dab12cfbcc Merge "Reland: "init: run property service in a thread""
am: 34f2537393

Change-Id: I6025edc7f49e8325d82afbc19924f4ef409b9822
2019-08-28 08:23:19 -07:00
Tom Cherry
e8ef83a362 Merge "ueventd: parallelize restorecon /sys"
am: 15c8760403

Change-Id: I22316b385bb9ae592614f7cb183b346645178ffb
2019-08-28 08:22:52 -07:00
Tom Cherry
34f2537393 Merge "Reland: "init: run property service in a thread"" 2019-08-28 15:01:34 +00:00
Tom Cherry
15c8760403 Merge "ueventd: parallelize restorecon /sys" 2019-08-28 14:58:12 +00:00
Ravi Kumar Siddojigari
33783fc29c init: set SetKptrRestrict before early-init
As part of debugging long run issue we are enabling
module info as part of debug build under the config key
DEBUG_MODULE_LOAD_INFO , But doing so can lead to info leak
as modules/dlkm are loaded in early-init and setting the
kptr_restriction is done after early-init.

So moving setting of kptr_restrict much before early-init.

Bug: 138641073

Change-Id: Ic3c0ca57a94c8b20136a15331dd646bd8825b625
2019-08-28 14:28:08 +02:00
Haibo Huang
ef4d2b075a Merge "Include chrono.h"
am: fc71730834

Change-Id: I83bd41ac34b04352627569c92189886528a1f1c8
2019-08-27 21:13:20 -07:00
Haibo Huang
fc71730834 Merge "Include chrono.h" 2019-08-28 03:52:35 +00:00
David Anderson
07012f8ba8 Merge "libsnapshot: Do not map snapshots for partitions that were reflashed."
am: f5960a1ac7

Change-Id: Ibe80264d53d4becfdddc89352747b5faf26f8404
2019-08-27 20:00:43 -07:00
David Anderson
f63251c81b Merge "liblp: Add an attribute to indicate that a partition has been updated."
am: 74a6f4cf57

Change-Id: I0f3038c4537e38ce4d09c030bec1079dd941d973
2019-08-27 20:00:37 -07:00
Josh Gao
f9b9bc7e61 Merge "Mark some tests as requiring root."
am: b245609059

Change-Id: I49cb34eebb6bb7e8ebb80f3e2edf45f36e7a2f97
2019-08-27 19:59:55 -07:00
David Anderson
f5960a1ac7 Merge "libsnapshot: Do not map snapshots for partitions that were reflashed." 2019-08-28 02:51:43 +00:00
David Anderson
74a6f4cf57 Merge "liblp: Add an attribute to indicate that a partition has been updated." 2019-08-28 02:51:43 +00:00
Josh Gao
b245609059 Merge "Mark some tests as requiring root." 2019-08-28 02:40:03 +00:00
Bongkyu Kim
5aa6197d5f ueventd: parallelize restorecon /sys
generate subdir for /sys and /sys/devices, handle restorecon in parallel.

This reduces coldboot time on our target about 300ms.

Change-Id: I9c3d0e97aacff0ca127880d936dfd5fcc2aee125
2019-08-28 09:55:09 +09:00
Christopher Ferris
1804a2e687 Merge "Fix unwind_reg_info tool."
am: 8381e72a84

Change-Id: I80f4ff37abf2f815e6836c907208fa4dc2f40a9b
2019-08-27 17:54:07 -07:00
Christopher Ferris
8381e72a84 Merge "Fix unwind_reg_info tool." 2019-08-28 00:35:26 +00:00
Tom Cherry
ac5ffc56c5 Merge "init: send property_set failures to the audit netlink socket"
am: a5c2aed35f

Change-Id: I22ecd17d04c60488437bb90372714617589ae7d9
2019-08-27 16:46:38 -07:00
Tom Cherry
be23b99b97 Merge "liblog: only allow one transport for reading"
am: 30cda267c0

Change-Id: Id265331b16c52175a297d93c73e995891a10a0ab
2019-08-27 16:44:28 -07:00
Tom Cherry
a5c2aed35f Merge "init: send property_set failures to the audit netlink socket" 2019-08-27 23:23:00 +00:00
Josh Gao
6cad139bcc Mark some tests as requiring root.
Bug: http://b/140123924
Test: mma
Change-Id: I3ad277179018631c50d9295cdb173dd9dfa7ac59
2019-08-27 16:09:32 -07:00
Tom Cherry
30cda267c0 Merge "liblog: only allow one transport for reading" 2019-08-27 22:57:16 +00:00
David Anderson
1145c01e8e libsnapshot: Improve how devices are collapsed after merging.
Currently, we replace snapshot-merge with a linear device wrapping the
base device. This is not efficient. This patch reads LpMetadata for the
underlying partition, and duplicates its table into the snapshot-merge
device. This removes a layer of stacking and also allows removing the
base device.

Note that snapshot_test is growing a bit unwiedly, because it's starting
to implement pieces of libsnapshot that will be filled in later for
update_engine. (MapUpdatePartitions is a good example of this.) When
those pieces land in libsnapshot, snapshot_test will be cleaned up to
remove much of this manual fiddling.

Bug: 139090440
Test: libsnapshot_test gtest
Change-Id: I3872dc51d9e5980803303806f42a5c7e74b0b78a
2019-08-27 15:09:56 -07:00
David Anderson
ad970fc055 fastbootd: Cancel snapshots when modifying partitions.
When flashing or resizing partitions, remove the
LP_PARTITION_ATTR_UPDATED flag. This will cause first-stage init to skip
any snapshots for that partition, and the backing storage (if any)
will later be reclaimed.

Bug: 139155473
Test: manual test
Change-Id: I3b185f68dfecb5a93636af0b5ae289ead1363fd0
2019-08-27 14:03:44 -07:00
David Anderson
c058df7b12 libsnapshot: Do not map snapshots for partitions that were reflashed.
Bug: 139154795
Test: libsnapshot_test gtests
Change-Id: Ic4bb663d4286040adec4c0141373c66a487c91ff
2019-08-27 13:43:18 -07:00
David Anderson
a6e288a178 Clean up update state when snapshots are interrupted or cancelled.
This patch addresses two edge cases with interrupted updates:
 (1) If the device reverts to the old slot *before* merging, snapshots
     must be removed.
 (2) If during a merge, a snapshot is detected to be invalid (due to
     flashing), the snapshot must be removed.

To encapsulate this logic, WaitForMerge has been renamed to
ProcessUpdateState. It is still intended to be called after /data is
mounted, or after a merge is initiated.

Bug: 139154795
Test: libsnapshot_test gtest
Change-Id: I37a25ca722f30ae9548894dcfbd70cb64330e416
2019-08-27 13:43:18 -07:00
Christopher Ferris
d128dccddf Fix unwind_reg_info tool.
I was using the pc as the offest into the elf. That is obviously not
correct. Added an optional OFFSET argument like in unwind_info along
with this change.

Test: Verified that with no offest works, verified with a zero offset
Test: works, verified with a non-zero offset results in a bad elf
Test: on an elf without an offset.
Change-Id: I4b6d02609627288e9f8a0eb26988d03adf95cb1f
2019-08-27 13:41:50 -07:00
Haibo Huang
f4c3471d22 Include chrono.h
Upstream merged time.h into chrono.h

Test: build
Change-Id: Iadbdfa4902ddd2dd38ee1dba51ef59def54130e4
2019-08-27 20:38:14 +00:00
Alessio Balsini
29b30cba04 Merge "libsnapshot: use DeleteDeviceIfExists() when required"
am: f8d80b7d56

Change-Id: I1a8f2509fd8390e5656b09a3ac1c6dc16bf4c11e
2019-08-27 13:16:06 -07:00
Treehugger Robot
f8d80b7d56 Merge "libsnapshot: use DeleteDeviceIfExists() when required" 2019-08-27 19:59:13 +00:00
Paul Lawrence
1f3a8c4fc7 Merge "Fix ext4/metadata/udc issue"
am: 8c8ce02e2e

Change-Id: Ic1dd99dfdf886e36f0e1de2638202ca406354267
2019-08-27 08:44:55 -07:00
Paul Lawrence
8c8ce02e2e Merge "Fix ext4/metadata/udc issue" 2019-08-27 15:21:58 +00:00
Tom Cherry
f7e1b1ebd4 liblog: only allow one transport for reading
liblog has left over code from local_logger that allows for reading
from multiple sources and merging the contents.  Since we've already
removed local_logger, this change removes the rest of this code.

Test: liblog-unit-tests
Change-Id: I5685ad6c1e7cbcaa0a660ed10f47714784a40791
2019-08-26 19:50:32 -07:00
Paul Crowley
88dc450050 Merge changes I1c1445ba,Ic0c8b163
am: 309d6dde31

Change-Id: I692405863f30006ff23c339efc0469d4ac71fd48
2019-08-26 19:33:00 -07:00
Paul Crowley
309d6dde31 Merge changes I1c1445ba,Ic0c8b163
* changes:
  Straighten out do_mkdir
  Convert fscrypt_set_directory_policy to C++
2019-08-27 02:26:25 +00:00
Yifan Hong
7309acb536 Merge "init: Add first-stage init support for snapshot-based partitions."
am: 8d168c3321

Change-Id: I7d1adcbb55f842b3bba0eee4caa4345b747a903d
2019-08-26 19:21:04 -07:00