diff options
author | Sandeep Patil <sspatil@google.com> | 2017-02-16 17:04:11 -0800 |
---|---|---|
committer | Sandeep Patil <sspatil@google.com> | 2017-02-22 11:22:53 -0800 |
commit | 05ff38ba43eb7a882873312f12fc019b42f37b34 (patch) | |
tree | 630a81bbc8fd8f3daaaee1abdcef72eb39a288e3 /fs_mgr | |
parent | 0a3e36fbb19315de6208560e239dbc7cccbba214 (diff) | |
download | core-05ff38ba43eb7a882873312f12fc019b42f37b34.tar.gz core-05ff38ba43eb7a882873312f12fc019b42f37b34.tar.bz2 core-05ff38ba43eb7a882873312f12fc019b42f37b34.zip |
init: early_mount: disallow partitions to be verified at boot
While technically possible, the verification at boot basically will
block init for as long as the entire partition is read while nothing
else is running. Disallow that as this is not going to be used anywhere.
Bug: 27805372
Test: boot angler with verifyatboot fs_mgr option for early mounted
vendor partition. That resulted in a panic() as expected.
Change-Id: I9da5caa163cae8bce6dbfb630f0ed5605ea044a0
Signed-off-by: Sandeep Patil <sspatil@google.com>
Diffstat (limited to 'fs_mgr')
-rw-r--r-- | fs_mgr/fs_mgr_fstab.cpp | 5 | ||||
-rw-r--r-- | fs_mgr/include/fs_mgr.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/fs_mgr/fs_mgr_fstab.cpp b/fs_mgr/fs_mgr_fstab.cpp index 48ddf29e8..10e70d6e5 100644 --- a/fs_mgr/fs_mgr_fstab.cpp +++ b/fs_mgr/fs_mgr_fstab.cpp @@ -557,6 +557,11 @@ int fs_mgr_is_verified(const struct fstab_rec *fstab) return fstab->fs_mgr_flags & MF_VERIFY; } +int fs_mgr_is_verifyatboot(const struct fstab_rec *fstab) +{ + return fstab->fs_mgr_flags & MF_VERIFYATBOOT; +} + int fs_mgr_is_encryptable(const struct fstab_rec *fstab) { return fstab->fs_mgr_flags & (MF_CRYPT | MF_FORCECRYPT | MF_FORCEFDEORFBE); diff --git a/fs_mgr/include/fs_mgr.h b/fs_mgr/include/fs_mgr.h index 7b389cd1c..0402b5593 100644 --- a/fs_mgr/include/fs_mgr.h +++ b/fs_mgr/include/fs_mgr.h @@ -117,6 +117,7 @@ struct fstab_rec *fs_mgr_get_entry_for_mount_point(struct fstab *fstab, const ch int fs_mgr_is_voldmanaged(const struct fstab_rec *fstab); int fs_mgr_is_nonremovable(const struct fstab_rec *fstab); int fs_mgr_is_verified(const struct fstab_rec *fstab); +int fs_mgr_is_verifyatboot(const struct fstab_rec *fstab); int fs_mgr_is_encryptable(const struct fstab_rec *fstab); int fs_mgr_is_file_encrypted(const struct fstab_rec *fstab); const char* fs_mgr_get_file_encryption_mode(const struct fstab_rec *fstab); |