<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/crypto/ccree/cc_hash.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/crypto/ccree/cc_hash.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/crypto/ccree/cc_hash.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-03-12T12:00:16Z</updated>
<entry>
<title>crypto: ccree - remove ancient TODO remarks</title>
<updated>2020-03-12T12:00:16Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
<email>gilad@benyossef.com</email>
</author>
<published>2020-03-08T15:57:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6429ccdd4f2d873db73ca60342669e160b0a7226'/>
<id>urn:sha1:6429ccdd4f2d873db73ca60342669e160b0a7226</id>
<content type='text'>
Remove left over ancient and now misleading TODO remarks.

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>
<entry>
<title>crypto: ccree - use devm_kzalloc() for hash data</title>
<updated>2020-02-22T01:25:46Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2020-02-11T18:19:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=91fc6c7b3328c6f72a37e7bc319eb8419f109be3'/>
<id>urn:sha1:91fc6c7b3328c6f72a37e7bc319eb8419f109be3</id>
<content type='text'>
As the lifetime of the hash data matches the lifetime of the driver,
hash data can be allocated using the managed allocators.
While at it, simplify cc_hash_free() by removing an unneeded check
(hash_handle is always valid here).

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - use devm_k[mz]alloc() for AEAD data</title>
<updated>2020-02-22T01:25:46Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2020-02-11T18:19:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=ff4d719a5bc7e27eac7002ea6eaea05fa2deb87a'/>
<id>urn:sha1:ff4d719a5bc7e27eac7002ea6eaea05fa2deb87a</id>
<content type='text'>
As the lifetime of the AEAD data matches the lifetime of the driver,
AEAD data can be allocated using the managed allocators.
While at it, simplify cc_aead_free() by removing an unneeded cast, and
an unneeded check (aead_handle is always valid here).

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - improve kerneldoc in cc_hash.[ch]</title>
<updated>2020-02-22T01:25:45Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2020-02-11T18:19:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=dc16c9f764721019df7a8a9becdab4a48b95cbc3'/>
<id>urn:sha1:dc16c9f764721019df7a8a9becdab4a48b95cbc3</id>
<content type='text'>
Miscellaneous improvements:
  - Start comment blocks with "/**" to enable kerneldoc,
  - Mark parameters using "@" instead of "\param",
  - Add missing function names to kerneldoc headers,
  - Add missing parameter descriptions.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - extract cc_init_copy_sram()</title>
<updated>2020-02-22T01:25:45Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2020-02-11T18:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=08884316bb15e53a71116a8c4f75b6331de38373'/>
<id>urn:sha1:08884316bb15e53a71116a8c4f75b6331de38373</id>
<content type='text'>
Extract the copy to SRAM of the initial values for a hash algorithm into
its own function, to improve readability and ease maintenance.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - use u32 for SRAM addresses</title>
<updated>2020-02-22T01:25:44Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2020-02-11T18:19:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=1a895f1d5bceee0c6b66dcfdabcc9804006ca229'/>
<id>urn:sha1:1a895f1d5bceee0c6b66dcfdabcc9804006ca229</id>
<content type='text'>
SRAM addresses are small integer offsets into local SRAM.  Currently
they are stored using a mixture of cc_sram_addr_t (u64), u32, and
dma_addr_t types.

Settle on u32, and remove the cc_sram_addr_t typedefs.
This allows to drop several casts.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - defer larval_digest_addr init until needed</title>
<updated>2020-02-22T01:25:44Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2020-02-11T18:19:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e431cc04381708660b321f6c5a5500ea577a903e'/>
<id>urn:sha1:e431cc04381708660b321f6c5a5500ea577a903e</id>
<content type='text'>
While the larval digest addresses are not always used in
cc_get_plain_hmac_key() and cc_hash_digest(), they are always
calculated.

Defer their calculations to the points where needed.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - drop duplicated error message on SRAM exhaustion</title>
<updated>2020-02-22T01:25:43Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2020-02-11T18:19:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=08e8cb119f5ab434c398d865b16f9d7bdb76b0b0'/>
<id>urn:sha1:08e8cb119f5ab434c398d865b16f9d7bdb76b0b0</id>
<content type='text'>
When no SRAM can be allocated, cc_sram_alloc() already prints an error
message.  Hence there is no need to duplicate this in all callers.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - swap SHA384 and SHA512 larval hashes at build time</title>
<updated>2020-02-22T01:25:43Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2020-02-11T18:18:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f08b58501c74d6ec0828b55a0d4e0b2e840c2b9e'/>
<id>urn:sha1:f08b58501c74d6ec0828b55a0d4e0b2e840c2b9e</id>
<content type='text'>
Due to the way the hardware works, every double word in the SHA384 and
SHA512 larval hashes must be swapped.  Currently this is done at run
time, during driver initialization.

However, this swapping can easily be done at build time.  Treating each
double word as two words has the benefit of changing the larval hashes'
types from u64[] to u32[], like for all other hashes, and allows
dropping the casts and size doublings when calling cc_set_sram_desc().

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - remove unneeded casts</title>
<updated>2020-02-22T01:25:43Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2020-02-11T18:18:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f4274eeca476305a78f140e2e74bd07bd379a5da'/>
<id>urn:sha1:f4274eeca476305a78f140e2e74bd07bd379a5da</id>
<content type='text'>
Unneeded casts prevent the compiler from performing valuable checks.
This is especially true for function pointers.

Remove these casts, to prevent silently introducing bugs when a
variable's type might be changed in the future.

No change in generated code.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
