<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/crypto/axis, branch v5.4.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-08-09T05:11:58Z</updated>
<entry>
<title>crypto: artpec6 - use devm_platform_ioremap_resource() to simplify code</title>
<updated>2019-08-09T05:11:58Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-08-02T13:27:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0866ba23b7efcc6837d6b4231bf91b79647b81ea'/>
<id>urn:sha1:0866ba23b7efcc6837d6b4231bf91b79647b81ea</id>
<content type='text'>
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
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>treewide: Add SPDX license identifier - Makefile/Kconfig</title>
<updated>2019-05-21T08:50:46Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-19T12:07:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1'/>
<id>urn:sha1:ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1</id>
<content type='text'>
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Add SPDX license identifier for more missed files</title>
<updated>2019-05-21T08:50:45Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-19T12:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=09c434b8a0047c69e48499de0107de312901e798'/>
<id>urn:sha1:09c434b8a0047c69e48499de0107de312901e798</id>
<content type='text'>
Add SPDX license identifiers to all files which:

 - Have no license information of any form

 - Have MODULE_LICENCE("GPL*") inside which was used in the initial
   scan/conversion to ignore the file

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>crypto: shash - remove shash_desc::flags</title>
<updated>2019-04-25T07:38:12Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2019-04-15T00:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=877b5691f27a1aec0d9b53095a323e45c30069e2'/>
<id>urn:sha1:877b5691f27a1aec0d9b53095a323e45c30069e2</id>
<content type='text'>
The flags field in 'struct shash_desc' never actually does anything.
The only ostensibly supported flag is CRYPTO_TFM_REQ_MAY_SLEEP.
However, no shash algorithm ever sleeps, making this flag a no-op.

With this being the case, inevitably some users who can't sleep wrongly
pass MAY_SLEEP.  These would all need to be fixed if any shash algorithm
actually started sleeping.  For example, the shash_ahash_*() functions,
which wrap a shash algorithm with the ahash API, pass through MAY_SLEEP
from the ahash API to the shash API.  However, the shash functions are
called under kmap_atomic(), so actually they're assumed to never sleep.

Even if it turns out that some users do need preemption points while
hashing large buffers, we could easily provide a helper function
crypto_shash_update_large() which divides the data into smaller chunks
and calls crypto_shash_update() and cond_resched() for each chunk.  It's
not necessary to have a flag in 'struct shash_desc', nor is it necessary
to make individual shash algorithms aware of this at all.

Therefore, remove shash_desc::flags, and document that the
crypto_shash_*() functions can be called from any context.

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: axis - move request unmap outside of the queue lock</title>
<updated>2019-02-01T06:42:04Z</updated>
<author>
<name>Vincent Whitchurch</name>
<email>rabinv@axis.com</email>
</author>
<published>2019-01-23T11:59:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=341a64c7e69f54e319ac187721b342f7620af6d6'/>
<id>urn:sha1:341a64c7e69f54e319ac187721b342f7620af6d6</id>
<content type='text'>
The request unmap and bounce buffer copying is currently unnecessarily
done while holding the queue spin lock.

Signed-off-by: Lars Persson &lt;larper@axis.com&gt;
Signed-off-by: Vincent Whitchurch &lt;rabinv@axis.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: axis - use a constant time tag compare</title>
<updated>2019-02-01T06:42:04Z</updated>
<author>
<name>Lars Persson</name>
<email>lars.persson@axis.com</email>
</author>
<published>2019-01-23T11:59:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5997a245c77b754fb8ef807043066fcfde64858c'/>
<id>urn:sha1:5997a245c77b754fb8ef807043066fcfde64858c</id>
<content type='text'>
Avoid plain memcmp() on the AEAD tag value as this could leak
information through a timing side channel.

Signed-off-by: Lars Persson &lt;larper@axis.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: axis - support variable AEAD tag length</title>
<updated>2019-02-01T06:42:04Z</updated>
<author>
<name>Lars Persson</name>
<email>lars.persson@axis.com</email>
</author>
<published>2019-01-23T11:59:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=48ef0908b81cc6b92ec8b157bb78ce2c4eddd7c7'/>
<id>urn:sha1:48ef0908b81cc6b92ec8b157bb78ce2c4eddd7c7</id>
<content type='text'>
The implementation assumed that the client always wants the whole 16
byte AES-GCM tag. Now we respect the requested authentication tag size
fetched using crypto_aead_authsize().

Signed-off-by: Lars Persson &lt;larper@axis.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: axis - give DMA the start of the status buffer</title>
<updated>2019-02-01T06:42:04Z</updated>
<author>
<name>Lars Persson</name>
<email>lars.persson@axis.com</email>
</author>
<published>2019-01-23T11:59:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0d1d482416002791a705e7acef55edcd989facd2'/>
<id>urn:sha1:0d1d482416002791a705e7acef55edcd989facd2</id>
<content type='text'>
The driver was optimized to only do cache maintenance for the last
word of the dma descriptor status array. Unfortunately an omission
also passed the last word as the address of the array start to the DMA
engine. In most cases this goes unnoticed since the hardware aligns
the address to a 64 byte boundary.

