<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/include/nolibc/sys, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-12-18T13:02:27+00:00</updated>
<entry>
<title>tools/nolibc: handle NULL wstatus argument to waitpid()</title>
<updated>2025-12-18T13:02:27+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-09-26T14:26:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e506f976c9143ed5920456f3847b102a581edbae'/>
<id>urn:sha1:e506f976c9143ed5920456f3847b102a581edbae</id>
<content type='text'>
[ Upstream commit 812f223fe9be03dc22abb85240b6f075135d2386 ]

wstatus is allowed to be NULL. Avoid a segmentation fault in this case.

Fixes: 0c89abf5ab3f ("tools/nolibc: implement waitpid() in terms of waitid()")
Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: drop wait4() support</title>
<updated>2025-09-01T18:48:40+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-08-21T15:40:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4c2ef951cfe68bcd823d59a9e7ef9e3c16aa3974'/>
<id>urn:sha1:4c2ef951cfe68bcd823d59a9e7ef9e3c16aa3974</id>
<content type='text'>
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ßschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250821-nolibc-enosys-v1-7-4b63f2caaa89@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: remove __nolibc_enosys() fallback from time64-related functions</title>
<updated>2025-09-01T18:47:51+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-08-21T15:40:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e6366101ce1fab9e42ae66ff0fed5360fce65bb5'/>
<id>urn:sha1:e6366101ce1fab9e42ae66ff0fed5360fce65bb5</id>
<content type='text'>
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ßschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250821-nolibc-enosys-v1-1-4b63f2caaa89@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: use tabs instead of spaces for indentation</title>
<updated>2025-09-01T18:47:50+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-08-24T06:58:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b22d81ed319cbe2d5b45f605cab18aaf82a66a50'/>
<id>urn:sha1:b22d81ed319cbe2d5b45f605cab18aaf82a66a50</id>
<content type='text'>
Some lines are using spaces for indentation instead of the standard tabs.

Fix them.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: avoid false-positive -Wmaybe-uninitialized through waitpid()</title>
<updated>2025-07-07T13:24:35+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-07-07T12:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=31db7b6a78b7651973c66b7cf479209b20c55290'/>
<id>urn:sha1:31db7b6a78b7651973c66b7cf479209b20c55290</id>
<content type='text'>
The compiler does not know that waitid() will only ever return 0 or -1.
If waitid() would return a positive value than waitpid() would return that
same value and *status would not be initialized.
However users calling waitpid() know that the only possible return values
of it are 0 or -1. They therefore might check for errors with
'ret == -1' or 'ret &lt; 0' and use *status otherwise. The compiler will then
warn about the usage of a potentially uninitialized variable.

Example:

	$ cat test.c
	#include &lt;stdio.h&gt;
	#include &lt;unistd.h&gt;

	int main(void)
	{
		int ret, status;

		ret = waitpid(0, &amp;status, 0);
		if (ret == -1)
			return 0;

		printf("status %x\n", status);

		return 0;
	}

	$ gcc --version
	gcc (GCC) 15.1.1 20250425

	$ gcc -Wall -Os -Werror -nostdlib -nostdinc -static -Iusr/include -Itools/include/nolibc/ -o /dev/null test.c
	test.c: In function ‘main’:
	test.c:12:9: error: ‘status’ may be used uninitialized [-Werror=maybe-uninitialized]
	   12 |         printf("status %x\n", status);
	      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	test.c:6:18: note: ‘status’ was declared here
	    6 |         int ret, status;
	      |                  ^~~~~~
	cc1: all warnings being treated as errors

Avoid the warning by normalizing waitid() errors to '-1' in waitpid().

Fixes: 0c89abf5ab3f ("tools/nolibc: implement waitpid() in terms of waitid()")
Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250707-nolibc-waitpid-uninitialized-v1-1-dcd4e70bcd8f@linutronix.de
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: move uname() and friends to sys/utsname.h</title>
<updated>2025-05-21T13:32:24+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-05-15T19:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f971358dcf34ca4e430e828582cb1c70cfe1f70'/>
<id>urn:sha1:0f971358dcf34ca4e430e828582cb1c70cfe1f70</id>
<content type='text'>
This is the location regular userspace expects these definitions.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-7-74f82eea3b59@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: move makedev() and friends to sys/sysmacros.h</title>
<updated>2025-05-21T13:32:23+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-05-15T19:57:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e1211e2206356785365f065ece4965a997903f69'/>
<id>urn:sha1:e1211e2206356785365f065ece4965a997903f69</id>
<content type='text'>
This is the location regular userspace expects these definitions.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-6-74f82eea3b59@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: move getrlimit() and friends to sys/resource.h</title>
<updated>2025-05-21T13:32:21+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-05-15T19:57:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9089524753b480b7a169004c46296d1e45103a31'/>
<id>urn:sha1:9089524753b480b7a169004c46296d1e45103a31</id>
<content type='text'>
This is the location regular userspace expects these definitions.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-5-74f82eea3b59@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: move reboot() to sys/reboot.h</title>
<updated>2025-05-21T13:32:20+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-05-15T19:57:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2efb9050909f1fc0db39b2600bada8341ebc56c3'/>
<id>urn:sha1:2efb9050909f1fc0db39b2600bada8341ebc56c3</id>
<content type='text'>
This is the location regular userspace expects this definition.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-4-74f82eea3b59@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: move prctl() to sys/prctl.h</title>
<updated>2025-05-21T13:32:19+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-05-15T19:57:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3edd5365f99eeff38c5d31d9809afa6231e6de2d'/>
<id>urn:sha1:3edd5365f99eeff38c5d31d9809afa6231e6de2d</id>
<content type='text'>
This is the location regular userspace expects this definition.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250515-nolibc-sys-v1-3-74f82eea3b59@weissschuh.net
</content>
</entry>
</feed>
