Skip to content

Commit 098bf98

Browse files
author
CKI KWF Bot
committed
Merge: dm: sync with upstream v6.17
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1671 JIRA: https://issues.redhat.com/browse/RHEL-119008 JIRA: https://issues.redhat.com/browse/RHEL-12834 Tested: lvm2-testsuite and cryptsetup tests Upstream Status: kernel/git/torvalds/linux.git Pull in various dm changes from upstream. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Approved-by: Matthew Sakai <msakai@redhat.com> Approved-by: Mikuláš Patočka <mpatocka@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents d18ce5b + 00cc7f9 commit 098bf98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1027
-801
lines changed

Documentation/admin-guide/device-mapper/dm-crypt.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ integrity:<bytes>:<type>
146146
integrity for the encrypted device. The additional space is then
147147
used for storing authentication tag (and persistent IV if needed).
148148

149+
integrity_key_size:<bytes>
150+
Optionally set the integrity key size if it differs from the digest size.
151+
It allows the use of wrapped key algorithms where the key size is
152+
independent of the cryptographic key size.
153+
149154
sector_size:<bytes>
150155
Use <bytes> as the encryption unit instead of 512 bytes sectors.
151156
This option can be in range 512 - 4096 bytes and must be power of two.

Documentation/admin-guide/device-mapper/dm-integrity.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ Target arguments:
9292
allowed. This mode is useful for data recovery if the
9393
device cannot be activated in any of the other standard
9494
modes.
95+
I - inline mode - in this mode, dm-integrity will store integrity
96+
data directly in the underlying device sectors.
97+
The underlying device must have an integrity profile that
98+
allows storing user integrity data and provides enough
99+
space for the selected integrity tag.
95100

96101
5. the number of additional arguments
97102

Documentation/admin-guide/device-mapper/thin-provisioning.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ less sharing than average you'll need a larger-than-average metadata device.
8080

8181
As a guide, we suggest you calculate the number of bytes to use in the
8282
metadata device as 48 * $data_dev_size / $data_block_size but round it up
83-
to 2MB if the answer is smaller. If you're creating large numbers of
83+
to 2MiB if the answer is smaller. If you're creating large numbers of
8484
snapshots which are recording large amounts of change, you may find you
8585
need to increase this.
8686

87-
The largest size supported is 16GB: If the device is larger,
87+
The largest size supported is 16GiB: If the device is larger,
8888
a warning will be issued and the excess space will not be used.
8989

9090
Reloading a pool table
@@ -107,13 +107,13 @@ Using an existing pool device
107107

108108
$data_block_size gives the smallest unit of disk space that can be
109109
allocated at a time expressed in units of 512-byte sectors.
110-
$data_block_size must be between 128 (64KB) and 2097152 (1GB) and a
111-
multiple of 128 (64KB). $data_block_size cannot be changed after the
110+
$data_block_size must be between 128 (64KiB) and 2097152 (1GiB) and a
111+
multiple of 128 (64KiB). $data_block_size cannot be changed after the
112112
thin-pool is created. People primarily interested in thin provisioning
113-
may want to use a value such as 1024 (512KB). People doing lots of
114-
snapshotting may want a smaller value such as 128 (64KB). If you are
113+
may want to use a value such as 1024 (512KiB). People doing lots of
114+
snapshotting may want a smaller value such as 128 (64KiB). If you are
115115
not zeroing newly-allocated data, a larger $data_block_size in the
116-
region of 256000 (128MB) is suggested.
116+
region of 262144 (128MiB) is suggested.
117117

118118
$low_water_mark is expressed in blocks of size $data_block_size. If
119119
free space on the data device drops below this level then a dm event
@@ -291,7 +291,7 @@ i) Constructor
291291
error_if_no_space:
292292
Error IOs, instead of queueing, if no space.
293293

294-
Data block size must be between 64KB (128 sectors) and 1GB
294+
Data block size must be between 64KiB (128 sectors) and 1GiB
295295
(2097152 sectors) inclusive.
296296

