<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/crypto/marvell, branch linux-5.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-06-09T08:26:02Z</updated>
<entry>
<title>crypto: marvell/cesa - ECB does not IV</title>
<updated>2022-06-09T08:26:02Z</updated>
<author>
<name>Corentin Labbe</name>
</author>
<published>2022-04-13T19:11:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e27315001349c62f86da4637aa3c4873914becfd'/>
<id>urn:sha1:e27315001349c62f86da4637aa3c4873914becfd</id>
<content type='text'>
[ Upstream commit 4ffa1763622ae5752961499588f3f8874315f974 ]

The DES3 ECB has an IV size set but ECB does not need one.

Fixes: 4ada483978237 ("crypto: marvell/cesa - add Triple-DES support")
Signed-off-by: Corentin Labbe &lt;clabbe@baylibre.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>crypto: octeontx2 - CN10K CPT to RNM workaround</title>
<updated>2022-04-08T11:58:35Z</updated>
<author>
<name>Srujana Challa</name>
</author>
<published>2022-01-25T18:26:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c756b8a20176f5537b2604c9d917827f1a3834bc'/>
<id>urn:sha1:c756b8a20176f5537b2604c9d917827f1a3834bc</id>
<content type='text'>
[ Upstream commit bd9305b0cb69bfe98885a63a9e6231ae92e822e2 ]

When software sets CPT_AF_CTL[RNM_REQ_EN]=1 and RNM in not producing
entropy(i.e., RNM_ENTROPY_STATUS[NORMAL_CNT] &lt; 0x40), the first cycle of
the response may be lost due to a conditional clocking issue. Due to
this, the subsequent random number stream will be corrupted. So, this
patch adds support to ensure RNM_ENTROPY_STATUS[NORMAL_CNT] = 0x40
before writing CPT_AF_CTL[RNM_REQ_EN] = 1, as a workaround.

Signed-off-by: Srujana Challa &lt;schalla@marvell.com&gt;
Signed-off-by: Shijith Thotton &lt;sthotton@marvell.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>crypto: octeontx2 - remove CONFIG_DM_CRYPT check</title>
<updated>2022-04-08T11:57:33Z</updated>
<author>
<name>Shijith Thotton</name>
</author>
<published>2022-01-28T13:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a1bf728f3388ac3a2c2dffa57e25622e90b9f6f2'/>
<id>urn:sha1:a1bf728f3388ac3a2c2dffa57e25622e90b9f6f2</id>
<content type='text'>
[ Upstream commit 2d841af23ae8f398c85dd1ff2dc24b5ec8ba4569 ]

No issues were found while using the driver with dm-crypt enabled. So
CONFIG_DM_CRYPT check in the driver can be removed.

This also fixes the NULL pointer dereference in driver release if
CONFIG_DM_CRYPT is enabled.

...
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
...
Call trace:
 crypto_unregister_alg+0x68/0xfc
 crypto_unregister_skciphers+0x44/0x60
 otx2_cpt_crypto_exit+0x100/0x1a0
 otx2_cptvf_remove+0xf8/0x200
 pci_device_remove+0x3c/0xd4
 __device_release_driver+0x188/0x234
 device_release_driver+0x2c/0x4c
...

Fixes: 6f03f0e8b6c8 ("crypto: octeontx2 - register with linux crypto framework")
Signed-off-by: Shijith Thotton &lt;sthotton@marvell.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>crypto: octeontx2 - select CONFIG_NET_DEVLINK</title>
<updated>2022-04-08T11:57:33Z</updated>
<author>
<name>Shijith Thotton</name>
</author>
<published>2022-01-21T11:12:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19f636ad81658747a0326b1bd0885252756fce14'/>
<id>urn:sha1:19f636ad81658747a0326b1bd0885252756fce14</id>
<content type='text'>
[ Upstream commit 85872d1a6f38d133133784c8027d25d1c5328f4f ]

OcteonTX2 CPT driver will fail to link without devlink support.

aarch64-linux-gnu-ld: otx2_cpt_devlink.o: in function `otx2_cpt_dl_egrp_delete':
otx2_cpt_devlink.c:18: undefined reference to `devlink_priv'
aarch64-linux-gnu-ld: otx2_cpt_devlink.o: in function `otx2_cpt_dl_egrp_create':
otx2_cpt_devlink.c:9: undefined reference to `devlink_priv'
aarch64-linux-gnu-ld: otx2_cpt_devlink.o: in function `otx2_cpt_dl_uc_info':
otx2_cpt_devlink.c:27: undefined reference to `devlink_priv'

Fixes: fed8f4d5f946 ("crypto: octeontx2 - parameters for custom engine groups")

Signed-off-by: Shijith Thotton &lt;sthotton@marvell.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>crypto: octeontx2 - Avoid stack variable overflow</title>
<updated>2022-01-31T00:22:53Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2022-01-12T20:38:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47307c31d90ae7d52cebbbc7c1d4ff213213d4e9'/>
<id>urn:sha1:47307c31d90ae7d52cebbbc7c1d4ff213213d4e9</id>
<content type='text'>
Building with -Warray-bounds showed a stack variable array index
overflow. Increase the expected size of the array to avoid the warning:

