]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/pkey: Simplify protected key length calculation code
authorHarald Freudenberger <freude@linux.ibm.com>
Fri, 25 Oct 2024 10:34:28 +0000 (12:34 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 29 Oct 2024 10:17:17 +0000 (11:17 +0100)
commitbbecb519004c928629f2fd150b929b54f9740bf6
tree8b1fdb0ef2420ac954f06cb1cb28240e0c5776ee
parent55e055ba7faf4f190d76272749735724eac211f4
s390/pkey: Simplify protected key length calculation code

The calculation of the length of a protected key based on
the protected key type is scattered over certain places within
the pkey code. By introducing a new inline function
pkey_keytype_to_size() this can be centralized and the calling
code can be reduced and simplified.

With this also comes a slight rework of the generation of
protected keys. Now the pkey_pckmo module is able to generate
all but ECC keys.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/crypto/pkey_base.h
drivers/s390/crypto/pkey_pckmo.c