Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm ima: update dm documentation for ima measurement support

The ima documentation for measuring DM targets (dm-ima.rst) is
missing the attribute information for the targets - 'cache', 'integrity',
'multipath', and 'snapshot'. It is also missing the grammar for
various DM events and targets, which can help the attestation servers
to determine what data to expect for a given DM device. Further,
the documentation needs to be updated to incorporate code changes
made to DM ima events and targets as part of this patch series. For
instance, prefixing the event names with "dm_", adding the DM version to
events, prefixing the table hashes in the ima log with the
hash algorithm etc. There are warnings reported by 'make htmldocs' on
dm-ima.rst, which need to be fixed. And lastly, the expected behavior
needs to be documented when the configuration CONFIG_IMA_DISABLE_HTABLE
is disabled.

Update the documentation to add examples for 'cache', 'integrity',
'multipath', and 'snapshot' targets. Add the grammar for
various DM events and targets in Backus Naur form,
so that the attestation servers can interpret and act on the ima
measurements for DM target. Fix htmldocs warnings in dm-ima.rst. Update
the documentation to be consistent with the code changes that are part of
this patch series.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>

authored by

Tushar Sugandhi and committed by
Mike Snitzer
17bfa968 33ace4ca

+596 -187
+596 -187
Documentation/admin-guide/device-mapper/dm-ima.rst
··· 26 26 IMA kernel subsystem provides the necessary functionality for 27 27 device mapper to measure the state and configuration of 28 28 various block devices - 29 - - BY device mapper itself, from within the kernel, 30 - - in a tamper resistant way, 31 - - and re-measured - triggered on state/configuration change. 29 + 30 + - by device mapper itself, from within the kernel, 31 + - in a tamper resistant way, 32 + - and re-measured - triggered on state/configuration change. 32 33 33 34 Setting the IMA Policy: 34 35 ======================= ··· 37 36 system needs to be updated to have following line, and the system needs 38 37 to be restarted for the measurements to take effect. 39 38 40 - /etc/ima/ima-policy 41 - measure func=CRITICAL_DATA label=device-mapper template=ima-buf 39 + :: 40 + 41 + /etc/ima/ima-policy 42 + measure func=CRITICAL_DATA label=device-mapper template=ima-buf 42 43 43 44 The measurements will be reflected in the IMA logs, which are located at: 44 45 45 - /sys/kernel/security/integrity/ima/ascii_runtime_measurements 46 - /sys/kernel/security/integrity/ima/binary_runtime_measurements 46 + :: 47 + 48 + /sys/kernel/security/integrity/ima/ascii_runtime_measurements 49 + /sys/kernel/security/integrity/ima/binary_runtime_measurements 47 50 48 51 Then IMA ASCII measurement log has the following format: 49 - PCR TEMPLATE_DIGEST TEMPLATE ALG:EVENT_DIGEST EVENT_NAME EVENT_DATA 50 52 51 - PCR := Platform Configuration Register, in which the values are registered. 53 + :: 54 + 55 + <PCR> <TEMPLATE_DATA_DIGEST> <TEMPLATE_NAME> <TEMPLATE_DATA> 56 + 57 + PCR := Platform Configuration Register, in which the values are registered. 52 58 This is applicable if TPM chip is in use. 53 - TEMPLATE_DIGEST := Template digest of the IMA record. 54 - TEMPLATE := Template that registered the integrity value (e.g. ima-buf). 55 - ALG:EVENT_DIGEST = Algorithm to compute event digest, followed by digest of event data 56 - EVENT_NAME := Description of the event (e.g. 'table_load'). 57 - EVENT_DATA := The event data to be measured. 58 59 59 - The DM target data measured by IMA subsystem can alternatively 60 - be queried from userspace by setting DM_IMA_MEASUREMENT_FLAG with 61 - DM_TABLE_STATUS_CMD. 60 + TEMPLATE_DATA_DIGEST := Template data digest of the IMA record. 61 + TEMPLATE_NAME := Template name that registered the integrity value (e.g. ima-buf). 62 + 63 + TEMPLATE_DATA := <ALG> ":" <EVENT_DIGEST> <EVENT_NAME> <EVENT_DATA> 64 + It contains data for the specific event to be measured, 65 + in a given template data format. 66 + 67 + ALG := Algorithm to compute event digest 68 + EVENT_DIGEST := Digest of the event data 69 + EVENT_NAME := Description of the event (e.g. 'dm_table_load'). 70 + EVENT_DATA := The event data to be measured. 71 + 72 + | 73 + 74 + | *NOTE #1:* 75 + | The DM target data measured by IMA subsystem can alternatively 76 + be queried from userspace by setting DM_IMA_MEASUREMENT_FLAG with 77 + DM_TABLE_STATUS_CMD. 78 + 79 + | 80 + 81 + | *NOTE #2:* 82 + | The Kernel configuration CONFIG_IMA_DISABLE_HTABLE allows measurement of duplicate records. 83 + | To support recording duplicate IMA events in the IMA log, the Kernel needs to be configured with 84 + CONFIG_IMA_DISABLE_HTABLE=y. 62 85 63 86 Supported Device States: 64 87 ======================== 65 - Following device state changes will trigger IMA measurements. 66 - 01. Table load 67 - 02. Device resume 68 - 03. Device remove 69 - 04. Table clear 70 - 05. Device rename 88 + Following device state changes will trigger IMA measurements: 71 89 72 - 01. Table load: 90 + 1. Table load 91 + #. Device resume 92 + #. Device remove 93 + #. Table clear 94 + #. Device rename 95 + 96 + 1. Table load: 73 97 --------------- 74 98 When a new table is loaded in a device's inactive table slot, 75 99 the device information and target specific details from the 76 100 targets in the table are measured. 77 101 78 - For instance, if a linear device is created with the following table entries, 79 - # dmsetup create linear1 80 - 0 2 linear /dev/loop0 512 81 - 2 2 linear /dev/loop0 512 82 - 4 2 linear /dev/loop0 512 83 - 6 2 linear /dev/loop0 512 102 + The IMA measurement log has the following format for 'dm_table_load': 84 103 85 - Then IMA ASCII measurement log will have an entry with: 86 - EVENT_NAME := table_load 87 - EVENT_DATA := [device_data];[target_data_row_1];[target_data_row_2];...[target_data_row_n]; 104 + :: 88 105 89 - E.g. 90 - (converted from ASCII to text for readability) 91 - 10 a8c5ff755561c7a28146389d1514c318592af49a ima-buf sha256:4d73481ecce5eadba8ab084640d85bb9ca899af4d0a122989252a76efadc5b72 92 - table_load 93 - name=linear1,uuid=,major=253,minor=0,minor_count=1,num_targets=4; 94 - target_index=0,target_begin=0,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 95 - target_index=1,target_begin=2,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 96 - target_index=2,target_begin=4,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 97 - target_index=3,target_begin=6,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 106 + EVENT_NAME := "dm_table_load" 107 + EVENT_DATA := <dm_version_str> ";" <device_metadata> ";" <table_load_data> 98 108 99 - 02. Device resume: 109 + dm_version_str := "dm_version=" <N> "." <N> "." <N> 110 + Same as Device Mapper driver version. 111 + device_metadata := <device_name> "," <device_uuid> "," <device_major> "," <device_minor> "," 112 + <minor_count> "," <num_device_targets> ";" 113 + 114 + device_name := "name=" <dm-device-name> 115 + device_uuid := "uuid=" <dm-device-uuid> 116 + device_major := "major=" <N> 117 + device_minor := "minor=" <N> 118 + minor_count := "minor_count=" <N> 119 + num_device_targets := "num_targets=" <N> 120 + dm-device-name := Name of the device. If it contains special characters like '\', ',', ';', 121 + they are prefixed with '\'. 122 + dm-device-uuid := UUID of the device. If it contains special characters like '\', ',', ';', 123 + they are prefixed with '\'. 124 + 125 + table_load_data := <target_data> 126 + Represents the data (as name=value pairs) from various targets in the table, 127 + which is being loaded into the DM device's inactive table slot. 128 + target_data := <target_data_row> | <target_data><target_data_row> 129 + 130 + target_data_row := <target_index> "," <target_begin> "," <target_len> "," <target_name> "," 131 + <target_version> "," <target_attributes> ";" 132 + target_index := "target_index=" <N> 133 + Represents nth target in the table (from 0 to N-1 targets specified in <num_device_targets>) 134 + If all the data for N targets doesn't fit in the given buffer - then the data that fits 135 + in the buffer (say from target 0 to x) is measured in a given IMA event. 136 + The remaining data from targets x+1 to N-1 is measured in the subsequent IMA events, 137 + with the same format as that of 'dm_table_load' 138 + i.e. <dm_version_str> ";" <device_metadata> ";" <table_load_data>. 139 + 140 + target_begin := "target_begin=" <N> 141 + target_len := "target_len=" <N> 142 + target_name := Name of the target. 'linear', 'crypt', 'integrity' etc. 143 + The targets that are supported for IMA measurements are documented below in the 144 + 'Supported targets' section. 145 + target_version := "target_version=" <N> "." <N> "." <N> 146 + target_attributes := Data containing comma separated list of name=value pairs of target specific attributes. 147 + 148 + For instance, if a linear device is created with the following table entries, 149 + # dmsetup create linear1 150 + 0 2 linear /dev/loop0 512 151 + 2 2 linear /dev/loop0 512 152 + 4 2 linear /dev/loop0 512 153 + 6 2 linear /dev/loop0 512 154 + 155 + Then IMA ASCII measurement log will have the following entry: 156 + (converted from ASCII to text for readability) 157 + 158 + 10 a8c5ff755561c7a28146389d1514c318592af49a ima-buf sha256:4d73481ecce5eadba8ab084640d85bb9ca899af4d0a122989252a76efadc5b72 159 + dm_table_load 160 + dm_version=4.45.0; 161 + name=linear1,uuid=,major=253,minor=0,minor_count=1,num_targets=4; 162 + target_index=0,target_begin=0,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 163 + target_index=1,target_begin=2,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 164 + target_index=2,target_begin=4,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 165 + target_index=3,target_begin=6,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 166 + 167 + 2. Device resume: 100 168 ------------------ 101 - When a suspended device is resumed, the device information and a sha256 hash of the 169 + When a suspended device is resumed, the device information and the hash of the 102 170 data from previous load of an active table are measured. 103 171 104 - For instance, if a linear device is resumed with the following command, 105 - #dmsetup resume linear1 172 + The IMA measurement log has the following format for 'dm_device_resume': 106 173 107 - Then IMA ASCII measurement log will have an entry with: 108 - EVENT_NAME := device_resume 109 - EVENT_DATA := [device_data];active_table_hash=(sha256hash([device_data];[target_data_row_1];...[target_data_row_n]); 110 - current_device_capacity=<N>; 174 + :: 111 175 112 - E.g. 113 - (converted from ASCII to text for readability) 114 - 10 56c00cc062ffc24ccd9ac2d67d194af3282b934e ima-buf sha256:e7d12c03b958b4e0e53e7363a06376be88d98a1ac191fdbd3baf5e4b77f329b6 115 - device_resume 116 - name=linear1,uuid=,major=253,minor=0,minor_count=1,num_targets=4; 117 - active_table_hash=4d73481ecce5eadba8ab084640d85bb9ca899af4d0a122989252a76efadc5b72;current_device_capacity=8; 176 + EVENT_NAME := "dm_device_resume" 177 + EVENT_DATA := <dm_version_str> ";" <device_metadata> ";" <active_table_hash> ";" <current_device_capacity> ";" 118 178 119 - 03. Device remove: 179 + dm_version_str := As described in the 'Table load' section above. 180 + device_metadata := As described in the 'Table load' section above. 181 + active_table_hash := "active_table_hash=" <table_hash_alg> ":" <table_hash> 182 + Rerpresents the hash of the IMA data being measured for the 183 + active table for the device. 184 + table_hash_alg := Algorithm used to compute the hash. 185 + table_hash := Hash of the (<dm_version_str> ";" <device_metadata> ";" <table_load_data> ";") 186 + as described in the 'dm_table_load' above. 187 + Note: If the table_load data spans across multiple IMA 'dm_table_load' 188 + events for a given device, the hash is computed combining all the event data 189 + i.e. (<dm_version_str> ";" <device_metadata> ";" <table_load_data> ";") 190 + across all those events. 191 + current_device_capacity := "current_device_capacity=" <N> 192 + 193 + For instance, if a linear device is resumed with the following command, 194 + #dmsetup resume linear1 195 + 196 + then IMA ASCII measurement log will have an entry with: 197 + (converted from ASCII to text for readability) 198 + 199 + 10 56c00cc062ffc24ccd9ac2d67d194af3282b934e ima-buf sha256:e7d12c03b958b4e0e53e7363a06376be88d98a1ac191fdbd3baf5e4b77f329b6 200 + dm_device_resume 201 + dm_version=4.45.0; 202 + name=linear1,uuid=,major=253,minor=0,minor_count=1,num_targets=4; 203 + active_table_hash=sha256:4d73481ecce5eadba8ab084640d85bb9ca899af4d0a122989252a76efadc5b72;current_device_capacity=8; 204 + 205 + 3. Device remove: 120 206 ------------------ 121 207 When a device is removed, the device information and a sha256 hash of the 122 208 data from an active and inactive table are measured. 123 209 124 - For instance, if a linear device is removed with the following command, 125 - # dmsetup remove linear1 210 + The IMA measurement log has the following format for 'dm_device_remove': 126 211 127 - Then IMA ASCII measurement log will have an entry with: 128 - EVENT_NAME := device_remove 129 - EVENT_DATA := [device_active_metadata];[device_inactive_metadata]; 130 - [active_table_hash=(sha256hash([device_active_metadata];[active_table_row_1];...[active_table_row_n]), 131 - [inactive_table_hash=(sha256hash([device_inactive_metadata];[inactive_table_row_1];...[inactive_table_row_n]), 132 - remove_all=[y|n];current_device_capacity=<N>; 212 + :: 133 213 134 - E.g 135 - (converted from ASCII to text for readability) 136 - 10 499812b621b705061c4514d643894483e16d2619 ima-buf sha256:c3f26b02f09bf5b464925589454bdd4d354077ce430fd1e75c9e96ce29cd1cad 137 - device_remove 138 - device_active_metadata=name=linear1,uuid=,major=253,minor=0,minor_count=1,num_targets=4; 139 - device_inactive_metadata=name=linear1,uuid=,major=253,minor=0,minor_count=1,num_targets=2; 140 - active_table_hash=4d73481ecce5eadba8ab084640d85bb9ca899af4d0a122989252a76efadc5b72, 141 - inactive_table_hash=5596cc857b0e887fd0c5d58dc6382513284596b07f09fd37efae2da224bd521d,remove_all=n; 142 - current_device_capacity=8; 214 + EVENT_NAME := "dm_device_remove" 215 + EVENT_DATA := <dm_version_str> ";" <device_active_metadata> ";" <device_inactive_metadata> ";" 216 + <active_table_hash> "," <inactive_table_hash> "," <remove_all> ";" <current_device_capacity> ";" 143 217 218 + dm_version_str := As described in the 'Table load' section above. 219 + device_active_metadata := Device metadata that reflects the currently loaded active table. 220 + The format is same as 'device_metadata' described in the 'Table load' section above. 221 + device_inactive_metadata := Device metadata that reflects the inactive table. 222 + The format is same as 'device_metadata' described in the 'Table load' section above. 223 + active_table_hash := Hash of the currently loaded active table. 224 + The format is same as 'active_table_hash' described in the 'Device resume' section above. 225 + inactive_table_hash := Hash of the inactive table. 226 + The format is same as 'active_table_hash' described in the 'Device resume' section above. 227 + remove_all := "remove_all=" <yes_no> 228 + yes_no := "y" | "n" 229 + current_device_capacity := "current_device_capacity=" <N> 144 230 145 - 04. Table clear: 231 + For instance, if a linear device is removed with the following command, 232 + #dmsetup remove l1 233 + 234 + then IMA ASCII measurement log will have the following entry: 235 + (converted from ASCII to text for readability) 236 + 237 + 10 790e830a3a7a31590824ac0642b3b31c2d0e8b38 ima-buf sha256:ab9f3c959367a8f5d4403d6ce9c3627dadfa8f9f0e7ec7899299782388de3840 238 + dm_device_remove 239 + dm_version=4.45.0; 240 + device_active_metadata=name=l1,uuid=,major=253,minor=2,minor_count=1,num_targets=2; 241 + device_inactive_metadata=name=l1,uuid=,major=253,minor=2,minor_count=1,num_targets=1; 242 + active_table_hash=sha256:4a7e62efaebfc86af755831998b7db6f59b60d23c9534fb16a4455907957953a, 243 + inactive_table_hash=sha256:9d79c175bc2302d55a183e8f50ad4bafd60f7692fd6249e5fd213e2464384b86,remove_all=n; 244 + current_device_capacity=2048; 245 + 246 + 4. Table clear: 146 247 ---------------- 147 248 When an inactive table is cleared from the device, the device information and a sha256 hash of the 148 249 data from an inactive table are measured. 149 250 150 - For instance, if a linear device's inactive table is cleared with the following command, 251 + The IMA measurement log has the following format for 'dm_table_clear': 151 252 152 - # dmsetup clear linear1 253 + :: 153 254 154 - Then IMA ASCII measurement log will have an entry with: 155 - EVENT_NAME := table_clear 156 - EVENT_DATA := [device_data];inactive_table_hash=(sha256hash([device_data];[inactive_table_row_1];...[inactive_table_row_n]); 157 - current_device_capacity=<N>; 255 + EVENT_NAME := "dm_table_clear" 256 + EVENT_DATA := <dm_version_str> ";" <device_inactive_metadata> ";" <inactive_table_hash> ";" <current_device_capacity> ";" 158 257 159 - E.g. 160 - (converted from ASCII to text for readability) 161 - 10 9c11e284d792875352d51c09f6643c96649484be ima-buf sha256:84b22b364ea4d8264fa33c38635c18ef448fa9077731fa7e5f969b1da2003ea4 162 - table_clear 163 - name=linear1,uuid=,major=253,minor=0,minor_count=1,num_targets=2; 164 - inactive_table_hash=5596cc857b0e887fd0c5d58dc6382513284596b07f09fd37efae2da224bd521d;current_device_capacity=0; 258 + dm_version_str := As described in the 'Table load' section above. 259 + device_inactive_metadata := Device metadata that was captured during the load time inactive table being cleared. 260 + The format is same as 'device_metadata' described in the 'Table load' section above. 261 + inactive_table_hash := Hash of the inactive table being cleared from the device. 262 + The format is same as 'active_table_hash' described in the 'Device resume' section above. 263 + current_device_capacity := "current_device_capacity=" <N> 165 264 265 + For instance, if a linear device's inactive table is cleared, 266 + #dmsetup clear l1 166 267 167 - 05. Device rename: 268 + then IMA ASCII measurement log will have an entry with: 269 + (converted from ASCII to text for readability) 270 + 271 + 10 77d347408f557f68f0041acb0072946bb2367fe5 ima-buf sha256:42f9ca22163fdfa548e6229dece2959bc5ce295c681644240035827ada0e1db5 272 + dm_table_clear 273 + dm_version=4.45.0; 274 + name=l1,uuid=,major=253,minor=2,minor_count=1,num_targets=1; 275 + inactive_table_hash=sha256:75c0dc347063bf474d28a9907037eba060bfe39d8847fc0646d75e149045d545;current_device_capacity=1024; 276 + 277 + 5. Device rename: 168 278 ------------------ 169 279 When an device's NAME or UUID is changed, the device information and the new NAME and UUID 170 280 are measured. 171 281 172 - For instance, if a linear device's name is changed with the following command, 282 + The IMA measurement log has the following format for 'dm_device_rename': 173 283 174 - #dmsetup rename linear1 linear=2 175 - Then IMA ASCII measurement log will have an entry with: 176 - EVENT_NAME := device_rename 177 - EVENT_DATA := [current_device_data];new_name=<new_name_value>;new_uuid=<new_uuid_value>;current_device_capacity=<N>; 284 + :: 178 285 179 - E.g 1: 180 - #dmsetup rename linear1 --setuuid 1234-5678 286 + EVENT_NAME := "dm_device_rename" 287 + EVENT_DATA := <dm_version_str> ";" <device_active_metadata> ";" <new_device_name> "," <new_device_uuid> ";" <current_device_capacity> ";" 181 288 182 - IMA Log entry: 183 - (converted from ASCII to text for readability) 184 - 10 7380ef4d1349fe1ebd74affa54e9fcc960e3cbf5 ima-buf sha256:9759e36a17a967ea43c1bf3455279395a40bd0401105ec5ad8edb9a52054efc7 185 - device_rename 186 - name=linear1,uuid=,major=253,minor=0,minor_count=1,num_targets=1;new_name=linear1,new_uuid=1234-5678;current_device_capacity=2; 289 + dm_version_str := As described in the 'Table load' section above. 290 + device_active_metadata := Device metadata that reflects the currently loaded active table. 291 + The format is same as 'device_metadata' described in the 'Table load' section above. 292 + new_device_name := "new_name=" <dm-device-name> 293 + dm-device-name := Same as <dm-device-name> described in 'Table load' section above 294 + new_device_uuid := "new_uuid=" <dm-device-uuid> 295 + dm-device-uuid := Same as <dm-device-uuid> described in 'Table load' section above 296 + current_device_capacity := "current_device_capacity=" <N> 187 297 188 - E.g 2: 189 - # dmsetup rename linear1 linear=2 190 - 10 092c8266fc36e44f74c59f123ecfe15310f249f4 ima-buf sha256:4cf8b85c81fa6fedaeb602b05019124dbbb0605dce58fcdeea56887a8a3874cd 191 - device_rename 192 - name=linear1,uuid=1234-5678,major=253,minor=0,minor_count=1,num_targets=1;new_name=linear\=2,new_uuid=1234-5678;current_device_capacity=2; 298 + E.g 1: if a linear device's name is changed with the following command, 299 + #dmsetup rename linear1 --setuuid 1234-5678 193 300 301 + then IMA ASCII measurement log will have an entry with: 302 + (converted from ASCII to text for readability) 303 + 304 + 10 8b0423209b4c66ac1523f4c9848c9b51ee332f48 ima-buf sha256:6847b7258134189531db593e9230b257c84f04038b5a18fd2e1473860e0569ac 305 + dm_device_rename 306 + dm_version=4.45.0; 307 + name=linear1,uuid=,major=253,minor=2,minor_count=1,num_targets=1;new_name=linear1,new_uuid=1234-5678; 308 + current_device_capacity=1024; 309 + 310 + E.g 2: if a linear device's name is changed with the following command, 311 + # dmsetup rename linear1 linear=2 312 + 313 + then IMA ASCII measurement log will have an entry with: 314 + (converted from ASCII to text for readability) 315 + 316 + 10 bef70476b99c2bdf7136fae033aa8627da1bf76f ima-buf sha256:8c6f9f53b9ef9dc8f92a2f2cca8910e622543d0f0d37d484870cb16b95111402 317 + dm_device_rename 318 + dm_version=4.45.0; 319 + name=linear1,uuid=1234-5678,major=253,minor=2,minor_count=1,num_targets=1; 320 + new_name=linear\=2,new_uuid=1234-5678; 321 + current_device_capacity=1024; 194 322 195 323 Supported targets: 196 324 ================== 197 - Following targets are supported to measure their data using IMA. 198 325 199 - 01. cache 200 - 02. crypt 201 - 03. integrity 202 - 04. linear 203 - 05. mirror 204 - 06. multipath 205 - 07. raid 206 - 08. snapshot 207 - 09. striped 208 - 10. verity 326 + Following targets are supported to measure their data using IMA: 209 327 210 - 01. cache 328 + 1. cache 329 + #. crypt 330 + #. integrity 331 + #. linear 332 + #. mirror 333 + #. multipath 334 + #. raid 335 + #. snapshot 336 + #. striped 337 + #. verity 338 + 339 + 1. cache 211 340 --------- 212 - <<documenatation in progress>> 341 + The 'target_attributes' (described as part of EVENT_DATA in 'Table load' 342 + section above) has the following data format for 'cache' target. 213 343 214 - 02. crypt 344 + :: 345 + 346 + target_attributes := <target_name> "," <target_version> "," <metadata_mode> "," <cache_metadata_device> "," 347 + <cache_device> "," <cache_origin_device> "," <writethrough> "," <writeback> "," 348 + <passthrough> "," <no_discard_passdown> ";" 349 + 350 + target_name := "target_name=cache" 351 + target_version := "target_version=" <N> "." <N> "." <N> 352 + metadata_mode := "metadata_mode=" <cache_metadata_mode> 353 + cache_metadata_mode := "fail" | "ro" | "rw" 354 + cache_device := "cache_device=" <cache_device_name_string> 355 + cache_origin_device := "cache_origin_device=" <cache_origin_device_string> 356 + writethrough := "writethrough=" <yes_no> 357 + writeback := "writeback=" <yes_no> 358 + passthrough := "passthrough=" <yes_no> 359 + no_discard_passdown := "no_discard_passdown=" <yes_no> 360 + yes_no := "y" | "n" 361 + 362 + E.g. 363 + When a 'cache' target is loaded, then IMA ASCII measurement log will have an entry 364 + similar to the following, depicting what 'cache' attributes are measured in EVENT_DATA 365 + for 'dm_table_load' event. 366 + (converted from ASCII to text for readability) 367 + 368 + dm_version=4.45.0;name=cache1,uuid=cache_uuid,major=253,minor=2,minor_count=1,num_targets=1; 369 + target_index=0,target_begin=0,target_len=28672,target_name=cache,target_version=2.2.0,metadata_mode=rw, 370 + cache_metadata_device=253:4,cache_device=253:3,cache_origin_device=253:5,writethrough=y,writeback=n, 371 + passthrough=n,metadata2=y,no_discard_passdown=n; 372 + 373 + 374 + 2. crypt 215 375 --------- 216 - When a crypt target is loaded, then IMA ASCII measurement log will have an entry 217 - similar to the following, depicting what crypt attributes are measured in EVENT_DATA. 376 + The 'target_attributes' (described as part of EVENT_DATA in 'Table load' 377 + section above) has the following data format for 'crypt' target. 218 378 219 - (converted from ASCII to text for readability) 220 - 10 fe3b80a35b155bd282df778e2625066c05fc068c ima-buf sha256:2d86ce9d6f16a4a97607318aa123ae816e0ceadefeea7903abf7f782f2cb78ad 221 - table_load 222 - name=test-crypt,uuid=,major=253,minor=0,minor_count=1,num_targets=1; 223 - target_index=0,target_begin=0,target_len=1953125,target_name=crypt,target_version=1.23.0, 224 - allow_discards=y,same_cpu=n,submit_from_crypt_cpus=n,no_read_workqueue=n,no_write_workqueue=n, 225 - iv_large_sectors=n,cipher_string=aes-xts-plain64,key_size=32,key_parts=1,key_extra_size=0,key_mac_size=0; 379 + :: 226 380 227 - 03. integrity 381 + target_attributes := <target_name> "," <target_version> "," <allow_discards> "," <same_cpu_crypt> "," 382 + <submit_from_crypt_cpus> "," <no_read_workqueue> "," <no_write_workqueue> "," 383 + <iv_large_sectors> "," <iv_large_sectors> "," [<integrity_tag_size> ","] [<cipher_auth> ","] 384 + [<sector_size> ","] [<cipher_string> ","] <key_size> "," <key_parts> "," 385 + <key_extra_size> "," <key_mac_size> ";" 386 + 387 + target_name := "target_name=crypt" 388 + target_version := "target_version=" <N> "." <N> "." <N> 389 + allow_discards := "allow_discards=" <yes_no> 390 + same_cpu_crypt := "same_cpu_crypt=" <yes_no> 391 + submit_from_crypt_cpus := "submit_from_crypt_cpus=" <yes_no> 392 + no_read_workqueue := "no_read_workqueue=" <yes_no> 393 + no_write_workqueue := "no_write_workqueue=" <yes_no> 394 + iv_large_sectors := "iv_large_sectors=" <yes_no> 395 + integrity_tag_size := "integrity_tag_size=" <N> 396 + cipher_auth := "cipher_auth=" <string> 397 + sector_size := "sector_size=" <N> 398 + cipher_string := "cipher_string=" 399 + key_size := "key_size=" <N> 400 + key_parts := "key_parts=" <N> 401 + key_extra_size := "key_extra_size=" <N> 402 + key_mac_size := "key_mac_size=" <N> 403 + yes_no := "y" | "n" 404 + 405 + E.g. 406 + When a 'crypt' target is loaded, then IMA ASCII measurement log will have an entry 407 + similar to the following, depicting what 'crypt' attributes are measured in EVENT_DATA 408 + for 'dm_table_load' event. 409 + (converted from ASCII to text for readability) 410 + 411 + dm_version=4.45.0; 412 + name=crypt1,uuid=crypt_uuid1,major=253,minor=0,minor_count=1,num_targets=1; 413 + target_index=0,target_begin=0,target_len=1953125,target_name=crypt,target_version=1.23.0, 414 + allow_discards=y,same_cpu=n,submit_from_crypt_cpus=n,no_read_workqueue=n,no_write_workqueue=n, 415 + iv_large_sectors=n,cipher_string=aes-xts-plain64,key_size=32,key_parts=1,key_extra_size=0,key_mac_size=0; 416 + 417 + 3. integrity 228 418 ------------- 229 - <<documenatation in progress>> 419 + The 'target_attributes' (described as part of EVENT_DATA in 'Table load' 420 + section above) has the following data format for 'integrity' target. 421 + 422 + :: 423 + 424 + target_attributes := <target_name> "," <target_version> "," <dev_name> "," <start> 425 + <tag_size> "," <mode> "," [<meta_device> ","] [<block_size> ","] <recalculate> "," 426 + <allow_discards> "," <fix_padding> "," <fix_hmac> "," <legacy_recalculate> "," 427 + <journal_sectors> "," <interleave_sectors> "," <buffer_sectors> ";" 428 + 429 + target_name := "target_name=integrity" 430 + target_version := "target_version=" <N> "." <N> "." <N> 431 + dev_name := "dev_name=" <device_name_str> 432 + start := "start=" <N> 433 + tag_size := "tag_size=" <N> 434 + mode := "mode=" <integrity_mode_str> 435 + integrity_mode_str := "J" | "B" | "D" | "R" 436 + meta_device := "meta_device=" <meta_device_str> 437 + block_size := "block_size=" <N> 438 + recalculate := "recalculate=" <yes_no> 439 + allow_discards := "allow_discards=" <yes_no> 440 + fix_padding := "fix_padding=" <yes_no> 441 + fix_hmac := "fix_hmac=" <yes_no> 442 + legacy_recalculate := "legacy_recalculate=" <yes_no> 443 + journal_sectors := "journal_sectors=" <N> 444 + interleave_sectors := "interleave_sectors=" <N> 445 + buffer_sectors := "buffer_sectors=" <N> 446 + yes_no := "y" | "n" 447 + 448 + E.g. 449 + When a 'integrity' target is loaded, then IMA ASCII measurement log will have an entry 450 + similar to the following, depicting what 'integrity' attributes are measured in EVENT_DATA 451 + for 'dm_table_load' event. 452 + (converted from ASCII to text for readability) 453 + 454 + dm_version=4.45.0; 455 + name=integrity1,uuid=,major=253,minor=1,minor_count=1,num_targets=1; 456 + target_index=0,target_begin=0,target_len=7856,target_name=integrity,target_version=1.10.0, 457 + dev_name=253:0,start=0,tag_size=32,mode=J,recalculate=n,allow_discards=n,fix_padding=n, 458 + fix_hmac=n,legacy_recalculate=n,journal_sectors=88,interleave_sectors=32768,buffer_sectors=128; 230 459 231 460 232 - 04. linear 461 + 4. linear 233 462 ---------- 234 - When a linear target is loaded, then IMA ASCII measurement log will have an entry 235 - similar to the following, depicting what linear attributes are measured in EVENT_DATA. 463 + The 'target_attributes' (described as part of EVENT_DATA in 'Table load' 464 + section above) has the following data format for 'linear' target. 236 465 237 - (converted from ASCII to text for readability) 238 - 10 a8c5ff755561c7a28146389d1514c318592af49a ima-buf sha256:4d73481ecce5eadba8ab084640d85bb9ca899af4d0a122989252a76efadc5b72 239 - table_load 240 - name=linear1,uuid=,major=253,minor=0,minor_count=1,num_targets=4; 241 - target_index=0,target_begin=0,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 242 - target_index=1,target_begin=2,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 243 - target_index=2,target_begin=4,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 244 - target_index=3,target_begin=6,target_len=2,target_name=linear,target_version=1.4.0,device_name=7:0,start=512; 466 + :: 245 467 246 - 05. mirror 468 + target_attributes := <target_name> "," <target_version> "," <device_name> <,> <start> ";" 469 + 470 + target_name := "target_name=linear" 471 + target_version := "target_version=" <N> "." <N> "." <N> 472 + device_name := "device_name=" <linear_device_name_str> 473 + start := "start=" <N> 474 + 475 + E.g. 476 + When a 'linear' target is loaded, then IMA ASCII measurement log will have an entry 477 + similar to the following, depicting what 'linear' attributes are measured in EVENT_DATA 478 + for 'dm_table_load' event. 479 + (converted from ASCII to text for readability) 480 + 481 + dm_version=4.45.0; 482 + name=linear1,uuid=linear_uuid1,major=253,minor=2,minor_count=1,num_targets=1; 483 + target_index=0,target_begin=0,target_len=28672,target_name=linear,target_version=1.4.0, 484 + device_name=253:1,start=2048; 485 + 486 + 5. mirror 247 487 ---------- 248 - When a mirror target is loaded, then IMA ASCII measurement log will have an entry 249 - similar to the following, depicting what mirror attributes are measured in EVENT_DATA. 488 + The 'target_attributes' (described as part of EVENT_DATA in 'Table load' 489 + section above) has the following data format for 'mirror' target. 250 490 251 - (converted from ASCII to text for readability) 252 - 10 90ff9113a00c367df823595dc347425ce3bfc50a ima-buf sha256:8da0678ed3bf616533573d9e61e5342f2bd16cb0b3145a08262641a743806c2e 253 - table_load 254 - name=test-mirror,uuid=,major=253,minor=4,minor_count=1,num_targets=1; 255 - target_index=0,target_begin=0,target_len=1953125,target_name=mirror,target_version=1.14.0, 256 - nr_mirrors=2,mirror_device_0=253:2,mirror_device_0_status=A,mirror_device_1=253:3,mirror_device_1_status=A, 257 - handle_errors=y,keep_log=n,log_type_status=; 491 + :: 258 492 259 - 06. multipath 493 + target_attributes := <target_name> "," <target_version> "," <nr_mirrors> "," 494 + <mirror_device_data> "," <handle_errors> "," <keep_log> "," <log_type_status> ";" 495 + 496 + target_name := "target_name=mirror" 497 + target_version := "target_version=" <N> "." <N> "." <N> 498 + nr_mirrors := "nr_mirrors=" <NR> 499 + mirror_device_data := <mirror_device_row> | <mirror_device_data><mirror_device_row> 500 + mirror_device_row is repeated <NR> times - for <NR> described in <nr_mirrors>. 501 + mirror_device_row := <mirror_device_name> "," <mirror_device_status> 502 + mirror_device_name := "mirror_device_" <X> "=" <mirror_device_name_str> 503 + where <X> ranges from 0 to (<NR> -1) - for <NR> described in <nr_mirrors>. 504 + mirror_device_status := "mirror_device_" <X> "_status=" <mirror_device_status_char> 505 + where <X> ranges from 0 to (<NR> -1) - for <NR> described in <nr_mirrors>. 506 + mirror_device_status_char := "A" | "F" | "D" | "S" | "R" | "U" 507 + handle_errors := "handle_errors=" <yes_no> 508 + keep_log := "keep_log=" <yes_no> 509 + log_type_status := "log_type_status=" <log_type_status_str> 510 + yes_no := "y" | "n" 511 + 512 + E.g. 513 + When a 'mirror' target is loaded, then IMA ASCII measurement log will have an entry 514 + similar to the following, depicting what 'mirror' attributes are measured in EVENT_DATA 515 + for 'dm_table_load' event. 516 + (converted from ASCII to text for readability) 517 + 518 + dm_version=4.45.0; 519 + name=mirror1,uuid=mirror_uuid1,major=253,minor=6,minor_count=1,num_targets=1; 520 + target_index=0,target_begin=0,target_len=2048,target_name=mirror,target_version=1.14.0,nr_mirrors=2, 521 + mirror_device_0=253:4,mirror_device_0_status=A, 522 + mirror_device_1=253:5,mirror_device_1_status=A, 523 + handle_errors=y,keep_log=n,log_type_status=; 524 + 525 + 6. multipath 260 526 ------------- 261 - <<documenatation in progress>> 527 + The 'target_attributes' (described as part of EVENT_DATA in 'Table load' 528 + section above) has the following data format for 'multipath' target. 262 529 263 - 07. raid 530 + :: 531 + 532 + target_attributes := <target_name> "," <target_version> "," <nr_priority_groups> 533 + ["," <pg_state> "," <priority_groups> "," <priority_group_paths>] ";" 534 + 535 + target_name := "target_name=multipath" 536 + target_version := "target_version=" <N> "." <N> "." <N> 537 + nr_priority_groups := "nr_priority_groups=" <NPG> 538 + priority_groups := <priority_groups_row>|<priority_groups_row><priority_groups> 539 + priority_groups_row := "pg_state_" <X> "=" <pg_state_str> "," "nr_pgpaths_" <X> "=" <NPGP> "," 540 + "path_selector_name_" <X> "=" <string> "," <priority_group_paths> 541 + where <X> ranges from 0 to (<NPG> -1) - for <NPG> described in <nr_priority_groups>. 542 + pg_state_str := "E" | "A" | "D" 543 + <priority_group_paths> := <priority_group_paths_row> | <priority_group_paths_row><priority_group_paths> 544 + priority_group_paths_row := "path_name_" <X> "_" <Y> "=" <string> "," "is_active_" <X> "_" <Y> "=" <is_active_str> 545 + "fail_count_" <X> "_" <Y> "=" <N> "," "path_selector_status_" <X> "_" <Y> "=" <path_selector_status_str> 546 + where <X> ranges from 0 to (<NPG> -1) - for <NPG> described in <nr_priority_groups>, 547 + and <Y> ranges from 0 to (<NPGP> -1) - for <NPGP> described in <priority_groups_row>. 548 + is_active_str := "A" | "F" 549 + 550 + E.g. 551 + When a 'multipath' target is loaded, then IMA ASCII measurement log will have an entry 552 + similar to the following, depicting what 'multipath' attributes are measured in EVENT_DATA 553 + for 'dm_table_load' event. 554 + (converted from ASCII to text for readability) 555 + 556 + dm_version=4.45.0; 557 + name=mp,uuid=,major=253,minor=0,minor_count=1,num_targets=1; 558 + target_index=0,target_begin=0,target_len=2097152,target_name=multipath,target_version=1.14.0,nr_priority_groups=2, 559 + pg_state_0=E,nr_pgpaths_0=2,path_selector_name_0=queue-length, 560 + path_name_0_0=8:16,is_active_0_0=A,fail_count_0_0=0,path_selector_status_0_0=, 561 + path_name_0_1=8:32,is_active_0_1=A,fail_count_0_1=0,path_selector_status_0_1=, 562 + pg_state_1=E,nr_pgpaths_1=2,path_selector_name_1=queue-length, 563 + path_name_1_0=8:48,is_active_1_0=A,fail_count_1_0=0,path_selector_status_1_0=, 564 + path_name_1_1=8:64,is_active_1_1=A,fail_count_1_1=0,path_selector_status_1_1=; 565 + 566 + 7. raid 264 567 -------- 265 - When a raid target is loaded, then IMA ASCII measurement log will have an entry 266 - similar to the following, depicting what raid attributes are measured in EVENT_DATA. 568 + The 'target_attributes' (described as part of EVENT_DATA in 'Table load' 569 + section above) has the following data format for 'raid' target. 267 570 268 - (converted from ASCII to text for readability) 269 - 10 76cb30d0cd0fe099966f20f5c82e3a2ac29b21a0 ima-buf sha256:52250f20b27376fcfb348bdfa1e1cf5acfd6646e0f3ad1a72952cffd9f818753 270 - table_load 271 - name=test-raid1,uuid=,major=253,minor=2,minor_count=1,num_targets=1; 272 - target_index=0,target_begin=0,target_len=1953125,target_name=raid,target_version=1.15.1, 273 - raid_type=raid1,raid_disks=2,raid_state=idle,raid_device_0_status=A,raid_device_1_status=A; 571 + :: 274 572 275 - 08. snapshot 573 + target_attributes := <target_name> "," <target_version> "," <raid_type> "," <raid_disks> "," <raid_state> 574 + <raid_device_status> ["," journal_dev_mode] ";" 575 + 576 + target_name := "target_name=raid" 577 + target_version := "target_version=" <N> "." <N> "." <N> 578 + raid_type := "raid_type=" <raid_type_str> 579 + raid_disks := "raid_disks=" <NRD> 580 + raid_state := "raid_state=" <raid_state_str> 581 + raid_state_str := "frozen" | "reshape" |"resync" | "check" | "repair" | "recover" | "idle" |"undef" 582 + raid_device_status := <raid_device_status_row> | <raid_device_status_row><raid_device_status> 583 + <raid_device_status_row> is repeated <NRD> times - for <NRD> described in <raid_disks>. 584 + raid_device_status_row := "raid_device_" <X> "_status=" <raid_device_status_str> 585 + where <X> ranges from 0 to (<NRD> -1) - for <NRD> described in <raid_disks>. 586 + raid_device_status_str := "A" | "D" | "a" | "-" 587 + journal_dev_mode := "journal_dev_mode=" <journal_dev_mode_str> 588 + journal_dev_mode_str := "writethrough" | "writeback" | "invalid" 589 + 590 + E.g. 591 + When a 'raid' target is loaded, then IMA ASCII measurement log will have an entry 592 + similar to the following, depicting what 'raid' attributes are measured in EVENT_DATA 593 + for 'dm_table_load' event. 594 + (converted from ASCII to text for readability) 595 + 596 + dm_version=4.45.0; 597 + name=raid_LV1,uuid=uuid_raid_LV1,major=253,minor=12,minor_count=1,num_targets=1; 598 + target_index=0,target_begin=0,target_len=2048,target_name=raid,target_version=1.15.1, 599 + raid_type=raid10,raid_disks=4,raid_state=idle, 600 + raid_device_0_status=A, 601 + raid_device_1_status=A, 602 + raid_device_2_status=A, 603 + raid_device_3_status=A; 604 + 605 + 606 + 8. snapshot 276 607 ------------ 277 - <<documenatation in progress>> 608 + The 'target_attributes' (described as part of EVENT_DATA in 'Table load' 609 + section above) has the following data format for 'snapshot' target. 278 610 279 - 09. striped 611 + :: 612 + 613 + target_attributes := <target_name> "," <target_version> "," <snap_origin_name> "," 614 + <snap_cow_name> "," <snap_valid> "," <snap_merge_failed> "," <snapshot_overflowed> ";" 615 + 616 + target_name := "target_name=snapshot" 617 + target_version := "target_version=" <N> "." <N> "." <N> 618 + snap_origin_name := "snap_origin_name=" <string> 619 + snap_cow_name := "snap_cow_name=" <string> 620 + snap_valid := "snap_valid=" <yes_no> 621 + snap_merge_failed := "snap_merge_failed=" <yes_no> 622 + snapshot_overflowed := "snapshot_overflowed=" <yes_no> 623 + yes_no := "y" | "n" 624 + 625 + E.g. 626 + When a 'snapshot' target is loaded, then IMA ASCII measurement log will have an entry 627 + similar to the following, depicting what 'snapshot' attributes are measured in EVENT_DATA 628 + for 'dm_table_load' event. 629 + (converted from ASCII to text for readability) 630 + 631 + dm_version=4.45.0; 632 + name=snap1,uuid=snap_uuid1,major=253,minor=13,minor_count=1,num_targets=1; 633 + target_index=0,target_begin=0,target_len=4096,target_name=snapshot,target_version=1.16.0, 634 + snap_origin_name=253:11,snap_cow_name=253:12,snap_valid=y,snap_merge_failed=n,snapshot_overflowed=n; 635 + 636 + 9. striped 280 637 ----------- 281 - When a linear target is loaded, then IMA ASCII measurement log will have an entry 282 - similar to the following, depicting what linear attributes are measured in EVENT_DATA. 638 + The 'target_attributes' (described as part of EVENT_DATA in 'Table load' 639 + section above) has the following data format for 'striped' target. 283 640 284 - (converted from ASCII to text for readability) 285 - 10 7bd94fa8f799169b9f12d97b9dbdce4dc5509233 ima-buf sha256:0d148eda69887f7833f1a6042767b54359cd23b64fa941b9e1856879eee1f778 286 - table_load 287 - name=test-raid0,uuid=,major=253,minor=8,minor_count=1,num_targets=1; 288 - target_index=0,target_begin=0,target_len=7812096,target_name=striped,target_version=1.6.0,stripes=4,chunk_size=128, 289 - stripe_0_device_name=253:1,stripe_0_physical_start=0,stripe_0_status=A, 290 - stripe_1_device_name=253:3,stripe_1_physical_start=0,stripe_1_status=A, 291 - stripe_2_device_name=253:5,stripe_2_physical_start=0,stripe_2_status=A, 292 - stripe_3_device_name=253:7,stripe_3_physical_start=0,stripe_3_status=A; 641 + :: 642 + 643 + target_attributes := <target_name> "," <target_version> "," <stripes> "," <chunk_size> "," 644 + <stripe_data> ";" 645 + 646 + target_name := "target_name=striped" 647 + target_version := "target_version=" <N> "." <N> "." <N> 648 + stripes := "stripes=" <NS> 649 + chunk_size := "chunk_size=" <N> 650 + stripe_data := <stripe_data_row>|<stripe_data><stripe_data_row> 651 + stripe_data_row := <stripe_device_name> "," <stripe_physical_start> "," <stripe_status> 652 + stripe_device_name := "stripe_" <X> "_device_name=" <stripe_device_name_str> 653 + where <X> ranges from 0 to (<NS> -1) - for <NS> described in <stripes>. 654 + stripe_physical_start := "stripe_" <X> "_physical_start=" <N> 655 + where <X> ranges from 0 to (<NS> -1) - for <NS> described in <stripes>. 656 + stripe_status := "stripe_" <X> "_status=" <stripe_status_str> 657 + where <X> ranges from 0 to (<NS> -1) - for <NS> described in <stripes>. 658 + stripe_status_str := "D" | "A" 659 + 660 + E.g. 661 + When a 'striped' target is loaded, then IMA ASCII measurement log will have an entry 662 + similar to the following, depicting what 'striped' attributes are measured in EVENT_DATA 663 + for 'dm_table_load' event. 664 + (converted from ASCII to text for readability) 665 + 666 + dm_version=4.45.0; 667 + name=striped1,uuid=striped_uuid1,major=253,minor=5,minor_count=1,num_targets=1; 668 + target_index=0,target_begin=0,target_len=640,target_name=striped,target_version=1.6.0,stripes=2,chunk_size=64, 669 + stripe_0_device_name=253:0,stripe_0_physical_start=2048,stripe_0_status=A, 670 + stripe_1_device_name=253:3,stripe_1_physical_start=2048,stripe_1_status=A; 293 671 294 672 10. verity 295 673 ---------- 296 - When a verity target is loaded, then IMA ASCII measurement log will have an entry 297 - similar to the following, depicting what verity attributes are measured in EVENT_DATA. 674 + The 'target_attributes' (described as part of EVENT_DATA in 'Table load' 675 + section above) has the following data format for 'verity' target. 298 676 299 - (converted from ASCII to text for readability) 300 - 10 fced5f575b140fc0efac302c88a635174cd663da ima-buf sha256:021370c1cc93929460b06922c606334fb1d7ea5ecf04f2384f3157a446894283 301 - table_load 302 - name=test-verity,uuid=,major=253,minor=2,minor_count=1,num_targets=1; 303 - target_index=0,target_begin=0,target_len=1953120,target_name=verity,target_version=1.8.0,hash_failed=V, 304 - verity_version=1,data_device_name=253:1,hash_device_name=253:0,verity_algorithm=sha256, 305 - root_digest=29cb87e60ce7b12b443ba6008266f3e41e93e403d7f298f8e3f316b29ff89c5e, 306 - salt=e48da609055204e89ae53b655ca2216dd983cf3cb829f34f63a297d106d53e2d, 307 - ignore_zero_blocks=n,check_at_most_once=n; 677 + :: 678 + 679 + target_attributes := <target_name> "," <target_version> "," <hash_failed> "," <verity_version> "," 680 + <data_device_name> "," <hash_device_name> "," <verity_algorithm> "," <root_digest> "," 681 + <salt> "," <ignore_zero_blocks> "," <check_at_most_once> ["," <root_hash_sig_key_desc>] 682 + ["," <verity_mode>] ";" 683 + 684 + target_name := "target_name=verity" 685 + target_version := "target_version=" <N> "." <N> "." <N> 686 + hash_failed := "hash_failed=" <hash_failed_str> 687 + hash_failed_str := "C" | "V" 688 + verity_version := "verity_version=" <verity_version_str> 689 + data_device_name := "data_device_name=" <data_device_name_str> 690 + hash_device_name := "hash_device_name=" <hash_device_name_str> 691 + verity_algorithm := "verity_algorithm=" <verity_algorithm_str> 692 + root_digest := "root_digest=" <root_digest_str> 693 + salt := "salt=" <salt_str> 694 + salt_str := "-" <verity_salt_str> 695 + ignore_zero_blocks := "ignore_zero_blocks=" <yes_no> 696 + check_at_most_once := "check_at_most_once=" <yes_no> 697 + root_hash_sig_key_desc := "root_hash_sig_key_desc=" 698 + verity_mode := "verity_mode=" <verity_mode_str> 699 + verity_mode_str := "ignore_corruption" | "restart_on_corruption" | "panic_on_corruption" | "invalid" 700 + yes_no := "y" | "n" 701 + 702 + E.g. 703 + When a 'verity' target is loaded, then IMA ASCII measurement log will have an entry 704 + similar to the following, depicting what 'verity' attributes are measured in EVENT_DATA 705 + for 'dm_table_load' event. 706 + (converted from ASCII to text for readability) 707 + 708 + dm_version=4.45.0; 709 + name=test-verity,uuid=,major=253,minor=2,minor_count=1,num_targets=1; 710 + target_index=0,target_begin=0,target_len=1953120,target_name=verity,target_version=1.8.0,hash_failed=V, 711 + verity_version=1,data_device_name=253:1,hash_device_name=253:0,verity_algorithm=sha256, 712 + root_digest=29cb87e60ce7b12b443ba6008266f3e41e93e403d7f298f8e3f316b29ff89c5e, 713 + salt=e48da609055204e89ae53b655ca2216dd983cf3cb829f34f63a297d106d53e2d, 714 + ignore_zero_blocks=n,check_at_most_once=n;