Lines Matching refs:the

5 writing the sector and the integrity tag must be atomic - i.e. in case of
8 To guarantee write atomicity, the dm-integrity target uses journal, it
9 writes sector data and integrity tags into a journal, commits the journal
10 and then copies the data and integrity tags to their respective location.
12 The dm-integrity target can be used with the dm-crypt target - in this
13 situation the dm-crypt target creates the integrity data and passes them
14 to the dm-integrity target via bio_integrity_payload attached to the bio.
15 In this mode, the dm-crypt and dm-integrity targets provide authenticated
16 disk encryption - if the attacker modifies the encrypted device, an I/O
20 mode it calculates and verifies the integrity tag internally. In this
21 mode, the dm-integrity target can be used to detect silent data
22 corruption on the disk or in the I/O path.
25 When loading the target for the first time, the kernel driver will format
26 the device. But it will only format the device if the superblock contains
27 zeroes. If the superblock is neither valid nor zeroed, the dm-integrity
30 To use the target for the first time:
31 1. overwrite the superblock with zeroes
32 2. load the dm-integrity target with one-sector size, the kernel driver
33 will format the device
34 3. unload the dm-integrity target
35 4. read the "provided_data_sectors" value from the superblock
36 5. load the dm-integrity target with the the target size
38 6. if you want to use dm-integrity with dm-crypt, load the dm-crypt target
39 with the size "provided_data_sectors"
44 1. the underlying block device
46 2. the number of reserved sector at the beginning of the device - the
49 3. the size of the integrity tag (if "-" is used, the size is taken from
50 the internal-hash algorithm)
55 separately. In case of crash, it is possible that the data
57 J - journaled writes - data and integrity tags are written to the
60 journaled mode degrades write throughput twice because the
63 checksums are not checked and writes to the device are not
64 allowed. This mode is useful for data recovery if the
65 device cannot be activated in any of the other standard
68 5. the number of additional arguments
73 The size of journal, this argument is used only if formatting the
74 device. If the device is already formatted, the value from the
79 a power of two. If the device is already formatted, the value from
80 the superblock is used.
86 The tag area is accessed using buffers, the buffer size is
87 configurable. The large buffer size means that the I/O size will
91 The journal watermark in percents. When the size of the journal
92 exceeds this watermark, the thread that flushes the journal will
96 Commit time in milliseconds. When this time passes, the journal is
97 written. The journal is also written immediatelly if the FLUSH
100 internal_hash:algorithm(:key) (the key is optional)
102 When this argument is used, the dm-integrity target won't accept
103 integrity tags from the upper target, but it will automatically
104 generate and verify the integrity tags.
107 will protect the data against accidental corruption.
110 cryptographic authentication of the data without encryption.
112 When this argument is not used, the integrity tags are accepted
114 target should check the validity of the integrity tags.
117 Recalculate the integrity tags automatically. It is only valid
120 journal_crypt:algorithm(:key) (the key is optional)
121 Encrypt the journal using given algorithm to make sure that the
122 attacker can't read the journal. You can use a block cipher here
126 The journal contains history of last writes to the block device,
127 an attacker reading the journal could see the last sector nubmers
128 that were written. From the sector numbers, the attacker can infer
129 the size of files that were written. To protect against this
130 situation, you can encrypt the journal.
132 journal_mac:algorithm(:key) (the key is optional)
133 Protect sector numbers in the journal from accidental or malicious
139 mode, the integrity of journal entries is checked when replaying
140 the journal. Thus, modified sector number would be detected at
144 The size of a data block in bytes. The larger the block size the
147 specified the default block size is 512 bytes.
150 be changed when reloading the target (load an inactive table and swap the
152 when reloading the target because the layout of disk data depend on them
153 and the reloaded target would be non-functional.
156 The layout of the formatted block device:
158 storing LUKS metadata or for other purpose), the size of the reserved
159 area is specified in the target arguments
161 * magic string - identifies that the device was formatted
165 * the number of journal sections
166 * provided data sectors - the number of sectors that this target
167 provides (i.e. the size of the device minus the size of all
169 bios that access data beyond the "provided data sectors" limit.
175 * logical sector (specifies where the data and tag should
178 * integrity tag (the size is specified in the superblock)
180 * mac (8-bytes), all the macs in 8 metadata sectors form a
182 numbers in the journal section, to protect against a
183 possibility that the attacker tampers with sector
184 numbers in the journal.
186 * data area (the size is variable; it depends on how many journal
187 entries fit into the metadata area)
188 every sector in the data area contains:
189 * data (504 bytes of data, the last 8 bytes are stored in
190 the journal entry)
192 To test if the whole journal section was written correctly, every
193 512-byte sector of the journal ends with 8-byte commit id. If the
195 assumed that the section was written correctly. If the commit id
196 doesn't match, the section was written partially and it should not
200 sector in the data area
203 in the superblock.