<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/crypto/cavium/zip, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/crypto/cavium/zip?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/crypto/cavium/zip?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2019-09-09T13:48:41Z</updated>
<entry>
<title>crypto: cavium/zip - Add missing single_release()</title>
<updated>2019-09-09T13:48:41Z</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2019-09-04T14:18:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c552ffb5c93d9d65aaf34f5f001c4e7e8484ced1'/>
<id>urn:sha1:c552ffb5c93d9d65aaf34f5f001c4e7e8484ced1</id>
<content type='text'>
When using single_open() for opening, single_release() should be
used instead of seq_release(), otherwise there is a memory leak.

Fixes: 09ae5d37e093 ("crypto: zip - Add Compression/Decompression statistics")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: zip - Make some functions static</title>
<updated>2019-03-28T05:55:34Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-03-19T13:55:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8355003c502e6fa66b52c7a5b2cf8f53dfa484b5'/>
<id>urn:sha1:8355003c502e6fa66b52c7a5b2cf8f53dfa484b5</id>
<content type='text'>
Fix following sparse warnings:

drivers/crypto/cavium/zip/zip_crypto.c:72:5: warning: symbol 'zip_ctx_init' was not declared. Should it be static?
drivers/crypto/cavium/zip/zip_crypto.c:110:6: warning: symbol 'zip_ctx_exit' was not declared. Should it be static?
drivers/crypto/cavium/zip/zip_crypto.c:122:5: warning: symbol 'zip_compress' was not declared. Should it be static?
drivers/crypto/cavium/zip/zip_crypto.c:158:5: warning: symbol 'zip_decompress' was not declared. Should it be static?

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/zip - fix collision with generic cra_driver_name</title>
<updated>2019-02-28T06:37:35Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2019-02-23T08:23:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=41798036430015ad45137db2d4c213cd77fd0251'/>
<id>urn:sha1:41798036430015ad45137db2d4c213cd77fd0251</id>
<content type='text'>
The cavium/zip implementation of the deflate compression algorithm is
incorrectly being registered under the generic driver name, which
prevents the generic implementation from being registered with the
crypto API when CONFIG_CRYPTO_DEV_CAVIUM_ZIP=y.  Similarly the lzs
algorithm (which does not currently have a generic implementation...)
is incorrectly being registered as lzs-generic.

Fix the naming collision by adding a suffix "-cavium" to the
cra_driver_name of the cavium/zip algorithms.

Fixes: 640035a2dc55 ("crypto: zip - Add ThunderX ZIP driver core")
Cc: Mahipal Challa &lt;mahipalreddy2006@gmail.com&gt;
Cc: Jan Glauber &lt;jglauber@cavium.com&gt;
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/zip - no need to check return value of debugfs_create functions</title>
<updated>2019-02-01T06:42:03Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-01-22T15:14:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e30886b47c43046a310797b139f741c01600f39a'/>
<id>urn:sha1:e30886b47c43046a310797b139f741c01600f39a</id>
<content type='text'>
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Robert Richter &lt;rrichter@cavium.com&gt;
Cc: Jan Glauber &lt;jglauber@cavium.com&gt;
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Jan Glauber &lt;jglauber@cavium.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium - Remove unnecessary parentheses</title>
<updated>2018-04-28T08:09:38Z</updated>
<author>
<name>Varsha Rao</name>
<email>rvarsha016@gmail.com</email>
</author>
<published>2018-04-19T15:49:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=5b0aa2556ec9ea98f98e2a802818f75827896d25'/>
<id>urn:sha1:5b0aa2556ec9ea98f98e2a802818f75827896d25</id>
<content type='text'>
This patch fixes the clang warning of extraneous parentheses, with the
following coccinelle script.

@@
identifier i;
constant c;
expression e;
@@
(
!((e))
|
-((
\(i == c\|i != c\|i &lt;= c\|i &lt; c\|i &gt;= c\|i &gt; c\)
-))
)

