<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/crypto/ccree, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/crypto/ccree?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/crypto/ccree?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-15T08:34:25Z</updated>
<entry>
<title>crypto: ccree - use fine grained DMA mapping dir</title>
<updated>2022-04-15T08:34:25Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
<email>gilad@benyossef.com</email>
</author>
<published>2022-04-06T08:11:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a260436c98171cd825955a84a7f6e62bc8f4f00d'/>
<id>urn:sha1:a260436c98171cd825955a84a7f6e62bc8f4f00d</id>
<content type='text'>
Use a fine grained specification of DMA mapping directions
in certain cases, allowing both a more optimized operation
as well as shushing out a harmless, though persky
dma-debug warning.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Reported-by: Corentin Labbe &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - rearrange init calls to avoid race</title>
<updated>2022-04-15T08:34:25Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
<email>gilad@benyossef.com</email>
</author>
<published>2022-04-06T08:11:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=476c9ab75976c3aea1f7f05e1ebbd1219a0f11bb'/>
<id>urn:sha1:476c9ab75976c3aea1f7f05e1ebbd1219a0f11bb</id>
<content type='text'>
Rearrange init calls to avoid the rare race condition of
the cipher algs being registered and used while we still
init the hash code which uses the HW without proper lock.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Reported-by: Dung Nguyen &lt;dung.nguyen.zy@renesas.com&gt;
Tested-by: Jing Dan &lt;jing.dan.nx@renesas.com&gt;
Tested-by: Dung Nguyen &lt;dung.nguyen.zy@renesas.com&gt;
Fixes: 63893811b0fc("crypto: ccree - add ahash support")
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - Fix use after free in cc_cipher_exit()</title>
<updated>2022-03-09T03:12:31Z</updated>
<author>
<name>Jianglei Nie</name>
<email>niejianglei2021@163.com</email>
</author>
<published>2022-03-03T02:23:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3d950c34074ed74d2713c3856ba01264523289e6'/>
<id>urn:sha1:3d950c34074ed74d2713c3856ba01264523289e6</id>
<content type='text'>
kfree_sensitive(ctx_p-&gt;user.key) will free the ctx_p-&gt;user.key. But
ctx_p-&gt;user.key is still used in the next line, which will lead to a
use after free.

We can call kfree_sensitive() after dev_dbg() to avoid the uaf.

Fixes: 63ee04c8b491 ("crypto: ccree - add skcipher support")
Signed-off-by: Jianglei Nie &lt;niejianglei2021@163.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - don't attempt 0 len DMA mappings</title>
<updated>2022-02-23T03:28:32Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
<email>gilad@benyossef.com</email>
</author>
<published>2022-02-17T19:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1fb37b5692c915edcc2448a6b37255738c7c77e0'/>
<id>urn:sha1:1fb37b5692c915edcc2448a6b37255738c7c77e0</id>
<content type='text'>
Refuse to try mapping zero bytes as this may cause a fault
on some configurations / platforms and it seems the prev.
attempt is not enough and we need to be more explicit.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Reported-by: Corentin Labbe &lt;clabbe.montjoie@gmail.com&gt;
Fixes: ce0fc6db38de ("crypto: ccree - protect against empty or NULL
scatterlists")
Tested-by: Corentin Labbe &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - remove redundant 'flush_workqueue()' calls</title>
<updated>2021-11-20T04:06:38Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-11-12T16:49:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=882ed23e103f2cc8222eb3d280ddf1af167fa9ea'/>
<id>urn:sha1:882ed23e103f2cc8222eb3d280ddf1af167fa9ea</id>
<content type='text'>
'destroy_workqueue()' already drains the queue before destroying it, so
there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

This was generated with coccinelle:

@@
expression E;
@@
- 	flush_workqueue(E);
	destroy_workqueue(E);

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Acked-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - avoid out-of-range warnings from clang</title>
<updated>2021-10-08T12:02:37Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2021-09-27T12:18:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cfd6fb45cfaf46fa9547421d8da387dc9c7997d4'/>
<id>urn:sha1:cfd6fb45cfaf46fa9547421d8da387dc9c7997d4</id>
<content type='text'>
clang points out inconsistencies in the FIELD_PREP() invocation in
this driver that result from the 'mask' being a 32-bit value:

drivers/crypto/ccree/cc_driver.c:117:18: error: result of comparison of constant 18446744073709551615 with expression of type 'u32' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
        cache_params |= FIELD_PREP(mask, val);
                        ^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:94:3: note: expanded from macro 'FIELD_PREP'
                __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:52:28: note: expanded from macro '__BF_FIELD_CHECK'
                BUILD_BUG_ON_MSG((_mask) &gt; (typeof(_reg))~0ull,         \
                ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This does not happen in other places that just pass a constant here.

Work around the warnings by widening the type of the temporary variable.

Fixes: 05c2a705917b ("crypto: ccree - rework cache parameters handling")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Gilad ben-Yossef &lt;gilad@benyossef.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - Remove redundant dev_err call in init_cc_resources()</title>
<updated>2021-04-16T11:16:32Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2021-04-07T14:18:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e0e638f7e09c10ca0d1e67837125d0dfc6284974'/>
<id>urn:sha1:e0e638f7e09c10ca0d1e67837125d0dfc6284974</id>
<content type='text'>
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

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: ccree - fix spelling typo of allocated</title>
<updated>2021-02-05T03:31:35Z</updated>
<author>
<name>dingsenjie</name>
<email>dingsenjie@yulong.com</email>
</author>
<published>2021-01-26T03:45:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b2cd1d812b955c4a06bb411d3363abf5e9009f9c'/>
<id>urn:sha1:b2cd1d812b955c4a06bb411d3363abf5e9009f9c</id>
<content type='text'>
allocted -&gt; allocated

Signed-off-by: dingsenjie &lt;dingsenjie@yulong.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - remove unused including &lt;linux/version.h&gt;</title>
<updated>2021-01-02T21:41:35Z</updated>
<author>
<name>Tian Tao</name>
<email>tiantao6@hisilicon.com</email>
</author>
<published>2020-12-11T01:42:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bbfd06c7c85ec6dfae4a77b27495db8b8bcdfc8c'/>
<id>urn:sha1:bbfd06c7c85ec6dfae4a77b27495db8b8bcdfc8c</id>
<content type='text'>
Remove including &lt;linux/version.h&gt; that don't need it.

Signed-off-by: Tian Tao &lt;tiantao6@hisilicon.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - rework cache parameters handling</title>
<updated>2020-11-27T06:13:49Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
<email>gilad@benyossef.com</email>
</author>
<published>2020-11-22T07:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=05c2a705917b77e0915cca3551583583f4eafcf8'/>
<id>urn:sha1:05c2a705917b77e0915cca3551583583f4eafcf8</id>
<content type='text'>
Rework the setting of DMA cache parameters, program more appropriate
values and explicitly set sharability domain.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
