Commit Graph

194 Commits

Author SHA1 Message Date
Daniel Rosenberg 88f82b6650 am 39087653: am 13d62278: Merge "Skip mounting /, just mark block device as ro if needed."
* commit '390876539ec12115268710762d86d8c4c5738c25':
  Skip mounting /, just mark block device as ro if needed.
2015-08-04 01:07:07 +00:00
Daniel Rosenberg 31a4fafc15 Skip mounting /, just mark block device as ro if needed.
Change-Id: I7fbb636d296abc1caab6c7bf88017684c9df7759
2015-08-04 00:47:04 +00:00
Yusuke Sato 7c842b57fe am ab64465d: am 0e3ce82b: Merge "Use fsck.f2fs -a instead of -f for faster boot"
* commit 'ab64465d1f16f414c0bde5e3c4707c32b8220bbc':
  Use fsck.f2fs -a instead of -f for faster boot
2015-07-21 18:25:57 +00:00
Yusuke Sato 0e3ce82b94 Merge "Use fsck.f2fs -a instead of -f for faster boot" 2015-07-21 16:06:40 +00:00
Sami Tolvanen 5f2b3b4be8 am 6c3b205c: am 759717ee: Merge "Update partition.*.verified even with ro.boot.veritymode set"
* commit '6c3b205c408f92101ddfa053cb134371e951a9a7':
  Update partition.*.verified even with ro.boot.veritymode set
2015-07-15 21:27:38 +00:00
Yusuke Sato 0df08271fb Use fsck.f2fs -a instead of -f for faster boot
and run fsck with -f on clean shutdown instead.

With -f, fsck.f2fs always performs a full scan of the /data
partition regardless of whether the partition is clean or not.
The full scan takes more than 2 seconds on volantis-userdebug
and delays the OS boot.

With -a, the command does almost nothing when the partition
is clean and finishes within 20-30ms on volantis-userdebug.
When the partition has an error or its check point has
CP_FSCK_FLAG (aka "need_fsck"), the command does exactly the
same full scan as -f to fix it.

Bug: 21853106
Change-Id: I126263caf34c0f5bb8f5e6794454d4e72526ce38
2015-07-15 10:13:51 -07:00
Sami Tolvanen 2f42554f18 Update partition.*.verified even with ro.boot.veritymode set
We need to have partition.*.verified properties even when bootloader
is managing dm-verity mode, because we may have failed to set up the
verified partition and need a property to indicate this.

This means we still need to run fs_mgr_update_verity_state and walk
through all the partitions to verify the device mapper status, just
without updating verity mode.

Bug: 22489805
Change-Id: Iaf28185adb8b80e5452447e54e1f4e4417a34168
2015-07-15 09:11:13 +00:00
Thierry Strudel a0fbb90885 am 8703bea1: Merge "fs_config: replace getenv(\'OUT\') by new fs_config parameter" into mnc-dev
* commit '8703bea1807326fef9835bc474e7a7288c725925':
  fs_config: replace getenv('OUT') by new fs_config parameter
  fs_mgr: Use ro.boot.veritymode
2015-07-10 18:44:51 +00:00
Thierry Strudel df33ffadd2 fs_config: replace getenv('OUT') by new fs_config parameter
Using a getenv('OUT') in such a deep down function is a wrong design
choice. Replacing with explicit parameter that may be NULL in case
device specific files can be accessed from /.
Since TARGET_COPY_OUT_SYSTEM may be defined to something different than
system we also ensure that we use a path relative to TARGET_OUT to
compute path to fs_config_* files.

Bug: 21989305
Bug: 22048934
Change-Id: Id91bc183b29beac7379d1117ad83bd3346e6897b
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2015-07-09 21:47:07 -07:00
Sami Tolvanen 3fd58ae7e5 fs_mgr: Use ro.boot.veritymode
If verity state is managed by bootloader, it will pass the verity
mode to the kernel in the androidboot.veritymode command line
parameter. Init copies the value to the ro.boot.veritymode property.

Check for ro.boot.veritymode in fs_mgr and use the value to set
dm-verity mode. If this property is not set, store verity state in
metadata as before, if a storage location is specified in fstab.

Bug: 21605676
Change-Id: Ife3c978c133248432c302583d3b70e179605fe42
(cherry picked from commit ac5c1224cf)
2015-07-08 07:54:24 +00:00
Elliott Hughes 182e561932 am 450a24a5: am c604ccfa: Merge "Only pass nomblk_io_submit option when mounting ext4"
* commit '450a24a598b816b71dddde121460dc4fd3fdd3fd':
  Only pass nomblk_io_submit option when mounting ext4
