From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
Sarthak Kukreti <sarthakkukreti@google.com>,
Kees Cook <keescook@chromium.org>,
Mike Snitzer <snitzer@kernel.org>
Subject: [PATCH 4.9 09/12] dm verity: set DM_TARGET_IMMUTABLE feature flag
Date: Fri, 3 Jun 2022 19:39:35 +0200 [thread overview]
Message-ID: <20220603173812.801934643@linuxfoundation.org> (raw)
In-Reply-To: <20220603173812.524184588@linuxfoundation.org>
From: Sarthak Kukreti <sarthakkukreti@google.com>
commit 4caae58406f8ceb741603eee460d79bacca9b1b5 upstream.
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: a4ffc152198e ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm-verity-target.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/md/dm-verity-target.c
+++ b/drivers/md/dm-verity-target.c
@@ -1056,6 +1056,7 @@ bad:
static struct target_type verity_target = {
.name = "verity",
+ .features = DM_TARGET_IMMUTABLE,
.version = {1, 3, 0},
.module = THIS_MODULE,
.ctr = verity_ctr,
next prev parent reply other threads:[~2022-06-03 17:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 17:39 [PATCH 4.9 00/12] 4.9.317-rc1 review Greg Kroah-Hartman
2022-06-03 17:39 ` [PATCH 4.9 01/12] net: af_key: check encryption module availability consistency Greg Kroah-Hartman
2022-06-03 17:39 ` [PATCH 4.9 02/12] drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers Greg Kroah-Hartman
2022-06-03 17:39 ` [PATCH 4.9 03/12] assoc_array: Fix BUG_ON during garbage collect Greg Kroah-Hartman
2022-06-03 17:39 ` [PATCH 4.9 04/12] drm/i915: Fix -Wstringop-overflow warning in call to intel_read_wm_latency() Greg Kroah-Hartman
2022-06-03 17:39 ` [PATCH 4.9 05/12] block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern Greg Kroah-Hartman
2022-06-03 17:39 ` [PATCH 4.9 06/12] exec: Force single empty string when argv is empty Greg Kroah-Hartman
2022-06-03 17:39 ` [PATCH 4.9 07/12] dm crypt: make printing of the key constant-time Greg Kroah-Hartman
2022-06-03 17:39 ` [PATCH 4.9 08/12] dm stats: add cond_resched when looping over entries Greg Kroah-Hartman
2022-06-03 17:39 ` Greg Kroah-Hartman [this message]
2022-06-03 17:39 ` [PATCH 4.9 10/12] tpm: ibmvtpm: Correct the return value in tpm_ibmvtpm_probe() Greg Kroah-Hartman
2022-06-03 17:39 ` [PATCH 4.9 11/12] NFSD: Fix possible sleep during nfsd4_release_lockowner() Greg Kroah-Hartman
2022-06-03 17:39 ` [PATCH 4.9 12/12] bpf: Enlarge offset check value to INT_MAX in bpf_skb_{load,store}_bytes Greg Kroah-Hartman
2022-06-04 18:38 ` [PATCH 4.9 00/12] 4.9.317-rc1 review Naresh Kamboju
2022-06-04 18:53 ` Guenter Roeck
2022-06-06 8:40 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220603173812.801934643@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sarthakkukreti@google.com \
--cc=snitzer@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).