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-next>] [day] [month] [year] [list]
Message-ID: <20250715093233.94108-1-sgarzare@redhat.com>
Date: Tue, 15 Jul 2025 11:32:33 +0200
From: Stefano Garzarella <sgarzare@...hat.com>
To: netdev@...r.kernel.org
Cc: Stefano Garzarella <sgarzare@...hat.com>,
	niuxuewei.nxw@...group.com
Subject: [PATCH net-next] vsock/test: fix vsock_ioctl_int() check for unsupported ioctl

From: Stefano Garzarella <sgarzare@...hat.com>

`vsock_do_ioctl` returns -ENOIOCTLCMD if an ioctl support is not
implemented, like for SIOCINQ before commit f7c722659275 ("vsock: Add
support for SIOCINQ ioctl"). In net/socket.c, -ENOIOCTLCMD is re-mapped
to -ENOTTY for the user space. So, our test suite, without that commit
applied, is failing in this way:

    34 - SOCK_STREAM ioctl(SIOCINQ) functionality...ioctl(21531): Inappropriate ioctl for device

Return false in vsock_ioctl_int() to skip the test in this case as well,
instead of failing.

Fixes: 53548d6bffac ("test/vsock: Add retry mechanism to ioctl wrapper")
Cc: niuxuewei.nxw@...group.com
Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
---
 tools/testing/vsock/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/vsock/util.c b/tools/testing/vsock/util.c
index 1e65c5abd85b..7b861a8e997a 100644
--- a/tools/testing/vsock/util.c
+++ b/tools/testing/vsock/util.c
@@ -116,7 +116,7 @@ bool vsock_ioctl_int(int fd, unsigned long op, int expected)
 	do {
 		ret = ioctl(fd, op, &actual);
 		if (ret < 0) {
-			if (errno == EOPNOTSUPP)
+			if (errno == EOPNOTSUPP || errno == ENOTTY)
 				break;
 
 			perror(name);
-- 
2.50.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