[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220426143059.v2.3.I5aca2dcc3b06de4bf53696cd21329dce8272b8aa@changeid>
Date: Tue, 26 Apr 2022 14:31:10 -0700
From: Matthias Kaehlcke <mka@...omium.org>
To: Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...nel.org>,
Kees Cook <keescook@...omium.org>,
James Morris <jmorris@...ei.org>,
"Serge E . Hallyn" <serge@...lyn.com>
Cc: linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, dm-devel@...hat.com,
linux-raid@...r.kernel.org,
Douglas Anderson <dianders@...omium.org>,
Song Liu <song@...nel.org>,
Matthias Kaehlcke <mka@...omium.org>
Subject: [PATCH v2 3/3] dm: verity-loadpin: Use CONFIG_SECURITY_LOADPIN_VERITY for conditional compilation
The verity glue for LoadPin is only needed when CONFIG_SECURITY_LOADPIN_VERITY
is set, use this option for conditional compilation instead of the combo of
CONFIG_DM_VERITY and CONFIG_SECURITY_LOADPIN.
Signed-off-by: Matthias Kaehlcke <mka@...omium.org>
---
Changes in v2:
- none
drivers/md/Makefile | 7 +------
include/linux/dm-verity-loadpin.h | 2 +-
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/md/Makefile b/drivers/md/Makefile
index e12cd004d375..a96441752ec7 100644
--- a/drivers/md/Makefile
+++ b/drivers/md/Makefile
@@ -83,6 +83,7 @@ obj-$(CONFIG_DM_LOG_WRITES) += dm-log-writes.o
obj-$(CONFIG_DM_INTEGRITY) += dm-integrity.o
obj-$(CONFIG_DM_ZONED) += dm-zoned.o
obj-$(CONFIG_DM_WRITECACHE) += dm-writecache.o
+obj-$(CONFIG_SECURITY_LOADPIN_VERITY) += dm-verity-loadpin.o
ifeq ($(CONFIG_DM_INIT),y)
dm-mod-objs += dm-init.o
@@ -100,12 +101,6 @@ ifeq ($(CONFIG_IMA),y)
dm-mod-objs += dm-ima.o
endif
-ifeq ($(CONFIG_DM_VERITY),y)
-ifeq ($(CONFIG_SECURITY_LOADPIN),y)
-dm-mod-objs += dm-verity-loadpin.o
-endif
-endif
-
ifeq ($(CONFIG_DM_VERITY_FEC),y)
dm-verity-objs += dm-verity-fec.o
endif
diff --git a/include/linux/dm-verity-loadpin.h b/include/linux/dm-verity-loadpin.h
index 12a86911d05a..be63ac76f98d 100644
--- a/include/linux/dm-verity-loadpin.h
+++ b/include/linux/dm-verity-loadpin.h
@@ -13,7 +13,7 @@ struct trusted_root_digest {
struct list_head node;
};
-#if IS_ENABLED(CONFIG_SECURITY_LOADPIN) && IS_BUILTIN(CONFIG_DM_VERITY)
+#if IS_ENABLED(CONFIG_SECURITY_LOADPIN_VERITY)
void dm_verity_loadpin_set_trusted_root_digests(struct list_head *digests);
bool dm_verity_loadpin_is_md_trusted(struct mapped_device *md);
#else
--
2.36.0.rc2.479.g8af0fa9b8e-goog
Powered by blists - more mailing lists