]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: make recv path in secure mode work the same as send path
authorIlya Dryomov <idryomov@gmail.com>
Sun, 23 Jan 2022 16:27:47 +0000 (17:27 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 2 Feb 2022 17:50:36 +0000 (18:50 +0100)
commit496adbed720d6491001256b8d5dd399f265b2fd5
tree6aa47e4bd917650d9c888a8dc77494d1bf45d5a1
parent59e766ff6f8c2d0f016dfe97ff01198e0de898dc
libceph: make recv path in secure mode work the same as send path

The recv path of secure mode is intertwined with that of crc mode.
While it's slightly more efficient that way (the ciphertext is read
into the destination buffer and decrypted in place, thus avoiding
two potentially heavy memory allocations for the bounce buffer and
the corresponding sg array), it isn't really amenable to changes.
Sacrifice that edge and align with the send path which always uses
a full-sized bounce buffer (currently there is no other way -- if
the kernel crypto API ever grows support for streaming (piecewise)
en/decryption for GCM [1], we would be able to easily take advantage
of that on both sides).

[1] https://lore.kernel.org/all/20141225202830.GA18794@gondor.apana.org.au/

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
include/linux/ceph/messenger.h
net/ceph/messenger_v2.c