<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/crypto/cavium/nitrox, branch v6.12.91</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.91</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.91'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-12-08T03:59:46+00:00</updated>
<entry>
<title>crypto: nitrox - Remove cfb</title>
<updated>2023-12-08T03:59:46+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2023-11-30T10:06:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f5a019f5b094fc4cedda413571ece59931932a02'/>
<id>urn:sha1:f5a019f5b094fc4cedda413571ece59931932a02</id>
<content type='text'>
    
Remove the unused CFB implementation.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/nitrox - refactor deprecated strncpy</title>
<updated>2023-09-20T05:15:29+00:00</updated>
<author>
<name>Justin Stitt</name>
<email>justinstitt@google.com</email>
</author>
<published>2023-09-13T00:32:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0da05a040d563d4dc5058449be37814bb5177024'/>
<id>urn:sha1:0da05a040d563d4dc5058449be37814bb5177024</id>
<content type='text'>
`strncpy` is deprecated for use on NUL-terminated destination strings [1].

We know `hw.partname` is supposed to be NUL-terminated by its later use with seq_printf:
| nitrox_debugfs.c +25
|      seq_printf(s, "  Part Name: %s\n", ndev-&gt;hw.partname);

Let's prefer a more robust and less ambiguous string interface.

A suitable replacement is `strscpy` [2] due to the fact that it guarantees
NUL-termination on the destination buffer.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/nitrox - remove unnecessary aer.h include</title>
<updated>2023-03-17T03:16:43+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2023-03-07T16:19:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f87706e5c6e556090195b72161d518c8b1924e94'/>
<id>urn:sha1:f87706e5c6e556090195b72161d518c8b1924e94</id>
<content type='text'>
&lt;linux/aer.h&gt; is unused, so remove it.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: nitrox - Use request_complete helpers</title>
<updated>2023-02-13T10:34:49+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2023-01-31T08:02:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea2fbe3b1a317498d2c66d6b97bc281db1a18b45'/>
<id>urn:sha1:ea2fbe3b1a317498d2c66d6b97bc281db1a18b45</id>
<content type='text'>
Use the request_complete helpers instead of calling the completion
function directly.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: xts - drop xts_check_key()</title>
<updated>2023-01-06T09:15:47+00:00</updated>
<author>
<name>Vladis Dronov</name>
<email>vdronov@redhat.com</email>
</author>
<published>2022-12-29T21:17:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0ee433676e4f499cb65f3d375a60a0ac54af4c47'/>
<id>urn:sha1:0ee433676e4f499cb65f3d375a60a0ac54af4c47</id>
<content type='text'>
xts_check_key() is obsoleted by xts_verify_key(). Over time XTS crypto
drivers adopted the newer xts_verify_key() variant, but xts_check_key()
is still used by a number of drivers. Switch drivers to use the newer
xts_verify_key() and make a couple of cleanups. This allows us to drop
xts_check_key() completely and avoid redundancy.

Signed-off-by: Vladis Dronov &lt;vdronov@redhat.com&gt;
Reviewed-by: Eric Biggers &lt;ebiggers@google.com&gt;
Reviewed-by: Nicolai Stange &lt;nstange@suse.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium - Set DMA alignment explicitly</title>
<updated>2022-12-09T10:45:00+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2022-12-02T09:20:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1c64a7e1f931821acadf964c5ddb0dc41abf9e20'/>
<id>urn:sha1:1c64a7e1f931821acadf964c5ddb0dc41abf9e20</id>
<content type='text'>
This driver has been implicitly relying on kmalloc alignment
to be sufficient for DMA.  This may no longer be the case with
upcoming arm64 changes.

This patch changes it to explicitly request DMA alignment from
the Crypto API.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: nitrox - avoid double free on error path in nitrox_sriov_init()</title>
<updated>2022-10-21T11:15:35+00:00</updated>
<author>
<name>Natalia Petrova</name>
<email>n.petrova@fintech.ru</email>
</author>
<published>2022-09-28T10:25:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=094528b6a5a755b1195a01e10b13597d67d1a0e6'/>
<id>urn:sha1:094528b6a5a755b1195a01e10b13597d67d1a0e6</id>
<content type='text'>
If alloc_workqueue() fails in nitrox_mbox_init() it deallocates
ndev-&gt;iov.vfdev and returns error code, but then nitrox_sriov_init()
calls nitrox_sriov_cleanup() where ndev-&gt;iov.vfdev is deallocated
again.

Fix this by nulling ndev-&gt;iov.vfdev after the first deallocation.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 9e5de3e06e54 ("crypto: cavium/nitrox - Add mailbox...")
Signed-off-by: Natalia Petrova &lt;n.petrova@fintech.ru&gt;
Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/nitrox - remove check of list iterator against head past the loop body</title>
<updated>2022-04-08T08:26:43+00:00</updated>
<author>
<name>Jakob Koschel</name>
<email>jakobkoschel@gmail.com</email>
</author>
<published>2022-03-31T21:59:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7b2206d8809259b0dd297f0ccf017bf2dea98a02'/>
<id>urn:sha1:7b2206d8809259b0dd297f0ccf017bf2dea98a02</id>
<content type='text'>
When list_for_each_entry() completes the iteration over the whole list
without breaking the loop, the iterator value will be a bogus pointer
computed based on the head element.

While it is safe to use the pointer to determine if it was computed
based on the head element, either with list_entry_is_head() or
&amp;pos-&gt;member == head, using the iterator variable after the loop should
be avoided.

In preparation to limit the scope of a list iterator to the list
traversal loop, use a dedicated pointer to point to the found element [1].

Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1]
Signed-off-by: Jakob Koschel &lt;jakobkoschel@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/nitrox - don't cast parameter in bit operations</title>
<updated>2022-03-02T22:49:21+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2022-02-23T16:26:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=959e375464912a32b9d971642d933ae71b9f0267'/>
<id>urn:sha1:959e375464912a32b9d971642d933ae71b9f0267</id>
<content type='text'>
While in this particular case it would not be a (critical) issue,
the pattern itself is bad and error prone in case the location
of the parameter is changed.

Don't cast parameter to unsigned long pointer in the bit operations.
Instead copy to a local variable on stack of a proper type and use.

Fixes: cf718eaa8f9b ("crypto: cavium/nitrox - Enabled Mailbox support")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/nitrox - fix typo on crypto</title>
<updated>2022-02-18T05:21:08+00:00</updated>
<author>
<name>Corentin Labbe</name>
<email>clabbe@baylibre.com</email>
</author>
<published>2022-02-09T10:21:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4ba31cdd88c9008777a48d3ac2b045dce5634389'/>
<id>urn:sha1:4ba31cdd88c9008777a48d3ac2b045dce5634389</id>
<content type='text'>
crypto had a typo, fix it.

Signed-off-by: Corentin Labbe &lt;clabbe@baylibre.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
