]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dm-ima: Remove status_flags from dm_ima_measure_on_table_load()
authorBenjamin Marzinski <bmarzins@redhat.com>
Wed, 29 Apr 2026 20:21:01 +0000 (16:21 -0400)
committerMikulas Patocka <mpatocka@redhat.com>
Mon, 4 May 2026 12:52:37 +0000 (14:52 +0200)
There is no status flag that is is used for STATUSTYPE_IMA type
status() calls, and STATUSTYPE_IMA itself is not a valid
status flag.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-ima.c
drivers/md/dm-ima.h
drivers/md/dm-ioctl.c

index 209221fa8bc5be0a2747e52879d0443bca3e16af..8b84b676cad44c1fd9697aa4fa7361d8fc7081c6 100644 (file)
@@ -162,7 +162,7 @@ static int dm_ima_alloc_and_copy_capacity_str(struct mapped_device *md, char **c
 /*
  * Build up the IMA data for each target, and finally measure.
  */
-void dm_ima_measure_on_table_load(struct dm_table *table, unsigned int status_flags)
+void dm_ima_measure_on_table_load(struct dm_table *table)
 {
        size_t device_data_buf_len, target_metadata_buf_len, target_data_buf_len, l = 0;
        char *target_metadata_buf = NULL, *target_data_buf = NULL, *digest_buf = NULL;
@@ -217,7 +217,7 @@ void dm_ima_measure_on_table_load(struct dm_table *table, unsigned int status_fl
                 * Then retrieve the actual target data.
                 */
                if (ti->type->status)
-                       ti->type->status(ti, type, status_flags, target_data_buf,
+                       ti->type->status(ti, type, 0, target_data_buf,
                                         DM_IMA_TARGET_DATA_BUF_LEN);
                else
                        target_data_buf[0] = '\0';
index b0b166aa2283b59ecd583d320db514daef3c2fb1..c0548492bef0a5737530ba42ff8e8093236847f6 100644 (file)
@@ -54,7 +54,7 @@ struct dm_ima_measurements {
        struct dm_ima_device_table_metadata inactive_table;
 };
 
-void dm_ima_measure_on_table_load(struct dm_table *table, unsigned int status_flags);
+void dm_ima_measure_on_table_load(struct dm_table *table);
 void dm_ima_measure_on_device_resume(struct mapped_device *md, bool swap);
 void dm_ima_measure_on_device_remove(struct mapped_device *md, bool remove_all);
 void dm_ima_measure_on_table_clear(struct mapped_device *md, bool new_map);
@@ -62,7 +62,7 @@ void dm_ima_measure_on_device_rename(struct mapped_device *md);
 
 #else
 
-static inline void dm_ima_measure_on_table_load(struct dm_table *table, unsigned int status_flags) {}
+static inline void dm_ima_measure_on_table_load(struct dm_table *table) {}
 static inline void dm_ima_measure_on_device_resume(struct mapped_device *md, bool swap) {}
 static inline void dm_ima_measure_on_device_remove(struct mapped_device *md, bool remove_all) {}
 static inline void dm_ima_measure_on_table_clear(struct mapped_device *md, bool new_map) {}
index a529174c94cf33c9e2e16b3372950ce7c77152c5..074a3c71297e04ad0803b93ddf176af735809257 100644 (file)
@@ -1552,7 +1552,7 @@ static int table_load(struct file *filp, struct dm_ioctl *param, size_t param_si
        if (r)
                goto err_unlock_md_type;
 
-       dm_ima_measure_on_table_load(t, STATUSTYPE_IMA);
+       dm_ima_measure_on_table_load(t);
 
        immutable_target_type = dm_get_immutable_target_type(md);
        if (immutable_target_type &&