<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/net/tls.c, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-03-26T22:22:12Z</updated>
<entry>
<title>selftests: tls: use exact comparison in recv_partial</title>
<updated>2024-03-26T22:22:12Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2024-02-07T01:18:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ef5de5d5057fad2f957fb94ddb104abbc4932e90'/>
<id>urn:sha1:ef5de5d5057fad2f957fb94ddb104abbc4932e90</id>
<content type='text'>
[ Upstream commit 49d821064c44cb5ffdf272905236012ea9ce50e3 ]

This exact case was fail for async crypto and we weren't
catching it.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: tls: swap the TX and RX sockets in some tests</title>
<updated>2023-10-10T19:46:37Z</updated>
<author>
<name>Sabrina Dubroca</name>
</author>
<published>2023-09-12T14:16:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ca1d4e3c4dba556ca3e51a1531545fc16aaa5779'/>
<id>urn:sha1:ca1d4e3c4dba556ca3e51a1531545fc16aaa5779</id>
<content type='text'>
[ Upstream commit c326ca98446e0ae4fee43a40acf79412b74cfedb ]

tls.sendmsg_large and tls.sendmsg_multiple are trying to send through
the self-&gt;cfd socket (only configured with TLS_RX) and to receive through
the self-&gt;fd socket (only configured with TLS_TX), so they're not using
kTLS at all. Swap the sockets.

Fixes: 7f657d5bf507 ("selftests: tls: add selftests for TLS sockets")
Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/tls: Add {} to avoid static checker warning</title>
<updated>2023-10-10T19:46:36Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-05-27T03:27:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9eb384fd4fd50b00ed73f9f537c953e9d90739f'/>
<id>urn:sha1:b9eb384fd4fd50b00ed73f9f537c953e9d90739f</id>
<content type='text'>
[ Upstream commit f50688b47c5858d2ff315d020332bf4cb6710837 ]

This silences a static checker warning due to the unusual macro
construction of EXPECT_*() by adding explicit {}s around the enclosing
while loop.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Fixes: 7f657d5bf507 ("selftests: tls: add selftests for TLS sockets")
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Stable-dep-of: c326ca98446e ("selftests: tls: swap the TX and RX sockets in some tests")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: net: tls: remove recv_rcvbuf test</title>
<updated>2019-12-31T15:45:58Z</updated>
<author>
<name>Thadeu Lima de Souza Cascardo</name>
</author>
<published>2019-12-13T10:39:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ceb30424faf284019a07ae0a73d4692753133c0'/>
<id>urn:sha1:1ceb30424faf284019a07ae0a73d4692753133c0</id>
<content type='text'>
[ Upstream commit 6dd504b0fd1039c6e5d391e97cf5c4ee592aefcb ]

This test only works when [1] is applied, which was rejected.

Basically, the errors are reported and cleared. In this particular case of
tls sockets, following reads will block.

The test case was originally submitted with the rejected patch, but, then,
was included as part of a different patchset, possibly by mistake.

[1] https://lore.kernel.org/netdev/20191007035323.4360-2-jakub.kicinski@netronome.com/#t

Thanks Paolo Pisati for pointing out the original patchset where this
appeared.

Fixes: 65190f77424d (selftests/tls: add a test for fragmented messages)
Reported-by: Paolo Pisati &lt;paolo.pisati@canonical.com&gt;
Signed-off-by: Thadeu Lima de Souza Cascardo &lt;cascardo@canonical.com&gt;
Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net/tls: Fix return values to avoid ENOTSUPP</title>
<updated>2019-12-18T15:08:31Z</updated>
<author>
<name>Valentin Vidic</name>
</author>
<published>2019-12-05T06:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61c6c1296a5e3d122223890198ab017f07321def'/>
<id>urn:sha1:61c6c1296a5e3d122223890198ab017f07321def</id>
<content type='text'>
[ Upstream commit 4a5cdc604b9cf645e6fa24d8d9f055955c3c8516 ]

ENOTSUPP is not available in userspace, for example:

  setsockopt failed, 524, Unknown error 524

Signed-off-by: Valentin Vidic &lt;vvidic@valentin-vidic.from.hr&gt;
Acked-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/tls: add a test for fragmented messages</title>
<updated>2019-12-04T21:31:01Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2019-11-27T20:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0e663d88f9f4ae52e2985ac4b52f25e470c7e4f7'/>
<id>urn:sha1:0e663d88f9f4ae52e2985ac4b52f25e470c7e4f7</id>
<content type='text'>
[ Upstream commit 65190f77424d7b82c4aad7326c9cce6bd91a2fcc ]

Add a sendmsg test with very fragmented messages. This should
fill up sk_msg and test the boundary conditions.

Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/tls: add test for concurrent recv and send</title>
<updated>2019-11-07T01:33:32Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2019-11-05T22:24:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41098af59d8d753aa8d3bb4310cc4ecb61fc82c7'/>
<id>urn:sha1:41098af59d8d753aa8d3bb4310cc4ecb61fc82c7</id>
<content type='text'>
Add a test which spawns 16 threads and performs concurrent
send and recv calls on the same socket.

Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/tls: add a litmus test for the socket reuse through shutdown</title>
<updated>2019-08-05T20:15:30Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2019-08-01T21:36:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd114d2e81f632104b3f1e804104060b97337410'/>
<id>urn:sha1:cd114d2e81f632104b3f1e804104060b97337410</id>
<content type='text'>
Make sure that shutdown never works, and at the same time document how
I tested to came to the conclusion that currently reuse is not possible.

Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/tls: fix TLS tests with CONFIG_TLS=n</title>
<updated>2019-07-31T22:53:36Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2019-07-29T23:08:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e29903c49990376e5e928b20f658cdf7c29bf1eb'/>
<id>urn:sha1:e29903c49990376e5e928b20f658cdf7c29bf1eb</id>
<content type='text'>
Build bot reports some recent TLS tests are failing
with CONFIG_TLS=n. Correct the expected return code
and skip TLS installation if not supported.

Tested with CONFIG_TLS=n and CONFIG_TLS=m.

Reported-by: kernel test robot &lt;rong.a.chen@intel.com&gt;
Fixes: cf32526c8842 ("selftests/tls: add a test for ULP but no keys")
Fixes: 65d41fb317c6 ("selftests/tls: add a bidirectional test")
Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/tls: add shutdown tests</title>
<updated>2019-07-22T14:04:17Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2019-07-19T17:29:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d4d34185e710750ad748a0f0a73e8cdac7480bfc'/>
<id>urn:sha1:d4d34185e710750ad748a0f0a73e8cdac7480bfc</id>
<content type='text'>
Add test for killing the connection via shutdown.

Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Reviewed-by: Dirk van der Merwe &lt;dirk.vandermerwe@netronome.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
</feed>
