lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bd49fd49-a6c8-cbe7-abd8-e8e990d9ee05@sberdevices.ru>
Date: Tue, 25 Jul 2023 18:51:25 +0300
From: Arseniy Krasnov <avkrasnov@...rdevices.ru>
To: Stefano Garzarella <sgarzare@...hat.com>
CC: Stefan Hajnoczi <stefanha@...hat.com>, "David S. Miller"
	<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Michael S. Tsirkin"
	<mst@...hat.com>, Jason Wang <jasowang@...hat.com>, Bobby Eshleman
	<bobby.eshleman@...edance.com>, <kvm@...r.kernel.org>,
	<virtualization@...ts.linux-foundation.org>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <kernel@...rdevices.ru>, <oxffffaa@...il.com>
Subject: Re: [RFC PATCH v2 4/4] vsock/test: MSG_PEEK test for SOCK_SEQPACKET



On 25.07.2023 18:41, Stefano Garzarella wrote:
> On Wed, Jul 19, 2023 at 10:27:08PM +0300, Arseniy Krasnov wrote:
>> This adds MSG_PEEK test for SOCK_SEQPACKET. It works in the same way as
>> SOCK_STREAM test, except it also tests MSG_TRUNC flag.
>>
>> Signed-off-by: Arseniy Krasnov <AVKrasnov@...rdevices.ru>
>> ---
>> tools/testing/vsock/vsock_test.c | 58 +++++++++++++++++++++++++++++---
>> 1 file changed, 54 insertions(+), 4 deletions(-)
>>
>> diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c
>> index 444a3ff0681f..2ca2cbfa9808 100644
>> --- a/tools/testing/vsock/vsock_test.c
>> +++ b/tools/testing/vsock/vsock_test.c
>> @@ -257,14 +257,19 @@ static void test_stream_multiconn_server(const struct test_opts *opts)
>>
>> #define MSG_PEEK_BUF_LEN 64
>>
>> -static void test_stream_msg_peek_client(const struct test_opts *opts)
>> +static void __test_msg_peek_client(const struct test_opts *opts,
> 
> Let's stay with just test_msg_peek_client(), WDYT?
> 
>> +                   bool seqpacket)
>> {
>>     unsigned char buf[MSG_PEEK_BUF_LEN];
>>     ssize_t send_size;
>>     int fd;
>>     int i;
>>
>> -    fd = vsock_stream_connect(opts->peer_cid, 1234);
>> +    if (seqpacket)
>> +        fd = vsock_seqpacket_connect(opts->peer_cid, 1234);
>> +    else
>> +        fd = vsock_stream_connect(opts->peer_cid, 1234);
>> +
>>     if (fd < 0) {
>>         perror("connect");
>>         exit(EXIT_FAILURE);
>> @@ -290,7 +295,8 @@ static void test_stream_msg_peek_client(const struct test_opts *opts)
>>     close(fd);
>> }
>>
>> -static void test_stream_msg_peek_server(const struct test_opts *opts)
>> +static void __test_msg_peek_server(const struct test_opts *opts,
> 
> Same here.
> 
> The rest LGTM!

Ok! I'll update.

> 
> Also the whole series should be ready for net-next, right?

Yes, I'll fix these two things and resend this as 'net-next'

Thanks, Arseniy

> 
> Stefano
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