Signed-off-by: Lars Persson &lt;larper@axis.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: axis - fix for recursive locking from bottom half</title>
<updated>2019-02-01T06:42:04Z</updated>
<author>
<name>Lars Persson</name>
<email>lars.persson@axis.com</email>
</author>
<published>2019-01-23T11:59:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c34a83820f59bb275e5f2d55cd5ea99c64f6ef23'/>
<id>urn:sha1:c34a83820f59bb275e5f2d55cd5ea99c64f6ef23</id>
<content type='text'>
Clients may submit a new requests from the completion callback
context. The driver was not prepared to receive a request in this
state because it already held the request queue lock and a recursive
lock error is triggered.

Now all completions are queued up until we are ready to drop the queue
lock and then delivered.

The fault was triggered by TCP over an IPsec connection in the LTP
test suite:
  LTP: starting tcp4_ipsec02 (tcp_ipsec.sh -p ah -m transport -s "100 1000 65535")
  BUG: spinlock recursion on CPU#1, genload/943
   lock: 0xbf3c3094, .magic: dead4ead, .owner: genload/943, .owner_cpu: 1
  CPU: 1 PID: 943 Comm: genload Tainted: G           O    4.9.62-axis5-devel #6
  Hardware name: Axis ARTPEC-6 Platform
   (unwind_backtrace) from [&lt;8010d134&gt;] (show_stack+0x18/0x1c)
   (show_stack) from [&lt;803a289c&gt;] (dump_stack+0x84/0x98)
   (dump_stack) from [&lt;8016e164&gt;] (do_raw_spin_lock+0x124/0x128)
   (do_raw_spin_lock) from [&lt;804de1a4&gt;] (artpec6_crypto_submit+0x2c/0xa0)
   (artpec6_crypto_submit) from [&lt;804def38&gt;] (artpec6_crypto_prepare_submit_hash+0xd0/0x54c)
   (artpec6_crypto_prepare_submit_hash) from [&lt;7f3165f0&gt;] (ah_output+0x2a4/0x3dc [ah4])
   (ah_output [ah4]) from [&lt;805df9bc&gt;] (xfrm_output_resume+0x178/0x4a4)
   (xfrm_output_resume) from [&lt;805d283c&gt;] (xfrm4_output+0xac/0xbc)
   (xfrm4_output) from [&lt;80587928&gt;] (ip_queue_xmit+0x140/0x3b4)
   (ip_queue_xmit) from [&lt;805a13b4&gt;] (tcp_transmit_skb+0x4c4/0x95c)
   (tcp_transmit_skb) from [&lt;8059f218&gt;] (tcp_rcv_state_process+0xdf4/0xdfc)
   (tcp_rcv_state_process) from [&lt;805a7530&gt;] (tcp_v4_do_rcv+0x64/0x1ac)
   (tcp_v4_do_rcv) from [&lt;805a9724&gt;] (tcp_v4_rcv+0xa34/0xb74)
   (tcp_v4_rcv) from [&lt;80581d34&gt;] (ip_local_deliver_finish+0x78/0x2b0)
   (ip_local_deliver_finish) from [&lt;8058259c&gt;] (ip_local_deliver+0xe4/0x104)
   (ip_local_deliver) from [&lt;805d23ec&gt;] (xfrm4_transport_finish+0xf4/0x144)
   (xfrm4_transport_finish) from [&lt;805df564&gt;] (xfrm_input+0x4f4/0x74c)
   (xfrm_input) from [&lt;804de420&gt;] (artpec6_crypto_task+0x208/0x38c)
   (artpec6_crypto_task) from [&lt;801271b0&gt;] (tasklet_action+0x60/0xec)
   (tasklet_action) from [&lt;801266d4&gt;] (__do_softirq+0xcc/0x3a4)
   (__do_softirq) from [&lt;80126d20&gt;] (irq_exit+0xf4/0x15c)
   (irq_exit) from [&lt;801741e8&gt;] (__handle_domain_irq+0x68/0xbc)
   (__handle_domain_irq) from [&lt;801014f0&gt;] (gic_handle_irq+0x50/0x94)
   (gic_handle_irq) from [&lt;80657370&gt;] (__irq_usr+0x50/0x80)

Signed-off-by: Lars Persson &lt;larper@axis.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: axis - remove sha512 support for artpec7</title>
<updated>2019-02-01T06:42:04Z</updated>
<author>
<name>Lars Persson</name>
<email>lars.persson@axis.com</email>
</author>
<published>2019-01-23T11:59:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f68deebabe2190d343624964860c48a8056f7e2a'/>
<id>urn:sha1:f68deebabe2190d343624964860c48a8056f7e2a</id>
<content type='text'>
The hardware cannot restore the context correctly when it operates in
SHA512 mode. This is too restrictive when operating in a framework that
can interleave multiple hash sessions.

Signed-off-by: Lars Persson &lt;larper@axis.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