Signed-off-by: Varsha Rao &lt;rvarsha016@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium - Fix smp_processor_id() warnings</title>
<updated>2018-04-20T16:58:36Z</updated>
<author>
<name>Jan Glauber</name>
<email>jglauber@cavium.com</email>
</author>
<published>2018-04-09T15:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e7a9b05ca4c707ff4b46a77963db48d085d383e0'/>
<id>urn:sha1:e7a9b05ca4c707ff4b46a77963db48d085d383e0</id>
<content type='text'>
Switch to raw_smp_processor_id() to prevent a number of
warnings from kernel debugging. We do not care about
preemption here, as the CPU number is only used as a
poor mans load balancing or device selection. If preemption
happens during a compress/decompress operation a small performance
hit will occur but everything will continue to work, so just
ignore it.

Signed-off-by: Jan Glauber &lt;jglauber@cavium.com&gt;
Reviewed-by: Robert Richter &lt;rrichter@cavium.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium - Fix statistics pending request value</title>
<updated>2018-04-20T16:58:35Z</updated>
<author>
<name>Jan Glauber</name>
<email>jglauber@cavium.com</email>
</author>
<published>2018-04-09T15:45:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=1cc7e01ff977770ce0651f4d347a84e360835c3b'/>
<id>urn:sha1:1cc7e01ff977770ce0651f4d347a84e360835c3b</id>
<content type='text'>
The pending request counter was read from the wrong register. While
at it, there is no need to use an atomic for it as it is only read
localy in a loop.

Signed-off-by: Jan Glauber &lt;jglauber@cavium.com&gt;
Reviewed-by: Robert Richter &lt;rrichter@cavium.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium - Prevent division by zero</title>
<updated>2018-04-20T16:58:35Z</updated>
<author>
<name>Jan Glauber</name>
<email>jglauber@cavium.com</email>
</author>
<published>2018-04-09T15:45:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=a40c88045506ecba8e3ae75da19e8a2c53e23a41'/>
<id>urn:sha1:a40c88045506ecba8e3ae75da19e8a2c53e23a41</id>
<content type='text'>
Avoid two potential divisions by zero when calculating average
values for the zip statistics.

Signed-off-by: Jan Glauber &lt;jglauber@cavium.com&gt;
Reviewed-by: Robert Richter &lt;rrichter@cavium.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium - Limit result reading attempts</title>
<updated>2018-04-20T16:58:35Z</updated>
<author>
<name>Jan Glauber</name>
<email>jglauber@cavium.com</email>
</author>
<published>2018-04-09T15:45:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c782a8c43e94ba6c09e9de2d69b5e3a5840ce61c'/>
<id>urn:sha1:c782a8c43e94ba6c09e9de2d69b5e3a5840ce61c</id>
<content type='text'>
After issuing a request an endless loop was used to read the
completion state from memory which is asynchronously updated
by the ZIP coprocessor.

Add an upper bound to the retry attempts to prevent a CPU getting stuck
forever in case of an error. Additionally, add a read memory barrier
and a small delay between the reading attempts.

Signed-off-by: Jan Glauber &lt;jglauber@cavium.com&gt;
Reviewed-by: Robert Richter &lt;rrichter@cavium.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt; # 4.14
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium - Fix fallout from CONFIG_VMAP_STACK</title>
<updated>2018-04-20T16:58:34Z</updated>
<author>
<name>Jan Glauber</name>
<email>jglauber@cavium.com</email>
</author>
<published>2018-04-09T15:45:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=37ff02acaa3d7be87ecb89f198a549ffd3ae2403'/>
<id>urn:sha1:37ff02acaa3d7be87ecb89f198a549ffd3ae2403</id>
<content type='text'>
Enabling virtual mapped kernel stacks breaks the thunderx_zip
driver. On compression or decompression the executing CPU hangs
in an endless loop. The reason for this is the usage of __pa
by the driver which does no longer work for an address that is
not part of the 1:1 mapping.

The zip driver allocates a result struct on the stack and needs
to tell the hardware the physical address within this struct
that is used to signal the completion of the request.

As the hardware gets the wrong address after the broken __pa
conversion it writes to an arbitrary address. The zip driver then
waits forever for the completion byte to contain a non-zero value.

Allocating the result struct from 1:1 mapped memory resolves this
bug.

Signed-off-by: Jan Glauber &lt;jglauber@cavium.com&gt;
Reviewed-by: Robert Richter &lt;rrichter@cavium.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt; # 4.14
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
