summaryrefslogtreecommitdiffstats
path: root/fs_mgr
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert "fs_mgr_verity: Add support for squashfs""Mohamad Ayyash2015-04-082-27/+54
| | | | | | This reverts commit 7b97c7a3fa0f1bdae5b45a70f625ff48f9dab0c1. Change-Id: Id47e70479fe9247b7936f2e54d4dbfbb4f63f635
* Merge "Revert "fs_mgr_verity: Add support for squashfs""Mohamad Ayyash2015-04-082-39/+26
|\
| * Revert "fs_mgr_verity: Add support for squashfs"Mohamad Ayyash2015-04-082-39/+26
| | | | | | | | | | | | This reverts commit 807f47004f03653997edbe3c83d46350cb056cd4. Change-Id: I2d7972c0828c842b44747dd08fbe44668f2a55db
* | Merge "fs_mgr_verity: Add support for squashfs"Mohamad Ayyash2015-04-082-26/+39
|\ \ | |/
| * fs_mgr_verity: Add support for squashfsMohamad Ayyash2015-04-062-26/+39
| | | | | | | | | | | | | | | | - 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>
* | Merge "Restore verity state when verified partition is reflashed"Sami Tolvanen2015-04-071-20/+117
|\ \
| * | Restore verity state when verified partition is reflashedSami Tolvanen2015-03-311-20/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Set verity mode as the verified property value"Sami Tolvanen2015-04-072-31/+37
|\ \ \ | |/ / | | / | |/ |/|
| * Set verity mode as the verified property valueSami Tolvanen2015-03-312-31/+37
| | | | | | | | | | | | | | 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
* | Link libc++_static into fs_mgr.Dan Albert2015-04-011-0/+1
| | | | | | | | Change-Id: Ic2461d3a30dbd8a22f9800a33fac27c658340b21
* | Revert "Revert "Adding e4crypt support""Paul Lawrence2015-03-314-27/+102
|/ | | | | | | | Fix build break caused by original change This reverts commit 84b0bab58fcc7f225e9a17a15c531b0c2fc509c5. Change-Id: I99fbd7c3d1ed92db1f546033c8493bb71a327924
* Fix buildSami Tolvanen2015-03-261-15/+14
| | | | | | | Fix build breakage in aosp_fugu-userdebug_clang (linux) caused by Id8711f7d51dc1e4e9a4d84f9951240f64528e69d Change-Id: Icd04aeaf131be045cf5788846ae9832e6cbbb944
* Use structured format for verity metadataSami Tolvanen2015-03-243-63/+197
| | | | | | | | Specify the location of verity metadata in fstab, and use a type-length-value format for the metadata that allows other data to be stored in the same location in an extensible way. Change-Id: Id8711f7d51dc1e4e9a4d84f9951240f64528e69d
* Add init command to set verified propertiesSami Tolvanen2015-03-192-7/+20
| | | | | | | | | | Add a command that updates dm-verity state and sets partition.%.verified properties used by adb remount. This is needed in init since fs_mgr cannot set properties: I6a28cccb1ccce960841af20a4b20c32d424b5524 Change-Id: I0fdf5bc29c56690dcadff9d0eb216d3c68483538
* Merge "Do not call libcutils property_set in init through libfs_mgr"Sami Tolvanen2015-03-111-27/+1
|\
| * Do not call libcutils property_set in init through libfs_mgrSami Tolvanen2015-03-051-27/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both init and libcutils define a property_set function. The init version sets the property directly while libcutils simply calls __system_property_set, which sends a message to init to set the property. Since libfs_mgr is statically linked to libcutils, any calls to property_set end up sending a message to init and waiting for a response. When libfs_mgr is further statically linked to init, this leads to init sending a message to itself when property_set is called in fs_mgr. Because send_prop_msg in bionic only waits for a response for 250ms, this does not cause a deadlock. However, using libcutils to set a property in the init process is hardly a good idea. This change removes the property_set call from fs_mgr_verity.c. If this property is required later, it should be set elsewhere. Change-Id: I6a28cccb1ccce960841af20a4b20c32d424b5524
* | am 291ce5b8: Merge "Fs_mgr: Fix format code"Andreas Gampe2015-03-041-1/+1
|\ \ | |/ | | | | | | * commit '291ce5b82d8a504be69132f1827e20041833c488': Fs_mgr: Fix format code
| * Fs_mgr: Fix format codeAndreas Gampe2015-03-041-1/+1
| | | | | | | | | | | | | | | | Suggested printing for off_t is to cast to intmax_t and print that. Follow-up to https://android-review.googlesource.com/133111. Change-Id: Icff6844044c3d0fa6372c3f399453a526fd89954
* | am a88fb24a: Merge "Add fs_mgr support for dm-verity modes"Sami Tolvanen2015-03-042-10/+343
|\ \ | |/ | | | | | | * commit 'a88fb24ab43eec9710a0d4d15aedb6d4bc51a2ec': Add fs_mgr support for dm-verity modes
| * Merge "Add fs_mgr support for dm-verity modes"Sami Tolvanen2015-03-042-10/+343
| |\
| | * Add fs_mgr support for dm-verity modesSami Tolvanen2015-03-042-10/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for dm-verity modes and storing persistent state in a location specified by the following properties: ro.verity.state.location ro.verity.state.offset If these properties do not exist, dm-verity is always loaded in EIO mode. If the properties do exist, but the location does not have valid state data, dm-verity is loaded in RESTART mode. The mode is updated to LOGGING if a dm-verity triggered restart has occurred. Change-Id: Ibb82953594d234f81ad21c40f524190b88e4ac8f
* | | am fbb3f8ca: Merge "Set underlying block device RO when enabling verity"Sami Tolvanen2015-02-283-6/+14
|\ \ \ | |/ / | | | | | | | | | * commit 'fbb3f8ca499b04c82437155f87c8666cad607c6b': Set underlying block device RO when enabling verity
| * | Set underlying block device RO when enabling veritySami Tolvanen2015-02-273-6/+14
| |/ | | | | | | | | | | | | | | | | | | | | Currently, when verity is set up on a block device, the underlying device is still accessible directly. Change the existing function fs_set_blk_ro visible to other fs_mgr modules, change the behavior to match the comment above the function definition, and call it to disable write access to the block device when setting up verity. Bug: 18609347 Change-Id: I7884175df15f9161174788d74d20a08e4cd472ca
* | Merge commit '9c1bc6bbc82e3e4f005e9fcacfca94b2dd82ca31' into HEADBill Yi2015-02-194-11/+8
|\ \ | |/ |/|
| * am 317b4024: Revert "Make encryption configurable"Paul Lawrence2015-02-073-7/+3
| |\ | | | | | | | | | | | | * commit '317b4024a2a46b8c57abfa08f2a649df13572bd3': Revert "Make encryption configurable"
| | * Revert "Make encryption configurable"Paul Lawrence2015-02-063-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bda6272446454886339841a62daaa1b66c07ad60. The original fix seems to have led to boot failures in QA. Rather than risk shipping, revert the change. Bug 18764230 reopened. Requires change https://googleplex-android-review.git.corp.google.com/#/c/629764/ Bug: 19278390 Bug: 19199624 Change-Id: I8b6ab585666f2b0f585ffb2a5f61ac2e3462e06e
| * | am 17b5b352: Merge "fs_mgr: error check umount calls / add retry logic"Nick Kralevich2015-02-062-3/+14
| |\ \ | | | | | | | | | | | | | | | | * commit '17b5b3520094de679c9e43a872c02d15758c83b8': fs_mgr: error check umount calls / add retry logic
| * \ \ am bda62724: Make encryption configurablePaul Lawrence2015-01-263-3/+7
| |\ \ \ | | | |/ | | |/| | | | | | | | | * commit 'bda6272446454886339841a62daaa1b66c07ad60': Make encryption configurable
| | * | Make encryption configurablePaul Lawrence2015-01-213-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delay mounting encryptable but unencrypted volumes until we can check the ro.vold.forceencrypt flag, then optionally encrypt. Requires matching vold change from https://googleplex-android-review.git.corp.google.com/#/c/615309/ Bug: 18764230 Change-Id: If22008be8de6a4f3216b349f81ace49be1730314
| * | | am 4e0bdd10: Merge "fs_mgr: Support filesystem labels in fstab"Elliott Hughes2015-01-231-0/+91
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit '4e0bdd1034ffcf55f4ebcbd547cf4aad59c05f03': fs_mgr: Support filesystem labels in fstab
| * \ \ \ am 4083ed7d: Merge "Revert "fs_mgr: Support filesystem labels in fstab""Elliott Hughes2015-01-231-91/+0
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '4083ed7dff6e1dd8e20bec04f9451061951394f5': Revert "fs_mgr: Support filesystem labels in fstab"
| * \ \ \ \ am f9e23395: Merge "fs_mgr: Support filesystem labels in fstab"JP Abgrall2015-01-231-0/+91
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f9e2339553f70aebdd170e96ab9332b28c3851b4': fs_mgr: Support filesystem labels in fstab
| * \ \ \ \ \ am f2bd3fdd: Merge "Provide a way to select force encryption from vendor ↵Leo Wang2015-01-091-1/+12
| |\ \ \ \ \ \ | | | |_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partition" into lmp-mr1-dev * commit 'f2bd3fdd190fc1234913febfe254f8bcc4e675da': Provide a way to select force encryption from vendor partition
| | * | | | | Provide a way to select force encryption from vendor partitionPaul Lawrence2015-01-071-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows a vendor to force encryption on devices via a vendor partition flag: ro.vold.forceencryption 1 Bug: 18764230 Change-Id: Id0049ce64e34e4f6f96e593aadd70c277ac131c8
| * | | | | | am a97c1075: Merge "Fix Nick\'s nits"Elliott Hughes2014-12-101-4/+4
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a97c10755442e3800c0b1011d986d554ce2096db': Fix Nick's nits
| * \ \ \ \ \ \ am 294e610f: Merge "Fix verity on system partitions larger than 2G"Elliott Hughes2014-12-101-3/+4
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '294e610f886eeb839d16172bb5b98559a6a7434d': Fix verity on system partitions larger than 2G
| * \ \ \ \ \ \ \ resolved conflicts for merge of b471f524 to lmp-mr1-dev-plus-aospElliott Hughes2014-12-091-11/+8
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6efd0d4a0ece0b065d02796916355ad5ae8b4eea
| * \ \ \ \ \ \ \ \ am 72f0d92c: DO NOT MERGE: Do not mount devices with invalid verity metadataSami Tolvanen2014-11-141-1/+3
| |\ \ \ \ \ \ \ \ \ | | | |_|_|/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '72f0d92c722447e0c87cfe765516a7352db3d51a': DO NOT MERGE: Do not mount devices with invalid verity metadata
| | * | | | | | | | DO NOT MERGE: Do not mount devices with invalid verity metadataSami Tolvanen2014-11-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return value of read_verity_metadata is propagated to caller even if the verity metadata is invalid, provided that it can be read from the device. This results in devices with invalid verity metadata signatures to be mounted normally, which is not desirable. This change fixes the bug by changing the return value in case of verification failure to FS_MGR_SETUP_VERITY_FAIL. Bug: 15984840 Bug: 18120110 Change-Id: Ic29f37a23cb417c2538d60fb05de9dd310d50f4a (cherry picked from commit c95e9da39660f278ace4b14d688dc6818d1a38bf)
| * | | | | | | | | am 9573a13b: DO NOT MERGE: Switch fs_mgr to use SHA-256 instead of SHA-1Sami Tolvanen2014-11-141-3/+3
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9573a13bbc015c555adff1e4e0fbef2a18963111': DO NOT MERGE: Switch fs_mgr to use SHA-256 instead of SHA-1
| | * | | | | | | | DO NOT MERGE: Switch fs_mgr to use SHA-256 instead of SHA-1Sami Tolvanen2014-11-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verity metadata signatures will be switched to SHA-256. Switch fs_mgr signature verification to use the correct algorithm. Needs matching changes from https://googleplex-android-review.git.corp.google.com/#/c/579905/ https://googleplex-android-review.git.corp.google.com/#/c/583213/ https://googleplex-android-review.git.corp.google.com/#/c/583214/ https://googleplex-android-review.git.corp.google.com/#/c/583233/ Bug: 15984840 Bug: 18120110 Bug: 17917515 Change-Id: I8f90519bffa105a0eb7abeaad3aea1ffceb851e2 (cherry picked from commit a3465e250cfc3c00931735711e11ad61cf84d8b2)
| * | | | | | | | | fs_mgr: let fsck.f2fs actually attempt a fixJP Abgrall2014-11-121-1/+2
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | automerge: eb6036a * commit 'eb6036ac6be82dcc6e110de22574972631c8f83e': fs_mgr: let fsck.f2fs actually attempt a fix
| | * | | | | | | | fs_mgr: let fsck.f2fs actually attempt a fixJP Abgrall2014-11-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newer fsck.f2fs (1.4.0++) has better fix support, so invoke it. Requires http://ag/583949 f2fs-tools update. Bug: 17640053 Bug: 18292088 Change-Id: I42370d92b232e0bdbf28cccf7035a15dbffeb268 Signed-off-by: JP Abgrall <jpa@google.com>
| * | | | | | | | | am 4cafe2ff: Fix verity on system partitions larger than 2GSami Tolvanen2014-10-311-22/+26
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4cafe2ff89b49329e0e880900195d8e061bd3750': Fix verity on system partitions larger than 2G
| | * | | | | | | | Fix verity on system partitions larger than 2GSami Tolvanen2014-10-291-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the system partition is larger than 2G, the device fails to read verity metadata, because fseek accepts only a 32-bit signed offset. Switch from fseek to lseek64 to allow seeking using a 64-bit offset, which solves the problem. At the same time, move away from stdio in the function. Bug: 17705619 Change-Id: I226320498dcb750ec6cde84411c7fe0774c9cab7
| * | | | | | | | | am 97e48731: Fix Nick\'s nitsPaul Lawrence2014-10-101-4/+4
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '97e487311b1cb780dfd3b0994917c72047d6188f': Fix Nick's nits
| | * | | | | | | | Fix Nick's nitsPaul Lawrence2014-10-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ide7925e7ad328f0343d444d63ff72f1a26206d4c
| * | | | | | | | | resolved conflicts for merge of bbb36319 to lmp-mr1-dev-plus-aospPaul Lawrence2014-10-106-28/+87
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | Change-Id: I6b62347c3acfda7c2c954e719547021009d20c01
| | * | | | | | | | Revert "Revert "Enable verity on userdebug, and add disable-verity to adb""Paul Lawrence2014-10-096-28/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 152d2d4234ba89e0c20c4af13e291b6049a7bc33. Fixed build error, and also fixed memory leak spotted from warning. Bug: 17691572 Change-Id: I23b5ba537f7b557432041d4338b38b9be434e981
| * | | | | | | | | resolved conflicts for merge of a49bfc0d to lmp-mr1-dev-plus-aospPaul Lawrence2014-10-096-67/+20
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | Change-Id: I9ff777a6309aab2b5b18323dd4ee7617cb1c3180