OSDN Git Service

EncryptInPlace: ensure that backup superblocks get encrypted
authorWill Shiu <Will.Shiu@mediatek.com>
Wed, 29 Jul 2020 09:03:17 +0000 (17:03 +0800)
committerEric Biggers <ebiggers@google.com>
Thu, 6 Aug 2020 18:05:45 +0000 (11:05 -0700)
commit4ac43f0e163572d68313411ef734f364fb253f3a
treeb9055c95ff9150fd3454fe72cd19d8bb658bc075
parent5de675c93be181256ecc0361e885fa922693cfb8
EncryptInPlace: ensure that backup superblocks get encrypted

Block groups with EXT4_BG_BLOCK_UNINIT still have backup superblocks
(and backup block group descriptors).  Fix EncryptInPlace to encrypt
these backup superblocks rather than leave them unencrypted.

Previously leaving the backup superblocks unencrypted didn't cause any
problems, but due to system/core commit 72abd7b246f7 ("Try to recover
corrupted ext4 /data with backup superblock") it is causing problems.

Bug: 162479411
Bug: 161871210
Change-Id: Ic090bf4e88193b289b04c5254ddf661ef40b037e
EncryptInplace.cpp