<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/crypto/ccp/ccp-dev.h, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-08-21T09:02:05Z</updated>
<entry>
<title>crypto: ccp - Fix use of merged scatterlists</title>
<updated>2020-08-21T09:02: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=476c4a59e9f13fa1c5294eaabcc7912531ea2e6f'/>
<id>urn:sha1:476c4a59e9f13fa1c5294eaabcc7912531ea2e6f</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-08-04T07:33:30Z</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=029cc4f0f075de930e9a4ee13e73c4d37b1fecd9'/>
<id>urn:sha1:029cc4f0f075de930e9a4ee13e73c4d37b1fecd9</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 - Set the AES size field for all modes</title>
<updated>2017-11-08T09:08:33Z</updated>
<author>
<name>Gary R Hook</name>
</author>
<published>2017-10-07T22:36:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58b9a54ae03d9fecaaaea83a08098b2aeae41201'/>
<id>urn:sha1:58b9a54ae03d9fecaaaea83a08098b2aeae41201</id>
<content type='text'>
[ Upstream commit f7cc02b3c3a33a10dd5bb9e5dfd22e47e09503a2 ]

Ensure that the size field is correctly populated for
all AES modes.

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: Sasha Levin &lt;alexander.levin@verizon.com&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-09-27T12:39:20Z</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=dcb3a4b8d7768cab59546aa2ce5dd214f7b526fe'/>
<id>urn:sha1:dcb3a4b8d7768cab59546aa2ce5dd214f7b526fe</id>
<content type='text'>
commit e652399edba99a5497f0d80f240c9075d3b43493 upstream.

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.

Signed-off-by: Gary R Hook &lt;ghook@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 - Change ISR handler method for a v3 CCP</title>
<updated>2017-05-20T12:28:37Z</updated>
<author>
<name>Gary R Hook</name>
</author>
<published>2017-04-21T15:50:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0a232489c0fd8f41016f221cfca6644a34b7b9a'/>
<id>urn:sha1:a0a232489c0fd8f41016f221cfca6644a34b7b9a</id>
<content type='text'>
commit 7b537b24e76a1e8e6d7ea91483a45d5b1426809b upstream.

The CCP has the ability to perform several operations simultaneously,
but only one interrupt.  When implemented as a PCI device and using
MSI-X/MSI interrupts, use a tasklet model to service interrupts. By
disabling and enabling interrupts from the CCP, coupled with the
queuing that tasklets provide, we can ensure that all events
(occurring on the device) are recognized and serviced.

This change fixes a problem wherein 2 or more busy queues can cause
notification bits to change state while a (CCP) interrupt is being
serviced, but after the queue state has been evaluated. This results
in the event being 'lost' and the queue hanging, waiting to be
serviced. Since the status bits are never fully de-asserted, the
CCP never generates another interrupt (all bits zero -&gt; one or more
bits one), and no further CCP operations will be executed.

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 - Use only the relevant interrupt bits</title>
<updated>2017-05-20T12:28:37Z</updated>
<author>
<name>Gary R Hook</name>
</author>
<published>2017-04-20T20:24:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=36dffff240d937d626bea9196c027df076fbff34'/>
<id>urn:sha1:36dffff240d937d626bea9196c027df076fbff34</id>
<content type='text'>
commit 56467cb11cf8ae4db9003f54b3d3425b5f07a10a upstream.

Each CCP queue can product interrupts for 4 conditions:
operation complete, queue empty, error, and queue stopped.
This driver only works with completion and error events.

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 double add when creating new DMA command</title>
<updated>2017-02-14T23:25:33Z</updated>
<author>
<name>Gary R Hook</name>
</author>
<published>2017-01-27T23:09:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f77e7b119ff18d4732b6e08b3d10c4e324de9442'/>
<id>urn:sha1:f77e7b119ff18d4732b6e08b3d10c4e324de9442</id>
<content type='text'>
commit e5da5c5667381d2772374ee6a2967b3576c9483d upstream.

Eliminate a double-add by creating a new list to manage
command descriptors when created; move the descriptor to
the pending list when the command is submitted.

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 - Make syslog errors human-readable</title>
<updated>2016-10-02T14:33:45Z</updated>
<author>
<name>Gary R Hook</name>
</author>
<published>2016-09-28T16:53:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81422badb39078fde1ffcecda3caac555226fc7b'/>
<id>urn:sha1:81422badb39078fde1ffcecda3caac555226fc7b</id>
<content type='text'>
Add human-readable strings to log messages about CCP errors

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 - clean up data structure</title>
<updated>2016-10-02T14:33:44Z</updated>
<author>
<name>Gary R Hook</name>
</author>
<published>2016-09-28T16:53:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ddb9dc6be095ebe393f7eb582df09cc4847c5e9'/>
<id>urn:sha1:9ddb9dc6be095ebe393f7eb582df09cc4847c5e9</id>
<content type='text'>
Change names of data structure instances.  Add const
keyword where appropriate.  Add error handling path.

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 - Enable use of the additional CCP</title>
<updated>2016-08-09T10:47:18Z</updated>
<author>
<name>Gary R Hook</name>
</author>
<published>2016-07-27T00:10:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e14e7d126765ce0156ab5e3b250b1270998c207d'/>
<id>urn:sha1:e14e7d126765ce0156ab5e3b250b1270998c207d</id>
<content type='text'>
A second CCP is available, identical to the first, with
its ownn PCI ID. Make it available for use by the crypto
subsystem, as well as for DMA activity and random
number generation.

This device is not pre-configured at at boot time. The
driver must configure it (during the probe) for use.

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>
