- 01 8月, 2019 1 次提交
-
-
由 Rich Felker 提交于
without this, the SO_RCVTIMEO and SO_SNDTIMEO socket options would stop working on pre-5.1 kernels after time_t is switched to 64-bit and their values are changed to the new time64 versions. new code is written such that it's statically unreachable on 64-bit archs, and on existing 32-bit archs until the macro values are changed to activate 64-bit time_t.
-
- 31 7月, 2019 1 次提交
-
-
由 Rich Felker 提交于
the definition of the IPC_64 macro controls the interface between libc and the kernel through syscalls; it's not a public API. the meaning is rather obscure. long ago, Linux's sysvipc *id_ds structures used 16-bit uids/gids and wrong types for a few other fields. this was in the libc5 era, before glibc. the IPC_64 flag (64 is a misnomer; it's more like 32) tells the kernel to use the modern[-ish] versions of the structures. the definition of IPC_64 has nothing to do with whether the arch is 32- or 64-bit. rather, due to either historical accident or intentional obnoxiousness, the kernel only accepts and masks off the 0x100 IPC_64 flag conditional on CONFIG_ARCH_WANT_IPC_PARSE_VERSION, i.e. for archs that want to provide, or that accidentally provided, both. for archs which don't define this option, no masking is performed and commands with the 0x100 bit set will fail as invalid. so ultimately, the definition is just a matter of matching an arbitrary switch defined per-arch in the kernel.
-
- 30 7月, 2019 4 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
some of these were not exact duplicates, but had gratuitously different naming for padding, or omitted the endian checks because the arch is fixed-endian.
-
由 Rich Felker 提交于
various padding fields in the generic bits/sem.h were defined in terms of time_t as a cheap hack standing in for "kernel long", to allow x32 to use the generic version of the file. this was a really bad idea, as it ended up getting copied into lots of arch-specific versions of the bits file, and is a blocker to changing time_t to 64-bit on 32-bit archs. this commit adds an x32-specific version of the header, and changes padding type back from time_t to long (currently the same type on all archs but x32) in the generic header and all the others the hack got copied into.
-
由 Rich Felker 提交于
-
- 19 7月, 2019 3 次提交
-
-
由 Rich Felker 提交于
now that we have a kstat structure decoupled from the public struct stat, we can just use the broken kernel structures directly and let the code in fstatat do the translation.
-
由 Rich Felker 提交于
presently, all archs/ABIs have struct stat matching the kernel stat[64] type, except mips/mipsn32/mips64 which do conversion hacks in syscall_arch.h to work around bugs in the kernel type. this patch completely decouples them and adds a translation step to the success path of fstatat. at present, this is just a gratuitous copying, but it opens up multiple possibilities for future support for 64-bit time_t on 32-bit archs and for cleaned-up/unified ABIs. for clarity, the mips hacks are not yet removed in this commit, so the mips kstat structs still correspond to the output of the hacks in their syscall_arch.h files, not the raw kernel type. a subsequent commit will fix this.
-
由 Rich Felker 提交于
these were overlooked during review. bits headers are not allowed to pull in additional headers (note: that rule is currently broken in other places but just for endian.h). string.h has no place here anyway, and including bits/alltypes.h without defining macros to request types from it is a nop.
-
- 17 7月, 2019 2 次提交
-
-
由 Rich Felker 提交于
ever since inline syscalls were added for (o32) mips in commit 328810d3, the asm has nonsensically loaded the syscall number, rather than taking $2 as an input constraint to let the compiler load it. commit cfc09b1e improved on this somewhat by allowing a constant syscall number to propagate into an immediate, but missed that the whole operation made no sense. now, only $4, $5, $6, $8, and $9 are potential input-only registers. $2 is always input and output, and $7 is both when it's an argument, otherwise output-only. previously, $7 was treated as an input (with a "1" constraint matching its output position) even when it was not an input, which was arguably undefined behavior (asm input from indeterminate value). this is corrected.
-
由 Rich Felker 提交于
this patch is not purely non-functional changes, since before, $8 and $9 were wrongly in the clobberlist for syscalls with fewer than 5 or 6 arguments. of course it's impossible for syscalls to have different clobbers depending on their number of arguments. the clobberlist for the recently-added 5- and 6-argument forms was correct, and for the 0- to 4-argument forms was erroneously copied from the mips o32 ABI where the additional arguments had to be passed on the stack. in making this change, I reviewed the kernel sources, and $8 and $9 are always saved for 64-bit kernels since they're part of the syscall argument list for n32 and n64 ABIs.
-
- 11 7月, 2019 1 次提交
-
-
由 Samuel Holland 提交于
Commit 3517d74a changed the token in sys/ioctl.h from 0x01 to 1, so bits/termios.h no longer matches. Revert the bits/termios.h change to keep the headers in sync. This reverts commit 9eda4dc6.
-
- 02 7月, 2019 2 次提交
-
-
由 Szabolcs Nagy 提交于
syscall numbers are now synced up across targets (starting from 403 the numbers are the same on all targets other than an arch specific offset) IPC syscalls sem*, shm*, msg* got added where they were missing (except for semop: only semtimedop got added), the new semctl, shmctl, msgctl imply IPC_64, see linux commit 0d6040d4681735dfc47565de288525de405a5c99 arch: add split IPC system calls where needed new 64bit time_t syscall variants got added on 32bit targets, see linux commit 48166e6ea47d23984f0b481ca199250e1ce0730a y2038: add 64-bit time_t syscalls to all 32-bit architectures new async io syscalls got added, see linux commit 2b188cc1bb857a9d4701ae59aa7768b5124e262e Add io_uring IO interface linux commit edafccee56ff31678a091ddb7219aba9b28bc3cb io_uring: add support for pre-mapped user IO buffers a new syscall got added that uses the fd of /proc/<pid> as a stable handle for processes: allows sending signals without pid reuse issues, intended to eventually replace rt_sigqueueinfo, kill, tgkill and rt_tgsigqueueinfo, see linux commit 3eb39f47934f9d5a3027fe00d906a45fe3a15fad signal: add pidfd_send_signal() syscall on some targets (arm, m68k, s390x, sh) some previously missing syscall numbers got added as well.
-
由 Szabolcs Nagy 提交于
the numbers added in commit d149e69c add io_pgetevents and rseq syscall numbers from linux v4.18 were incorrect.
-
- 11 4月, 2019 2 次提交
-
-
由 Rich Felker 提交于
n32 and n64 ABIs add new argument registers vs o32, so that passing on the stack is not necessary, so it's not clear why the 5- and 6-argument versions were special-cased to begin with; it seems to have been pattern-copying from arch/mips (o32). i've treated the new argument registers like the first 4 in terms of clobber status (non-clobbered). hopefully this is correct.
-
由 Rich Felker 提交于
-
- 08 2月, 2019 1 次提交
-
-
由 Bobby Bingham 提交于
-
- 10 12月, 2018 1 次提交
-
-
由 Szabolcs Nagy 提交于
io_pgetevents is new in linux commit 7a074e96dee62586c935c80cecd931431bfdd0be rseq is new in linux commit d7822b1e24f2df5df98c76f0e94a5416349ff759
-
- 17 10月, 2018 1 次提交
-
-
由 Rich Felker 提交于
this will allow the compiler to cache and reuse the result, meaning we no longer have to take care not to load it more than once for the sake of archs where the load may be expensive. depends on commit 1c84c999 for correctness, since otherwise the compiler could hoist loads during stage 3 of dynamic linking before the initial thread-pointer setup.
-
- 13 9月, 2018 1 次提交
-
-
由 Rich Felker 提交于
these were overlooked in the declarations overhaul work because they are not properly declared, and the current framework even allows their declared types to vary by arch. at some point this should be cleaned up, but I'm not sure what the right way would be.
-
- 18 7月, 2018 1 次提交
-
-
由 Szabolcs Nagy 提交于
sys/ptrace.h is target specific, use bits/ptrace.h to add target specific macro definitions. these macros are kept in the generic sys/ptrace.h even though some targets don't support them: PTRACE_GETREGS PTRACE_SETREGS PTRACE_GETFPREGS PTRACE_SETFPREGS PTRACE_GETFPXREGS PTRACE_SETFPXREGS so no macro definition got removed in this patch on any target. only s390x has a numerically conflicting macro definition (PTRACE_SINGLEBLOCK). the PT_ aliases follow glibc headers, otherwise the definitions come from linux uapi headers except ones that are skipped in glibc and there is no real kernel support (s390x PTRACE_*_AREA) or need special type definitions (mips PTRACE_*_WATCH_*) or only relevant for linux 2.4 compatibility (PTRACE_OLDSETOPTIONS).
-
- 27 6月, 2018 1 次提交
-
-
由 Rich Felker 提交于
adapted from patch by Matthias Schiffer.
-
- 20 6月, 2018 1 次提交
-
-
由 Szabolcs Nagy 提交于
new in linux commit 256211f2b0b251e532d1899b115e374feb16fa7a
-
- 03 6月, 2018 1 次提交
-
-
由 Szabolcs Nagy 提交于
In TLS variant I the TLS is above TP (or above a fixed offset from TP) but on some targets there is a reserved gap above TP before TLS starts. This matters for the local-exec tls access model when the offsets of TLS variables from the TP are hard coded by the linker into the executable, so the libc must compute these offsets the same way as the linker. The tls offset of the main module has to be alignup(GAP_ABOVE_TP, main_tls_align). If there is no TLS in the main module then the gap can be ignored since musl does not use it and the tls access models of shared libraries are not affected. The previous setup only worked if (tls_align & -GAP_ABOVE_TP) == 0 (i.e. TLS did not require large alignment) because the gap was treated as a fixed offset from TP. Now the TP points at the end of the pthread struct (which is aligned) and there is a gap above it (which may also need alignment). The fix required changing TP_ADJ and __pthread_self on affected targets (aarch64, arm and sh) and in the tlsdesc asm the offset to access the dtv changed too.
-
- 11 3月, 2018 1 次提交
-
-
由 Rich Felker 提交于
the output delay features (NL*, CR*, TAB*, BS*, and VT*) are XSI-shaded. VT* is in the V* namespace reservation but the rest need to be suppressed in base POSIX namespace. unfortunately this change introduces feature test macro checks into another bits header. at some point these checks should be simplified by having features.h handle the "FTM X implies Y" relationships.
-
- 23 2月, 2018 2 次提交
-
-
由 Szabolcs Nagy 提交于
for synchronous page faults, new in linux commit 1c9725974074a047f6080eecc62c50a8e840d050 and b6fb293f2497a9841d94f6b57bd2bb2cd222da43 note that only targets that use asm-generic/mman.h have this new flag defined, so undef it on other targets (mips*, powerpc*).
-
由 Szabolcs Nagy 提交于
use the same token to define TIOCSER_TEMT as is used in ioctl.h so when both headers are included there are no redefinition warnings during musl build.
-
- 06 11月, 2017 2 次提交
-
-
由 Szabolcs Nagy 提交于
added for safe opening of peer end of pty in a mount namespace. new in linux commit c6325179238f1d4683edbec53d8322575d76d7e2
-
由 Szabolcs Nagy 提交于
statx was added in linux commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f (there is no libc wrapper yet and microblaze and sh misses the number).
-
- 30 8月, 2017 2 次提交
-
-
由 Szabolcs Nagy 提交于
it is defined in linux asm/sockios.h since commit ae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23 (linux v2.6.22) but was missing from musl by accident. in musl the sockios macros are exposed in sys/ioctl.h together with other ioctl requests instead of in sys/socket.h because of namespace rules. (glibc has them in sys/socket.h under _GNU_SOURCE.)
-
由 Szabolcs Nagy 提交于
-
- 01 6月, 2017 2 次提交
-
-
由 Rich Felker 提交于
at one point, clang reportedly failed to support the asm register constraints needed for inline syscalls. versions of clang that old have much bigger problems that preclude using them to compile musl libc.
-
由 Rich Felker 提交于
mips64 requires 'struct stat' conversion due to incorrect 32-bit fields where time_t should be in the kernel version of the structure. syscall_arch.h already performed the correct translation for stat, fstat, and lstat syscalls, but omitted special handling for fstatat.
-
- 30 12月, 2016 1 次提交
-
-
由 Szabolcs Nagy 提交于
see linux commit e8c24d3a23a469f1f40d4de24d872ca7023ced0a and linux Documentation/x86/protection-keys.txt
-
- 20 10月, 2016 1 次提交
-
-
由 Szabolcs Nagy 提交于
aarch64, arm, mips, mips64, mipsn32, powerpc, powerpc64 and sh have cpu feature bits defined in linux for AT_HWCAP auxv entry, so expose those in sys/auxv.h it seems the mips hwcaps were never exposed to userspace neither by linux nor by glibc, but that's most likely an oversight.
-
- 14 7月, 2016 1 次提交
-
-
由 Rich Felker 提交于
revert commit 8c316e9e. it was wrong and does not match how the kernel API works.
-
- 04 7月, 2016 4 次提交
-
-
由 Szabolcs Nagy 提交于
these were incorrectly using the generic definitions.
-
由 Szabolcs Nagy 提交于
same changes to the defined macros as in powerpc and generic bits.
-
由 Szabolcs Nagy 提交于
it seems it was a typo.
-
由 Szabolcs Nagy 提交于
TIOCM_ macros were wrongly using the asm-generic/termios.h definitions instead of the mips specific ones from asm/termios.h
-