Just a few changes below: On 1/6/22 08:37, Thore Sommer wrote: > The grammar for the events dm_device_remove, device_resume and > dm_table_clear did not include the no_data entry when device data > and hash are missing. > > For the device uuid or name "=" is also escaped with a "\". > > Add a note that dm_table_load might split its target measurements over > multiple IMA events. > > Signed-off-by: Thore Sommer <public@xxxxxxxx> > --- > .../admin-guide/device-mapper/dm-ima.rst | 26 ++++++++++++++----- > 1 file changed, 20 insertions(+), 6 deletions(-) > > diff --git a/Documentation/admin-guide/device-mapper/dm-ima.rst b/Documentation/admin-guide/device-mapper/dm-ima.rst > index a4aa50a828e0..fb6e4148b426 100644 > --- a/Documentation/admin-guide/device-mapper/dm-ima.rst > +++ b/Documentation/admin-guide/device-mapper/dm-ima.rst > @@ -100,6 +100,9 @@ When a new table is loaded in a device's inactive table slot, > the device information and target specific details from the > targets in the table are measured. > > +Note that if there are too many targets to measure at once multiple IMA > +measurements will be generated. > + > The IMA measurement log has the following format for 'dm_table_load': > > :: > @@ -118,9 +121,9 @@ The IMA measurement log has the following format for 'dm_table_load': > device_minor := "minor=" <N> > minor_count := "minor_count=" <N> > num_device_targets := "num_targets=" <N> > - dm-device-name := Name of the device. If it contains special characters like '\', ',', ';', > + dm-device-name := Name of the device. If it contains special characters like '\', ',', ';',"=", ';', '=', > they are prefixed with '\'. > - dm-device-uuid := UUID of the device. If it contains special characters like '\', ',', ';', > + dm-device-uuid := UUID of the device. If it contains special characters like '\', ',', ';',"=", ';', '=', > they are prefixed with '\'. > > table_load_data := <target_data> > @@ -175,8 +178,9 @@ The IMA measurement log has the following format for 'dm_device_resume': > :: > > EVENT_NAME := "dm_device_resume" > - EVENT_DATA := <dm_version_str> ";" <device_metadata> ";" <active_table_hash> ";" <current_device_capacity> ";" > + EVENT_DATA := <dm_version_str> ";" device_data ";" <current_device_capacity> ";" > > + device_data := <device_metadata> ";" <active_table_hash> | device_resume_no_data > dm_version_str := As described in the 'Table load' section above. > device_metadata := As described in the 'Table load' section above. > active_table_hash := "active_table_hash=" <table_hash_alg> ":" <table_hash> > @@ -189,6 +193,9 @@ The IMA measurement log has the following format for 'dm_device_resume': > events for a given device, the hash is computed combining all the event data > i.e. (<dm_version_str> ";" <device_metadata> ";" <table_load_data> ";") > across all those events. > + device_resume_no_data := "device_resume=no_data" > + If device metadata and hash for the active table do not exists this value gets measured. do not exist, this value is measured. > + Note: the hash should always exist if the device metadata is present. > current_device_capacity := "current_device_capacity=" <N> > > For instance, if a linear device is resumed with the following command, > @@ -213,10 +220,10 @@ The IMA measurement log has the following format for 'dm_device_remove': > :: > > EVENT_NAME := "dm_device_remove" > - EVENT_DATA := <dm_version_str> ";" <device_active_metadata> ";" <device_inactive_metadata> ";" > - <active_table_hash> "," <inactive_table_hash> "," <remove_all> ";" <current_device_capacity> ";" > + EVENT_DATA := <dm_version_str> ";" <device_data> <remove_all> ";" <current_device_capacity> ";" > > dm_version_str := As described in the 'Table load' section above. > + device_data := <device_active_metadata> ";" <device_inactive_metadata> ";" <active_table_hash> "," <inactive_table_hash> "," | <device_remove_no_data> ";" > device_active_metadata := Device metadata that reflects the currently loaded active table. > The format is same as 'device_metadata' described in the 'Table load' section above. > device_inactive_metadata := Device metadata that reflects the inactive table. > @@ -225,6 +232,9 @@ The IMA measurement log has the following format for 'dm_device_remove': > The format is same as 'active_table_hash' described in the 'Device resume' section above. > inactive_table_hash := Hash of the inactive table. > The format is same as 'active_table_hash' described in the 'Device resume' section above. > + device_remove_no_data := "device_remove=no_data" > + If device metadata and hash for the active and inactive table do not exists this value gets measured. exist, this value is measured. > + Note: the hash should always exist if the device metadata is present. > remove_all := "remove_all=" <yes_no> > yes_no := "y" | "n" > current_device_capacity := "current_device_capacity=" <N> > @@ -254,9 +264,13 @@ The IMA measurement log has the following format for 'dm_table_clear': > :: > > EVENT_NAME := "dm_table_clear" > - EVENT_DATA := <dm_version_str> ";" <device_inactive_metadata> ";" <inactive_table_hash> ";" <current_device_capacity> ";" > + EVENT_DATA := <dm_version_str> ";" <device_data> ";" <current_device_capacity> ";" > > dm_version_str := As described in the 'Table load' section above. > + device_data := <device_inactive_metadata> ";" <inactive_table_hash> | <table_clear_no_data> > + table_clear_no_data := "table_clear=no_data" > + If device metadata and hash for the inactive table do not exists this value gets measured. exist, this value is measured. > + Note: the hash should always exist if the device metadata is present. > device_inactive_metadata := Device metadata that was captured during the load time inactive table being cleared. > The format is same as 'device_metadata' described in the 'Table load' section above. > inactive_table_hash := Hash of the inactive table being cleared from the device. thanks. -- ~Randy -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel