<feed xmlns='http://www.w3.org/2005/Atom'>
<title>grovel/arch, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>http://euandre.org/git/grovel/atom?h=main</id>
<link rel='self' href='http://euandre.org/git/grovel/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://euandre.org/git/grovel/'/>
<updated>2023-11-07T02:48:02Z</updated>
<entry>
<title>ldso: convert TLSDESC_BACKWARDS from "#ifdef" to "if" logic</title>
<updated>2023-11-07T02:48:02Z</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2023-11-07T02:48:02Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/grovel/commit/?id=039d3c34f2e3578a8b7ada42f89213b844aa7a4e'/>
<id>urn:sha1:039d3c34f2e3578a8b7ada42f89213b844aa7a4e</id>
<content type='text'>
this style is preferred because it allows the code to be
compile-checked even on archs where it is not used.
</content>
</entry>
<entry>
<title>fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64</title>
<updated>2023-02-09T17:33:35Z</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2023-02-09T16:52:44Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/grovel/commit/?id=269d193820342dc109f39909d78fb30f4c978f76'/>
<id>urn:sha1:269d193820342dc109f39909d78fb30f4c978f76</id>
<content type='text'>
we wrongly defined a dummy SA_RESTORER flag on these archs, despite
the kernel interface not actually having such a feature. on archs
which lack SA_RESTORER, the kernel sigaction structure also lacks the
restorer function pointer member, which means the signal mask appears
at a different offset. the kernel was thereby interpreting the bits of
the code address as part of the signal set to be masked while handling
the signal.

this patch removes the erroneous SA_RESTORER definitions from archs
which do not have it, makes access to the member conditional on
whether SA_RESTORER is defined for the arch, and removes the
now-unused asm for the affected archs.

because there are reportedly versions of qemu-user which also use the
wrong ABI here, the old ksigaction struct size is preserved with an
unused member at the end. this is harmless and mitigates the risk of
such a bug turning into a buffer overflow onto the sigaction
function's stack.
</content>
</entry>
<entry>
<title>fix debugger tracking of shared libraries on mips with PIE main program</title>
<updated>2023-01-18T15:32:14Z</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2023-01-18T15:32:14Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/grovel/commit/?id=f897461d4fe72bb71854a6d0662de83008caccb7'/>
<id>urn:sha1:f897461d4fe72bb71854a6d0662de83008caccb7</id>
<content type='text'>
mips has its own mechanisms for DT_DEBUG because it makes _DYNAMIC
read-only, and the original mechanism, DT_MIPS_RLD_MAP, was
PIE-incompatible. DT_MIPS_RLD_MAP_REL was added to remedy this, but we
never implemented support for it. add it now using the same idioms for
mips-specific ldso logic.
</content>
</entry>
<entry>
<title>re-enable vdso clock_gettime on arm (32-bit) with workaround</title>
<updated>2022-09-19T17:21:54Z</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2022-09-12T12:38:03Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/grovel/commit/?id=bf14ef193b4203aa9a8b173faeeea06d98397f65'/>
<id>urn:sha1:bf14ef193b4203aa9a8b173faeeea06d98397f65</id>
<content type='text'>
commit 4486c579cbf0d989080705f515d08cb48636ba88 disabled vdso
clock_gettime on arm due to a Linux kernel bug that was not understood
at the time, whereby the vdso function silently produced
catastrophically wrong results on some systems.

since then, the bug was tracked down to the way the arm kernel
disabled use of vdso clock_gettime on kernels where the necessary
timer was not available or was disabled. it simply patched out the
symbols, but it only did this for the legacy time32 functions, and
left the time64 function in place but non-operational. kernel commit
4405bdf3c57ec28d606bdf5325f1167505bfdcd4 (first present in 5.8)
provided the fix.

if this were a bug that impacted all users of the broken kernel
versions, we could probably ignore it and assume it had been patched
or replaced. however, it's very possible that these kernels appear in
the wild in devices running time32 userspace (glibc, musl 1.1.x, or
some other environment) where they appear to work fine, but where our
new binaries would fail catastrophically if we used the time64 vdso
function.

