Commit Graph

22 Commits

Author SHA1 Message Date
Szabolcs Nagy 754f66afb7 ioctl TIOCGPTPEER from linux v4.13
added for safe opening of peer end of pty in a mount namespace.
new in linux commit c6325179238f1d4683edbec53d8322575d76d7e2
2017-11-05 18:41:22 -05:00
Szabolcs Nagy 9864f60e92 add statx syscall numbers from linux v4.11
statx was added in linux commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
(there is no libc wrapper yet and microblaze and sh misses the number).
2017-11-05 18:41:11 -05:00
Szabolcs Nagy cc08669380 add SIOCGSTAMPNS socket ioctl macro to ioctl.h
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.)
2017-08-29 19:48:37 -04:00
Szabolcs Nagy 02b50c9d0a fix mips ioctl macros to match linux asm/sockios.h 2017-08-29 19:48:35 -04:00
Szabolcs Nagy 62eaf40bf4 add pkey_{mprotect,alloc,free} syscalls from linux v4.9
see linux commit e8c24d3a23a469f1f40d4de24d872ca7023ced0a
and linux Documentation/x86/protection-keys.txt
2016-12-29 22:10:19 -05:00
Szabolcs Nagy fe39aaae0e 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.
2016-10-20 01:28:25 -04:00
Rich Felker cff5747c74 fix regression in tcsetattr on all mips archs
revert commit 8c316e9e49. it was wrong
and does not match how the kernel API works.
2016-07-13 15:04:30 -04:00
Szabolcs Nagy 8c316e9e49 fix TCS* definitions in mips termios.h
these were incorrectly using the generic definitions.
2016-07-03 15:02:24 -04:00
Szabolcs Nagy ee9b5900fb fix mips termios.h macro exposure/namespace issues
same changes to the defined macros as in powerpc and generic bits.
2016-07-03 15:02:24 -04:00
Szabolcs Nagy 809495f7b7 fix TIOCMSET in mips ioctl.h
it seems it was a typo.
2016-07-03 14:54:35 -04:00
Szabolcs Nagy b76d4e06f1 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
2016-07-03 14:54:34 -04:00
Szabolcs Nagy 058c0b2d70 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
2016-07-03 14:54:34 -04:00
Szabolcs Nagy 5ce901279e add missing TIOC* macros to ioctl.h
these are defined in linux asm/ioctls.h.
(powerpc64 and powerpc bits/ioctl.h are now identical)
2016-07-03 14:54:34 -04:00
Szabolcs Nagy 8735a921d0 add missing SIOCSIFNAME from linux/sockios.h to ioctl.h
glibc ioctl.h has it too.
2016-07-03 14:54:33 -04:00
Szabolcs Nagy 2df9ae9161 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
2016-07-03 14:54:33 -04:00
Rich Felker 7158481d51 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.
2016-07-03 10:49:52 -04:00
Szabolcs Nagy 78b1f3cb14 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.
2016-06-09 13:38:41 -04:00
Bobby Bingham 63e3a1661f deduplicate __NR_* and SYS_* syscall number definitions 2016-05-12 00:34:05 -05:00
Szabolcs Nagy 84d4f5eee5 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.)
2016-03-19 11:30:49 -04:00
Szabolcs Nagy 2de52704ca mips64: add recent linux syscall numbers
add userfaultfd, membarrier and mlock2 system call numbers.
2016-03-19 11:30:22 -04:00
Szabolcs Nagy e9f1c7981a 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.
2016-03-18 22:40:28 -04:00
Rich Felker 83933573af add mips64 port
patch by Mahesh Bodapati and Jaydeep Patil of Imagination
Technologies.
2016-03-06 17:41:56 +00:00