<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/tools/include/nolibc, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-08-02T07:30:55+00:00</updated>
<entry>
<title>tools/nolibc: add support for Alpha</title>
<updated>2026-08-02T07:30:55+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-07-21T22:07:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b58afc8d1cf85688601b8d7e271125fff666f661'/>
<id>urn:sha1:b58afc8d1cf85688601b8d7e271125fff666f661</id>
<content type='text'>
A straightforward new architecture.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Tested-by: Michael Cree &lt;mcree@orcon.net.nz&gt;
Link: https://patch.msgid.link/20260722-nolibc-alpha-v2-1-4970e48eb7bf@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc/powerpc: mark ctr and xer as clobbered by system call</title>
<updated>2026-07-30T10:44:07+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-07-27T15:02:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b9fc5a1742b0c8fb7edf066cc17fa0b18b7be623'/>
<id>urn:sha1:b9fc5a1742b0c8fb7edf066cc17fa0b18b7be623</id>
<content type='text'>
The system call can clobber the ctr and xer registers.

Make sure the compiler takes this into account.

The missing clobbers only seem to be an issue with newer compilers.

Fixes: 0cb0675ec37e ("tools/nolibc: add support for powerpc")
Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Link: https://patch.msgid.link/20260727-nolibc-powerpc-clobber-v1-1-e0911cc99ce1@linutronix.de
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: remove dead __ARCH_WANT_SYS_OLD_SELECT</title>
<updated>2026-07-26T19:51:33+00:00</updated>
<author>
<name>Ammar Faizi</name>
<email>ammarfaizi2@openresty.com</email>
</author>
<published>2026-07-26T10:13:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=01d8fa031ac2d84ba5254caeb1fa5c11159797b5'/>
<id>urn:sha1:01d8fa031ac2d84ba5254caeb1fa5c11159797b5</id>
<content type='text'>
The macro lost its last user when select() was reimplemented on top of
pselect6 for every architecture; sys/select.h no longer looks at it,
and nothing else in the tree does either. See commit 668e43737279
("tools/nolibc/select: drop non-pselect based implementations").

The comment that goes with it is stale for the same reason, as neither
architecture can end up calling old_select any more.

Drop both from arch-x86.h and arch-arm.h.

Cc: Alviro Iskandar Setiawan &lt;alviro.iskandar@gnuweeb.org&gt;
Signed-off-by: Ammar Faizi &lt;ammarfaizi2@openresty.com&gt;
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: mark arg1 operand in __nolibc_syscall0() as write-only</title>
<updated>2026-07-03T18:00:09+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-07-03T17:30:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a3b2181459a2c74c03ddbad585f884eefc8ff8ff'/>
<id>urn:sha1:a3b2181459a2c74c03ddbad585f884eefc8ff8ff</id>
<content type='text'>
__nolibc_syscall0() does not set the arg1 variable before passing it to
the asm block. This uninitialized variable read is undefined behavior.
Clang can miscompile this.

Mark the asm operand as write-only to fix this.

Fixes: 8e1930296f92 ("tools/nolibc: Add support for SPARC")
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260703-nolibc-sparc-asm-v1-1-c7fe73e2e777@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: unistd: Add readlink()</title>
<updated>2026-07-03T06:07:59+00:00</updated>
<author>
<name>Daniel Palmer</name>
<email>daniel@thingy.jp</email>
</author>
<published>2026-07-02T08:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=94518b77e194d71b1d76a2dd75f4891954edc296'/>
<id>urn:sha1:94518b77e194d71b1d76a2dd75f4891954edc296</id>
<content type='text'>
Add readlink(). This is needed to test getcwd().

Signed-off-by: Daniel Palmer &lt;daniel@thingy.jp&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260702085101.3304547-3-daniel@thingy.jp
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: unistd: Add getcwd()</title>
<updated>2026-07-03T06:07:59+00:00</updated>
<author>
<name>Daniel Palmer</name>
<email>daniel@thingy.jp</email>
</author>
<published>2026-07-02T08:50:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0fbc34f028e9eb7705e1f4ee1591ecd6d05160e8'/>
<id>urn:sha1:0fbc34f028e9eb7705e1f4ee1591ecd6d05160e8</id>
<content type='text'>
Add getcwd() for getting the current working directory.

