<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/crypto/atmel-sha.c, branch linux-5.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-09-04T03:37:04Z</updated>
<entry>
<title>crypto: atmel - switch to SPDX license identifiers</title>
<updated>2018-09-04T03:37:04Z</updated>
<author>
<name>Tudor Ambarus</name>
</author>
<published>2018-08-21T13:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=820684cc269f8295f13c890491dcbe07fdc647af'/>
<id>urn:sha1:820684cc269f8295f13c890491dcbe07fdc647af</id>
<content type='text'>
Adopt the SPDX license identifiers to ease license compliance
management.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: remove redundant type flags from tfm allocation</title>
<updated>2018-07-08T16:30:29Z</updated>
<author>
<name>Eric Biggers</name>
</author>
<published>2018-06-30T22:16:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=85d7311f1908b9ca20c10c2c23f5dbb93875f0c6'/>
<id>urn:sha1:85d7311f1908b9ca20c10c2c23f5dbb93875f0c6</id>
<content type='text'>
Some crypto API users allocating a tfm with crypto_alloc_$FOO() are also
specifying the type flags for $FOO, e.g. crypto_alloc_shash() with
CRYPTO_ALG_TYPE_SHASH.  But, that's redundant since the crypto API will
override any specified type flag/mask with the correct ones.

So, remove the unneeded flags.

This patch shouldn't change any actual behavior.

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: atmel - Delete error messages for a failed memory allocation in six functions</title>
<updated>2018-02-22T14:17:00Z</updated>
<author>
<name>Markus Elfring</name>
</author>
<published>2018-02-15T10:38:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0268483992a23a9185e41b060cca71bfd7582788'/>
<id>urn:sha1:0268483992a23a9185e41b060cca71bfd7582788</id>
<content type='text'>
Omit extra messages for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Reviewed-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: atmel - remove useless irq init</title>
<updated>2017-11-03T14:11:24Z</updated>
<author>
<name>Tudor-Dan Ambarus</name>
</author>
<published>2017-10-23T15:34:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d472e42aafd6ab13a5981defb696874cc6bc26b3'/>
<id>urn:sha1:d472e42aafd6ab13a5981defb696874cc6bc26b3</id>
<content type='text'>
irq would be set to -1 and then unused, if we failed to get IORESOURCE_MEM.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: atmel - return appropriate error code</title>
<updated>2017-11-03T14:11:23Z</updated>
<author>
<name>Tudor-Dan Ambarus</name>
</author>
<published>2017-10-23T15:34:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c88761e8a7bee9252c6ed1e2552eb0cfefa521d'/>
<id>urn:sha1:3c88761e8a7bee9252c6ed1e2552eb0cfefa521d</id>
<content type='text'>
Return -ENODEV when dma_request_slave_channel_compat() fails.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: atmel-sha - remove unnecessary static in atmel_sha_remove()</title>
<updated>2017-08-03T05:47:16Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2017-07-18T23:04:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=22d96f04bb7498549ae7c130f03d7ea327744c5a'/>
<id>urn:sha1:22d96f04bb7498549ae7c130f03d7ea327744c5a</id>
<content type='text'>
Remove unnecessary static on local variable sha_dd. Such variable
is initialized before being used, on every execution path throughout
the function. The static has no benefit and, removing it reduces the
object file size.

This issue was detected using Coccinelle and the following semantic patch:
https://github.com/GustavoARSilva/coccinelle/blob/master/static/static_unused.cocci

In the following log you can see a significant difference in the object
file size. This log is the output of the size command, before and after
the code change:

before:
   text    data     bss     dec     hex filename
  30005   10264     128   40397    9dcd drivers/crypto/atmel-sha.o

after:
   text    data     bss     dec     hex filename
  29934   10208      64   40206    9d0e drivers/crypto/atmel-sha.o

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: atmel - only treat EBUSY as transient if backlog</title>
<updated>2017-07-12T10:38:06Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2017-06-28T07:22:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1606043f214f912a52195293614935811a6e3e53'/>
<id>urn:sha1:1606043f214f912a52195293614935811a6e3e53</id>
<content type='text'>
The Atmel SHA driver was treating -EBUSY as indication of queueing
to backlog without checking that backlog is enabled for the request.

Fix it by checking request flags.

Cc: &lt;stable@vger.kernel.org&gt;
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: atmel-sha - fix error management in atmel_sha_start()</title>
<updated>2017-02-15T05:23:33Z</updated>
<author>
<name>Cyrille Pitchen</name>
</author>
<published>2017-02-09T16:51:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19998acb0ff67cb8843668f3b94bdbe6018fa7d8'/>
<id>urn:sha1:19998acb0ff67cb8843668f3b94bdbe6018fa7d8</id>
<content type='text'>
This patch clarifies and fixes how errors should be handled by
atmel_sha_start().

For update operations, the previous code wrongly assumed that
(err != -EINPROGRESS) implies (err == 0). It's wrong because that doesn't
take the error cases (err &lt; 0) into account.

This patch also adds many comments to detail all the possible returned
values and what should be done in each case.

Especially, when an error occurs, since atmel_sha_complete() has already
been called, hence releasing the hardware, atmel_sha_start() must not call
atmel_sha_finish_req() later otherwise atmel_sha_complete() would be
called a second time.

Signed-off-by: Cyrille Pitchen &lt;cyrille.pitchen@atmel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: atmel-sha - fix missing "return" instructions</title>
<updated>2017-02-15T05:23:32Z</updated>
<author>
<name>Cyrille Pitchen</name>
</author>
<published>2017-02-09T16:51:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd3f9f40b58168f91f27ab686c7bae1f35edd3d4'/>
<id>urn:sha1:dd3f9f40b58168f91f27ab686c7bae1f35edd3d4</id>
<content type='text'>
This patch fixes a previous patch: "crypto: atmel-sha - update request
queue management to make it more generic".

Indeed the patch above should have replaced the "return -EINVAL;" lines by
"return atmel_sha_complete(dd, -EINVAL);" but instead replaced them by a
simple call of "atmel_sha_complete(dd, -EINVAL);".
Hence all "return" instructions were missing.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Cyrille Pitchen &lt;cyrille.pitchen@atmel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: atmel - fix 64-bit build warnings</title>
<updated>2017-02-11T09:52:29Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2017-02-06T12:32:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c147bcff52b582cd278f39261302a4659da3fef'/>
<id>urn:sha1:4c147bcff52b582cd278f39261302a4659da3fef</id>
<content type='text'>
When we enable COMPILE_TEST building for the Atmel sha and tdes implementations,
we run into a couple of warnings about incorrect format strings, e.g.

In file included from include/linux/platform_device.h:14:0,
                 from drivers/crypto/atmel-sha.c:24:
drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_cpu':
drivers/crypto/atmel-sha.c:571:19: error: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Werror=format=]
In file included from include/linux/printk.h:6:0,
                 from include/linux/kernel.h:13,
                 from drivers/crypto/atmel-tdes.c:17:
drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_dma_stop':
include/linux/kern_levels.h:4:18: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Werror=format=]

These are all fixed by using the "%z" modifier for size_t data.

There are also a few uses of min()/max() with incompatible types:

drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_start':
drivers/crypto/atmel-tdes.c:528:181: error: comparison of distinct pointer types lacks a cast [-Werror]

Where possible, we should use consistent types here, otherwise we can use
min_t()/max_t() to get well-defined behavior without a warning.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
