<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/crypto, branch linux-5.9.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.9.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.9.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-12-21T12:28:18+00:00</updated>
<entry>
<title>ch_ktls: fix build warning for ipv4-only config</title>
<updated>2020-12-21T12:28:18+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2020-12-03T22:26:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c655dbee26ae44b1f12acb75c4c4b27e73066c91'/>
<id>urn:sha1:c655dbee26ae44b1f12acb75c4c4b27e73066c91</id>
<content type='text'>
[ Upstream commit a54ba3465d86fa5dd7d41bb88c0b5e71fb3b627e ]

When CONFIG_IPV6 is disabled, clang complains that a variable
is uninitialized for non-IPv4 data:

drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:1046:6: error: variable 'cntrl1' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
        if (tx_info-&gt;ip_family == AF_INET) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:1059:2: note: uninitialized use occurs here
        cntrl1 |= T6_TXPKT_ETHHDR_LEN_V(maclen - ETH_HLEN) |
        ^~~~~~

Replace the preprocessor conditional with the corresponding C version,
and make the ipv4 case unconditional in this configuration to improve
readability and avoid the warning.

Fixes: 86716b51d14f ("ch_ktls: Update cheksum information")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20201203222641.964234-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>chelsio/chtls: fix a double free in chtls_setkey()</title>
<updated>2020-12-08T09:42:03+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-12-03T08:44:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f8a3f6b2d4bf255b3852beda8561a1e76fc2d22'/>
<id>urn:sha1:2f8a3f6b2d4bf255b3852beda8561a1e76fc2d22</id>
<content type='text'>
[ Upstream commit 391119fb5c5c4bdb4d57c7ffeb5e8d18560783d1 ]

The "skb" is freed by the transmit code in cxgb4_ofld_send() and we
shouldn't use it again.  But in the current code, if we hit an error
later on in the function then the clean up code will call kfree_skb(skb)
and so it causes a double free.

Set the "skb" to NULL and that makes the kfree_skb() a no-op.

Fixes: d25f2f71f653 ("crypto: chtls - Program the TLS session Key")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/X8ilb6PtBRLWiSHp@mwanda
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>chelsio/chtls: fix panic during unload reload chtls</title>
<updated>2020-12-08T09:42:01+00:00</updated>
<author>
<name>Vinay Kumar Yadav</name>
<email>vinay.yadav@chelsio.com</email>
</author>
<published>2020-11-25T21:49:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a0a5d6881a0dfb3e2d386ef00447107f37e489a'/>
<id>urn:sha1:5a0a5d6881a0dfb3e2d386ef00447107f37e489a</id>
<content type='text'>
[ Upstream commit e3d5e971d2f83d8ddd4b91a50cea4517fb488383 ]

there is kernel panic in inet_twsk_free() while chtls
module unload when socket is in TIME_WAIT state because
sk_prot_creator was not preserved on connection socket.

Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Udai Sharma &lt;udai.sharma@chelsio.com&gt;
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201125214913.16938-1-vinay.yadav@chelsio.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ch_ktls: tcb update fails sometimes</title>
<updated>2020-11-18T18:22:21+00:00</updated>
<author>
<name>Rohit Maheshwari</name>
<email>rohitm@chelsio.com</email>
</author>
<published>2020-11-09T10:51:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e2d69c0519869769b6ac3c5e0388b232d351518a'/>
<id>urn:sha1:e2d69c0519869769b6ac3c5e0388b232d351518a</id>
<content type='text'>
[ Upstream commit 7d01c428c86b525dc780226924d74df2048cf411 ]

context id and port id should be filled while sending tcb update.

Fixes: 5a4b9fe7fece ("cxgb4/chcr: complete record tx handling")
Signed-off-by: Rohit Maheshwari &lt;rohitm@chelsio.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ch_ktls: Update cheksum information</title>
<updated>2020-11-18T18:22:20+00:00</updated>
<author>
<name>Rohit Maheshwari</name>
<email>rohitm@chelsio.com</email>
</author>
<published>2020-11-09T10:51:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d274cd323ec158c6be13cf06b9cfd8893abd9c81'/>
<id>urn:sha1:d274cd323ec158c6be13cf06b9cfd8893abd9c81</id>
<content type='text'>
[ Upstream commit 86716b51d14fc2201938939b323ba3ad99186910 ]

Checksum update was missing in the WR.

