summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-01-16 19:02:36 -0800
committerMikulas Patocka <mpatocka@redhat.com>2026-01-21 17:55:28 +0100
commitd6d0e6b9d54532264761405a1ba8ea5bd293acb1 (patch)
treea2a0efccf9543ab016ffdb3cba13dca42f91b903 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
parent0f1e16b3a8634d540fb0c7a11ca13412d2902974 (diff)
dm: fix excessive blk-crypto operations for invalid keys
dm_exec_wrappedkey_op() passes through the derive_sw_secret, import_key, generate_key, and prepare_key blk-crypto operations to an underlying device. Currently, it calls the operation on every underlying device until one returns success. This logic is flawed when the operation is expected to fail, such as an invalid key being passed to derive_sw_secret. That can happen if userspace passes an invalid key to the FS_IOC_ADD_ENCRYPTION_KEY ioctl. When that happens on a device-mapper device that consists of many dm-linear targets, a lot of unnecessary key unwrapping requests get sent to the underlying key wrapping hardware. Fix this by considering the first device only. As already documented in the comment, it was already checked that all underlying devices support wrapped keys, so this should be fine. Fixes: e93912786e50 ("dm: pass through operations on wrapped inline crypto keys") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions