Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9eb1296e authored by JeongHyeon Lee's avatar JeongHyeon Lee
Browse files

Add new dm-verity error handling mode



The latest kernel supports dm-verity has new error handling mode(panic).
However, there is no code to support in android.

Signed-off-by: default avatarJeongHyeon Lee <jhs2.lee@samsung.com>
Change-Id: Ib88ec258adb76ca4c88df1a78636f73f40604b40
parent b20e9a36
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -95,7 +95,9 @@ void DmTargetVerity::UseFec(const std::string& device, uint32_t num_roots, uint3
}

void DmTargetVerity::SetVerityMode(const std::string& mode) {
    if (mode != "restart_on_corruption" && mode != "ignore_corruption") {
    if (mode != "panic_on_corruption" &&
        mode != "restart_on_corruption" &&
        mode != "ignore_corruption") {
        LOG(ERROR) << "Unknown verity mode: " << mode;
        valid_ = false;
        return;
+3 −1
Original line number Diff line number Diff line
@@ -61,7 +61,9 @@ bool ConstructVerityTable(const FsAvbHashtreeDescriptor& hashtree_desc,

    // Converts veritymode to the format used in kernel.
    std::string dm_verity_mode;
    if (verity_mode == "enforcing") {
    if (verity_mode == "panicking") {
        dm_verity_mode = "panic_on_corruption";
    } else if (verity_mode == "enforcing") {
        dm_verity_mode = "restart_on_corruption";
    } else if (verity_mode == "logging") {
        dm_verity_mode = "ignore_corruption";