Commit graph

183 commits

Author SHA1 Message Date
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
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
Sami Tolvanen
284c5cb2a1 Merge "Set verity mode as the verified property value" 2015-04-07 08:45:24 +00:00
Mohamad Ayyash
807f47004f fs_mgr_verity: Add support for squashfs
- Cleanup the code to get filesystem size in a block device
- Add support to reading size of squashfs in a block device

Change-Id: I3848a705ed4dc2fc9afad20331f0fdecfee545c5
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-04-06 16:20:26 -07:00
Paul Lawrence
b8bd76b7cb Merge "Revert "Revert "Adding e4crypt support""" 2015-04-02 14:49:25 +00:00
Dan Albert
487abaaf86 am 1c4cdf72: am 4f6c526e: am 3891cfef: Merge "Link libc++_static into fs_mgr."
* commit '1c4cdf72a685fe2b913244991b79a81a0d1c2620':
  Link libc++_static into fs_mgr.
2015-04-02 01:38:18 +00:00
Paul Lawrence
c410b3bd63 Revert "Revert "Adding e4crypt support""
Fix build break caused by original change

This reverts commit 84b0bab58f.

(cherry picked from commit bbb4c85bdcc9a1bce315ed9d61a228bb1b992a1c)

Change-Id: If0ead0f2656b69f33f72c64b03a05784455a4143
2015-04-01 13:48:06 -07:00
Dan Albert
bbbc634e09 Link libc++_static into fs_mgr.
Change-Id: Ic2461d3a30dbd8a22f9800a33fac27c658340b21
2015-04-01 13:26:04 -07:00
Paul Lawrence
b8c9d273a0 Revert "Revert "Adding e4crypt support""
Fix build break caused by original change

This reverts commit 84b0bab58f.

Change-Id: I99fbd7c3d1ed92db1f546033c8493bb71a327924
2015-03-31 13:02:13 -07:00
Sami Tolvanen
6122edbac4 Restore verity state when verified partition is reflashed
Store verity state separately for each verified partition, and store
a hash of the last verity table signature for each partition. If the
signature changes, assume the partition has been reflashed and reset
verity state.

Bug: 20006638
Change-Id: I1c85fb816bfec1a54b1033c938bf1fdaf572f849
2015-03-31 18:44:37 +00:00
Sami Tolvanen
454742392f Set verity mode as the verified property value
Set the verity mode as the value for partition.%s.verified to make it
easier for userspace to determine in which mode dm-verity was started.

Change-Id: Icc635515f8a8ede941277aed196867351d8387cb
2015-03-31 09:12:00 +01:00
Sami Tolvanen
c1d6685b15 am 825c2655: am 6ca1dbd4: am 6baab44e: Merge "Fix build"
* commit '825c2655b7bbd5f88d316a5a9b3a746c50282c24':
  Fix build
2015-03-26 16:27:48 +00:00
Sami Tolvanen
b042a2e8bd am c28e2598: am 3fdc2f2b: am d33c6c0e: Merge "Use structured format for verity metadata"
* commit 'c28e2598af394834dbf6532f1cf252705fabd76b':
  Use structured format for verity metadata
2015-03-26 16:27:46 +00:00