<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/crypto/ccp/ccp-dev.h, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-08-19T06:15:05Z</updated>
<entry>
<title>crypto: ccp - Fix use of merged scatterlists</title>
<updated>2020-08-19T06:15:05Z</updated>
<author>
<name>John Allen</name>
</author>
<published>2020-06-22T20:24:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aabc11c145177650ec2cd7f6a496aa4c4a77a64f'/>
<id>urn:sha1:aabc11c145177650ec2cd7f6a496aa4c4a77a64f</id>
<content type='text'>
commit 8a302808c60d441d9884cb00ea7f2b534f2e3ca5 upstream.

Running the crypto manager self tests with
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS may result in several types of errors
when using the ccp-crypto driver:

alg: skcipher: cbc-des3-ccp encryption failed on test vector 0; expected_error=0, actual_error=-5 ...

alg: skcipher: ctr-aes-ccp decryption overran dst buffer on test vector 0 ...

alg: ahash: sha224-ccp test failed (wrong result) on test vector ...

These errors are the result of improper processing of scatterlists mapped
for DMA.

Given a scatterlist in which entries are merged as part of mapping the
scatterlist for DMA, the DMA length of a merged entry will reflect the
combined length of the entries that were merged. The subsequent
scatterlist entry will contain DMA information for the scatterlist entry
after the last merged entry, but the non-DMA information will be that of
the first merged entry.

The ccp driver does not take this scatterlist merging into account. To
address this, add a second scatterlist pointer to track the current
position in the DMA mapped representation of the scatterlist. Both the DMA
representation and the original representation of the scatterlist must be
tracked as while most of the driver can use just the DMA representation,
scatterlist_map_and_copy() must use the original representation and
expects the scatterlist pointer to be accurate to the original
representation.

In order to properly walk the original scatterlist, the scatterlist must
be walked until the combined lengths of the entries seen is equal to the
DMA length of the current entry being processed in the DMA mapped
representation.

Fixes: 63b945091a070 ("crypto: ccp - CCP device driver and interface support")
Signed-off-by: John Allen &lt;john.allen@amd.com&gt;
Cc: stable@vger.kernel.org
Acked-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>crypto: ccp - Validate the the error value used to index error messages</title>
<updated>2019-07-26T07:14:19Z</updated>
<author>
<name>Hook, Gary</name>
</author>
<published>2019-06-27T16:16:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=52f07c1ac70e2ed0f9f49baf7e55d501364f6019'/>
<id>urn:sha1:52f07c1ac70e2ed0f9f49baf7e55d501364f6019</id>
<content type='text'>
commit 52393d617af7b554f03531e6756facf2ea687d2e upstream.

The error code read from the queue status register is only 6 bits wide,
but we need to verify its value is within range before indexing the error
messages.

Fixes: 81422badb3907 ("crypto: ccp - Make syslog errors human-readable")
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Cfir Cohen &lt;cfir@google.com&gt;
Signed-off-by: Gary R Hook &lt;gary.hook@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>crypto: ccp - Fix XTS-AES-128 support on v5 CCPs</title>
<updated>2017-08-04T01:27:41Z</updated>
<author>
<name>Gary R Hook</name>
</author>
<published>2017-07-25T19:12:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e652399edba99a5497f0d80f240c9075d3b43493'/>
<id>urn:sha1:e652399edba99a5497f0d80f240c9075d3b43493</id>
<content type='text'>
Version 5 CCPs have some new requirements for XTS-AES: the type field
must be specified, and the key requires 512 bits, with each part
occupying 256 bits and padded with zeroes.

cc: &lt;stable@vger.kernel.org&gt; # 4.9.x+

Signed-off-by: Gary R Hook &lt;ghook@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>csrypto: ccp - Expand RSA support for a v5 ccp</title>
<updated>2017-07-28T09:58:06Z</updated>
<author>
<name>Gary R Hook</name>
</author>
<published>2017-07-17T20:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e28c190db66830c04b403b7eba7f8a5b53c22ffc'/>
<id>urn:sha1:e28c190db66830c04b403b7eba7f8a5b53c22ffc</id>
<content type='text'>
A version 5 CCP can handle an RSA modulus up to 16k bits.

