• Harald Freudenberger's avatar
    s390/pkey: do not use struct pkey_protkey · f370f45c
    Harald Freudenberger authored
    This is an internal rework of the pkey code to not use the
    struct pkey_protkey internal any more. This struct has a hard
    coded protected key buffer with MAXPROTKEYSIZE = 64 bytes.
    However, with support for ECC protected key, this limit is
    too short and thus this patch reworks all the internal code
    to use the triple u8 *protkey, u32 protkeylen, u32 protkeytype
    instead. So the ioctl which still has to deal with this struct
    coming from userspace and/or provided to userspace invoke all
    the internal functions now with the triple instead of passing
    a pointer to struct pkey_protkey.
    
    Also the struct pkey_clrkey has been internally replaced in
    a similar way. This struct also has a hard coded clear key
    buffer of MAXCLRKEYSIZE = 32 bytes and thus is not usable with
    e.g. ECC clear key material.
    
    This is a transparent rework for userspace applications using
    the pkey API. The internal kernel API used by the PAES crypto
    ciphers has been adapted to this change to make it possible
    to provide ECC protected keys via this interface in the future.
    Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
    Reviewed-by: default avatarHolger Dengler <dengler@linux.ibm.com>
    Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
    f370f45c
pkey.h 756 Bytes