From: Konstantin Shkolnyy <kshk@linux.ibm.com>
To: sgarzare@redhat.com
Cc: virtualization@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, mjrosato@linux.ibm.com,
Konstantin Shkolnyy <kshk@linux.ibm.com>
Subject: [PATCH v5 0/3] vsock/test: fix wrong setsockopt() parameters
Date: Thu, 7 Nov 2024 19:17:23 -0600 [thread overview]
Message-ID: <20241108011726.213948-1-kshk@linux.ibm.com> (raw)
Parameters were created using wrong C types, which caused them to be of
wrong size on some architectures, causing problems.
The problem with SO_RCVLOWAT was found on s390 (big endian), while x86-64
didn't show it. After the fix, all tests pass on s390.
Then Stefano Garzarella pointed out that SO_VM_SOCKETS_* calls might have
a similar problem, which turned out to be true, hence, the second patch.
Changes for v5:
- in the patch #2 replace the introduced uint64_t with unsigned long long
to match documentation
- add a patch #3 that verifies every setsockopt() call.
Changes for v4:
- add "Reviewed-by:" to the first patch, and add a second patch fixing
SO_VM_SOCKETS_* calls, which depends on the first one (hence, it's now
a patch series.)
Changes for v3:
- fix the same problem in vsock_perf and update commit message
Changes for v2:
- add "Fixes:" lines to the commit message
Konstantin Shkolnyy (3):
vsock/test: fix failures due to wrong SO_RCVLOWAT parameter
vsock/test: fix parameter types in SO_VM_SOCKETS_* calls
vsock/test: verify socket options after setting them
tools/testing/vsock/Makefile | 8 +-
tools/testing/vsock/control.c | 8 +-
tools/testing/vsock/msg_zerocopy_common.c | 8 +-
tools/testing/vsock/util_socket.c | 149 ++++++++++++++++++++++
tools/testing/vsock/util_socket.h | 19 +++
tools/testing/vsock/vsock_perf.c | 34 ++---
tools/testing/vsock/vsock_test.c | 64 +++++-----
7 files changed, 231 insertions(+), 59 deletions(-)
create mode 100644 tools/testing/vsock/util_socket.c
create mode 100644 tools/testing/vsock/util_socket.h
--
2.34.1
next reply other threads:[~2024-11-08 1:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 1:17 Konstantin Shkolnyy [this message]
2024-11-08 1:17 ` [PATCH v5 1/3] vsock/test: fix failures due to wrong SO_RCVLOWAT parameter Konstantin Shkolnyy
2024-11-08 1:17 ` [PATCH v5 2/3] vsock/test: fix parameter types in SO_VM_SOCKETS_* calls Konstantin Shkolnyy
2024-11-12 8:50 ` Stefano Garzarella
2024-11-08 1:17 ` [PATCH v5 3/3] vsock/test: verify socket options after setting them Konstantin Shkolnyy
2024-11-12 8:58 ` Stefano Garzarella
2024-11-12 15:18 ` Konstantin Shkolnyy
2024-11-12 18:10 ` Stefano Garzarella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241108011726.213948-1-kshk@linux.ibm.com \
--to=kshk@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjrosato@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=sgarzare@redhat.com \
--cc=virtualization@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).