2015-06-11 02:31:53 +00:00
Elliott Hughes c604ccfadd Merge "Only pass nomblk_io_submit option when mounting ext4" 2015-06-11 01:22:57 +00:00
Sami Tolvanen 62481cf7d1 am ecad7587: am 4e359e1d: Merge "fs_mgr: Use ro.boot.veritymode"
* commit 'ecad7587ace0bb702b33fdc278d6705ff968aac8':
  fs_mgr: Use ro.boot.veritymode
2015-06-10 20:36:31 +00:00
Sami Tolvanen ac5c1224cf fs_mgr: Use ro.boot.veritymode
If verity state is managed by bootloader, it will pass the verity
mode to the kernel in the androidboot.veritymode command line
parameter. Init copies the value to the ro.boot.veritymode property.

Check for ro.boot.veritymode in fs_mgr and use the value to set
dm-verity mode. If this property is not set, store verity state in
metadata as before, if a storage location is specified in fstab.

Change-Id: Ife3c978c133248432c302583d3b70e179605fe42
2015-06-10 17:40:29 +01:00
Oreste Salerno 6ed84c986f Only pass nomblk_io_submit option when mounting ext4
This option only exists for ext4 filesystems, so it shouldn't be
used when mounting ext2/ext3.
This bug would cause the mount system call in check_fs to always fail
with ext2/ext3 filesystems.

Change-Id: I3c8938029357a4a4170355118b6757f61ff4b227
2015-06-09 16:38:35 +00:00
Paul Lawrence 0a423d994a DO NOT MERGE Securely encrypt the master key
(chery-picked from commit 806d10be23)

Move all key management into vold
Reuse vold's existing key management through the crypto footer
to manage the device wide keys.

Use ro.crypto.type flag to determine crypto type, which prevents
any issues when running in block encrypted mode, as well as speeding
up boot in block or no encryption.

This is one of four changes to enable this functionality:
  https://android-review.googlesource.com/#/c/148586/
  https://android-review.googlesource.com/#/c/148604/
  https://android-review.googlesource.com/#/c/148606/
  https://android-review.googlesource.com/#/c/148607/

Bug: 18151196

Change-Id: I6a8a18f43ae837e330e2785bd26c2c306ae1816b
2015-05-29 17:39:16 +00:00
Elliott Hughes af02e2403a am 9fc83437: Don\'t use TEMP_FAILURE_RETRY on close in system/core.
* commit '9fc834377297cb2dcc418e4ce7e38e89dd09812b':
  Don't use TEMP_FAILURE_RETRY on close in system/core.
2015-05-27 20:51:25 +00:00
Elliott Hughes 9fc8343772 Don't use TEMP_FAILURE_RETRY on close in system/core.
Bug: http://b/20501816
Change-Id: I1839b48ee4f891b8431ecb809e37a4566a5b3e50
(cherry picked from commit 47b0134ec2)
2015-05-27 13:27:06 -07:00
Elliott Hughes 47b0134ec2 Don't use TEMP_FAILURE_RETRY on close in system/core.
Bug: http://b/20501816
Change-Id: I1839b48ee4f891b8431ecb809e37a4566a5b3e50
2015-05-15 19:16:40 -07:00
Iliyan Malchev 355bd1fd98 am b33118ac: am 2557cd21: am 8b448629: am 16092b7a: Merge "fs_mgr: allow for zramsize to be specified as percentage of total memory" into lmp-mr1-dev
* commit 'b33118ac7603b459d690f524e0c64161f8ab5c0d':
  fs_mgr: allow for zramsize to be specified as percentage of total memory
2015-05-13 17:29:05 +00:00
Iliyan Malchev b33118ac76 am 2557cd21: am 8b448629: am 16092b7a: Merge "fs_mgr: allow for zramsize to be specified as percentage of total memory" into lmp-mr1-dev
* commit '2557cd21f0af31d6dafee24d649f83314d2896d4':
  fs_mgr: allow for zramsize to be specified as percentage of total memory
2015-05-13 17:07:53 +00:00
Iliyan Malchev 2557cd21f0 am 8b448629: am 16092b7a: Merge "fs_mgr: allow for zramsize to be specified as percentage of total memory" into lmp-mr1-dev
* commit '8b4486294053ea96ac50d8c07d4fc23729ef7c52':
  fs_mgr: allow for zramsize to be specified as percentage of total memory
