| Commit message (Expand) | Author | Age | Files | Lines |
| * | add pkey_{mprotect,alloc,free} syscalls from linux v4.9•••see linux commit e8c24d3a23a469f1f40d4de24d872ca7023ced0a
and linux Documentation/x86/protection-keys.txt
| Szabolcs Nagy | 2016-12-29 | 9 | -0/+27 |
| * | rework arm atomic/tp backends to be thumb-compatible and fdpic-ready•••three problems are addressed:
- use of pc arithmetic, which was difficult if not impossible to make
correct in thumb mode on all models, so that relative rather than
absolute pointers to the backends could be used. this was designed
back when there was no coherent model for the early stages of the
dynamic linker before relocations, and is no longer necessary.
- assumption that data (the relative pointers to the backends) can be
accessed at a constant displacement from the code. this will not be
possible on future fdpic subarchs (for cortex-m), so move
responsibility for loading the backend code address to the caller.
- hard-coded arm opcodes using the .word directive. instead, use the
.arch directive to work around the assembler's refusal to assemble
instructions not available (or in some cases, available but just
considered deprecated) in the target isa level. the obscure v6t2
arch is used for v6 code so as to (1) allow generation of thumb2
output if -mthumb is active, and (2) avoid warnings/errors for mcr
barriers that clang would produce if we just set arch to v7-a.
in addition, the __aeabi_read_tp function is moved out of the inner
workings and implemented as an asm wrapper around a C function, so
that asm code does not need to read global data. the asm wrapper
serves to satisfy the ABI calling convention requirements for this
function.
| Rich Felker | 2016-12-19 | 2 | -14/+23 |
| * | fix use of incomplete struct type in s390x user.h | Bobby Bingham | 2016-12-16 | 1 | -10/+10 |
| * | fix typo in s390x user.h | Bobby Bingham | 2016-12-16 | 1 | -1/+1 |
| * | remove legacy i386 fallback stdarg implementation and framework•••this has been slated for removal for a long time. there is
fundamentally no way to implement stdarg without compiler assistance;
any attempt to do so has serious undefined behavior; its working
depends not just (as a common misconception goes) on ABI, but also on
assumptions about compiler code generation internal to a translation
unit, which is not subject to external ABI constraints.
| Rich Felker | 2016-12-15 | 2 | -13/+0 |
| * | work around gdb issues recognizing sigreturn trampoline on x86_64•••gdb can only backtrace/unwind across signal handlers if it recognizes
the sa_restorer trampoline. for x86_64, gdb first attempts to
determine the symbol name for the function in which the program
counter resides and match it against "__restore_rt". if no name can be
found (e.g. in the case of a stripped binary), the exact instruction
sequence is matched instead.
when matching the function name, however, gdb's unwind code wrongly
considers the interval [sym,sym+size] rather than [sym,sym+size).
thus, if __restore_rt begins immediately after another function, gdb
wrongly identifies pc as lying within the previous adjacent function.
this patch adds a nop before __restore_rt to preclude that
possibility. it also removes the symbol name __restore and replaces it
with a macro since the stability of whether gdb identifies the
function as __restore_rt or __restore is not clear.
for the no-symbols case, the instruction sequence is changed to use
%rax rather than %eax to match what gdb expects.
based on patch by Szabolcs Nagy, with extended description and
corresponding x32 changes added.
| Rich Felker | 2016-11-12 | 2 | -0/+18 |
| * | add s390x port | Bobby Bingham | 2016-11-11 | 27 | -0/+1097 |
| * | generalize ELF hash table types not to assume 32-bit entries•••alpha and s390x gratuitously use 64-bit entries (wasting 2x space and
cache utilization) despite the values always being 32-bit.
based on patch by Bobby Bingham, with changes suggested by Alexander
Monakov to use the public Elf_Symndx type from link.h (and make it
properly variable by arch) rather than adding new internal
infrastructure for handling the type.
| Rich Felker | 2016-11-11 | 1 | -0/+1 |
| * | add bits/hwcap.h and include it in sys/auxv.h•••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.
| Szabolcs Nagy | 2016-10-20 | 9 | -0/+137 |
| * | add sh syscall numbers from linux v4.8•••sh was updated in linux commit 74bdaa611fa69368fb4032ad437af073d31116bd
to have numbers for new syscalls.
| Szabolcs Nagy | 2016-10-20 | 1 | -0/+14 |
| * | fix preadv2 and pwritev2 syscall numbers on x32 for linux v4.8•••the numbers were wrong in musl, but they were also wrong in the kernel
and got fixed in v4.8 commit 3ebfd81f7fb3e81a754e37283b7f38c62244641a
| Szabolcs Nagy | 2016-10-20 | 1 | -2/+2 |
| * | microblaze: add syscall numbers from linux v4.7•••userfaultfd, membarrier and mlock2 syscalls got wired up in linux
commit fbce3befd60d40639bf3c6b60f7477b2f988f92d
| Szabolcs Nagy | 2016-08-30 | 1 | -0/+3 |
| * | fix pread/pwrite syscall calling convention on sh•••despite sh not generally using register-pair alignment for 64-bit
syscall arguments, there are arch-specific versions of the syscall
entry points for pread and pwrite which include a dummy argument for
alignment before the 64-bit offset argument.
| Rich Felker | 2016-08-11 | 1 | -0/+1 |
| * | fix regression in tcsetattr on all mips archs•••revert commit 8c316e9e49d37ad92c2e7493e16166a2afca419f. it was wrong
and does not match how the kernel API works.
| Rich Felker | 2016-07-13 | 3 | -9/+9 |
| * | remove or1k version of sem.h•••It's identical to the generic version, after evaluating the endian
preprocessor checks in the generic version.
| Bobby Bingham | 2016-07-06 | 1 | -11/+0 |
| * | make brace placement in public header typedef'd structs consistent•••commit befa5866ee30d09c0c96e88af2eabff5911342ea performed this change
for struct definitions that did not also involve typedef, but omitted
the latter.
| Rich Felker | 2016-07-03 | 8 | -18/+9 |
| * | make brace placement in public header struct definitions consistent•••placing the opening brace on the same line as the struct keyword/tag
is the style I prefer and seems to be the prevailing practice in more
recent additions.
these changes were generated by the command:
find include/ arch/*/bits -name '*.h' \
-exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} +
and subsequently checked by hand to ensure that the regex did not pick
up any false positives.
| Rich Felker | 2016-07-03 | 44 | -108/+54 |
| * | format mips bits/termios.h consistently mips64 and n32 versions•••with this change, all three files are identical.
| Rich Felker | 2016-07-03 | 1 | -2/+1 |
| * | fix CBAUDEX in powerpc termios.h•••it seems it was a typo.
| Szabolcs Nagy | 2016-07-03 | 2 | -2/+2 |
| * | fix TCS* definitions in mips termios.h•••these were incorrectly using the generic definitions.
| Szabolcs Nagy | 2016-07-03 | 3 | -9/+9 |
| * | fix mips termios.h macro exposure/namespace issues•••same changes to the defined macros as in powerpc and generic bits.
| Szabolcs Nagy | 2016-07-03 | 3 | -45/+42 |
| * | fix powerpc termios.h macro exposure/namespace issues•••same changes as in the generic header.
and BOTHER and IBSHIFT were removed (present in linux uapi but not
in glibc) and TIOCSER_TEMT was added (present in glibc).
| Szabolcs Nagy | 2016-07-03 | 2 | -24/+24 |
| * | fix generic termios.h macro exposure/namespace issues•••add EXTA, EXTB, CIBAUD, CMSPAR, XCASE macros and hide them as well as
CBAUD, ECHOCTL, ECHOPRT, ECHOKE, FLUSHO, PENDIN in standard mode.
the new macros are both in glibc termios.h and in linux asm/termbits.h,
the later also contains IBSHIFT and BOTHER, those were not added.
these are not standard macros, but some of them are in the reserved
namespace so could be exposed, the ones which are not reserved are
CIBAUD, CMSPAR and XCASE (which was removed in issue 6), the rest
got hidden to be consistent with glibc.
| Szabolcs Nagy | 2016-07-03 | 1 | -9/+14 |
| * | fix FIOQSIZE in arm ioctl.h•••arm ioctl.h is the same as the generic one except this macro,
so a workaround solution is used to avoid another ioctl.h copy.
| Szabolcs Nagy | 2016-07-03 | 3 | -0/+4 |
| * | remove termios2 related ioctls from sh ioctl.h•••musl does not define these on other targets either.
| Szabolcs Nagy | 2016-07-03 | 1 | -4/+0 |
| * | fix TIOCMSET in mips ioctl.h•••it seems it was a typo.
| Szabolcs Nagy | 2016-07-03 | 3 | -3/+3 |
| * | fix mips, mips64, mipsn32 TIOCM_* macros in ioctl.h•••TIOCM_ macros were wrongly using the asm-generic/termios.h definitions
instead of the mips specific ones from asm/termios.h
| Szabolcs Nagy | 2016-07-03 | 3 | -42/+42 |
| * | remove mips and powerpc ioctls that are missing from linux uapi•••mips and powerpc use their own asm/ioctls.h, not the asm-generic/ioctls.h
and they lack termiox macros that are available on other targets.
see kernel commit 1d65b4a088de407e99714fdc27862449db04fb5c
| Szabolcs Nagy | 2016-07-03 | 5 | -31/+0 |
| * | add missing TIOC* macros to ioctl.h•••these are defined in linux asm/ioctls.h.
(powerpc64 and powerpc bits/ioctl.h are now identical)
| Szabolcs Nagy | 2016-07-03 | 7 | -3/+40 |
| * | add missing SIOCSIFNAME from linux/sockios.h to ioctl.h•••glibc ioctl.h has it too.
| Szabolcs Nagy | 2016-07-03 | 7 | -0/+7 |
| * | remove ioctl macros that were removed from linux uapi•••TIOCTTYGSTRUCT, TIOCGHAYESESP, TIOCSHAYESESP and TIOCM_MODEM_BITS
were removed from the linux uapi and not present in glibc ioctl.h
| Szabolcs Nagy | 2016-07-03 | 7 | -32/+0 |
| * | use the generic ioctl.h for x86_64, x32 and aarch64•••they were slightly different in musl, but should be the same:
the linux uapi and glibc headers are not different.
| Szabolcs Nagy | 2016-07-03 | 3 | -607/+0 |
| * | add consistent reserved fields in mips64/n32 termios structures•••the (unused) speed fields were omitted when these ports were first
added (within this release cycle, so not present in any release yet)
in accordance with how glibc defines the structure on mips archs.
however their omission does not match existing musl practice/intent.
glibc provides its own, mostly-unified termios structure definition
and performs translation in userspace to match the kernel structure
for the arch, but has gratuitous differences on a few archs like mips,
presumably as a result of historical mistakes. some other libcs use
the kernel definitions directly. musl essentially does that, by
matching the kernel layout in the part of the structure the kernel
will read/write, but leaves additional space at the end for
extensibility. these are nominally the (nonstandard) speed fields and
(on most archs) extra c_cc elements, but since they are not used they
could be repurposed if there's ever a need.
| Rich Felker | 2016-07-03 | 2 | -0/+4 |
| * | fix posix_fadvise syscall args on powerpc, unify with arm fix•••commit 6d38c9cf80f47623e5e48190046673bbd0dc410b provided an
arm-specific version of posix_fadvise to address the alternate
argument order the kernel expects on arm, but neglected to address
that powerpc (32-bit) has the same issue. instead of having arch
variant files in duplicate, simply put the alternate version in the
top-level file under the control of a macro defined in syscall_arch.h.
| Rich Felker | 2016-07-01 | 2 | -0/+4 |
| * | add preadv2 and pwritev2 syscall numbers for linux v4.6•••the syscalls take an additional flag argument, they were added in commit
f17d8b35452cab31a70d224964cd583fb2845449 and a RWF_HIPRI priority hint
flag was added to linux/fs.h in 97be7ebe53915af504fb491fb99f064c7cf3cb09.
the syscall is not allocated for microblaze and sh yet.
| Szabolcs Nagy | 2016-06-09 | 11 | -0/+22 |
| * | deduplicate __NR_* and SYS_* syscall number definitions | Bobby Bingham | 2016-05-12 | 16 | -5283/+885 |
| * | x32: eliminate __X32_SYSCALL_BIT constant | Bobby Bingham | 2016-05-12 | 1 | -317/+316 |
| * | x32: remove arch-specific syscall remapping•••These system calls are already all remapped in an arch-agnostic manner in
src/internal/syscall.h
| Bobby Bingham | 2016-05-12 | 1 | -20/+0 |
| * | fix spurious trailing whitespace in powerpc & powerpc64 bits/errno.h | Rich Felker | 2016-05-08 | 2 | -2/+2 |
| * | add powerpc64 port | Bobby Bingham | 2016-05-08 | 28 | -0/+1907 |
| * | add mips n32 port (ILP32 ABI for mips64)•••based on patch submitted by Jaydeep Patil, with minor changes.
| Rich Felker | 2016-04-18 | 31 | -0/+2009 |
| * | add support for mips and mips64 r6 isa•••mips32r6 and mips64r6 are actually new isas at both the asm source and
opcode levels (pre-r6 code cannot run on r6) and thus need to be
treated as a new subarch. the following changes are made, some of
which yield code generation improvements for non-r6 targets too:
- add subarch logic in configure script and reloc.h files for dynamic
linker name.
- suppress use of .set mips2 asm directives (used to allow mips2
atomic instructions on baseline mips1 builds; the kernel has to
emulate them on mips1) except when actually needed. they cause wrong
instruction encodings on r6, and pessimize inlining on at least some
compilers.
- only hard-code sync instruction encoding on mips1.
- use "ZC" constraint instead of "m" constraint for llsc memory
operands on r6, where the ll/sc instructions no longer accept full
16-bit offsets.
- only hard-code rdhwr instruction encoding with .word on targets
(pre-r2) where it may need trap-and-emulate by the kernel.
otherwise, just use the instruction mnemonic, and allow an arbitrary
destination register to be used.
| Rich Felker | 2016-04-03 | 6 | -22/+58 |
| * | fix regression disabling use of pause instruction for x86 a_spin•••commits e24984efd5c6ac5ea8e6cb6cd914fa8435d458bc and
16b55298dc4b6a54d287d7494e04542667ef8861 inadvertently disabled the
a_spin implementations for i386, x86_64, and x32 by defining a macro
named a_pause instead of a_spin. this should not have caused any
functional regression, but it inhibited cpu relaxation while spinning
for locks.
bug reported by George Kulakowski.
| Rich Felker | 2016-03-29 | 3 | -3/+3 |
| * | add copy_file_range syscall numbers from linux v4.5•••it was introduced for offloading copying between regular files
in linux commit 29732938a6289a15e907da234d6692a2ead71855
(microblaze and sh does not yet have the syscall number.)
| Szabolcs Nagy | 2016-03-19 | 9 | -0/+18 |
| * | mips64: add recent linux syscall numbers•••add userfaultfd, membarrier and mlock2 system call numbers.
| Szabolcs Nagy | 2016-03-19 | 1 | -0/+6 |
| * | deduplicate bits/mman.h•••currently five targets use the same mman.h constants and the rest
share most constants too, so move them to sys/mman.h before the
bits/mman.h include where the differences can be corrected by
redefinition of the macros.
this fixes two minor bugs: POSIX_MADV_DONTNEED was wrong on most
targets (it should be the same as MADV_DONTNEED), and sh defined
the x86-only MAP_32BIT mmap flag.
| Szabolcs Nagy | 2016-03-18 | 12 | -617/+25 |
| * | correct pointer types for a_ll_p and a_sc_p primitives on mips64•••these changes should not affect generated code, but they reflect that
the underlying objects operated on by a_cas_p are supposed to have
type volatile void *, not volatile long. in theory a compiler could
treat the effective type mismatch in the "m" memory operands as
undefined behavior.
| Rich Felker | 2016-03-11 | 1 | -4/+4 |
| * | make mips64 a_sc_p atomic primitive's asm constraints work with clang•••apparently clang does not accept matching-register input and output
constraints that differ in size (32-bit vs 64-bit).
based on patch by Jaydeep Patil.
| Rich Felker | 2016-03-11 | 1 | -1/+1 |
| * | add powerpc soft-float support•••Some PowerPC CPUs (e.g. Freescale MPC85xx) have a completely different
instruction set for floating point operations (SPE).
Executing regular PowerPC floating point instructions results in
"Illegal instruction" errors.
Make it possible to run these devices in soft-float mode.
| Felix Fietkau | 2016-03-06 | 2 | -1/+12 |
| * | add mips64 port•••patch by Mahesh Bodapati and Jaydeep Patil of Imagination
Technologies.
| Rich Felker | 2016-03-06 | 32 | -0/+2171 |