]> git.baikalelectronics.ru Git - kernel.git/commit
dm verity: set DM_TARGET_IMMUTABLE feature flag
authorSarthak Kukreti <sarthakkukreti@google.com>
Tue, 31 May 2022 19:56:40 +0000 (15:56 -0400)
committerMike Snitzer <snitzer@kernel.org>
Tue, 31 May 2022 20:22:30 +0000 (16:22 -0400)
commitcf1d13147a79dafdb431fd721603e4de658c3463
treec80f49750da1ca7de174a76ebbb7dbffce24a35a
parent485217bd882b15800e100b5fe302a64e0a2455b2
dm verity: set DM_TARGET_IMMUTABLE feature flag

The device-mapper framework provides a mechanism to mark targets as
immutable (and hence fail table reloads that try to change the target
type). Add the DM_TARGET_IMMUTABLE flag to the dm-verity target's
feature flags to prevent switching the verity target with a different
target type.

Fixes: c5a9d7958dce ("dm: add verity target")
Cc: stable@vger.kernel.org
Signed-off-by: Sarthak Kukreti <sarthakkukreti@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-verity-target.c