since the kernel has not (yet?) given us a way to probe for the
working time64 vdso function semantically, we work around the problem
by refusing to use the time64 one unless the time32 one is also
present. this will revert to not using vdso at all if the time32 one
is ever removed, but at least that's safe against wrong results and is
just a missed optimization.
</content>
</entry>
<entry>
<title>fix __WORDSIZE on x32 sys/user.h</title>
<updated>2022-03-08T22:21:49Z</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2022-03-08T22:21:49Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/grovel/commit/?id=760f5d7efed4d4761875334f8c4e6398be308cc9'/>
<id>urn:sha1:760f5d7efed4d4761875334f8c4e6398be308cc9</id>
<content type='text'>
sys/reg.h already had it right as 32, to which it was explicitly
changed when commit 664cd341921007cea52c8891f27ce35927dca378 derived
x32 from x86_64. but the copy exposed in sys/user.h was missed.
</content>
</entry>
<entry>
<title>bits/syscall.h: add landlock syscalls from linux v5.13</title>
<updated>2022-03-08T22:21:14Z</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2021-07-04T16:34:15Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/grovel/commit/?id=ee05b11b67d59a6c5bb4b9d661bcc20bbd0bbe7a'/>
<id>urn:sha1:ee05b11b67d59a6c5bb4b9d661bcc20bbd0bbe7a</id>
<content type='text'>
see

  linux commit a49f4f81cb48925e8d7cbd9e59068f516e984144
  arch: Wire up Landlock syscalls

  linuxcommit 17ae69aba89dbfa2139b7f8024b757ab3cc42f59
  Merge tag 'landlock_v34' of ... jmorris/linux-security

Landlock provides for unprivileged application sandboxing. The goal of
Landlock is to enable to restrict ambient rights (e.g. global filesystem
access) for a set of processes. Landlock is inspired by seccomp-bpf but
instead of filtering syscalls and their raw arguments, a Landlock rule
can restrict the use of kernel objects like file hierarchies, according
to the kernel semantic.
</content>
</entry>
<entry>
<title>s390x: add ptrace requests from linux v5.12</title>
<updated>2022-03-08T22:19:52Z</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2021-05-25T21:16:43Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/grovel/commit/?id=9ffd145479c53b5eb0940dc6c3d09c060d7f3273'/>
<id>urn:sha1:9ffd145479c53b5eb0940dc6c3d09c060d7f3273</id>
<content type='text'>
PTRACE_OLDSETOPTIONS is old, but it was missing, PTRACE_SYSEMU and
PTRACE_SYSEMU_SINGLESTEP are new, see

  linux commit 56e62a73702836017564eaacd5212e4d0fa1c01d
  s390: convert to generic entry
</content>
</entry>
<entry>
<title>bits/syscall.h: add mount_setattr from linux v5.12</title>
<updated>2022-03-08T22:19:51Z</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2021-05-25T20:53:18Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/grovel/commit/?id=f7d3db5bfc4c3b2315dd8c3137f0f332e1c6896a'/>
<id>urn:sha1:f7d3db5bfc4c3b2315dd8c3137f0f332e1c6896a</id>
<content type='text'>
new syscall to change the properties of a mount or a mount tree using
file descriptors which the new mount api is based on, see

  linux commit 2a1867219c7b27f928e2545782b86daaf9ad50bd
  fs: add mount_setattr()
</content>
</entry>
<entry>
<title>bits/syscall.h: add epoll_pwait2 from linux v5.11</title>
<updated>2022-03-08T22:19:36Z</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2021-03-07T19:21:34Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/grovel/commit/?id=b21f3ded780cc8fd8e510c99aeaf4a453d8c8a22'/>
<id>urn:sha1:b21f3ded780cc8fd8e510c99aeaf4a453d8c8a22</id>
<content type='text'>
see

  linux commit b0a0c2615f6f199a656ed8549d7dce625d77aa77
  epoll: wire up syscall epoll_pwait2

  linux commit 58169a52ebc9a733aeb5bea857bc5daa71a301bb
  epoll: add syscall epoll_pwait2

epoll_wait with struct timespec timeout instead of int. no time32 variant.
</content>
</entry>
<entry>
<title>add SPE FPU support to powerpc-sf</title>
<updated>2021-09-23T23:11:46Z</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2021-09-23T23:11:46Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/grovel/commit/?id=7be59733d71ada3a32a98622507399253f1d5e48'/>
<id>urn:sha1:7be59733d71ada3a32a98622507399253f1d5e48</id>
<content type='text'>
When the soft-float ABI for PowerPC was added in commit
5a92dd95c77cee81755f1a441ae0b71e3ae2bcdb, with Freescale cpus using
the alternative SPE FPU as the main use case, it was noted that we
could probably support hard float on them, but that it would involve
determining some difficult ABI constraints. This commit is the
completion of that work.

The Power-Arch-32 ABI supplement defines the ABI profiles, and indeed
ATR-SPE is built on ATR-SOFT-FLOAT. But setjmp/longjmp compatibility
are problematic for the same reason they're problematic on ARM, where
optional float-related parts of the register file are "call-saved if
present". This requires testing __hwcap, which is now done.

In keeping with the existing powerpc-sf subarch definition, which did
not have fenv, the fenv macros are not defined for SPE and the SPEFSCR
control register is left (and assumed to start in) the default mode.
</content>
</entry>
</feed>
