dm ima: measure data on device rename
authorTushar Sugandhi <tusharsu@linux.microsoft.com>
Tue, 13 Jul 2021 00:49:02 +0000 (17:49 -0700)
committerMike Snitzer <snitzer@redhat.com>
Tue, 10 Aug 2021 17:34:23 +0000 (13:34 -0400)
commit7d1d1df8ce31491edda5effb216450aad8f05c0d
tree5bc1c1bd4f7a4f09f5b9a830c20b83a695ea2b6f
parent99169b93838aa4b45dfed7163bd3302f1b375238
dm ima: measure data on device rename

A given block device is identified by it's name and UUID.  However, both
these parameters can be renamed.  For an external attestation service to
correctly attest a given device, it needs to keep track of these rename
events.

Update the device data with the new values for IMA measurements.  Measure
both old and new device name/UUID parameters in the same IMA measurement
event, so that the old and the new values can be connected later.

Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-ima.c
drivers/md/dm-ima.h
drivers/md/dm-ioctl.c