]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
s390/zcrypt: Fix wrong dispatching for control domain CPRBs
authorHarald Freudenberger <freude@linux.ibm.com>
Thu, 27 Jun 2019 20:13:00 +0000 (22:13 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 2 Jul 2019 12:18:49 +0000 (14:18 +0200)
commitc83450ad034f154ccbd38a0bf300fb1555bac196
tree7ee552a21c69aff10b3643e1b1538eba3e34e72e
parent241527c1d1f5f427f4c0a5d2a726e753329bb415
s390/zcrypt: Fix wrong dispatching for control domain CPRBs

BugLink: https://bugs.launchpad.net/bugs/1832624
The zcrypt device driver does not handle CPRBs which address
a control domain correctly. This fix introduces a workaround:
The domain field of the request CPRB is checked if there is
a valid domain value in there. If this is true and the value
is a control only domain (a domain which is enabled in the
crypto config ADM mask but disabled in the AQM mask) the
CPRB is forwarded to the default usage domain. If there is
no default domain, the request is rejected with an ENODEV.

This fix is important for maintaining crypto adapters. For
example one LPAR can use a crypto adapter domain ('Control
and Usage') but another LPAR needs to be able to maintain
this adapter domain ('Control'). Scenarios like this did
not work properly and the patch enables this.

OriginalAuthor: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
(backported from commit 7379e652797c0b9b5f6caea1576f2dff9ce6a708)
Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/s390/include/asm/ap.h
drivers/s390/crypto/ap_bus.c
drivers/s390/crypto/ap_bus.h
drivers/s390/crypto/zcrypt_api.c