about summary refs log tree commit diff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* sys/prctl.h: add PR_PAC_RESET_KEYS from linux v5.0Szabolcs Nagy2019-03-131-0/+7
| | | | | | aarch64 pointer authentication code related prctl that allows reinitializing the key for the thread, added in linux commit ba830885656414101b2f8ca88786524d4bb5e8c1
* elf.h: add NT_ definitions from linux v5.0Szabolcs Nagy2019-03-131-0/+2
| | | | | | | NT_MIPS_MSA for ptrace access to mips simd arch reg set, added in linux commit 3cd640832894b85b5929d5bda74505452c800421 NT_ARM_PAC_MASK for ptrace access to pointer auth code mask, added in commit ec6e822d1a22d0eef1d1fa260dff751dba9a4258
* elf.h: update with C-SKY definitionsSzabolcs Nagy2019-03-131-1/+57
| | | | | | | C-SKY support was added to binutils 2.32 in commit b8891f8d622a31306062065813fc278d8a94fe21 the elf.h change was added to glibc 2.29 in commit 4975f0c3d0131fdf697be0b1631c265e5fd39088
* netinet/tcp.h: add TCP_NLA_SRTT from linux v5.0Szabolcs Nagy2019-03-131-0/+1
| | | | | smoothed RTT for SCM_TIMESTAMPING_OPT_STATS control messages. added in linux commit e8bd8fca6773ef49390269bd467bf940a0841ccf
* netinet/udp.h: add UDP_GRO from linux v5.0Szabolcs Nagy2019-03-131-0/+1
| | | | | sockopt to enable gro for udp. added in linux commit e20cf8d3f1f763ad28a9cb3b41305b8a8a42653e
* sys/prctl.h: add PR_SPEC_INDIRECT_BRANCH from linux v4.20Szabolcs Nagy2019-03-131-0/+1
| | | | | | prctls to allow per task control of indirect branch speculation on x86. added in linux commit 9137bb27e60e554dab694eafa4cca241fa3a694f
* netinet/in.h add IPV6_MULTICAST_ALL from linux v4.20Szabolcs Nagy2019-03-131-0/+1
| | | | | | ipv6 analogue of IP_MULTICAST_ALL sockopt. added in linux commit 15033f0457dca569b284bef0c8d3ad55fb37eacb
* add PACKET_IGNORE_OUTGOING sockopt from linux v4.20Szabolcs Nagy2019-03-131-0/+1
| | | | new in linux commit fa788d986a3aac5069378ed04697bd06f83d3488
* sys/mman.h: add new hugetlb mmap flags from linux v4.19Szabolcs Nagy2019-03-132-0/+4
| | | | | aarch64 supports 32MB and 512MB hugetlb page sizes too. added in linux commit 20916d4636a9b3c1bf562b305f91d126771edaf9
* elf.h: add new mips core dump note values from linux v4.19Szabolcs Nagy2019-03-131-0/+2
| | | | | | | | NT_MIPS_FP_MODE is new in linux commit 1ae22a0e35636efceab83728ba30b013df761592 NT_MIPS_DSP is new in linux commit 44109c60176ae73924a42a6bef64ef151aba9095
* netinet/udp.h: add UDP_ENCAP_RXRPC from linux v4.19Szabolcs Nagy2019-03-131-0/+1
| | | | | used for optimizing the rxrpc protocol added in linux commit 5271953cad31b97dea80f848c16e96ad66401199
* netinet/tcp.h: add tcp_info fields from linux v4.19Szabolcs Nagy2019-03-131-0/+8
| | | | | | | | | | | | new fields for RFC 4898 tcp stats in linux tcpi_bytes_sent added in commit ba113c3aa79a7f941ac162d05a3620bdc985c58d tcpi_bytes_retrans added in commit fb31c9b9f6c85b1bad569ecedbde78d9e37cd87b tcpi_dsack_dups added in commit 7e10b6554ff2ce7f86d5d3eec3af5db8db482caa tcpi_reord_seen added in commit 7ec65372ca534217b53fd208500cf7aac223a383 The new fields change the size of a public struct and thus an ABI break, but this is how the getsockopt TCP_INFO api is designed: the tcp_info type must only be used with a length parameter in extern interfaces.
* sys/inotify.h: add IN_MASK_CREATE from linux v4.19Szabolcs Nagy2019-03-131-0/+1
| | | | | | inotify_add_watch flag to prevent modifying existing watch descriptors, when used on an already watched inode it fails with EEXIST. added in linux commit 4d97f7d53da7dc830dbf416a3d2a6778d267ae68
* sys/socket.h: add SO_TXTIME from linux v4.19Szabolcs Nagy2019-03-131-0/+2
| | | | added in linux commit 80b14dee2bea128928537d61c333f24cb8cbb62f
* fix POSIX_FADV_DONTNEED/_NOREUSE on s390xJonathan Neuschäfer2019-03-131-0/+2
| | | | | | | | | On s390x, POSIX_FADV_DONTNEED and POSIX_FADV_NOREUSE have different values than on all other architectures that Linux supports. Handle this difference by wrapping their definitions in include/fcntl.h in #ifdef, so that arch/s390x/bits/fcntl.h can override them.
* expose TSVTX unconditionally in tar.hRich Felker2019-03-131-4/+0
| | | | | | | | | | as noted in Austin Group issue #1236, the XSI shading for TSVTX is misplaced in the html version of the standard; it was only supposed to be on the description text. the intent was that the definition always be visible, which is reflected in the pdf version of the standard. this reverts commits d93c0740d86aaf7043e79b942a6c0b3f576af4c8 and 729fef0a9358e2f6f1cd8c75a1a0f7ee48b08c95.
* make FILE a complete type for pre-C11 standard profilesRich Felker2019-03-123-0/+9
| | | | | | | | | | | | | | | | | | | | C11 removed the requirement that FILE be a complete type, which was deemed erroneous, as part of the changes introduced by N1439 regarding completeness of types (see footnote 6 for specific mention of FILE). however the current version of POSIX is still based on C99 and incorporates the old requirement that FILE be a complete type. expose an arbitrary, useless complete type definition because the actual object used to represent FILE streams cannot be public/ABI. thanks to commit 13d1afa46f8098df290008c681816c9eb89ffbdb, we now have a framework for suppressing the public complete-type definition of FILE when stdio.h is included internally, so that a different internal definition can be provided. this is perfectly well-defined, since the same struct tag can refer to different types in different translation units. it would be a problem if the implementation were accessing the application's FILE objects or vice versa, but either would be undefined behavior.
* add membarrier syscall wrapper, refactor dynamic tls install to use itRich Felker2019-02-221-0/+17
| | | | | | | | | | the motivation for this change is twofold. first, it gets the fallback logic out of the dynamic linker, improving code readability and organization. second, it provides application code that wants to use the membarrier syscall, which depends on preregistration of intent before the process becomes multithreaded unless unbounded latency is acceptable, with a symbol that, when linked, ensures that this registration happens.
* update line discipline constantsBobby Bingham2019-02-071-0/+12
|
* move arch-invariant definitions out of bits/ioctl.hBobby Bingham2019-02-071-0/+98
|
* add NT_VMCOREDD to elf.h from linux v4.18Szabolcs Nagy2018-12-091-0/+1
| | | | | used for device driver dump in /proc/vmcore new in linux commit 2724273e8fd00b512596a77ee063f49b25f36507
* add AT_MINSIGSTKSZ to elf.h from linux v4.18Szabolcs Nagy2018-12-091-0/+1
| | | | | | new in linux commit 94b07c1f8c39c6d839df35fa28ffd1785d385897 currently only supported on aarch64
* add TRAP_UNK si_code to signal.h from linux v4.18Szabolcs Nagy2018-12-091-0/+1
| | | | | used for undiagnosed trap exceptions where linux previously set si_code to 0. new in linux commit db78e6a0a6f9f7d7277965600eeb1a5b3a6f55a8
* add SIGSYS support to sys/signalfd.h from linux v4.18Szabolcs Nagy2018-12-091-1/+5
| | | | | | | new in linux commit 76b7f670730e87974f71df9f6129811e2769666e in struct signalfd_siginfo the pad member is changed to __pad to keep the namespace clean, it's not part of the public api.
* add AF_XDP to sys/socket.h from linux v4.18Szabolcs Nagy2018-12-091-1/+4
| | | | | new address family and related macros were added in linux commit 68e8b849b221b37a78a110a0307717d45e3593a0
* update netinet/udp.h for linux v4.18Szabolcs Nagy2018-12-091-0/+3
| | | | | | | add UDP_NO_CHECK6_* to restrict zero UDP6 checksums, new in linux commit 1c19448c9ba6545b80ded18488a64a7f3d8e6998 (pre-v4.18 change, was missed) add UDP_SEGMENT to support generic segmentation offload for udp datagrams, bec1f6f697362c5bc635dacd7ac8499d0a10a4e7 (new in v4.18)
* update netinet/tcp.h for linux v4.18Szabolcs Nagy2018-12-091-0/+18
| | | | | | | | | | | add packet delivery info to tcp_info, new in linux commit feb5f2ec646483fb66f9ad7218b1aad2a93a2a5c add TCP_ZEROCOPY_RECEIVE socket option for zerocopy receive, new in linux commit 05255b823a6173525587f29c4e8f1ca33fd7677d add TCP_INQ socket option and TCP_CM_INQ cmsg to get in-queue bytes in cmsg upon read, new in linux commit b75eba76d3d72e2374fac999926dafef2997edd2 add TCP_REPAIR_* to fix repair socket window probe patch, new in linux commit 31048d7aedf31bf0f69c54a662944632f29d82f2
* restore attribute((const)) to pthread_self and errno location declsRich Felker2018-10-163-0/+9
| | | | | | | | revert commit a603a75a72bb469c6be4963ed1b55fabe675fe15. as a result of commit 1c84c99913bf1cd47b866ed31e665848a0da84a2 this is now safe, assuming an interpretation of the somewhat-underspecified attribute((const)) consistent with real-world usage.
* define MAX_HANDLE_SZ for use with name_to_handle_atKhem Raj2018-09-131-0/+1
| | | | | MAX_HANDLE_SZ is described in name_to_handle_at() to contain maximum expected size for a file handle
* wireup linux/name_to_handle_at and name_to_handle_at syscallsKhem Raj2018-09-121-0/+7
|
* rework mechanism for posix_spawnp calling posix_spawnRich Felker2018-09-121-1/+3
| | | | | | | | | | | | | | | | | | previously, a common __posix_spawnx backend was used that accepted an additional argument for the execve variant to call in the child. this moderately bloated up the posix_spawn function, shuffling arguments between stack and/or registers to call a 7-argument function from a 6-argument one. instead, tuck the exec function pointer in an unused part of the (large) pthread_spawnattr_t structure, and have posix_spawnp duplicate the attributes and fill in a pointer to __execvpe. the net code size change is minimal, but the weight is shifted to the "heavier" function which already pulls in more dependencies. as a bonus, we get rid of an external symbol (__posix_spawnx) that had no really good place for a declaration because it shouldn't have existed to begin with.
* fix dubious char signedness check in limits.hRich Felker2018-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 201995f382cc698ae19289623cc06a70048ffe7b introduced a hack utilizing the signedness of character constants at the preprocessor level to avoid depending on the gcc-specific __CHAR_UNSIGNED__ predef. while this trick works on gcc and presumably other compilers being used, it's not clear that the behavior it depends on is actually conforming. C11 6.4.4.4 ¶10 defines character constants as having type int, and 6.10.1 ¶4 defines preprocessor #if arithmetic to take place in intmax_t or uintmax_t, depending on the signedness of the integer operand types, and it is specified that "this includes interpreting character constants". if character literals had type char and just promoted to int, it would be clear that when char is unsigned they should behave as uintmax_t at the preprocessor level. however, as written the text of the standard seems to require that character constants always behave as intmax_t, corresponding to int, at the preprocessor level. since there is a good deal of ambiguity about the correct behavior and a risk that compilers will disagree or that an interpretation may mandate a change in the behavior, do not rely on it for defining CHAR_MIN and CHAR_MAX correctly. instead, use the signedness of the value (as opposed to the type) of '\xff', which will be positive if and only if plain char is unsigned. this behavior is clearly specified, and the specific case '\xff' is even used in an example, under 6.4.4.4 of the standard.
* fix FP_ILOGB0 and FP_ILOGBNAN definitions to be valid for use in #ifRich Felker2018-08-221-1/+1
| | | | | | | | | | commit 98c9af500125df41fdb46d7e384b00982d72493a wrongly claimed they do not need to be valid for such usage, but the last sentence of C11 7.1.4 ¶1 imposes a broad requirement that all macros specified as integer constant expressions also need to be valid for #if. simply write the value out explicitly. there is no value here in pretending that the width of int will vary.
* remove erroneous SYMLINK_MAX definition from limits.h, pathconfRich Felker2018-08-201-1/+0
| | | | | | | | | | | | | | | | | POSIX requires the symlink function to fail with ENAMETOOLONG if the link contents to be written exceed SYMLINK_MAX in length, but neither Linux nor our syscall wrapper code enforce this. the value 255 for SYMLINK_MAX is not meaningful and does not seem to have been motivated by anything except perhaps a wrong assumption that a definition was mandatory. it has been present (though moving through bits to top-level limits.h) since the beginning of the project history. [f]pathconf is entitled to return -1 as the limit for conf names for which there is no hard limit, with the usual POSIX note that an indefinite limit does not imply an infinite limit. in principle we might should report a limit for filesystems that impose one, but such functionality is not currently present for any of the pathconf limits, and adding it is beyond the scope of fixing the incorrect limit.
* move inclusion of linux headers for kd.h, soundcard.h, vt.h to bitsmidipix2018-07-203-3/+3
| | | | | | | | | | | | maintainer's note: while musl does not use the linux kernel headers, it does provide these three sys/* headers which do nothing but include the corresponding linux/* headers, since the sys/* versions are the ones documented for application use (and they arguably provide interfaces that are not linux-specific but common to other unices). these headers should probably not be provided by libc (rather by a separate package), but as long as they are, use the bits header framework as an aid to out-of-tree ports of musl for non-linux systems that want to implement them in some other way.
* remove inclusion guard hacks for sys/kd.hmidipix2018-07-201-7/+0
| | | | | | | | | | | | maintainer's note: at some point, probably long before linux separated the uapi headers, it was the case, or at least I believed it was the case, that linux/types.h was unsafe to include from userspace. thus, the inclusion guard macro _LINUX_TYPES_H was defined in sys/kd.h to prevent linux/kd.h from including linux/types.h (which it spuriously includes but does not use). as far as I can tell, whatever problem this was meant to solve does not seem to have been present for a long time, and the hack was not done correctly anyway, so removing it is the right thing to do.
* add support for arch-specific ptrace command macrosSzabolcs Nagy2018-07-171-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).
* sys/ptrace.h: add missing PTRACE_EVENT_STOPSzabolcs Nagy2018-07-171-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.
* uchar.h: define char16_t and char32_t for old c++Szabolcs Nagy2018-07-171-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.
* add ST_RELATIME to statvfs.hRich Felker2018-07-121-0/+1
|
* add explicit_bzero implementationDavid Carlier2018-06-261-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.
* fix value of SO_PEERSEC on mips archsRich Felker2018-06-261-1/+1
| | | | adapted from patch by Matthias Schiffer.
* add memfd_create syscall wrapperSzabolcs Nagy2018-06-201-0/+5
| | | | memfd_create was added in linux v3.17 and glibc has api for it.
* add mlock2 linux syscall wrapperSzabolcs Nagy2018-06-201-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.
* add speculation control prctls from linux v4.17Szabolcs Nagy2018-06-191-0/+9
| | | | | | | PR_{SET,GET}_SPECULATION_CTRL controls speculation related vulnerability mitigations, new in commits b617cfc858161140d69cc0b5cc211996b557a1c7 356e4bfff2c5489e016fdb925adbf12a1e3950ee
* add ETH_P_PREAUTH ethertype from linux v4.17Szabolcs Nagy2018-06-191-0/+1
| | | | added in linux commit 4fe0de5b143762d327bfaf1d7be7c5b58041a18c
* add TCP_NLA_* from linux v4.17Szabolcs Nagy2018-06-191-0/+10
| | | | | | | | new and missing netlink attributes types for SCM_TIMESTAMPING_OPT_STATS, new ones were added in commits 7156d194a0772f733865267e7207e0b08f81b02b be631892948060f44b1ceee3132be1266932071e 87ecc95d81d951b0984f2eb9c5c118cb68d0dce8
* add {MSG,SEM,SHM}_STAT_ANY from linux v4.17Szabolcs Nagy2018-06-193-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
* add MAP_FIXED_NOREPLACE from linux v4.17Szabolcs Nagy2018-06-191-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.
* sys/ptrace.h: add PTRACE_SECCOMP_GET_METADATA from linux v4.16Szabolcs Nagy2018-06-191-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.