| Commit message (Expand) | Author | Files | Lines |
| 2022-08-26 | use kernel-provided AT_MINSIGSTKSZ for sysconf(_SC_[MIN]SIGSTKSZ)•••use the legacy constant values if the kernel does not provide
AT_MINSIGSTKSZ (__getauxval will return 0 in this case) and as a
safety check if something is wrong and the provided value is less than
the legacy constant.
sysconf(_SC_SIGSTKSZ) returns SIGSTKSZ adjusted for the difference
between the legacy constant MINSIGSTKSZ and the runtime value, so that
the working space the application has on top of the minimum remains
invariant under changes to the minimum.
| Rich Felker | 1 | -2/+12 |
| 2022-08-26 | add sysconf keys/values for signal stack size•••as a result of ISA extensions exploding register file sizes on some
archs, using a constant for minimum signal stack size no longer seems
viably future-proof. add sysconf keys allowing the kernel to provide a
machine-dependent minimum applications can query to ensure they
allocate sufficient space for stacks. the key names and indices align
with the same functionality in glibc.
see commit d5a5045382315e36588ca225889baa36ed0ed38f for previous
action on this subject.
ultimately, the macros MINSIGSTKSZ and SIGSTKSZ probably need to be
deprecated, but that is standards-amendment work outside the scope of
a single implementation.
| Rich Felker | 2 | -0/+5 |
| 2022-08-24 | fix fallback when ipv6 is disabled but resolv.conf has v6 nameserves•••apparently this code path was never tested, as it's not usual to have
v6 nameservers listed on a system without v6 networking support. but
it was always intended to work.
when reverting to binding a v4 address, also revert the family in the
sockaddr structure and the socklen for it. otherwise bind will just
fail due to mismatched family/sockaddr size.
fix dns resolver fallback when v6 nameservers are listed by
| Rich Felker | 1 | -1/+2 |
| 2022-08-24 | epoll_create: fail with EINVAL if size is non-positive•••This is a part of the interface contract defined in the Linux man
page (official for a Linux-specific interface) and asserted by test
cases in the Linux Test Project (LTP).
| Kristina Martsenko | 1 | -0/+1 |
| 2022-08-20 | use alt signal stack when present for implementation-internal signals•••a request for this behavior has been open for a long time. the
motivation is that application code, particularly under some language
runtimes designed around very-low-footprint coroutine type constructs,
may be operating with extremely small stack sizes unsuitable for
receiving signals, using a separate signal stack for any signals it
might handle.
progress on this was blocked at one point trying to determine whether
the implementation is actually entitled to clobber the alt stack, but
the phrasing "available to the implementation" in the POSIX spec for
sigaltstack seems to make it clear that the application cannot rely on
the contents of this memory to be preserved in the absence of signal
delivery (on the abstract machine, excluding implementation-internal
signals) and that we can therefore use it for delivery of signals that
"don't exist" on the abstract machine.
no change is made for SIGTIMER since it is always blocked when used,
and accepted via sigwaitinfo rather than execution of the signal
handler.
| Rich Felker | 3 | -3/+3 |
| 2022-08-17 | ldso: make exit condition clearer in fixup_rpath•••breaking out of the switch-case when l==-1 means the conditional below
will necessarily be true (-1 >= buf_size, a size_t variable) and the
function will return 0. it is, however, somewhat unclear that that's
what's happening. simply returning there is simpler
| Érico Nogueira | 1 | -1/+1 |
| 2022-08-17 | freopen: reset stream orientation (byte/wide) and encoding rule•••this is a requirement of the C language (orientation) and POSIX
(encoding rule) that was somehow overlooked.
we rely on the fact that the buffer pointers have been reset by
fflush, so that any future stdio operations on the stream will go
through the same code paths they would on a newly-opened file without
an orientation set, thereby setting the orientation as they should.
| Rich Felker | 1 | -0/+2 |
| 2022-08-02 | ldso: process RELR only for non-FDPIC archs•••the way RELR is applied is not a meaningful operation for FDPIC (there
is no single "base" address). it seems unlikely RELR would ever be
added for FDPIC, but if it ever is, the behavior and possibly data
format will need to be different, so guard against calling the
non-FDPIC code.
| Rich Felker | 1 | -1/+2 |
| 2022-08-02 | ldso: support DT_RELR relative relocation format•••this resolves DT_RELR relocations in non-ldso, dynamic-linked objects.
| Fangrui Song | 3 | -4/+27 |
| 2022-08-02 | use syscall_arg_t and __scc macro for arguments to __alt_socketcall•••otherwise, pointer arguments are sign-extended on x32, resulting in
EFAULT.
| Alex Xu (Hello71) | 1 | -3/+3 |
| 2022-08-01 | fix strings.h feature test macro usage due to missing features.h | Michael Pratt | 1 | -0/+1 |
| 2022-08-01 | fix ESRCH error handling for clock_getcpuclockid•••the syscall used to probe availability of the clock fails with EINVAL
when the requested pid does not exist, but clock_getcpuclockid is
specified to use ESRCH for this purpose.
| Eugene Yudin | 1 | -0/+1 |