In file included from ./include/linux/printk.h:555,
                 from ./include/asm-generic/bug.h:22,
                 from ./arch/x86/include/asm/bug.h:84,
                 from ./include/linux/bug.h:5,
                 from ./include/linux/mmdebug.h:5,
                 from ./include/linux/gfp.h:5,
                 from ./include/linux/firmware.h:7,
                 from drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:5:
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c: In function 'otx2_cpt_print_uc_dbg_info':
./include/linux/dynamic_debug.h:162:33: warning: array subscript 4 is above array bounds of 'u32[4]' {aka 'unsigned int[4]'} [-Warray-bounds]
  162 |         _dynamic_func_call(fmt, __dynamic_pr_debug,             \
      |                                 ^
./include/linux/dynamic_debug.h:134:17: note: in definition of macro '__dynamic_func_call'
  134 |                 func(&amp;id, ##__VA_ARGS__);               \
      |                 ^~~~
./include/linux/dynamic_debug.h:162:9: note: in expansion of macro '_dynamic_func_call'
  162 |         _dynamic_func_call(fmt, __dynamic_pr_debug,             \
      |         ^~~~~~~~~~~~~~~~~~
./include/linux/printk.h:570:9: note: in expansion of macro 'dynamic_pr_debug'
  570 |         dynamic_pr_debug(fmt, ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1807:41: note: in expansion of macro 'pr_debug'
 1807 |                                         pr_debug("Mask: %8.8x %8.8x %8.8x %8.8x %8.8x",
      |                                         ^~~~~~~~
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1765:13: note: while referencing 'mask'
 1765 |         u32 mask[4];
      |             ^~~~

This is justified because the mask size (eng_grps-&gt;engs_num) can be at
most 144 (OTX2_CPT_MAX_ENGINES bits), which is larger than available
storage. 4 * 32 == 128, so this must be 5: 5 * 32bit = 160.

Additionally clear the mask before conversion so trailing bits are zero.

Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
Cc: Arnaud Ebalard &lt;arno@natisbad.org&gt;
Cc: Srujana Challa &lt;schalla@marvell.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Suheil Chandran &lt;schandran@marvell.com&gt;
Cc: Shijith Thotton &lt;sthotton@marvell.com&gt;
Cc: Lukasz Bartosik &lt;lbartosik@marvell.com&gt;
Cc: linux-crypto@vger.kernel.org
Fixes: d9d7749773e8 ("crypto: octeontx2 - add apis for custom engine groups")
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-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: octeontx2 - prevent underflow in get_cores_bmap()</title>
<updated>2021-12-24T03:18:27Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2021-12-17T07:13:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=10371b6212bb682f13247733d6b76b91b2b80f9a'/>
<id>urn:sha1:10371b6212bb682f13247733d6b76b91b2b80f9a</id>
<content type='text'>
If we're going to cap "eng_grp-&gt;g-&gt;engs_num" upper bounds then we should
cap the lower bounds as well.

Fixes: 43ac0b824f1c ("crypto: octeontx2 - load microcode and create engine groups")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: octeontx2 - out of bounds access in otx2_cpt_dl_custom_egrp_delete()</title>
<updated>2021-12-24T03:18:27Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2021-12-17T07:12:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3438e7220b3183b1ee80227e3a0d742b18df4623'/>
<id>urn:sha1:3438e7220b3183b1ee80227e3a0d742b18df4623</id>
<content type='text'>
If "egrp" is negative then it is causes an out of bounds access in
eng_grps-&gt;grp[].

Fixes: d9d7749773e8 ("crypto: octeontx2 - add apis for custom engine groups")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: octeontx2 - Use swap() instead of swap_engines()</title>
<updated>2021-12-24T03:18:22Z</updated>
<author>
<name>Jiapeng Chong</name>
</author>
<published>2021-12-16T07:48:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3954ab6d9fce7df915a35a6ad4d657753340b011'/>
<id>urn:sha1:3954ab6d9fce7df915a35a6ad4d657753340b011</id>
<content type='text'>
Fix the following coccicheck warning:

./drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1523:16-17:
WARNING opportunity for swap().

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: marvell/octeontx - Use kcalloc() instead of kzalloc()</title>
<updated>2021-12-17T05:59:47Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2021-12-08T04:17:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b62b664d52c670eb5e0fa7dfd6a85dbc518619c'/>
<id>urn:sha1:0b62b664d52c670eb5e0fa7dfd6a85dbc518619c</id>
<content type='text'>
Use 2-factor multiplication argument form kcalloc() instead
of kzalloc().

Link: https://github.com/KSPP/linux/issues/162
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&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: octeontx2 - parameters for custom engine groups</title>
<updated>2021-12-11T05:49:17Z</updated>
<author>
<name>Srujana Challa</name>
</author>
<published>2021-12-01T09:02:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fed8f4d5f9469a4b59e501bf9b6dcab484c40047'/>
<id>urn:sha1:fed8f4d5f9469a4b59e501bf9b6dcab484c40047</id>
<content type='text'>
Added devlink parameters to create and delete custom CPT engine groups.

Example:
devlink dev param set pci/0002:20:00.0 name egrp_create value \
                "se:32;se.out" cmode runtime
devlink dev param set pci/0002:20:00.0 name egrp_delete value \
                "egrp:1" cmode runtime

Signed-off-by: Srujana Challa &lt;schalla@marvell.com&gt;
Signed-off-by: Shijith Thotton &lt;sthotton@marvell.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
