summaryrefslogtreecommitdiff
path: root/drivers/md/dm-ima.h
diff options
context:
space:
mode:
authorTushar Sugandhi <tusharsu@linux.microsoft.com>2021-07-12 17:49:01 -0700
committerMike Snitzer <snitzer@redhat.com>2021-08-10 13:34:23 -0400
commit99169b93838aa4b45dfed7163bd3302f1b375238 (patch)
treed6c3855071b09810146bf5abce6742df29d45b6d /drivers/md/dm-ima.h
parent84010e519f95c863728e4b1d73cf93cda41ac00e (diff)
dm ima: measure data on table clear
For a given block device, an inactive table slot contains the parameters to configure the device with. The inactive table can be cleared multiple times, accidentally or maliciously, which may impact the functionality of the device, and compromise the system. Therefore it is important to measure and log the event when a table is cleared. Measure device parameters, and table hashes when the inactive table slot is cleared. Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-ima.h')
-rw-r--r--drivers/md/dm-ima.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-ima.h b/drivers/md/dm-ima.h
index 59bede2454b0..caa5c84017b1 100644
--- a/drivers/md/dm-ima.h
+++ b/drivers/md/dm-ima.h
@@ -51,6 +51,7 @@ void dm_ima_reset_data(struct mapped_device *md);
void dm_ima_measure_on_table_load(struct dm_table *table, unsigned int status_flags);
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);
#else
@@ -58,6 +59,7 @@ static inline void dm_ima_reset_data(struct mapped_device *md) {}
static inline void dm_ima_measure_on_table_load(struct dm_table *table, unsigned int status_flags) {}
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) {}
#endif /* CONFIG_IMA */