1. 11 7月, 2019 1 次提交
  2. 02 7月, 2019 1 次提交
    • S
      add new syscall numbers from linux v5.1 · f3f96f2d
      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.
      f3f96f2d
  3. 05 5月, 2019 1 次提交
  4. 11 4月, 2019 1 次提交
    • R
      implement inline 5- and 6-argument syscalls for mips · dcb18bea
      Rich Felker 提交于
      the OABI passes these on the stack, using the convention that their
      position on the stack is as if the first four arguments (in registers)
      also had stack slots. originally this was deemed too awkward to do
      inline, falling back to external __syscall, but it's not that bad and
      now that external __syscall is being removed, it's necessary.
      dcb18bea
  5. 08 2月, 2019 1 次提交
  6. 10 12月, 2018 1 次提交
  7. 17 10月, 2018 1 次提交
    • R
      make thread-pointer-loading asm non-volatile · a4a3e4db
      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.
      a4a3e4db
  8. 13 9月, 2018 1 次提交
    • R
      apply hidden visibility to sigreturn code fragments · b6e59cd9
      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.
      b6e59cd9
  9. 06 9月, 2018 1 次提交
    • R
      define and use internal macros for hidden visibility, weak refs · 9b95fd09
      Rich Felker 提交于
      this cleans up what had become widespread direct inline use of "GNU C"
      style attributes directly in the source, and lowers the barrier to
      increased use of hidden visibility, which will be useful to recovering
      some of the efficiency lost when the protected visibility hack was
      dropped in commit dc2f368e, especially
      on archs where the PLT ABI is costly.
      9b95fd09
  10. 18 7月, 2018 1 次提交
    • S
      add support for arch-specific ptrace command macros · df6d9450
      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).
      df6d9450
  11. 27 6月, 2018 1 次提交
  12. 20 6月, 2018 1 次提交
  13. 03 6月, 2018 1 次提交
    • S
      fix TLS layout of TLS variant I when there is a gap above TP · 610c5a85
      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.
      610c5a85
  14. 11 3月, 2018 1 次提交
    • R
      fix minor namespace issues in termios.h · eb5ae940
      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.
      eb5ae940
  15. 23 2月, 2018 2 次提交
    • S
      add MAP_SYNC and MAP_SHARED_VALIDATE from linux v4.15 · 9b57db3f
      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*).
      9b57db3f
    • S
      mips,powerpc: fix TIOCSER_TEMT in termios.h · 9eda4dc6
      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.
      9eda4dc6
  16. 06 11月, 2017 2 次提交
  17. 07 9月, 2017 1 次提交
    • S
      make syscall.h consistent with linux · 822dddfb
      Szabolcs Nagy 提交于
      most of the found naming differences don't matter to musl, because
      internally it unifies the syscall names that vary across targets,
      but for external code the names should match the kernel uapi.
      
      aarch64:
      	__NR_fstatat is called __NR_newfstatat in linux.
      	__NR_or1k_atomic got mistakenly copied from or1k.
      arm:
      	__NR_arm_sync_file_range is an alias for __NR_sync_file_range2
      	__NR_fadvise64_64 is called __NR_arm_fadvise64_64 in linux,
      	the old non-arm name is kept too, it should not cause issues.
      	(powerpc has similar nonstandard fadvise and it uses the
      	normal name.)
      i386:
      	__NR_madvise1 was removed from linux in commit
      	303395ac3bf3e2cb488435537d416bc840438fcb 2011-11-11
      microblaze:
      	__NR_fadvise, __NR_fstatat, __NR_pread, __NR_pwrite
      	had different name in linux.
      mips:
      	__NR_fadvise, __NR_fstatat, __NR_pread, __NR_pwrite, __NR_select
      	had different name in linux.
      mipsn32:
      	__NR_fstatat is called __NR_newfstatat in linux.
      or1k:
      	__NR__llseek is called __NR_llseek in linux.
      	the old name is kept too because that's the name musl uses
      	internally.
      powerpc:
      	__NR_{get,set}res{gid,uid}32 was never present in powerpc linux.
      	__NR_timerfd was briefly defined in linux but then got renamed.
      822dddfb
  18. 30 8月, 2017 2 次提交
  19. 01 6月, 2017 1 次提交
  20. 30 12月, 2016 1 次提交
  21. 20 10月, 2016 1 次提交
    • S
      add bits/hwcap.h and include it in sys/auxv.h · fe39aaae
      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.
      fe39aaae
  22. 14 7月, 2016 1 次提交
  23. 04 7月, 2016 11 次提交
  24. 10 6月, 2016 1 次提交
    • S
      add preadv2 and pwritev2 syscall numbers for linux v4.6 · 78b1f3cb
      Szabolcs Nagy 提交于
      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.
      78b1f3cb
  25. 12 5月, 2016 1 次提交
  26. 03 4月, 2016 1 次提交
    • R
      add support for mips and mips64 r6 isa · 6d99ad91
      Rich Felker 提交于
      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.
      6d99ad91
  27. 19 3月, 2016 1 次提交