<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/crypto/omap-aes.c, branch v6.3-rc3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>crypto: omap-aes - Drop if with an always false condition</title>
<updated>2022-07-15T08:43:21+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2022-07-05T20:51:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=da1e716864aeeaeef0a32a7cdddfb8c6ebd8c1f9'/>
<id>da1e716864aeeaeef0a32a7cdddfb8c6ebd8c1f9</id>
<content type='text'>
The remove callback is only called after probe completed successfully.
In this case platform_set_drvdata() was called with a non-NULL argument
and so dd is never NULL.

This is a preparation for making platform remove callbacks return void.

While touching this driver remove a stray empty line.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The remove callback is only called after probe completed successfully.
In this case platform_set_drvdata() was called with a non-NULL argument
and so dd is never NULL.

This is a preparation for making platform remove callbacks return void.

While touching this driver remove a stray empty line.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-aes - Constify static attribute_group</title>
<updated>2022-02-18T05:21:09+00:00</updated>
<author>
<name>Rikard Falkeborn</name>
<email>rikard.falkeborn@gmail.com</email>
</author>
<published>2022-02-10T20:28:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=882f6c602b65cd384bec2cea4fbfc091a7bbfc50'/>
<id>882f6c602b65cd384bec2cea4fbfc091a7bbfc50</id>
<content type='text'>
The only usage of omap_aes_attr_group is to pass its address to
sysfs_{create,remove}_group(), which takes pointers to const struct
attribute_group. Make it const to allow the compiler to put it in
read-only memory.

Signed-off-by: Rikard Falkeborn &lt;rikard.falkeborn@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only usage of omap_aes_attr_group is to pass its address to
sysfs_{create,remove}_group(), which takes pointers to const struct
attribute_group. Make it const to allow the compiler to put it in
read-only memory.

