From nobody Sat Oct 4 00:32:14 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 650042D0627; Thu, 21 Aug 2025 15:40:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790839; cv=none; b=dTNlrMqwMSZFBnEgyHNF5RFhogaNVPG5DgTLaE1xreFtOc23J+4xWktF5O7LY+I04PprNatmlfdWgcyc3SD/u2StwHFaWsWx7vy+8Z3ELfKyG5diL36R+4SwgEP68ag9jWBWOzxn7S9MwRNGVTdV4pVcmtB/X88/GG4EzkjyiL0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790839; c=relaxed/simple; bh=qlooV4/9feWqqCDg0dJlCRxAE5NSCnoqNE5KelQxzIA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HU6jrl4pn66vAdF7aMOZ/LHNnUDdUwyr7VbDHh7UbOXrBda8MpNR3g4Xx477jrI5vWbFpNqQLZmeZl5siadSntZymVytuuL1RDTMqghRdkHnixXHKBxjVFtc5Y2i2yQKar1uKzMmYRa5tDya8xqyrIg+tcb2tjLsCCKBHDUC3qw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=jzvr7sws; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="jzvr7sws" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1755790835; bh=qlooV4/9feWqqCDg0dJlCRxAE5NSCnoqNE5KelQxzIA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jzvr7swsgNMpRLJVGgYKXJeYY/zF9+CQGtDzE12MdLG2D/lqqz9MVs3o6spjM8b5D Iu07OAkzCfwE+ZSqYSIe+Opla8FTeyip0WCidH4DbDTA3cn9810Lo5gEOZzwqM6lwk SJrfGStyezwSLpbpY+SSc+nPHtwbgzVUWk/X6biQ= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 21 Aug 2025 17:40:32 +0200 Subject: [PATCH 1/7] tools/nolibc: remove __nolibc_enosys() fallback from time64-related functions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-nolibc-enosys-v1-1-4b63f2caaa89@weissschuh.net> References: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> In-Reply-To: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> To: Willy Tarreau , Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Brown , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1755790835; l=4789; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=qlooV4/9feWqqCDg0dJlCRxAE5NSCnoqNE5KelQxzIA=; b=EDjgZpT3Utcf78HHrbEoVGhAg99CTq/rmAj0Su7rrwewKik8Ue2qWM+GodiSXWP6TsD+6akqR Ki3f4Ib5U7zBMfG6djt1iR7Gz4c8Hdxoh7AOw0sC/V8G1SyrkbjEPDm X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= These fallbacks where added when no explicit fallbacks for time64 was implemented. Now that these fallbacks are in place, the additional fallback to __nolibc_enosys() is superfluous. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/include/nolibc/poll.h | 4 +--- tools/include/nolibc/sys.h | 4 +--- tools/include/nolibc/sys/timerfd.h | 8 ++------ tools/include/nolibc/time.h | 8 ++------ 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/tools/include/nolibc/poll.h b/tools/include/nolibc/poll.h index 1765acb17ea01ff53cbad0b4750e4938446b6a45..0d053f93ea99b0363b4bdfd2c40= 0d6df2f932684 100644 --- a/tools/include/nolibc/poll.h +++ b/tools/include/nolibc/poll.h @@ -39,10 +39,8 @@ int sys_poll(struct pollfd *fds, int nfds, int timeout) t.tv_nsec =3D (timeout % 1000) * 1000000; } return my_syscall5(__NR_ppoll_time64, fds, nfds, (timeout >=3D 0) ? &t : = NULL, NULL, 0); -#elif defined(__NR_poll) - return my_syscall3(__NR_poll, fds, nfds, timeout); #else - return __nolibc_enosys(__func__, fds, nfds, timeout); + return my_syscall3(__NR_poll, fds, nfds, timeout); #endif } =20 diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 295e71d34abadb7f9c7ca995012b4395b6830975..4e5389edda03a61e76ad0377213= e8ef0a621d300 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -801,7 +801,7 @@ int sys_select(int nfds, fd_set *rfds, fd_set *wfds, fd= _set *efds, struct timeva t.tv_nsec =3D timeout->tv_usec * 1000; } return my_syscall6(__NR_pselect6, nfds, rfds, wfds, efds, timeout ? &t : = NULL, NULL); -#elif defined(__NR_pselect6_time64) +#else struct __kernel_timespec t; =20 if (timeout) { @@ -809,8 +809,6 @@ int sys_select(int nfds, fd_set *rfds, fd_set *wfds, fd= _set *efds, struct timeva t.tv_nsec =3D timeout->tv_usec * 1000; } return my_syscall6(__NR_pselect6_time64, nfds, rfds, wfds, efds, timeout = ? &t : NULL, NULL); -#else - return __nolibc_enosys(__func__, nfds, rfds, wfds, efds, timeout); #endif } =20 diff --git a/tools/include/nolibc/sys/timerfd.h b/tools/include/nolibc/sys/= timerfd.h index 4375d546ba58f849b3ba48e7b221e6ec3c15fcf6..5dd61030c9914d2b6b2a71130d0= 7a32ef7c37781 100644 --- a/tools/include/nolibc/sys/timerfd.h +++ b/tools/include/nolibc/sys/timerfd.h @@ -34,7 +34,7 @@ int sys_timerfd_gettime(int fd, struct itimerspec *curr_v= alue) { #if defined(__NR_timerfd_gettime) return my_syscall2(__NR_timerfd_gettime, fd, curr_value); -#elif defined(__NR_timerfd_gettime64) +#else struct __kernel_itimerspec kcurr_value; int ret; =20 @@ -42,8 +42,6 @@ int sys_timerfd_gettime(int fd, struct itimerspec *curr_v= alue) __nolibc_timespec_kernel_to_user(&kcurr_value.it_interval, &curr_value->i= t_interval); __nolibc_timespec_kernel_to_user(&kcurr_value.it_value, &curr_value->it_v= alue); return ret; -#else - return __nolibc_enosys(__func__, fd, curr_value); #endif } =20 @@ -60,7 +58,7 @@ int sys_timerfd_settime(int fd, int flags, { #if defined(__NR_timerfd_settime) return my_syscall4(__NR_timerfd_settime, fd, flags, new_value, old_value); -#elif defined(__NR_timerfd_settime64) +#else struct __kernel_itimerspec knew_value, kold_value; int ret; =20 @@ -72,8 +70,6 @@ int sys_timerfd_settime(int fd, int flags, __nolibc_timespec_kernel_to_user(&kold_value.it_value, &old_value->it_va= lue); } return ret; -#else - return __nolibc_enosys(__func__, fd, flags, new_value, old_value); #endif } =20 diff --git a/tools/include/nolibc/time.h b/tools/include/nolibc/time.h index e9c1b976791a65c0d73268bebbcfd4f2a57a47ee..6c276b8d646a4e8fd84162b6cb7= 4c73649a092c2 100644 --- a/tools/include/nolibc/time.h +++ b/tools/include/nolibc/time.h @@ -45,7 +45,7 @@ int sys_clock_getres(clockid_t clockid, struct timespec *= res) { #if defined(__NR_clock_getres) return my_syscall2(__NR_clock_getres, clockid, res); -#elif defined(__NR_clock_getres_time64) +#else struct __kernel_timespec kres; int ret; =20 @@ -53,8 +53,6 @@ int sys_clock_getres(clockid_t clockid, struct timespec *= res) if (res) __nolibc_timespec_kernel_to_user(&kres, res); return ret; -#else - return __nolibc_enosys(__func__, clockid, res); #endif } =20 @@ -69,7 +67,7 @@ int sys_clock_gettime(clockid_t clockid, struct timespec = *tp) { #if defined(__NR_clock_gettime) return my_syscall2(__NR_clock_gettime, clockid, tp); -#elif defined(__NR_clock_gettime64) +#else struct __kernel_timespec ktp; int ret; =20 @@ -77,8 +75,6 @@ int sys_clock_gettime(clockid_t clockid, struct timespec = *tp) if (tp) __nolibc_timespec_kernel_to_user(&ktp, tp); return ret; -#else - return __nolibc_enosys(__func__, clockid, tp); #endif } =20 --=20 2.50.1 From nobody Sat Oct 4 00:32:14 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E9C62D0628; Thu, 21 Aug 2025 15:40:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790839; cv=none; b=sd5C6j2FLOxfecQFD7XFleW05Kbp9UTvnC5qbW+fFgFBWYJLdHcv659Z4pvh6etDiC/EWmAEVfpHOTM2r5TC/FayecO1o9M+jjvXp5+Ql+bjD2g4NieiRaUiOYTMh1euDXelXBO4JRrTZPp+h1kow9Y/wz2OM3PLH+Zwx8ouC3k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790839; c=relaxed/simple; bh=cRhDVTvfEJS8mHqyTcbC6i1+gbWq4cwR+iPLEEiWZ2Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dzeoZseTTp5831fTqoD0wC3kHZLpJ1UPy1SY1LcEBNDXHVDZbLpRcT+WK+sCTmZCcXZLJCayKf4IbpZenP3KdXQ9vfYAKukkgQKNHmIHvmrj2dDRF5erh9r5KD+b30jRbo4Yj2/qpIBs7kjniUFLeSITrMYOYdDKA+YuW86QRqY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=ji1Aj9Pa; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="ji1Aj9Pa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1755790835; bh=cRhDVTvfEJS8mHqyTcbC6i1+gbWq4cwR+iPLEEiWZ2Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ji1Aj9Pa0KE62K23ADxtytlcMcvBm+5O2ouql4SWsL89MwWb4kYwh7AEW/+UVbqPD Q+8kMooDZla8qO3e0gpR4gCvBbT1xdqiX0ZrvEw7G9e0rpqT+b8ZlEfIrXZvwPbOFz QL/X8eTk33RbiTap9blAGyB2ToaDnk8+WDZ1NoNc= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 21 Aug 2025 17:40:33 +0200 Subject: [PATCH 2/7] tools/nolibc: remove __nolibc_enosys() fallback from *at() functions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-nolibc-enosys-v1-2-4b63f2caaa89@weissschuh.net> References: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> In-Reply-To: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> To: Willy Tarreau , Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Brown , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1755790835; l=3478; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=cRhDVTvfEJS8mHqyTcbC6i1+gbWq4cwR+iPLEEiWZ2Y=; b=kg0N2hbwZuFGUCxNsEe83kmS1G/QpIW6Z9QwM10aCuWItg7whQvOvP4R04xEL+woy3GaMyT2I 320/IAtY4YxC2r0SeXKjaQ1xryDceFFE7HUX3FVZRoYhqIDp4cI9+5B X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= All architectures have had one of the real functions available since Linux 2.6.12. The additional fallback to __nolibc_enosys() is superfluous. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/include/nolibc/sys.h | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 4e5389edda03a61e76ad0377213e8ef0a621d300..2b9c3bf697e74e80016606814fe= 21929512ca007 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -142,10 +142,8 @@ int sys_chmod(const char *path, mode_t mode) { #if defined(__NR_fchmodat) return my_syscall4(__NR_fchmodat, AT_FDCWD, path, mode, 0); -#elif defined(__NR_chmod) - return my_syscall2(__NR_chmod, path, mode); #else - return __nolibc_enosys(__func__, path, mode); + return my_syscall2(__NR_chmod, path, mode); #endif } =20 @@ -165,10 +163,8 @@ int sys_chown(const char *path, uid_t owner, gid_t gro= up) { #if defined(__NR_fchownat) return my_syscall5(__NR_fchownat, AT_FDCWD, path, owner, group, 0); -#elif defined(__NR_chown) - return my_syscall3(__NR_chown, path, owner, group); #else - return __nolibc_enosys(__func__, path, owner, group); + return my_syscall3(__NR_chown, path, owner, group); #endif } =20 @@ -569,10 +565,8 @@ int sys_link(const char *old, const char *new) { #if defined(__NR_linkat) return my_syscall5(__NR_linkat, AT_FDCWD, old, AT_FDCWD, new, 0); -#elif defined(__NR_link) - return my_syscall2(__NR_link, old, new); #else - return __nolibc_enosys(__func__, old, new); + return my_syscall2(__NR_link, old, new); #endif } =20 @@ -640,10 +634,8 @@ int sys_mkdir(const char *path, mode_t mode) { #if defined(__NR_mkdirat) return my_syscall3(__NR_mkdirat, AT_FDCWD, path, mode); -#elif defined(__NR_mkdir) - return my_syscall2(__NR_mkdir, path, mode); #else - return __nolibc_enosys(__func__, path, mode); + return my_syscall2(__NR_mkdir, path, mode); #endif } =20 @@ -662,10 +654,8 @@ int sys_rmdir(const char *path) { #if defined(__NR_rmdir) return my_syscall1(__NR_rmdir, path); -#elif defined(__NR_unlinkat) - return my_syscall3(__NR_unlinkat, AT_FDCWD, path, AT_REMOVEDIR); #else - return __nolibc_enosys(__func__, path); + return my_syscall3(__NR_unlinkat, AT_FDCWD, path, AT_REMOVEDIR); #endif } =20 @@ -685,10 +675,8 @@ long sys_mknod(const char *path, mode_t mode, dev_t de= v) { #if defined(__NR_mknodat) return my_syscall4(__NR_mknodat, AT_FDCWD, path, mode, dev); -#elif defined(__NR_mknod) - return my_syscall3(__NR_mknod, path, mode, dev); #else - return __nolibc_enosys(__func__, path, mode, dev); + return my_syscall3(__NR_mknod, path, mode, dev); #endif } =20 @@ -872,10 +860,8 @@ int sys_symlink(const char *old, const char *new) { #if defined(__NR_symlinkat) return my_syscall3(__NR_symlinkat, old, AT_FDCWD, new); -#elif defined(__NR_symlink) - return my_syscall2(__NR_symlink, old, new); #else - return __nolibc_enosys(__func__, old, new); + return my_syscall2(__NR_symlink, old, new); #endif } =20 @@ -929,10 +915,8 @@ int sys_unlink(const char *path) { #if defined(__NR_unlinkat) return my_syscall3(__NR_unlinkat, AT_FDCWD, path, 0); -#elif defined(__NR_unlink) - return my_syscall1(__NR_unlink, path); #else - return __nolibc_enosys(__func__, path); + return my_syscall1(__NR_unlink, path); #endif } =20 --=20 2.50.1 From nobody Sat Oct 4 00:32:14 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FAD52D061C; Thu, 21 Aug 2025 15:40:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790838; cv=none; b=jer3oSfJmhf2AvcZ2sMnMQE1+s4O7SJfwi31BoiVnZ/FvR5AQslk0Zs4TX7pYbcFSwBl6W2OwX8iCQ2+xgFNIoELt9PDLZWEPMBZD1rDReaqn23dajq5VreiErROwjvxnwUBZ+00hDNrhMIUKV8wHF9jf6faEdu41V7SepOtBLo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790838; c=relaxed/simple; bh=lJZvG23U87rgiOGKfE/Nw17HdxdXmhpAjW+f05nD3+Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Pkint+MGarerZsvQsdurvvQtdWhthp1zy2N9ynM16rcHk6MqDta9HoQYmQQspJJ2OhKiL/xfJ1YxAydIBNPDXIQvLbv+v+gz4Nm9To99oQcM6sWFb0jU7Iqkb1crVxtpr2kTEa3vFnMNBCbZknf8knEqwlL87LccyaRxc2WS7/0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=tfIHsAKU; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="tfIHsAKU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1755790835; bh=lJZvG23U87rgiOGKfE/Nw17HdxdXmhpAjW+f05nD3+Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=tfIHsAKUdlhE3JfZMTPsthocNLD6ubw3qrp7dKiy9ruHd5j/oYnP4pYmy8WF6A4wP xAG33BlmM+fzK3F03ZLgSs0ezFCaQhVS6dEyT9V4uHkDeAvuWCksRs/3LezYuGsZGw iUlNkyBi0x7Kuqg8+SeeiwCto/d5AoZqha81cAm8= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 21 Aug 2025 17:40:34 +0200 Subject: [PATCH 3/7] tools/nolibc: remove __nolibc_enosys() fallback from dup2() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-nolibc-enosys-v1-3-4b63f2caaa89@weissschuh.net> References: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> In-Reply-To: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> To: Willy Tarreau , Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Brown , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1755790835; l=841; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=lJZvG23U87rgiOGKfE/Nw17HdxdXmhpAjW+f05nD3+Q=; b=RXUu/QyPF4EAgnDokpRfyPuO6CVAQRbUmb7Ce1r3/E3Oekw6nRTlDhkW19/s8p0vL2PX4H+Xz mFK27aYX3z2Cw+QsDicbioNafkpEH6HeEA26wEHrqDr9/wv+1VbXwIz X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= All architectures have one of the real functions available. The additional fallback to __nolibc_enosys() is superfluous. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/include/nolibc/sys.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 2b9c3bf697e74e80016606814fe21929512ca007..9c4fa7efc1d606f18a5a92b0a3d= d9ad7b9b4521b 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -235,10 +235,8 @@ int sys_dup2(int old, int new) { #if defined(__NR_dup3) return my_syscall3(__NR_dup3, old, new, 0); -#elif defined(__NR_dup2) - return my_syscall2(__NR_dup2, old, new); #else - return __nolibc_enosys(__func__, old, new); + return my_syscall2(__NR_dup2, old, new); #endif } =20 --=20 2.50.1 From nobody Sat Oct 4 00:32:14 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 094132D0C73; Thu, 21 Aug 2025 15:40:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790839; cv=none; b=FHL311OUDvjntnoyesG1Sox1pJg6MpQWTlP7d8e/uBSzCj+nvn84WGCrv43z/rr7vLQ375cM0ZD8sv4y7fgVdljHiCIB2I84pSPnd2ltBwBafMam3Q37mZVNbY5UTsH2GE9wbwLABn9IpVQjTMWtVZwqD+Y0G0Y2gVpYRmUp0bA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790839; c=relaxed/simple; bh=Q57fMOSIHmitf0RgmFKEHgmC2mjuTNIw+xrEbPhFM0A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=c5x+Je3IY8P0YxxYpNeEN2FKES2Dxsmju6+5W77OP31Q+EHvwurg7QhaNM2LFnDCsswqwjFpajbaQC11Zo5UCQ6+AIhB/fj67rYLZyyq3vRNSU7E8yBTintIi54Ggmnlq1e8XypzkSsU0KbfOZ/1AViI14323LJuGzoMrRkp9HY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=oSG85jo5; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="oSG85jo5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1755790835; bh=Q57fMOSIHmitf0RgmFKEHgmC2mjuTNIw+xrEbPhFM0A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=oSG85jo53WxZgChcG3vNCa8gPefb1cturzLp9fcUP98upOiFiroLPHpHpgE38s2QB gqX4zuyIOYV3okHTd69KK+maRfMpns8+JCInjuIUn4DzlXTkVnLnmPwtgZIyG/CsgJ 4q8kZgGaxstJA8CEJjfkA68GgkE0l+6ORojsh/h8= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 21 Aug 2025 17:40:35 +0200 Subject: [PATCH 4/7] tools/nolibc: remove __nolibc_enosys() fallback from fork functions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-nolibc-enosys-v1-4-4b63f2caaa89@weissschuh.net> References: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> In-Reply-To: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> To: Willy Tarreau , Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Brown , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1755790835; l=1260; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Q57fMOSIHmitf0RgmFKEHgmC2mjuTNIw+xrEbPhFM0A=; b=Jj4T58dHtrOBuyLoxgHvWb7fDfeE6kTlbVgRDvn6fIGP5YcQbg/u386kNVBZ8TQh6ak/SuV7Y XyieRAHMi+7DaJKjka98snqABIVCEl0ZB62dI4HElo+w7UIqKKzcXjL X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= All architectures have one of the real functions available. The additional fallback to __nolibc_enosys() is superfluous. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/include/nolibc/sys.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 9c4fa7efc1d606f18a5a92b0a3dd9ad7b9b4521b..fc3c8a3d02e9a031aad2229a430= c232eb60065b1 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -321,10 +321,8 @@ pid_t sys_fork(void) * will not use the rest with no other flag. */ return my_syscall5(__NR_clone, SIGCHLD, 0, 0, 0, 0); -#elif defined(__NR_fork) - return my_syscall0(__NR_fork); #else - return __nolibc_enosys(__func__); + return my_syscall0(__NR_fork); #endif } #endif @@ -341,7 +339,7 @@ pid_t sys_vfork(void) { #if defined(__NR_vfork) return my_syscall0(__NR_vfork); -#elif defined(__NR_clone3) +#else /* * clone() could be used but has different argument orders per * architecture. @@ -352,8 +350,6 @@ pid_t sys_vfork(void) }; =20 return my_syscall2(__NR_clone3, &args, sizeof(args)); -#else - return __nolibc_enosys(__func__); #endif } #endif --=20 2.50.1 From nobody Sat Oct 4 00:32:14 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 933A9353362; Thu, 21 Aug 2025 15:40:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790842; cv=none; b=CWNcRcUoZksLw3J3qiSj1AqIksPo1p7Si0sJib0dxVf4Fmtv1OsOJt/HDkSVVvBEzS/fQmh50s+2WUnp42sJ5OYRwYamEoW07VhltNwV6UMA3ZF0LRbMzftNJJZ/sIN17+j5+l6mgsqCQl5G2VpYITndVIIY7eguXJg4MmNp4yo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790842; c=relaxed/simple; bh=q8eDqbBILV1czBvM5POhEnSq70A3azxubc0c65GrQKM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PVLOx3vQa6EHQ4GV1ZRAu2izq+ydC3ylWL7eEAOuXr3hVfIQrJLh6yNWJGo0ujvP4euDVhsjSHmQK/uYN1jsJyK+bCYwKF1UbQWh9vZStQPpoiOsRduRkoG/WQnEAM8x9O4DRdGMmANpb3o0utNJOLOiKeo175qb4XgW+4fr14w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=E7tpchI2; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="E7tpchI2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1755790835; bh=q8eDqbBILV1czBvM5POhEnSq70A3azxubc0c65GrQKM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=E7tpchI2nBpTyr+2NlCGg78PYwKvGYmLXU4Uyf9IURlN/qMjFhotSb2EBBZe5bxvo peHSg2ztW64C706LhaLGnw2xczkfS89hB7/tnD9yKTbw0TJrC6cQv6ApWadoddU0WN /lahqv/cFbpUQwhJV6YJe87P0NjBdeuB41TGBuRQ= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 21 Aug 2025 17:40:36 +0200 Subject: [PATCH 5/7] tools/nolibc: fold llseek fallback into lseek() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-nolibc-enosys-v1-5-4b63f2caaa89@weissschuh.net> References: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> In-Reply-To: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> To: Willy Tarreau , Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Brown , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1755790835; l=2033; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=q8eDqbBILV1czBvM5POhEnSq70A3azxubc0c65GrQKM=; b=VMu49a5Wy73r0fgc4zP29tox+EehdPaQ8G+k4voG279AOB1IPE6egnoEbJYZboZiVaYYqWHOj JibyB/ALf/sDEha4WbsUFrhO0NXKNF++R8g+lamKvC5+KVmDGyPro03 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Align the implementation of the fallback handling inside sys_lseek() with the rest of nolibc. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/include/nolibc/sys.h | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index fc3c8a3d02e9a031aad2229a430c232eb60065b1..f31db0f471131f8238912998905= 4e2b55a41a7cb 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -581,41 +581,27 @@ off_t sys_lseek(int fd, off_t offset, int whence) #if defined(__NR_lseek) return my_syscall3(__NR_lseek, fd, offset, whence); #else - return __nolibc_enosys(__func__, fd, offset, whence); -#endif -} + __kernel_loff_t loff =3D 0; + off_t result; + int ret; =20 -static __attribute__((unused)) -int sys_llseek(int fd, unsigned long offset_high, unsigned long offset_low, - __kernel_loff_t *result, int whence) -{ -#if defined(__NR_llseek) - return my_syscall5(__NR_llseek, fd, offset_high, offset_low, result, when= ce); -#else - return __nolibc_enosys(__func__, fd, offset_high, offset_low, result, whe= nce); + /* Only exists on 32bit where nolibc off_t is also 32bit */ + ret =3D my_syscall5(__NR_llseek, fd, 0, offset, &loff, whence); + if (ret < 0) + result =3D ret; + else if (loff !=3D (off_t)loff) + result =3D -EOVERFLOW; + else + result =3D loff; + + return result; #endif } =20 static __attribute__((unused)) off_t lseek(int fd, off_t offset, int whence) { - __kernel_loff_t loff =3D 0; - off_t result; - int ret; - - result =3D sys_lseek(fd, offset, whence); - if (result =3D=3D -ENOSYS) { - /* Only exists on 32bit where nolibc off_t is also 32bit */ - ret =3D sys_llseek(fd, 0, offset, &loff, whence); - if (ret < 0) - result =3D ret; - else if (loff !=3D (off_t)loff) - result =3D -EOVERFLOW; - else - result =3D loff; - } - - return __sysret(result); + return __sysret(sys_lseek(fd, offset, whence)); } =20 =20 --=20 2.50.1 From nobody Sat Oct 4 00:32:14 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 893CF35335A; Thu, 21 Aug 2025 15:40:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790842; cv=none; b=R23kI3n3CFO/9SucrqOS/NdND1UzAKNqz81vbM4AVOxP7/2bnxUZyUdWnwhU6E8hfV+iJ43Q7Fq7iwsDsLJ7JGP3Vy+roYpDq1F0VAm/J+GuO57LW1OcVpmR8QsCIjQJBqBm1G33h75riiw03Gy8uxuKNO0SQajhC0dVBVF/xcE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790842; c=relaxed/simple; bh=Nytg3brGBX94RkJqufZjR2+fI2MqCelukAJyT2C5iuA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Y3SIeTYNk9QH8iZtM8XwMa+6LHqmvMvH7K95mn4OIi4nfefrz0NI32w+YfrhnhWThPixL7L2Pv8DxxJAb1fSny9Rqr5ezCMtw+dGB1lBAxA3VHIA0u6n5v+uBUWBWzZdLMlWZDsJRxYOQB2Y81NaKdNJXWGQLplfILYk/WSoC7A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=ehysW5Ti; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="ehysW5Ti" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1755790835; bh=Nytg3brGBX94RkJqufZjR2+fI2MqCelukAJyT2C5iuA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ehysW5Ti14GbYFhA26/1gVMOc2+KTHF/h4tN3ojF7izVXO2E6sUcmCrRHdTJhy9U2 Q+4khxVCHYmfxyNbWUEceTDgDIemdajFjc4rCJlxPt9LiN232sK9qvTcgxBHXYwIIv aur07jnAWkia87y1UW1975zb7YLEvYv3XXofnsxg= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 21 Aug 2025 17:40:37 +0200 Subject: [PATCH 6/7] kselftest/arm64: tpidr2: Switch to waitpid() over wait4() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-nolibc-enosys-v1-6-4b63f2caaa89@weissschuh.net> References: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> In-Reply-To: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> To: Willy Tarreau , Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Brown , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1755790835; l=1157; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Nytg3brGBX94RkJqufZjR2+fI2MqCelukAJyT2C5iuA=; b=VqLBwVGYCEIudHHlBaFHOBetWwInVKrleIrbKcGtAm22hGoGNMsD8h8JJQiG88d2h8qI7f1f7 PR8nnUUDe10CiRbHV66a9YcSv/TqfRjhX2KHuXKXIFqXr0HyQtO8xf5 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= wait4() is deprecated, non-standard and about to be removed from nolibc. Switch to the equivalent waitpid() call. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Catalin Marinas Reviewed-by: Mark Brown --- tools/testing/selftests/arm64/abi/tpidr2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/arm64/abi/tpidr2.c b/tools/testing/sel= ftests/arm64/abi/tpidr2.c index f58a9f89b952c42c5393b93a2db4fefe3f335e5a..3b520b7efa49e0058616c04fcdc= 0222bd8b03d8a 100644 --- a/tools/testing/selftests/arm64/abi/tpidr2.c +++ b/tools/testing/selftests/arm64/abi/tpidr2.c @@ -182,16 +182,16 @@ static int write_clone_read(void) } =20 for (;;) { - waiting =3D wait4(ret, &status, __WCLONE, NULL); + waiting =3D waitpid(ret, &status, __WCLONE); =20 if (waiting < 0) { if (errno =3D=3D EINTR) continue; - ksft_print_msg("wait4() failed: %d\n", errno); + ksft_print_msg("waitpid() failed: %d\n", errno); return 0; } if (waiting !=3D ret) { - ksft_print_msg("wait4() returned wrong PID %d\n", + ksft_print_msg("waitpid() returned wrong PID %d\n", waiting); return 0; } --=20 2.50.1 From nobody Sat Oct 4 00:32:14 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B5D7353362; Thu, 21 Aug 2025 15:40:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790847; cv=none; b=U+aMXaMbGmuiB8/ZmQwa/Jon5LZIQtZK8aWcsYyumeCsfIep8E0MTHDOLQznvpsU73gaioNTLmSmBcHWt9qXawvD40twCP87r9LqfuVsgW/3I87NDYiWyoRHIZFhwF5+HFMeyklZOx3jq3SWdPHxsj6sW+MU6BtHB9yiUdlydwE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755790847; c=relaxed/simple; bh=K3Flvop9DgAFaUxrOP24qwqt1AB7pgft6CYh8LQ9d1M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F3964Owx27DNd+O+OKowe3ZBOyMRn2/Fo5/jvBqfyCN/TjHWPJtCtuYdJJTlsB3c5PEergDjYlUqF3iAYZO6sShKBA+/6Ybuld/yn4do7mEJRikQ+83lRPOrdbUB3satmtKknIM9tV/sdn/dRcGMKdXBgHyr73GXGNxLTn4q3dI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=NaEuc0pP; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="NaEuc0pP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1755790835; bh=K3Flvop9DgAFaUxrOP24qwqt1AB7pgft6CYh8LQ9d1M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=NaEuc0pPH/OfFQXUYS/0KYY2jT7bdW/6rWs6H3VQ3Oj9QdljGJTB0FJuq7FAhJTkX r7hgm3fpfXVGi2kRIL9P8FBfAqIdvuUHoZskfU+S+cHLV4sOEyrvMUVR10EmUrdk3Y RBore3JB0gSnXCkiCDLv0RyJa+ZbK/k+n8FCV6RI= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 21 Aug 2025 17:40:38 +0200 Subject: [PATCH 7/7] tools/nolibc: drop wait4() support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-nolibc-enosys-v1-7-4b63f2caaa89@weissschuh.net> References: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> In-Reply-To: <20250821-nolibc-enosys-v1-0-4b63f2caaa89@weissschuh.net> To: Willy Tarreau , Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Brown , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1755790835; l=1555; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=K3Flvop9DgAFaUxrOP24qwqt1AB7pgft6CYh8LQ9d1M=; b=LCj6oInxdTg/ApcY0tpjs/r3Gc/B9XIij3VZTtL++fFqMqZwWdJJ6hp7UJas8KDXdMjkJbidm 5kO4uAgF4ZxDqliD9oncd0c58Alr0+p2Ym8YEQxZRXqJykrR0eL4jlu X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Not all architectures implement the wait4() syscall. It can be implemented in terms of the waitid() syscall, but that would require some rework of the other wait-related functions in wait.h. As wait4() is non-standard and deprecated, remove it. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/include/nolibc/sys/wait.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/tools/include/nolibc/sys/wait.h b/tools/include/nolibc/sys/wai= t.h index 56ddb806da7f2466be5523b52fd01480b711daec..4e66e1f7a03e4585c91ec4ea683= 33b910600239a 100644 --- a/tools/include/nolibc/sys/wait.h +++ b/tools/include/nolibc/sys/wait.h @@ -16,27 +16,10 @@ =20 /* * pid_t wait(int *status); - * pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage); * pid_t waitpid(pid_t pid, int *status, int options); * int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options); */ =20 -static __attribute__((unused)) -pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage) -{ -#ifdef __NR_wait4 - return my_syscall4(__NR_wait4, pid, status, options, rusage); -#else - return __nolibc_enosys(__func__, pid, status, options, rusage); -#endif -} - -static __attribute__((unused)) -pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage) -{ - return __sysret(sys_wait4(pid, status, options, rusage)); -} - static __attribute__((unused)) int sys_waitid(int which, pid_t pid, siginfo_t *infop, int options, struct= rusage *rusage) { --=20 2.50.1