summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorLines
2018-07-17add support for arch-specific ptrace command macrosSzabolcs Nagy-0/+2
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).
2018-07-17sys/ptrace.h: add missing PTRACE_EVENT_STOPSzabolcs Nagy-0/+1
new in linux v3.1 commit 3544d72a0e10d0aa1c1bd59ed77a53a59cdc12f7 changed in linux v3.4 commit 5cdf389aee90109e2e3d88085dea4dd5508a3be7 A tracer recieves this event in the waitpid status of a PTRACED_SEIZED process.
2018-07-17uchar.h: define char16_t and char32_t for old c++Szabolcs Nagy-1/+3
including uchar.h in c++ code is only well defined in c++11 onwards where char16_t and char32_t type definitions must be hidden since they are keywords. however some c++ code compiled for older c++ standard include uchar.h too and they need the typedefs, this fix makes such code work.
2018-07-12add ST_RELATIME to statvfs.hRich Felker-0/+1
2018-06-26add explicit_bzero implementationDavid Carlier-0/+1
maintainer's note: past sentiment was that, despite being imperfect and unable to force clearing of all possible copies of sensitive data (e.g. in registers, register spills, signal contexts left on the stack, etc.) this function would be added if major implementations agreed on it, which has happened -- several BSDs and glibc all include it.
2018-06-26fix value of SO_PEERSEC on mips archsRich Felker-1/+1
adapted from patch by Matthias Schiffer.
2018-06-20add memfd_create syscall wrapperSzabolcs Nagy-0/+5
memfd_create was added in linux v3.17 and glibc has api for it.
2018-06-20add mlock2 linux syscall wrapperSzabolcs Nagy-3/+8
mlock2 syscall was added in linux v4.4 and glibc has api for it. It falls back to mlock in case of flags==0, so that case works even on older kernels. MLOCK_ONFAULT is moved under _GNU_SOURCE following glibc.
2018-06-19add speculation control prctls from linux v4.17Szabolcs Nagy-0/+9
PR_{SET,GET}_SPECULATION_CTRL controls speculation related vulnerability mitigations, new in commits b617cfc858161140d69cc0b5cc211996b557a1c7 356e4bfff2c5489e016fdb925adbf12a1e3950ee
2018-06-19add ETH_P_PREAUTH ethertype from linux v4.17Szabolcs Nagy-0/+1
added in linux commit 4fe0de5b143762d327bfaf1d7be7c5b58041a18c
2018-06-19add TCP_NLA_* from linux v4.17Szabolcs Nagy-0/+10
new and missing netlink attributes types for SCM_TIMESTAMPING_OPT_STATS, new ones were added in commits 7156d194a0772f733865267e7207e0b08f81b02b be631892948060f44b1ceee3132be1266932071e 87ecc95d81d951b0984f2eb9c5c118cb68d0dce8
2018-06-19add {MSG,SEM,SHM}_STAT_ANY from linux v4.17Szabolcs Nagy-0/+3
introduced to stat ipc objects without permission checks since the info is available in /proc/sysvipc anyway, new in linux commits 23c8cec8cf679b10997a512abb1e86f0cedc42ba a280d6dc77eb6002f269d58cd47c7c7e69b617b6 c21a6970ae727839a2f300cd8dd957de0d0238c3
2018-06-19add MAP_FIXED_NOREPLACE from linux v4.17Szabolcs Nagy-0/+1
to map at a fixed address without unmapping underlying mappings (fails with EEXIST unlike MAP_FIXED), new in linux commits 4ed28639519c7bad5f518e70b3284c6e0763e650 and a4ff8e8620d3f4f50ac4b41e8067b7d395056843.
2018-06-19sys/ptrace.h: add PTRACE_SECCOMP_GET_METADATA from linux v4.16Szabolcs Nagy-1/+7
to get seccomp state for checkpoint restore. added in linux commit 26500475ac1b499d8636ff281311d633909f5d20 struct tag follows the glibc api and ptrace_peeksiginfo_args got changed too accordingly.
2018-06-19netinet/if_ether.h: add ETH_TLEN from linux v4.16Szabolcs Nagy-0/+1
octets in ethernet type field added in linux commit 4bbb3e0e8239f9079bf1fe20b3c0cb598714ae61
2018-06-19netinet/if_ether.h: add ETH_P_ERSPAN2 from linux v4.16Szabolcs Nagy-0/+1
protocol number for erspan v2 support added in linux commit f551c91de262ba36b20c3ac19538afb4f4507441
2018-06-19sys/epoll.h: add EPOLLNVAL from linux v4.16Szabolcs Nagy-0/+1
added to uapi in commit 65aaf87b3aa2d049c6b9fd85221858a895df3393 used since commit a9a08845e9acbd224e4ee466f5c1275ed50054e8, which renamed POLL* to EPOLL* in the kernel.
2018-06-12add missing m68k relocation types in elf.hRich Felker-1/+19
2018-03-28fix default feature profile in tar.hRich Felker-0/+2
commit d93c0740d86aaf7043e79b942a6c0b3f576af4c8 added use of feature test macros without including features.h, causing a definition that should be exposed in the default profile, TSVTX, to appear only when _XOPEN_SOURCE or higher is explicitly defined.
2018-03-12explicitly use signed keyword to define intNN_t and derivative typesRich Felker-4/+4
standing alone, both the signed and int keywords identify the same type, a (signed) int. however the C language has an exception where, when the lone keyword int is used to declare a bitfield, it's implementation-defined whether the bitfield is signed or unsigned. C11 footnote 125 extends this implementation-definedness to typedefs, and DR#315 extends it to other integer types (for which support with bitfields is implementation-defined). while reasonable ABIs (all the ones we support) define bitfields as signed by default, GCC and compatible compilers offer an option -funsigned-bitfields to change the default. while any signed types defined without explicit use of the signed keyword are affected, the stdint.h types, especially intNN_t, have a natural use in bitfields. ensure that bitfields defined with these types always have the correct signedness regardless of compiler & flags used. see also GCC PR 83294.
2018-03-10remove spurious const keyword in sigqueue declarationRich Felker-1/+1
this must have been taken from POSIX without realizing that it was meaningless. the resolution to Austin Group issue #844 removed it from the standard.
2018-03-10fix minor namespace issue in unistd.hRich Felker-2/+1
the F_* macros associated with the lockf function are XSI-shaded (like the lockf function itself) and should only be exposed when the function is.
2018-03-10fix minor namespace issue in tar.hRich Felker-0/+2
TSVTX is XSI-shaded.
2018-03-10fix minor namespace issues in limits.hRich Felker-5/+10
PAGE_SIZE, NZERO, and NL_LANGMAX are XSI-shaded.
2018-03-10reverse definition dependency between PAGESIZE and PAGE_SIZERich Felker-2/+2
PAGESIZE is actually the version defined in POSIX base, with PAGE_SIZE being in the XSI option. use PAGESIZE as the underlying definition to facilitate making exposure of PAGE_SIZE conditional.
2018-02-24fix aliasing violations in fgetpos/fsetposRich Felker-0/+1
add a member of appropriate type to the fpos_t union so that accesses are well-defined. use long long instead of off_t since off_t is not always exposed in stdio.h and there's no namespace-clean alias for it. access is still performed using pointer casts rather than by naming the union member as a matter of style; to the extent possible, the naming of fields in opaque types defined in the public headers is not treated as an API contract with the implementation. access via the pointer cast is valid as long as the union has a member of matching type.
2018-02-23add getentropy functionRich Felker-0/+1
based loosely on patch by Hauke Mehrtens; converted to wrap the public API of the underlying getrandom function rather than direct syscalls, so that if/when a fallback implementation of getrandom is added it will automatically get picked up by getentropy too.
2018-02-22add getrandom syscall wrapperHauke Mehrtens-0/+19
This syscall is available since Linux 3.17 and was also implemented in glibc in version 2.25 using the same interfaces.
2018-02-22elf.h: add DT_SYMTAB_SHNDXSzabolcs Nagy-1/+2
it's a recent addition to elf gabi: http://sco.com/developers/gabi/latest/revision.html based on discussions at https://sourceware.org/bugzilla/show_bug.cgi?id=15835
2018-02-22elf.h: syncronize DF_1_ flags with binutilsSzabolcs Nagy-0/+2
DF_1_STUB and DF_1_PIE were added in binutils-gdb commit 5c383f026242d25a3c21fdfda42e5ca218b346c8
2018-02-22elf.h: update NT_* coredump elf notes for linux v4.15Szabolcs Nagy-0/+21
NT_ARM_SVE and NT_S390_RI_CB are new in linux commits 43d4da2c45b2f5d62f8a79ff7c6f95089bb24656 and 262832bc5acda76fd8f901d39f4da1121d951222 the rest are older. musl missed NT_PRFPREG because it followed the glibc api: https://sourceware.org/bugzilla/show_bug.cgi?id=14890
2018-02-22elf.h: add PPC64_OPT_LOCALENTRYSzabolcs Nagy-0/+1
allows calling extern functions without saving r2, for details see glibc commit 0572433b5beb636de1a49ec6b4fdab830c38cdc5
2018-02-22elf.h: add AT_* auxval macros for cache geometrySzabolcs Nagy-0/+8
AT_L1I_*, AT_L1D_*, AT_L2_* and AT_L3_* were added in linux v4.11 for powerpc in commit 98a5f361b8625c6f4841d6ba013bbf0e80d08147.
2018-02-22sys/prctl.h: add new PR_SVE_* macros from linux v4.15Szabolcs Nagy-0/+6
PR_SVE_SET_VL and PR_SVE_GET_VL controls are new in linux commit 2d2123bc7c7f843aa9db87720de159a049839862 related PR_SVE_* macros were added in 7582e22038a266444eb87bc07c372592ad647439
2018-02-22netinet/in.h: add new IPV6_FREEBIND from linux v4.15Szabolcs Nagy-0/+1
new socekt option for AF_INET6 SOL_RAW sockets, added in linux commit 84e14fe353de7624872e582887712079ba0b2d56
2018-02-22netinet/tcp.h: add TCP_* socket options from linux v4.15Szabolcs Nagy-0/+2
TCP_FASTOPEN_KEY is new in 1fba70e5b6bed53496ba1f1f16127f5be01b5fb6 TCP_FASTOPEN_NO_COOKIE is new in 71c02379c762cb616c00fd5c4ed253fbf6bbe11b
2018-02-22add MAP_SYNC and MAP_SHARED_VALIDATE from linux v4.15Szabolcs Nagy-0/+2
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*).
2018-02-22netinet/tcp.h: add tcp_diag_md5sig struct from linux v4.14Szabolcs Nagy-0/+8
for querying tcp md5 signing keys. new in linux commit c03fa9bcacd9ac04595cc13f34f3445f0a5ecf13
2018-02-22sys/{mman,shm}.h: add {MAP,SHM}_HUGE_ macros from linux uapiSzabolcs Nagy-0/+26
*_HUGE_SHIFT, *_HUGE_2MB, *_HUGE_1GB are documented in the man page, so add all of the *_HUGE_* macros from linux uapi. if MAP_HUGETLB is set, top bits of the mmap flags encode the page size. see the linux commit aafd4562dfee81a40ba21b5ea3cf5e06664bc7f6 if SHM_HUGETLB is set, top bits of the shmget flags encode the page size. see the linux commit 4da243ac1cf6aeb30b7c555d56208982d66d6d33 *_HUGE_16GB is defined unsigned to avoid signed left shift ub.
2018-02-22netinet/if_ether.h: add new ETH_P_ macros from linux v4.14Szabolcs Nagy-0/+4
new ethertypes in linux v4.14: ETH_P_ERSPAN new in 84e54fe0a5eaed696dee4019c396f8396f5a908b ETH_P_IFE new in 2804fd3af6ba5ae5737705b27146455eabe2e2f8 ETH_P_NSH new in 155e6f649757c902901e599c268f8b575ddac1f8 ETH_P_MAP new in 7373ae7e8f0bf2c0718422481da986db5058b005
2018-02-22net/if_arp.h: add ARPHRD_RAWIP from linux v4.14Szabolcs Nagy-0/+1
new in linux commmit cdf4969c42a6c1a376dd03a9e846cf638d3cd4b1
2018-02-22signal.h: add missing SIGTRAP si_codesSzabolcs Nagy-0/+2
TRAP_BRANCH and TRAP_HWBKPT new in linux commit da654b74bda14c45a7d98c731bf3c1a43b6b74e2
2018-02-22sys/mman.h: add MADV_WIPEONFORK from linux v4.14Szabolcs Nagy-0/+2
allows zeroing anonymous private pages inherited by a child process. new in linux commit d2cd9ede6e193dd7d88b6d27399e96229a551b19
2018-02-22sys/socket.h: add MSG_ZEROCOPY from linux v4.14Szabolcs Nagy-0/+2
MSG_ZEROCOPY socket send flag avoids copy in the kernel new in linux commit 52267790ef52d7513879238ca9fac22c1733e0e3 SO_ZEROCOPY socket option enables MSG_ZEROCOPY if availale new in linux commit 76851d1212c11365362525e1e2c0a18c97478e6b
2018-02-22sys/socket.h: add SOL_TLS from linux v4.13Szabolcs Nagy-0/+1
socket option for kernel TLS support new in linux commit 3c4d7559159bfe1e3b94df3a657b2cda3a34e218
2018-02-22sys/socket.h: add PF_SMC from linux v4.11Szabolcs Nagy-1/+3
add AF_SMC and PF_SMC for the IBM shared memory communication protocol. new in linux commit ac7138746e14137a451f8539614cdd349153e0c0 (linux socket.h is not in uapi so this update was missed earlier)
2018-01-12add _DIRENT_HAVE_D_* macros to dirent.hRostislav Skudnov-0/+4
2018-01-09add additional uapi guards for Linux kernel header filesHauke Mehrtens-0/+10
With Linux kernel 4.16 it will be possible to guard more parts of the Linux header files from a libc. Make use of this in musl to guard all the structures and other definitions from the Linux header files which are also defined by the header files provided by musl. This will make it possible to compile source files which include both the libc headers and the kernel userspace headers. This extends the definitions done in commit 04983f227238 ("make netinet/in.h suppress clashing definitions from kernel headers")
2017-12-15fix endian errors in netinet/icmp6.h due to failure to include endian.hRich Felker-0/+1
2017-12-14fix endian errors in arpa/nameser.h due to failure to include endian.hJo-Philipp Wich-0/+1