Signed-off-by: Rikard Falkeborn &lt;rikard.falkeborn@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-aes - Fix broken pm_runtime_and_get() usage</title>
<updated>2021-12-24T03:18:28+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2021-12-17T09:03:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c2aec59be093bd44627bc4f6bc67e4614a93a7b6'/>
<id>c2aec59be093bd44627bc4f6bc67e4614a93a7b6</id>
<content type='text'>
This fix is basically the same as 3d6b661330a7 ("crypto: stm32 -
Revert broken pm_runtime_resume_and_get changes"), just for the omap
driver. If the return value isn't used, then pm_runtime_get_sync()
has to be used for ensuring that the usage count is balanced.

Fixes: 1f34cc4a8da3 ("crypto: omap-aes - Fix PM reference leak on omap-aes.c")
Cc: stable@vger.kernel.org
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fix is basically the same as 3d6b661330a7 ("crypto: stm32 -
Revert broken pm_runtime_resume_and_get changes"), just for the omap
driver. If the return value isn't used, then pm_runtime_get_sync()
has to be used for ensuring that the usage count is balanced.

Fixes: 1f34cc4a8da3 ("crypto: omap-aes - Fix PM reference leak on omap-aes.c")
Cc: stable@vger.kernel.org
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap - Fix inconsistent locking of device lists</title>
<updated>2021-08-21T07:44:53+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben.hutchings@mind.be</email>
</author>
<published>2021-08-11T00:06:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fe4d55773b879c785ae61da9b1c2160f0110f67e'/>
<id>fe4d55773b879c785ae61da9b1c2160f0110f67e</id>
<content type='text'>
lockdep complains that in omap-aes, the list_lock is taken both with
softirqs enabled at probe time, and also in softirq context, which
could lead to a deadlock:

    ================================
    WARNING: inconsistent lock state
    5.14.0-rc1-00035-gc836005b01c5-dirty #69 Not tainted
    --------------------------------
    inconsistent {SOFTIRQ-ON-W} -&gt; {IN-SOFTIRQ-W} usage.
    ksoftirqd/0/7 [HC0[0]:SC1[3]:HE1:SE0] takes:
    bf00e014 (list_lock){+.?.}-{2:2}, at: omap_aes_find_dev+0x18/0x54 [omap_aes_driver]
    {SOFTIRQ-ON-W} state was registered at:
      _raw_spin_lock+0x40/0x50
      omap_aes_probe+0x1d4/0x664 [omap_aes_driver]
      platform_probe+0x58/0xb8
      really_probe+0xbc/0x314
      __driver_probe_device+0x80/0xe4
      driver_probe_device+0x30/0xc8
      __driver_attach+0x70/0xf4
      bus_for_each_dev+0x70/0xb4
      bus_add_driver+0xf0/0x1d4
      driver_register+0x74/0x108
      do_one_initcall+0x84/0x2e4
      do_init_module+0x5c/0x240
      load_module+0x221c/0x2584
      sys_finit_module+0xb0/0xec
      ret_fast_syscall+0x0/0x2c
      0xbed90b30
    irq event stamp: 111800
    hardirqs last  enabled at (111800): [&lt;c02a21e4&gt;] __kmalloc+0x484/0x5ec
    hardirqs last disabled at (111799): [&lt;c02a21f0&gt;] __kmalloc+0x490/0x5ec
    softirqs last  enabled at (111776): [&lt;c01015f0&gt;] __do_softirq+0x2b8/0x4d0
    softirqs last disabled at (111781): [&lt;c0135948&gt;] run_ksoftirqd+0x34/0x50

    other info that might help us debug this:
     Possible unsafe locking scenario:

           CPU0
           ----
      lock(list_lock);
      &lt;Interrupt&gt;
        lock(list_lock);

     *** DEADLOCK ***

    2 locks held by ksoftirqd/0/7:
     #0: c0f5e8c8 (rcu_read_lock){....}-{1:2}, at: netif_receive_skb+0x6c/0x260
     #1: c0f5e8c8 (rcu_read_lock){....}-{1:2}, at: ip_local_deliver_finish+0x2c/0xdc

    stack backtrace:
    CPU: 0 PID: 7 Comm: ksoftirqd/0 Not tainted 5.14.0-rc1-00035-gc836005b01c5-dirty #69
    Hardware name: Generic AM43 (Flattened Device Tree)
    [&lt;c010e6e0&gt;] (unwind_backtrace) from [&lt;c010b9d0&gt;] (show_stack+0x10/0x14)
    [&lt;c010b9d0&gt;] (show_stack) from [&lt;c017c640&gt;] (mark_lock.part.17+0x5bc/0xd04)
    [&lt;c017c640&gt;] (mark_lock.part.17) from [&lt;c017d9e4&gt;] (__lock_acquire+0x960/0x2fa4)
    [&lt;c017d9e4&gt;] (__lock_acquire) from [&lt;c0180980&gt;] (lock_acquire+0x10c/0x358)
    [&lt;c0180980&gt;] (lock_acquire) from [&lt;c093d324&gt;] (_raw_spin_lock_bh+0x44/0x58)
    [&lt;c093d324&gt;] (_raw_spin_lock_bh) from [&lt;bf00b258&gt;] (omap_aes_find_dev+0x18/0x54 [omap_aes_driver])
    [&lt;bf00b258&gt;] (omap_aes_find_dev [omap_aes_driver]) from [&lt;bf00b328&gt;] (omap_aes_crypt+0x94/0xd4 [omap_aes_driver])
    [&lt;bf00b328&gt;] (omap_aes_crypt [omap_aes_driver]) from [&lt;c08ac6d0&gt;] (esp_input+0x1b0/0x2c8)
    [&lt;c08ac6d0&gt;] (esp_input) from [&lt;c08c9e90&gt;] (xfrm_input+0x410/0x1290)
    [&lt;c08c9e90&gt;] (xfrm_input) from [&lt;c08b6374&gt;] (xfrm4_esp_rcv+0x54/0x11c)
    [&lt;c08b6374&gt;] (xfrm4_esp_rcv) from [&lt;c0838840&gt;] (ip_protocol_deliver_rcu+0x48/0x3bc)
    [&lt;c0838840&gt;] (ip_protocol_deliver_rcu) from [&lt;c0838c50&gt;] (ip_local_deliver_finish+0x9c/0xdc)
    [&lt;c0838c50&gt;] (ip_local_deliver_finish) from [&lt;c0838dd8&gt;] (ip_local_deliver+0x148/0x1b0)
    [&lt;c0838dd8&gt;] (ip_local_deliver) from [&lt;c0838f5c&gt;] (ip_rcv+0x11c/0x180)
    [&lt;c0838f5c&gt;] (ip_rcv) from [&lt;c077e3a4&gt;] (__netif_receive_skb_one_core+0x54/0x74)
    [&lt;c077e3a4&gt;] (__netif_receive_skb_one_core) from [&lt;c077e588&gt;] (netif_receive_skb+0xa8/0x260)
    [&lt;c077e588&gt;] (netif_receive_skb) from [&lt;c068d6d4&gt;] (cpsw_rx_handler+0x224/0x2fc)
    [&lt;c068d6d4&gt;] (cpsw_rx_handler) from [&lt;c0688ccc&gt;] (__cpdma_chan_process+0xf4/0x188)
    [&lt;c0688ccc&gt;] (__cpdma_chan_process) from [&lt;c068a0c0&gt;] (cpdma_chan_process+0x3c/0x5c)
    [&lt;c068a0c0&gt;] (cpdma_chan_process) from [&lt;c0690e14&gt;] (cpsw_rx_mq_poll+0x44/0x98)
    [&lt;c0690e14&gt;] (cpsw_rx_mq_poll) from [&lt;c0780810&gt;] (__napi_poll+0x28/0x268)
    [&lt;c0780810&gt;] (__napi_poll) from [&lt;c0780c64&gt;] (net_rx_action+0xcc/0x204)
    [&lt;c0780c64&gt;] (net_rx_action) from [&lt;c0101478&gt;] (__do_softirq+0x140/0x4d0)
    [&lt;c0101478&gt;] (__do_softirq) from [&lt;c0135948&gt;] (run_ksoftirqd+0x34/0x50)
    [&lt;c0135948&gt;] (run_ksoftirqd) from [&lt;c01583b8&gt;] (smpboot_thread_fn+0xf4/0x1d8)
    [&lt;c01583b8&gt;] (smpboot_thread_fn) from [&lt;c01546dc&gt;] (kthread+0x14c/0x174)
    [&lt;c01546dc&gt;] (kthread) from [&lt;c010013c&gt;] (ret_from_fork+0x14/0x38)
    ...

The omap-des and omap-sham drivers appear to have a similar issue.

Fix this by using spin_{,un}lock_bh() around device list access in all
the probe and remove functions.

Signed-off-by: Ben Hutchings &lt;ben.hutchings@mind.be&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lockdep complains that in omap-aes, the list_lock is taken both with
softirqs enabled at probe time, and also in softirq context, which
could lead to a deadlock:

    ================================
    WARNING: inconsistent lock state
    5.14.0-rc1-00035-gc836005b01c5-dirty #69 Not tainted
    --------------------------------
    inconsistent {SOFTIRQ-ON-W} -&gt; {IN-SOFTIRQ-W} usage.
    ksoftirqd/0/7 [HC0[0]:SC1[3]:HE1:SE0] takes:
    bf00e014 (list_lock){+.?.}-{2:2}, at: omap_aes_find_dev+0x18/0x54 [omap_aes_driver]
    {SOFTIRQ-ON-W} state was registered at:
      _raw_spin_lock+0x40/0x50
      omap_aes_probe+0x1d4/0x664 [omap_aes_driver]
      platform_probe+0x58/0xb8
      really_probe+0xbc/0x314
      __driver_probe_device+0x80/0xe4
      driver_probe_device+0x30/0xc8
      __driver_attach+0x70/0xf4
      bus_for_each_dev+0x70/0xb4
      bus_add_driver+0xf0/0x1d4
      driver_register+0x74/0x108
      do_one_initcall+0x84/0x2e4
      do_init_module+0x5c/0x240
      load_module+0x221c/0x2584
      sys_finit_module+0xb0/0xec
      ret_fast_syscall+0x0/0x2c
      0xbed90b30
    irq event stamp: 111800
    hardirqs last  enabled at (111800): [&lt;c02a21e4&gt;] __kmalloc+0x484/0x5ec
    hardirqs last disabled at (111799): [&lt;c02a21f0&gt;] __kmalloc+0x490/0x5ec
    softirqs last  enabled at (111776): [&lt;c01015f0&gt;] __do_softirq+0x2b8/0x4d0
    softirqs last disabled at (111781): [&lt;c0135948&gt;] run_ksoftirqd+0x34/0x50

    other info that might help us debug this:
     Possible unsafe locking scenario:

           CPU0
           ----
      lock(list_lock);
      &lt;Interrupt&gt;
        lock(list_lock);

     *** DEADLOCK ***

    2 locks held by ksoftirqd/0/7:
     #0: c0f5e8c8 (rcu_read_lock){....}-{1:2}, at: netif_receive_skb+0x6c/0x260
     #1: c0f5e8c8 (rcu_read_lock){....}-{1:2}, at: ip_local_deliver_finish+0x2c/0xdc

    stack backtrace:
    CPU: 0 PID: 7 Comm: ksoftirqd/0 Not tainted 5.14.0-rc1-00035-gc836005b01c5-dirty #69
    Hardware name: Generic AM43 (Flattened Device Tree)
    [&lt;c010e6e0&gt;] (unwind_backtrace) from [&lt;c010b9d0&gt;] (show_stack+0x10/0x14)
    [&lt;c010b9d0&gt;] (show_stack) from [&lt;c017c640&gt;] (mark_lock.part.17+0x5bc/0xd04)
    [&lt;c017c640&gt;] (mark_lock.part.17) from [&lt;c017d9e4&gt;] (__lock_acquire+0x960/0x2fa4)
    [&lt;c017d9e4&gt;] (__lock_acquire) from [&lt;c0180980&gt;] (lock_acquire+0x10c/0x358)
    [&lt;c0180980&gt;] (lock_acquire) from [&lt;c093d324&gt;] (_raw_spin_lock_bh+0x44/0x58)
    [&lt;c093d324&gt;] (_raw_spin_lock_bh) from [&lt;bf00b258&gt;] (omap_aes_find_dev+0x18/0x54 [omap_aes_driver])
    [&lt;bf00b258&gt;] (omap_aes_find_dev [omap_aes_driver]) from [&lt;bf00b328&gt;] (omap_aes_crypt+0x94/0xd4 [omap_aes_driver])
    [&lt;bf00b328&gt;] (omap_aes_crypt [omap_aes_driver]) from [&lt;c08ac6d0&gt;] (esp_input+0x1b0/0x2c8)
    [&lt;c08ac6d0&gt;] (esp_input) from [&lt;c08c9e90&gt;] (xfrm_input+0x410/0x1290)
    [&lt;c08c9e90&gt;] (xfrm_input) from [&lt;c08b6374&gt;] (xfrm4_esp_rcv+0x54/0x11c)
    [&lt;c08b6374&gt;] (xfrm4_esp_rcv) from [&lt;c0838840&gt;] (ip_protocol_deliver_rcu+0x48/0x3bc)
    [&lt;c0838840&gt;] (ip_protocol_deliver_rcu) from [&lt;c0838c50&gt;] (ip_local_deliver_finish+0x9c/0xdc)
    [&lt;c0838c50&gt;] (ip_local_deliver_finish) from [&lt;c0838dd8&gt;] (ip_local_deliver+0x148/0x1b0)
    [&lt;c0838dd8&gt;] (ip_local_deliver) from [&lt;c0838f5c&gt;] (ip_rcv+0x11c/0x180)
    [&lt;c0838f5c&gt;] (ip_rcv) from [&lt;c077e3a4&gt;] (__netif_receive_skb_one_core+0x54/0x74)
    [&lt;c077e3a4&gt;] (__netif_receive_skb_one_core) from [&lt;c077e588&gt;] (netif_receive_skb+0xa8/0x260)
    [&lt;c077e588&gt;] (netif_receive_skb) from [&lt;c068d6d4&gt;] (cpsw_rx_handler+0x224/0x2fc)
    [&lt;c068d6d4&gt;] (cpsw_rx_handler) from [&lt;c0688ccc&gt;] (__cpdma_chan_process+0xf4/0x188)
    [&lt;c0688ccc&gt;] (__cpdma_chan_process) from [&lt;c068a0c0&gt;] (cpdma_chan_process+0x3c/0x5c)
    [&lt;c068a0c0&gt;] (cpdma_chan_process) from [&lt;c0690e14&gt;] (cpsw_rx_mq_poll+0x44/0x98)
    [&lt;c0690e14&gt;] (cpsw_rx_mq_poll) from [&lt;c0780810&gt;] (__napi_poll+0x28/0x268)
    [&lt;c0780810&gt;] (__napi_poll) from [&lt;c0780c64&gt;] (net_rx_action+0xcc/0x204)
    [&lt;c0780c64&gt;] (net_rx_action) from [&lt;c0101478&gt;] (__do_softirq+0x140/0x4d0)
    [&lt;c0101478&gt;] (__do_softirq) from [&lt;c0135948&gt;] (run_ksoftirqd+0x34/0x50)
    [&lt;c0135948&gt;] (run_ksoftirqd) from [&lt;c01583b8&gt;] (smpboot_thread_fn+0xf4/0x1d8)
    [&lt;c01583b8&gt;] (smpboot_thread_fn) from [&lt;c01546dc&gt;] (kthread+0x14c/0x174)
    [&lt;c01546dc&gt;] (kthread) from [&lt;c010013c&gt;] (ret_from_fork+0x14/0x38)
    ...

The omap-des and omap-sham drivers appear to have a similar issue.

Fix this by using spin_{,un}lock_bh() around device list access in all
the probe and remove functions.

Signed-off-by: Ben Hutchings &lt;ben.hutchings@mind.be&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-aes - Fix PM reference leak on omap-aes.c</title>
<updated>2021-04-16T11:16:33+00:00</updated>
<author>
<name>Shixin Liu</name>
<email>liushixin2@huawei.com</email>
</author>
<published>2021-04-08T07:18:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1f34cc4a8da34fbb250efb928f9b8c6fe7ee0642'/>
<id>1f34cc4a8da34fbb250efb928f9b8c6fe7ee0642</id>
<content type='text'>
pm_runtime_get_sync will increment pm usage counter even it failed.
Forgetting to putting operation will result in reference leak here.
Fix it by replacing it with pm_runtime_resume_and_get to keep usage
counter balanced.

Signed-off-by: Shixin Liu &lt;liushixin2@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pm_runtime_get_sync will increment pm usage counter even it failed.
Forgetting to putting operation will result in reference leak here.
Fix it by replacing it with pm_runtime_resume_and_get to keep usage
counter balanced.

Signed-off-by: Shixin Liu &lt;liushixin2@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe</title>
<updated>2020-11-20T03:45:34+00:00</updated>
<author>
<name>Zhang Qilong</name>
<email>zhangqilong3@huawei.com</email>
</author>
<published>2020-11-13T13:17:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ff8107200367f4abe0e5bce66a245e8d0f2d229e'/>
<id>ff8107200367f4abe0e5bce66a245e8d0f2d229e</id>
<content type='text'>
The pm_runtime_enable will increase power disable depth.
Thus a pairing decrement is needed on the error handling
path to keep it balanced according to context.

Fixes: f7b2b5dd6a62a ("crypto: omap-aes - add error check for pm_runtime_get_sync")
Signed-off-by: Zhang Qilong &lt;zhangqilong3@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The pm_runtime_enable will increase power disable depth.
Thus a pairing decrement is needed on the error handling
path to keep it balanced according to context.

Fixes: f7b2b5dd6a62a ("crypto: omap-aes - add error check for pm_runtime_get_sync")
Signed-off-by: Zhang Qilong &lt;zhangqilong3@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-aes - fix the reference count leak of omap device</title>
<updated>2020-10-30T06:35:02+00:00</updated>
<author>
<name>Zhang Qilong</name>
<email>zhangqilong3@huawei.com</email>
</author>
<published>2020-10-16T09:05:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=383e8a823014532ffd81c787ef9009f1c2bd3b79'/>
<id>383e8a823014532ffd81c787ef9009f1c2bd3b79</id>
<content type='text'>
pm_runtime_get_sync() will increment  pm usage counter even
when it returns an error code. We should call put operation
in error handling paths of omap_aes_hw_init.

Signed-off-by: Zhang Qilong &lt;zhangqilong3@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pm_runtime_get_sync() will increment  pm usage counter even
when it returns an error code. We should call put operation
in error handling paths of omap_aes_hw_init.

Signed-off-by: Zhang Qilong &lt;zhangqilong3@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-aes - Fix sparse and compiler warnings</title>
<updated>2020-07-23T07:34:19+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2020-07-16T08:06:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ac855b3c1069dc7c6c1442e743600408ec474c36'/>
<id>ac855b3c1069dc7c6c1442e743600408ec474c36</id>
<content type='text'>
This patch fixes all the sparse and W=1 compiler warnings in the
driver.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes all the sparse and W=1 compiler warnings in the
driver.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-aes - permit asynchronous skcipher as fallback</title>
<updated>2020-07-16T11:49:02+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2020-07-07T06:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6a99d7a2d73cbeaa0b93551fc8ec887295821bbe'/>
<id>6a99d7a2d73cbeaa0b93551fc8ec887295821bbe</id>
<content type='text'>
Even though the omap-aes driver implements asynchronous versions of
ecb(aes), cbc(aes) and ctr(aes), the fallbacks it allocates are required
to be synchronous. Given that SIMD based software implementations are
usually asynchronous as well, even though they rarely complete
asynchronously (this typically only happens in cases where the request was
made from softirq context, while SIMD was already in use in the task
context that it interrupted), these implementations are disregarded, and
either the generic C version or another table based version implemented in
assembler is selected instead.

Since falling back to synchronous AES is not only a performance issue, but
potentially a security issue as well (due to the fact that table based AES
is not time invariant), let's fix this, by allocating an ordinary skcipher
as the fallback, and invoke it with the completion routine that was given
to the outer request.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Even though the omap-aes driver implements asynchronous versions of
ecb(aes), cbc(aes) and ctr(aes), the fallbacks it allocates are required
to be synchronous. Given that SIMD based software implementations are
usually asynchronous as well, even though they rarely complete
asynchronously (this typically only happens in cases where the request was
made from softirq context, while SIMD was already in use in the task
context that it interrupted), these implementations are disregarded, and
either the generic C version or another table based version implemented in
assembler is selected instead.

Since falling back to synchronous AES is not only a performance issue, but
potentially a security issue as well (due to the fact that table based AES
is not time invariant), let's fix this, by allocating an ordinary skcipher
as the fallback, and invoke it with the completion routine that was given
to the outer request.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-aes - prevent unregistering algorithms twice</title>
<updated>2020-06-04T12:03:42+00:00</updated>
<author>
<name>Tero Kristo</name>
<email>t-kristo@ti.com</email>
</author>
<published>2020-05-27T12:24:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9ef4e6e5e31403860081b995f26dc0d4b26356c2'/>
<id>9ef4e6e5e31403860081b995f26dc0d4b26356c2</id>
<content type='text'>
Most of the OMAP family SoCs contain two instances for AES core, which
causes the remove callbacks to be also done twice when driver is
removed. Fix the algorithm unregister callbacks to take into account the
number of algorithms still registered to avoid removing these twice.

Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most of the OMAP family SoCs contain two instances for AES core, which
causes the remove callbacks to be also done twice when driver is
removed. Fix the algorithm unregister callbacks to take into account the
number of algorithms still registered to avoid removing these twice.

Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
</feed>