Fixes: 429765a149f1 ("chcr: handle partial end part of a record")
Signed-off-by: Rohit Maheshwari &lt;rohitm@chelsio.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>chelsio/chtls: fix always leaking ctrl_skb</title>
<updated>2020-11-10T11:38:56+00:00</updated>
<author>
<name>Vinay Kumar Yadav</name>
<email>vinay.yadav@chelsio.com</email>
</author>
<published>2020-11-02T17:39:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b18ec4a9634d510bf70df3393ec27e1b52ca5329'/>
<id>urn:sha1:b18ec4a9634d510bf70df3393ec27e1b52ca5329</id>
<content type='text'>
[ Upstream commit dbfe394dad33f99cf8458be50483ec40a5d29c34 ]

Correct skb refcount in alloc_ctrl_skb(), causing skb memleak
when chtls_send_abort() called with NULL skb.
it was always leaking the skb, correct it by incrementing skb
refs by one.

Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201102173909.24826-1-vinay.yadav@chelsio.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>chelsio/chtls: fix memory leaks caused by a race</title>
<updated>2020-11-10T11:38:56+00:00</updated>
<author>
<name>Vinay Kumar Yadav</name>
<email>vinay.yadav@chelsio.com</email>
</author>
<published>2020-11-02T17:36:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d38c4b58aaa78f475d88ece4199472c9008ebc1c'/>
<id>urn:sha1:d38c4b58aaa78f475d88ece4199472c9008ebc1c</id>
<content type='text'>
[ Upstream commit 8080b462b6aa856ae05ea010441a702599e579f2 ]

race between user context and softirq causing memleak,
consider the call sequence scenario

chtls_setkey()         //user context
chtls_peer_close()
chtls_abort_req_rss()
chtls_setkey()         //user context

work request skb queued in chtls_setkey() won't be freed
because resources are already cleaned for this connection,
fix it by not queuing work request while socket is closing.

v1-&gt;v2:
- fix W=1 warning.

v2-&gt;v3:
- separate it out from another memleak fix.

Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201102173650.24754-1-vinay.yadav@chelsio.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>chelsio/chtls: fix tls record info to user</title>
<updated>2020-11-01T11:47:05+00:00</updated>
<author>
<name>Vinay Kumar Yadav</name>
<email>vinay.yadav@chelsio.com</email>
</author>
<published>2020-10-22T19:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=676a2b8478ea04cfa38cddd5dff8981098ace06f'/>
<id>urn:sha1:676a2b8478ea04cfa38cddd5dff8981098ace06f</id>
<content type='text'>
[ Upstream commit 4f3391ce8f5a69e7e6d66d0a3fc654eb6dbdc919 ]

chtls_pt_recvmsg() receives a skb with tls header and subsequent
skb with data, need to finalize the data copy whenever next skb
with tls header is available. but here current tls header is
overwritten by next available tls header, ends up corrupting
user buffer data. fixing it by finalizing current record whenever
next skb contains tls header.

v1-&gt;v2:
- Improved commit message.

Fixes: 17a7d24aa89d ("crypto: chtls - generic handling of data and hdr")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201022190556.21308-1-vinay.yadav@chelsio.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>chelsio/chtls: fix memory leaks in CPL handlers</title>
<updated>2020-11-01T11:47:04+00:00</updated>
<author>
<name>Vinay Kumar Yadav</name>
<email>vinay.yadav@chelsio.com</email>
</author>
<published>2020-10-25T19:42:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a368a6efeeb0e06cb98010f12127e9584faaa95b'/>
<id>urn:sha1:a368a6efeeb0e06cb98010f12127e9584faaa95b</id>
<content type='text'>
[ Upstream commit 6daa1da4e262b0cd52ef0acc1989ff22b5540264 ]

CPL handler functions chtls_pass_open_rpl() and
chtls_close_listsrv_rpl() should return CPL_RET_BUF_DONE
so that caller function will do skb free to avoid leak.

Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201025194228.31271-1-vinay.yadav@chelsio.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>chelsio/chtls: fix deadlock issue</title>
<updated>2020-11-01T11:47:04+00:00</updated>
<author>
<name>Vinay Kumar Yadav</name>
<email>vinay.yadav@chelsio.com</email>
</author>
<published>2020-10-25T19:35:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e3163c742580630cf8bba172ef84c3a5f2a9295'/>
<id>urn:sha1:6e3163c742580630cf8bba172ef84c3a5f2a9295</id>
<content type='text'>
[ Upstream commit 28e9dcd9172028263c8225c15c4e329e08475e89 ]

In chtls_pass_establish() we hold child socket lock using bh_lock_sock
and we are again trying bh_lock_sock in add_to_reap_list, causing deadlock.
Remove bh_lock_sock in add_to_reap_list() as lock is already held.

Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201025193538.31112-1-vinay.yadav@chelsio.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
