]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: ccp - Fix handling of RSA exponent on a v5 device
authorGary R Hook <gary.hook@amd.com>
Tue, 1 Nov 2016 19:05:05 +0000 (14:05 -0500)
committerSomasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Thu, 24 Aug 2017 17:56:02 +0000 (10:56 -0700)
commit9a9945fc84cafef06471e82305d5ed5a1e7db804
tree6b6c1d1a61e5bbd542a79baa6e854bd6aedb837f
parent63ef9cf5ed488451d36865c89ea7af3b614a1219
crypto: ccp - Fix handling of RSA exponent on a v5 device

Orabug: 26644685

The exponent size in the ccp_op structure is in bits. A v5
CCP requires the exponent size to be in bytes, so convert
the size from bits to bytes when populating the descriptor.

The current code references the exponent in memory, but
these fields have not been set since the exponent is
actually store in the LSB. Populate the descriptor with
the LSB location (address).

Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit e6414b13ea39e3011901a84eb1bdefa65610b0f8)
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/crypto/ccp/ccp-dev-v5.c