2015-05-12 23:55:40 +00:00
Iliyan Malchev 16092b7a48 Merge "fs_mgr: allow for zramsize to be specified as percentage of total memory" into lmp-mr1-dev 2015-05-12 23:25:51 +00:00
Elliott Hughes 0b3a8a7493 am 8b41a4a3: am 9680eaa1: Merge "fs_mgr: remove some dead code"
* commit '8b41a4a3ca0e6d1001e5dd92b09282d8ef03c307':
  fs_mgr: remove some dead code
2015-05-07 20:33:57 +00:00
Oleksiy Avramchenko 093dd317ec fs_mgr: remove some dead code
Using logical op on unitialized memory is a bad thing. Good thing
is that this bug is dead because the structure is completely
cleared later via create_verity_device() -> verity_ioctl_init().

Change-Id: Idf5515a888bc6216eda0e23885a789f9b0320bac
2015-05-07 10:18:33 +02:00
Iliyan Malchev 3ea902f252 fs_mgr: allow for zramsize to be specified as percentage of total memory
If the zramsize entry has a % size at the end, as in the following example:

	/dev/block/zram0 none swap defaults zramsize=25%

then we will set the value as that percentage of total RAM, as read by scanning
/proc/meminfo.

b/20760266 Seed common build allocated too much for zRAM-backed swap

Change-Id: I17c91d311ba99ae7adae112bfe1b38542ea69b80
Signed-off-by: Iliyan Malchev <malchev@google.com>
2015-05-01 23:04:04 -07:00
Paul Lawrence b8fca94e81 Merge commit '2fe6a631' into manualmerge
Change-Id: Ib8d61ee25711e86a2df3705e87904a50c0ef5187
2015-04-29 09:56:26 -07:00
Paul Lawrence 806d10be23 Securely encrypt the master key
Move all key management into vold
Reuse vold's existing key management through the crypto footer
to manage the device wide keys.

Use ro.crypto.type flag to determine crypto type, which prevents
any issues when running in block encrypted mode, as well as speeding
up boot in block or no encryption.

This is one of four changes to enable this functionality:
  https://android-review.googlesource.com/#/c/148586/
  https://android-review.googlesource.com/#/c/148604/
  https://android-review.googlesource.com/#/c/148606/
  https://android-review.googlesource.com/#/c/148607/

Bug: 18151196

Change-Id: I6a8a18f43ae837e330e2785bd26c2c306ae1816b
2015-04-28 15:34:10 -07:00
Paul Lawrence 658801ff9f resolved conflicts for merge of 6a5244bc to mnc-dev-plus-aosp
Change-Id: Ied1bbf09aeeed53daefb53c559498066abd9b767
2015-04-28 14:28:44 -07:00
Paul Lawrence 2b3a493946 Merge "Revert "Securely encrypt the master key"" 2015-04-28 19:15:40 +00:00
Paul Lawrence 7ac2807546 Revert "Securely encrypt the master key"
This reverts commit 4bf1887c78.

Change-Id: Ie6d1f39de530b99b50a27ddc45bcc900a24e04b5
2015-04-28 19:15:01 +00:00
Paul Lawrence 7880f812f7 resolved conflicts for merge of 72fad66f to mnc-dev-plus-aosp
Change-Id: Ib6659a50ee3f1f1ac3719e5d3397c21f786b9afc
2015-04-27 14:44:15 -07:00
Paul Lawrence 9234b169e6 Merge "Securely encrypt the master key" 2015-04-27 20:08:53 +00:00
Elliott Hughes 4822bd197d am 92f075aa: am 48ba7587: am 34dd04db: Merge "Improve bad error reporting seen in shamu SELinux boot failures."
* commit '92f075aa08a2665ad03c80a0408667f8864f1ecd':
  Improve bad error reporting seen in shamu SELinux boot failures.
2015-04-24 21:09:00 +00:00
Elliott Hughes 92f075aa08 am 48ba7587: am 34dd04db: Merge "Improve bad error reporting seen in shamu SELinux boot failures."
* commit '48ba758782bed8c50f450fd77c4b3284c3fa7316':
  Improve bad error reporting seen in shamu SELinux boot failures.
2015-04-24 18:58:21 +00:00
Elliott Hughes 5e7dd4454f Improve bad error reporting seen in shamu SELinux boot failures.
Explain why mount failed, and explicitly say that the umount fixed it.

