]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/pkey_pckmo: Return with success for valid protected key types
authorHolger Dengler <dengler@linux.ibm.com>
Fri, 11 Oct 2024 08:48:00 +0000 (10:48 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 16 Oct 2024 09:32:32 +0000 (11:32 +0200)
The key_to_protkey handler function in module pkey_pckmo should return
with success on all known protected key types, including the new types
introduced by fd197556eef5 ("s390/pkey: Add AES xts and HMAC clear key
token support").

Fixes: fd197556eef5 ("s390/pkey: Add AES xts and HMAC clear key token support")
Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/crypto/pkey_pckmo.c

index 98079b1ed6db81722ccab1e741f8d17fc9f3c858..beeca8827c4649c93bbfcbf5e889846607df9d91 100644 (file)
@@ -324,6 +324,7 @@ static int pckmo_key2protkey(const u8 *key, u32 keylen,
                memcpy(protkey, t->protkey, t->len);
                *protkeylen = t->len;
                *protkeytype = t->keytype;
+               rc = 0;
                break;
        }
        case TOKVER_CLEAR_KEY: {