The behaviour matches what musl is doing except for one
important difference: If the passed buf is NULL musl (and glibc)
uses a big buffer on the stack and that is then strdup()'d and
returned.

According to the man page for getcwd() this is a glibc extension
and I don't think we need it in nolibc.

Signed-off-by: Daniel Palmer &lt;daniel@thingy.jp&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260702085101.3304547-2-daniel@thingy.jp
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: cast default values of program_invocation_name</title>
<updated>2026-05-26T19:06:12+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-05-25T08:27:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=638b4816135c3b3426fed2e1b8834acec3fc831c'/>
<id>urn:sha1:638b4816135c3b3426fed2e1b8834acec3fc831c</id>
<content type='text'>
With -Wwrite-strings the plain assignment triggers a warning as a
'const char *' is assigned to a 'char *', removing the const qualifier.

Casting the const away is fine, as there is no valid modification that
can be done to an empty string anyways.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260525-nolibc-write-strings-v2-1-ab5cc16c7b23@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: add ftruncate()</title>
<updated>2026-05-24T21:58:04+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-05-21T17:31:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=835fa43a4d36bd66ad0dd052f9fa15f7bd365fa8'/>
<id>urn:sha1:835fa43a4d36bd66ad0dd052f9fa15f7bd365fa8</id>
<content type='text'>
On architectures with 32-bit longs, call the compat syscall
__NR_ftruncate64. As off_t is 64-bit it must be split into 2 registers.
Unlike llseek() which passes the high and low parts in explicitly named
arguments, the order here is endian independent.

Some architectures (arm, mips, ppc) require this pair of registers to
be aligned to an even register, so add custom _sys_ftruncate64()
wrappers for those.

A test case for ftruncate is added which validates negative length or
invalid fd return the appropriate error, and checks the length is
correct on success.

Co-developed-by: Jordan Richards &lt;jordanrichards@google.com&gt;
Signed-off-by: Jordan Richards &lt;jordanrichards@google.com&gt;
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Reviewed-by: Daniel Palmer &lt;daniel@thingy.jp&gt;
Link: https://patch.msgid.link/20260521-nolibc-ftruncate-v1-3-5384a83b2402@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: add a helper to split a 64-bit argument into 32-bit halves</title>
<updated>2026-05-24T21:57:59+00:00</updated>
<author>
<name>Daniel Palmer</name>
<email>daniel@thingy.jp</email>
</author>
<published>2026-05-21T17:31:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=acbbec15195b40adefd24993661c93022f6de2b7'/>
<id>urn:sha1:acbbec15195b40adefd24993661c93022f6de2b7</id>
<content type='text'>
On 32-bit architectures some system calls require a single 64-bit
argument to be passed as two 32-bit halves.

Add a helper to easily split such arguments. This works on little and
bit endian.

Signed-off-by: Daniel Palmer &lt;daniel@thingy.jp&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260521-nolibc-ftruncate-v1-2-5384a83b2402@weissschuh.net
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: stackprotector: Avoid stalling program startup if crng is not init yet</title>
<updated>2026-05-24T21:52:58+00:00</updated>
<author>
<name>Daniel Palmer</name>
<email>daniel@thingy.jp</email>
</author>
<published>2026-05-22T09:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b882d807fa443b529ae8bf917d7b640a8d555437'/>
<id>urn:sha1:b882d807fa443b529ae8bf917d7b640a8d555437</id>
<content type='text'>
We are using the getrandom syscall to get a random seed for the
stack protector canary but we are calling it with no flags which means
it'll block until there is some real randomness to return.

This means that if the crng is not ready yet program startup will
block and if you are unlucky that could be for a long time and
look like the program has crashed.

Even if the call to getrandom does not yield any random data,
we will still initialize the canary.

Fixes: 7188d4637e95 ("tools/nolibc: add support for stack protector")
Signed-off-by: Daniel Palmer &lt;daniel@thingy.jp&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260522090726.726985-1-daniel@thingy.jp
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
</feed>