Change-Id: I13b0927a36517f2fc9f9580945ba6ebefc4882df
2015-04-24 11:05:48 -07:00
Paul Lawrence 4bf1887c78 Securely encrypt the master key
Remove unencrypted link since it is easier to manage directly
Move creation of key to vold
Start vold early so this is possible in a timely fashion

This is one of four changes to enable this functionality:
  https://android-review.googlesource.com/#/c/144586/
  https://android-review.googlesource.com/#/c/144663/
  https://android-review.googlesource.com/#/c/144672/
  https://android-review.googlesource.com/#/c/144673/

Bug: 18151196
Change-Id: Idb17d1f1a724c6ec509d181ae4427113e9d3b5e6
2015-04-23 10:23:03 -07:00
Ed Tam e498c7ca2c resolved conflicts for merge of d0b6de41 to master
Change-Id: I1d1f6b1cdbd7ee441682c4258a11fb3198ca7d94
2015-04-13 18:01:33 -07:00
Ed Tam 438443e742 resolved conflicts for merge of 79f33846 to lmp-mr1-dev-plus-aosp
Change-Id: I24c60a2747931917a3ea09b953905ce0f4145280
2015-04-13 16:29:05 -07:00
Chris Fries 79f3384652 fs_mgr: introduce fs_mgr_format to format wiped partitions
Move fastboot's format logic into fs_mgr, to consolidate the knowledge
about how to do this (and when to wipe metadata).

Try to format these formattable paritions if they are wiped.

If formatting fails, we will fall out to let recovery mode handle it.

Bug: 20082763
Change-Id: I397cc197550e78d932e8a154fd234695c46dbe7b
2015-04-10 15:01:16 -07:00
Mohamad Ayyash b09ef774fa am d087e6f3: am 7a91e93e: am be940153: Merge "Revert "Revert "fs_mgr_verity: Add support for squashfs"""
* commit 'd087e6f3ff0f928fb1ad7e47e488a3345ab8a555':
  Revert "Revert "fs_mgr_verity: Add support for squashfs""
2015-04-09 21:00:26 +00:00
Mohamad Ayyash 030ef35966 Revert "Revert "fs_mgr_verity: Add support for squashfs""
This reverts commit 7b97c7a3fa.

Change-Id: Id47e70479fe9247b7936f2e54d4dbfbb4f63f635
2015-04-08 18:08:00 -07:00
Mohamad Ayyash 56b8a6a59f am 0009bacf: am d71eca9e: am e322ae19: Merge "Revert "fs_mgr_verity: Add support for squashfs""
* commit '0009bacfda1f6b6a7421c3d1d7a07cc8c88c2090':
  Revert "fs_mgr_verity: Add support for squashfs"
2015-04-08 22:07:18 +00:00
Mohamad Ayyash 520431b0b8 am d411d14a: am 48bfdb85: am 70f81cee: Merge "fs_mgr_verity: Add support for squashfs"
* commit 'd411d14a07842563500cb8991f0f8a84fcb1cd8f':
  fs_mgr_verity: Add support for squashfs
2015-04-08 22:07:17 +00:00
Mohamad Ayyash e322ae1996 Merge "Revert "fs_mgr_verity: Add support for squashfs"" 2015-04-08 19:34:10 +00:00
Mohamad Ayyash 7b97c7a3fa Revert "fs_mgr_verity: Add support for squashfs"
This reverts commit 807f47004f.

Change-Id: I2d7972c0828c842b44747dd08fbe44668f2a55db
2015-04-08 19:31:00 +00:00
Mohamad Ayyash 70f81ceeeb Merge "fs_mgr_verity: Add support for squashfs" 2015-04-08 19:02:11 +00:00
Sami Tolvanen a90dd16565 am 13e8af05: am b6b66f8f: am 02f1d80a: Merge "Restore verity state when verified partition is reflashed"
* commit '13e8af053b425b66199dc12b89c02236b517fac9':
  Restore verity state when verified partition is reflashed
2015-04-07 10:02:27 +00:00
Sami Tolvanen 856006047b am 93c4b6c8: am ddaebb24: am 284c5cb2: Merge "Set verity mode as the verified property value"
* commit '93c4b6c85ac4350029e1a78c16663f61c777ac14':
  Set verity mode as the verified property value
2015-04-07 10:02:26 +00:00
Sami Tolvanen 02f1d80ae2 Merge "Restore verity state when verified partition is reflashed" 2015-04-07 08:45:34 +00:00