Signed-off-by: Gary R Hook &lt;gary.hook@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - Update copyright dates for 2017.</title>
<updated>2017-07-28T09:58:01Z</updated>
<author>
<name>Gary R Hook</name>
</author>
<published>2017-07-17T20:00:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68cc652f83b9a4f79471db6c79ae0bfe5175eda3'/>
<id>urn:sha1:68cc652f83b9a4f79471db6c79ae0bfe5175eda3</id>
<content type='text'>
Some updates this year have not had copyright dates changed in modified
files. Correct this for 2017.

Signed-off-by: Gary R Hook &lt;gary.hook@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - rename ccp driver initialize files as sp device</title>
<updated>2017-07-18T10:15:54Z</updated>
<author>
<name>Brijesh Singh</name>
</author>
<published>2017-07-06T14:59:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d0ebbc0c407a10485a8672ef370dfe55c666d57f'/>
<id>urn:sha1:d0ebbc0c407a10485a8672ef370dfe55c666d57f</id>
<content type='text'>
CCP device initializes is now integerated into higher level SP device,
to avoid the confusion lets rename the ccp driver initialization files
(ccp-platform.c-&gt;sp-platform.c, ccp-pci.c-&gt;sp-pci.c). The patch does not
make any functional changes other than renaming file and structures

Signed-off-by: Brijesh Singh &lt;brijesh.singh@amd.com&gt;
Acked-by: Gary R Hook &lt;gary.hook@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - Abstract interrupt registeration</title>
<updated>2017-07-18T09:57:14Z</updated>
<author>
<name>Brijesh Singh</name>
</author>
<published>2017-07-06T14:59:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4d18d656f882a7ca558313d5f1b18b1fd01f759'/>
<id>urn:sha1:f4d18d656f882a7ca558313d5f1b18b1fd01f759</id>
<content type='text'>
The CCP and PSP devices part of AMD Secure Procesor may share the same
interrupt. Hence we expand the SP device to register a common interrupt
handler and provide functions to CCP and PSP devices to register their
interrupt callback which will be invoked upon interrupt.

Signed-off-by: Brijesh Singh &lt;brijesh.singh@amd.com&gt;
Acked-by: Gary R Hook &lt;gary.hook@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - Introduce the AMD Secure Processor device</title>
<updated>2017-07-18T09:51:19Z</updated>
<author>
<name>Brijesh Singh</name>
</author>
<published>2017-07-06T14:59:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=720419f01832f7e697cb80480b97b2a1e96045cd'/>
<id>urn:sha1:720419f01832f7e697cb80480b97b2a1e96045cd</id>
<content type='text'>
The CCP device is part of the AMD Secure Processor. In order to expand
the usage of the AMD Secure Processor, create a framework that allows
functional components of the AMD Secure Processor to be initialized and
handled appropriately.

Signed-off-by: Brijesh Singh &lt;brijesh.singh@amd.com&gt;
Acked-by: Gary R Hook &lt;gary.hook@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - Use devres interface to allocate PCI/iomap and cleanup</title>
<updated>2017-07-18T09:50:59Z</updated>
<author>
<name>Brijesh Singh</name>
</author>
<published>2017-07-06T14:59:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=970e8303cb8d6d8e77402345abbdd83862e800ac'/>
<id>urn:sha1:970e8303cb8d6d8e77402345abbdd83862e800ac</id>
<content type='text'>
Update pci and platform files to use devres interface to allocate the PCI
and iomap resources. Also add helper functions to consolicate module init,
exit and power mangagement code duplication.

Signed-off-by: Brijesh Singh &lt;brijesh.singh@amd.com&gt;
Acked-by: Gary R Hook &lt;gary.hook@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - Add debugfs entries for CCP information</title>
<updated>2017-06-19T06:11:47Z</updated>
<author>
<name>Gary R Hook</name>
</author>
<published>2017-05-02T22:33:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3cdbe346ed3f380eae1cb3e9febfe703e7d8a7b0'/>
<id>urn:sha1:3cdbe346ed3f380eae1cb3e9febfe703e7d8a7b0</id>
<content type='text'>
Expose some data about the configuration and operation of the CCP
through debugfs entries: device name, capabilities, configuration,
statistics.

Allow the user to reset the counters to zero by writing (any value)
to the 'stats' file. This can be done per queue or per device.

Changes from V1:
 - Correct polarity of test when destroying devices at module unload

Signed-off-by: Gary R Hook &lt;gary.hook@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
