]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
s390/zcrypt: change reply buffer size offering
authorHarald Freudenberger <freude@linux.ibm.com>
Tue, 23 Nov 2021 15:02:47 +0000 (16:02 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Tue, 22 Mar 2022 14:49:41 +0000 (15:49 +0100)
commit04ca70781d74d37dccccca1baa90730e93b058bf
tree914dc62275805e9d2ab5caf6db735d9a0b0ca5ee
parent1267bf90c88f24369553ac205487ca415de3618b
s390/zcrypt: change reply buffer size offering

BugLink: https://bugs.launchpad.net/bugs/1959547
Instead of offering the user space given receive buffer size to
the crypto card firmware as limit for the reply message offer
the internal per queue reply buffer size. As the queue's reply
buffer is always adjusted to the max message size possible for
this card this may offer more buffer space. However, now it is
important to check the user space reply buffer on pushing back
the reply. If the reply does not fit into the user space provided
buffer the ioctl will fail with errno EMSGSIZE.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Jürgen Christ <jchrist@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
(cherry picked from commit 252a1ff777639ad13978a614f2cde1f0c43a7c2f linux-next)
Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
drivers/s390/crypto/zcrypt_msgtype6.c