Lines Matching full:the

5 The dm-integrity target emulates a block device that has additional
9 writing the sector and the integrity tag must be atomic - i.e. in case of
12 To guarantee write atomicity, the dm-integrity target uses journal, it
13 writes sector data and integrity tags into a journal, commits the journal
14 and then copies the data and integrity tags to their respective location.
16 The dm-integrity target can be used with the dm-crypt target - in this
17 situation the dm-crypt target creates the integrity data and passes them
18 to the dm-integrity target via bio_integrity_payload attached to the bio.
19 In this mode, the dm-crypt and dm-integrity targets provide authenticated
20 disk encryption - if the attacker modifies the encrypted device, an I/O
23 The dm-integrity target can also be used as a standalone target, in this
24 mode it calculates and verifies the integrity tag internally. In this
25 mode, the dm-integrity target can be used to detect silent data
26 corruption on the disk or in the I/O path.
29 instead of a journal. If a bit in the bitmap is 1, the corresponding
30 region's data and integrity tags are not synchronized - if the machine
31 crashes, the unsynchronized regions will be recalculated. The bitmap mode
32 is faster than the journal mode, because we don't have to write the data
34 when the machine crashes, it may not be detected.
36 When loading the target for the first time, the kernel driver will format
37 the device. But it will only format the device if the superblock contains
38 zeroes. If the superblock is neither valid nor zeroed, the dm-integrity
41 Accesses to the on-disk metadata area containing checksums (aka tags) are
43 occurs, each unique metadata area gets its own buffer(s). The buffer size
44 is capped at the size of the metadata area, but may be smaller, thereby
45 requiring multiple buffers to represent the full metadata area. A smaller
46 buffer size will produce a smaller resulting read/write operation to the
47 metadata area for small reads/writes. The metadata is still read even in
48 a full write to the data covered by a single buffer.
50 To use the target for the first time:
52 1. overwrite the superblock with zeroes
53 2. load the dm-integrity target with one-sector size, the kernel driver
54 will format the device
55 3. unload the dm-integrity target
56 4. read the "provided_data_sectors" value from the superblock
57 5. load the dm-integrity target with the target size
59 6. if you want to use dm-integrity with dm-crypt, load the dm-crypt target
60 with the size "provided_data_sectors"
65 1. the underlying block device
67 2. the number of reserved sector at the beginning of the device - the
70 3. the size of the integrity tag (if "-" is used, the size is taken from
71 the internal-hash algorithm)
78 separately. In case of crash, it is possible that the data
81 data and integrity tags are written to the
83 either both data and tag or none of them are written. The
84 journaled mode degrades write throughput twice because the
87 synchronization, the driver maintains a bitmap of dirty
91 checksums are not checked and writes to the device are not
92 allowed. This mode is useful for data recovery if the
93 device cannot be activated in any of the other standard
96 5. the number of additional arguments
101 The size of journal, this argument is used only if formatting the
102 device. If the device is already formatted, the value from the
106 The number of interleaved sectors. This values is rounded down to
107 a power of two. If the device is already formatted, the value from
108 the superblock is used.
111 Don't interleave the data and metadata on the device. Use a
115 The number of sectors in one metadata buffer. The value is rounded
119 The journal watermark in percents. When the size of the journal
120 exceeds this watermark, the thread that flushes the journal will
124 Commit time in milliseconds. When this time passes, the journal is
125 written. The journal is also written immediately if the FLUSH
128 internal_hash:algorithm(:key) (the key is optional)
130 When this argument is used, the dm-integrity target won't accept
131 integrity tags from the upper target, but it will automatically
132 generate and verify the integrity tags.
135 will protect the data against accidental corruption.
138 cryptographic authentication of the data without encryption.
140 When this argument is not used, the integrity tags are accepted
141 from an upper layer target, such as dm-crypt. The upper layer
142 target should check the validity of the integrity tags.
145 Recalculate the integrity tags automatically. It is only valid
148 journal_crypt:algorithm(:key) (the key is optional)
149 Encrypt the journal using given algorithm to make sure that the
150 attacker can't read the journal. You can use a block cipher here
154 The journal contains history of last writes to the block device,
155 an attacker reading the journal could see the last sector numbers
156 that were written. From the sector numbers, the attacker can infer
157 the size of files that were written. To protect against this
158 situation, you can encrypt the journal.
160 journal_mac:algorithm(:key) (the key is optional)
161 Protect sector numbers in the journal from accidental or malicious
167 mode, the integrity of journal entries is checked when replaying
168 the journal. Thus, modified sector number would be detected at
172 The size of a data block in bytes. The larger the block size the
177 In the bitmap mode, this parameter specifies the number of
181 The bitmap flush interval in milliseconds. The metadata buffers
185 Allow block discard requests (a.k.a. TRIM) for the integrity device.
189 Use a smaller padding of the tag area that is more
196 - the section number is mixed to the mac, so that an attacker can't
198 - the superblock is protected by journal_mac
199 - a 16-byte salt stored in the superblock is mixed to the mac, so
200 that the attacker can't detect that two disks have the same hmac
201 key and also to disallow the attacker to move sectors from one
206 default for security reasons - an attacker could modify the volume,
207 set recalc_sector to zero, and the kernel would not detect the
210 The journal mode (D/J), buffer_sectors, journal_watermark, commit_time and
211 allow_discards can be changed when reloading the target (load an inactive
212 table and swap the tables with suspend and resume). The other arguments
213 should not be changed when reloading the target because the layout of disk
214 data depend on them and the reloaded target would be non-functional.
216 For example, on a device using the default interleave_sectors of 32768, a
219 256 sectors of metadata per data area. With the default buffer_sectors of
225 1. the number of integrity mismatches
226 2. provided data sectors - that is the number of sectors that the user
228 3. the current recalculating position (or '-' if we didn't recalculate)
231 The layout of the formatted block device:
235 storing LUKS metadata or for other purpose), the size of the reserved
236 area is specified in the target arguments
239 * magic string - identifies that the device was formatted
243 * the number of journal sections
244 * provided data sectors - the number of sectors that this target
245 provides (i.e. the size of the device minus the size of all
246 metadata and padding). The user of this target should not send
247 bios that access data beyond the "provided data sectors" limit.
254 - journal area contains the bitmap of dirty
259 The journal is divided into sections, each section contains:
265 * logical sector (specifies where the data and tag should
268 * integrity tag (the size is specified in the superblock)
272 * mac (8-bytes), all the macs in 8 metadata sectors form a
274 numbers in the journal section, to protect against a
275 possibility that the attacker tampers with sector
276 numbers in the journal.
279 * data area (the size is variable; it depends on how many journal
280 entries fit into the metadata area)
282 - every sector in the data area contains:
284 * data (504 bytes of data, the last 8 bytes are stored in
285 the journal entry)
288 To test if the whole journal section was written correctly, every
289 512-byte sector of the journal ends with 8-byte commit id. If the
291 assumed that the section was written correctly. If the commit id
292 doesn't match, the section was written partially and it should not
299 sector in the data area. The size of this area is always 4KiB or
301 * data area - it contains data sectors. The number of data sectors
303 in the superblock.