297297

Documentation/admin-guide/device-mapper/verity.rst

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ panic_on_corruption
8787
Panic the device when a corrupted block is discovered. This option is
8888
not compatible with ignore_corruption and restart_on_corruption.
8989

90+
restart_on_error
91+
Restart the system when an I/O error is detected.
92+
This option can be combined with the restart_on_corruption option.
93+
94+
panic_on_error
95+
Panic the device when an I/O error is detected. This option is
96+
not compatible with the restart_on_error option but can be combined
97+
with the panic_on_corruption option.
98+
9099
ignore_zero_blocks
91100
Do not verify blocks that are expected to contain zeroes and always return
92101
zeroes instead. This may be useful if the partition contains unused blocks
@@ -142,8 +151,15 @@ root_hash_sig_key_desc <key_description>
142151
already in the secondary trusted keyring.
143152

144153
try_verify_in_tasklet
145-
If verity hashes are in cache, verify data blocks in kernel tasklet instead
146-
of workqueue. This option can reduce IO latency.
154+
If verity hashes are in cache and the IO size does not exceed the limit,
155+
verify data blocks in bottom half instead of workqueue. This option can
156+
reduce IO latency. The size limits can be configured via
157+
/sys/module/dm_verity/parameters/use_bh_bytes. The four parameters
158+
correspond to limits for IOPRIO_CLASS_NONE, IOPRIO_CLASS_RT,
159+
IOPRIO_CLASS_BE and IOPRIO_CLASS_IDLE in turn.
160+
For example:
161+
<none>,<rt>,<be>,<idle>
162+
4096,4096,4096,4096
147163

148164
Theory of operation
149165
===================

block/blk-crypto-profile.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ int blk_crypto_derive_sw_secret(struct block_device *bdev,
501501
blk_crypto_hw_exit(profile);
502502
return err;
503503
}
504+
EXPORT_SYMBOL_GPL(blk_crypto_derive_sw_secret);
504505

505506
int blk_crypto_import_key(struct blk_crypto_profile *profile,
506507
const u8 *raw_key, size_t raw_key_size,
@@ -520,6 +521,7 @@ int blk_crypto_import_key(struct blk_crypto_profile *profile,
520521
blk_crypto_hw_exit(profile);
521522
return ret;
522523
}
524+
EXPORT_SYMBOL_GPL(blk_crypto_import_key);
523525

524526
int blk_crypto_generate_key(struct blk_crypto_profile *profile,
525527
u8 lt_key[BLK_CRYPTO_MAX_HW_WRAPPED_KEY_SIZE])
@@ -537,6 +539,7 @@ int blk_crypto_generate_key(struct blk_crypto_profile *profile,
537539
blk_crypto_hw_exit(profile);
538540
return ret;
539541
}
542+
EXPORT_SYMBOL_GPL(blk_crypto_generate_key);
540543

541544
int blk_crypto_prepare_key(struct blk_crypto_profile *profile,
542545
const u8 *lt_key, size_t lt_key_size,
@@ -556,6 +559,7 @@ int blk_crypto_prepare_key(struct blk_crypto_profile *profile,
556559
blk_crypto_hw_exit(profile);
557560
return ret;
558561
}
562+
EXPORT_SYMBOL_GPL(blk_crypto_prepare_key);
559563

560564
/**
561565
* blk_crypto_intersect_capabilities() - restrict supported crypto capabilities

drivers/md/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ config DM_CRYPT
267267
depends on BLK_DEV_DM
268268
depends on (ENCRYPTED_KEYS || ENCRYPTED_KEYS=n)
269269
depends on (TRUSTED_KEYS || TRUSTED_KEYS=n)
270+
select CRC32
270271
select CRYPTO
271272
select CRYPTO_CBC
272273
select CRYPTO_ESSIV

0 commit comments

Comments
 (0)