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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250304-nolibc-kselftest-harness-v1-17-adca7cd231e2@linutronix.de>
Date: Tue, 04 Mar 2025 08:10:47 +0100
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Shuah Khan <shuah@...nel.org>, Shuah Khan <skhan@...uxfoundation.org>, 
 Willy Tarreau <w@....eu>, 
 Thomas Weißschuh <linux@...ssschuh.net>
Cc: linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org, 
 Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [PATCH 17/32] tools/nolibc: use ppoll_time64 if available

riscv32 does not have any of the older poll systemcalls.
Use ppoll_time64 instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
---
 tools/include/nolibc/sys.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index 128a11441ba1f95a4331b63ff1cdfb9507d4fb33..e28b26f9c3fe8aeb11dedce5106e52228b753e37 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -875,6 +875,14 @@ int sys_poll(struct pollfd *fds, int nfds, int timeout)
 		t.tv_nsec = (timeout % 1000) * 1000000;
 	}
 	return my_syscall5(__NR_ppoll, fds, nfds, (timeout >= 0) ? &t : NULL, NULL, 0);
+#elif defined(__NR_ppoll_time64)
+	struct __kernel_timespec t;
+
+	if (timeout >= 0) {
+		t.tv_sec  = timeout / 1000;
+		t.tv_nsec = (timeout % 1000) * 1000000;
+	}
+	return my_syscall5(__NR_ppoll_time64, fds, nfds, (timeout >= 0) ? &t : NULL, NULL, 0);
 #elif defined(__NR_poll)
 	return my_syscall3(__NR_poll, fds, nfds, timeout);
 #else

-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