<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/crypto/hisilicon/zip, branch linux-5.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-10-26T11:25:41Z</updated>
<entry>
<title>crypto: hisilicon/zip - fix mismatch in get/set sgl_sge_nr</title>
<updated>2022-10-26T11:25:41Z</updated>
<author>
<name>Ye Weihua</name>
</author>
<published>2022-07-28T02:07:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d88b88514ef28515ccfa1f1787c2aedef75a79dd'/>
<id>urn:sha1:d88b88514ef28515ccfa1f1787c2aedef75a79dd</id>
<content type='text'>
[ Upstream commit d74f9340097a881869c4c22ca376654cc2516ecc ]

KASAN reported this Bug:

	[17619.659757] BUG: KASAN: global-out-of-bounds in param_get_int+0x34/0x60
	[17619.673193] Read of size 4 at addr fffff01332d7ed00 by task read_all/1507958
	...
	[17619.698934] The buggy address belongs to the variable:
	[17619.708371]  sgl_sge_nr+0x0/0xffffffffffffa300 [hisi_zip]

There is a mismatch in hisi_zip when get/set the variable sgl_sge_nr.
The type of sgl_sge_nr is u16, and get/set sgl_sge_nr by
param_get/set_int.

Replacing param_get/set_int to param_get/set_ushort can fix this bug.

Fixes: f081fda293ffb ("crypto: hisilicon - add sgl_sge_nr module param for zip")
Signed-off-by: Ye Weihua &lt;yeweihua4@huawei.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: hisilicon/zip - fix the uninitalized 'curr_qm_qp_num'</title>
<updated>2020-10-02T08:02:14Z</updated>
<author>
<name>Sihang Chen</name>
</author>
<published>2020-09-25T14:06:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2fcb4cc3b0303845752fa3f1497a0b037a319063'/>
<id>urn:sha1:2fcb4cc3b0303845752fa3f1497a0b037a319063</id>
<content type='text'>
The 'qm-&gt;curr_qm_qp_num' is not initialized, which will result in failure
to write the current_q file.

Signed-off-by: Sihang Chen &lt;chensihang1@hisilicon.com&gt;
Signed-off-by: Yang Shen &lt;shenyang39@huawei.com&gt;
Reviewed-by: Zhou Wang &lt;wangzhou1@hisilicon.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hisilicon/zip - fix the return value when device is busy</title>
<updated>2020-10-02T08:02:14Z</updated>
<author>
<name>Yang Shen</name>
</author>
<published>2020-09-25T14:06:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42856f0a5a72080ec3424550572100e698e5043e'/>
<id>urn:sha1:42856f0a5a72080ec3424550572100e698e5043e</id>
<content type='text'>
As before, when the ZIP device is too busy to creat a request, it will
return '-EBUSY'. But the crypto process think the '-EBUSY' means a
successful request and wait for its completion.

So replace '-EBUSY' with '-EAGAIN' to show crypto this request is failed.

Fixes: 62c455ca853e("crypto: hisilicon - add HiSilicon ZIP...")
Signed-off-by: Yang Shen &lt;shenyang39@huawei.com&gt;
Reviewed-by: Zhou Wang &lt;wangzhou1@hisilicon.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hisilicon/zip - fix zero length input in GZIP decompress</title>
<updated>2020-10-02T08:02:13Z</updated>
<author>
<name>Zhou Wang</name>
</author>
<published>2020-09-25T14:06:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d340f62db2f6da7f6f05087a4f6f504af9bb4d97'/>
<id>urn:sha1:d340f62db2f6da7f6f05087a4f6f504af9bb4d97</id>
<content type='text'>
The zero length input will cause a call trace when use GZIP
decompress like this:
    Unable to handle kernel paging request at virtual address
    ...
    lr : get_gzip_head_size+0x7c/0xd0 [hisi_zip]

Judge the input length and return '-EINVAL' when input is invalid.

Fixes: 62c455ca853e("crypto: hisilicon - add HiSilicon ZIP...")
Signed-off-by: Zhou Wang &lt;wangzhou1@hisilicon.com&gt;
Signed-off-by: Yang Shen &lt;shenyang39@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hisilicon/zip - fix the uncleared debug registers</title>
<updated>2020-10-02T08:02:13Z</updated>
<author>
<name>Hao Fang</name>
</author>
<published>2020-09-25T14:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=698f95235d242f6922cee73066db8d7a690f3ae1'/>
<id>urn:sha1:698f95235d242f6922cee73066db8d7a690f3ae1</id>
<content type='text'>
ZIP debug registers aren't cleared even if its driver is removed,
so add a clearing operation when remove driver.

Signed-off-by: Hao Fang &lt;fanghao11@huawei.com&gt;
Signed-off-by: Yang Shen &lt;shenyang39@huawei.com&gt;
Reviewed-by: Zhou Wang &lt;wangzhou1@hisilicon.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata'</title>
<updated>2020-09-25T07:48:53Z</updated>
<author>
<name>Yang Shen</name>
</author>
<published>2020-09-19T11:01:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8140b878eb317bda057468d969844f93a5d2d18'/>
<id>urn:sha1:d8140b878eb317bda057468d969844f93a5d2d18</id>
<content type='text'>
The parameter type of 'pci_set_drvdata' is 'struct hisi_qm',
so here the return type of 'pci_get_drvdata' should be 'struct hisi_qm'
too.

Signed-off-by: Yang Shen &lt;shenyang39@huawei.com&gt;
Signed-off-by: Weili Qian &lt;qianweili@huawei.com&gt;
Reviewed-by: Zhou Wang &lt;wangzhou1@hisilicon.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hisilicon - update ZIP module parameter description</title>
<updated>2020-09-18T07:20:11Z</updated>
<author>
<name>Longfang Liu</name>
</author>
<published>2020-09-10T11:56:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0542a9416af3b59ae31d0599d5da6ce43bec209c'/>
<id>urn:sha1:0542a9416af3b59ae31d0599d5da6ce43bec209c</id>
<content type='text'>
In order to pass kernel CRYPTO test, ZIP module parameter
'pf_q_num' needs to be set as greater than 1.

Signed-off-by: Longfang Liu &lt;liulongfang@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hisilicon/zip - fix some coding styles</title>
<updated>2020-09-18T07:20:10Z</updated>
<author>
<name>Yang Shen</name>
</author>
<published>2020-09-07T08:22:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ca73193ccab4f02ffde11f3f0a3185fbd1c50b3'/>
<id>urn:sha1:2ca73193ccab4f02ffde11f3f0a3185fbd1c50b3</id>
<content type='text'>
1.Unified alignment styles
2.Remove unnecessary goto branch
3.Remove address printf

Signed-off-by: Yang Shen &lt;shenyang39@huawei.com&gt;
Reviewed-by: Zhou Wang &lt;wangzhou1@hisilicon.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hisilicon/zip - supplement some comments</title>
<updated>2020-09-18T07:20:09Z</updated>
<author>
<name>Yang Shen</name>
</author>
<published>2020-09-07T08:22:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2a928693d7102e35addcd0cc9dbae05253ee2ed1'/>
<id>urn:sha1:2a928693d7102e35addcd0cc9dbae05253ee2ed1</id>
<content type='text'>
Supplement some comments.

Signed-off-by: Yang Shen &lt;shenyang39@huawei.com&gt;
Reviewed-by: Zhou Wang &lt;wangzhou1@hisilicon.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hisilicon/zip - move some private macros from 'zip.h' to 'zip_crypto.c'</title>
<updated>2020-09-18T07:20:09Z</updated>
<author>
<name>Yang Shen</name>
</author>
<published>2020-09-07T08:22:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f97a3d7558d7f77deccbac79eaf8ffa9d1a131d3'/>
<id>urn:sha1:f97a3d7558d7f77deccbac79eaf8ffa9d1a131d3</id>
<content type='text'>
Some macros which are defined in 'zip.h' are related to the struct
'hisi_zip_sqe' and are only used in 'zip_crypto.c'. So move them from
'zip.h' to 'zip_crypto.c'.

Signed-off-by: Yang Shen &lt;shenyang39@huawei.com&gt;
Reviewed-by: Zhou Wang &lt;wangzhou1@hisilicon.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
