summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r283441:dchagin2016-01-0917-31/+625
| | | | | | | | | | | Implement epoll family system calls. This is a tiny wrapper around kqueue() to implement epoll subset of functionality. The kqueue user data are 32bit on i386 which is not enough for epoll user data, so we keep user data in the proc emuldata. Initial patch developed by rdivacky@ in 2007, then extended by Yuri Victorovich @ r255672 and finished by me in collaboration with mjg@ and jillies@.
* MFC r283440:dchagin2016-01-092-9/+30
| | | | | | | | | | | | For future use in the Linuxulator: 1. Add a kern_kqueue() counterpart for kqueue() with flags parameter. 2. Be a bit secure. To avoid a double fp lookup add a kern_kevent_fp() counterpart for kern_kevent() with file pointer parameter instead of file descriptor an pass the buck to it. Suggested by: mjg [2]
* MFC r283439:dchagin2016-01-091-0/+3
| | | | Implement F_DUPFD_CLOEXEC fcntl flag.
* MFC r283438:dchagin2016-01-091-0/+27
| | | | Add several fcntl flags.
* MFC r283437:dchagin2016-01-095-110/+47
| | | | | To avoid code duplication move open/fcntl definitions to the MI header file.
* MFC r283436:dchagin2016-01-093-20/+7
| | | | | Use the BSD_TO_LINUX_SIGNAL() wherever there is no need to check the ABI as it is known.
* MFC r283435:dchagin2016-01-091-18/+13
| | | | | | | Convert Linux wait options to the FreeBSD. Check wait options as a Linux do. Linux always set WEXITED option not a WUNTRACED|WNOHANG which is a strange bug.
* MFC r283434:dchagin2016-01-091-0/+2
| | | | Set WIFCONTINUED to the wait status if needed.
* MFC r283433:dchagin2016-01-091-29/+37
| | | | | | Rewrite linux_recvfrom. To avoid double conversion of sockaddr use kern_recvit() directly. And check fromlen parameter before sockaddr copyin and conversion.
* MFC r283432:dchagin2016-01-093-5/+6
| | | | | | | Being exported through vdso the note.Linux section used by glibc to determine the kernel version (this saves one uname call). Temporarily disable the export of a note.Linux section until I figured out how to change the kernel version in the note.Linux on the fly.
* MFC r283431:dchagin2016-01-097-3/+84
| | | | | Add AT_RANDOM and AT_EXECFN auxiliary vector entries which are used by glibc. At list since glibc version 2.16 using AT_RANDOM is mandatory.
* Regen for r293533.dchagin2016-01-0915-30/+15
|
* MFC r283428:dchagin2016-01-094-8/+7
| | | | | | | | | Change linux faccessat syscall definition to match actual linux one. The AT_EACCESS and AT_SYMLINK_NOFOLLOW flags are actually implemented within the glibc wrapper function for faccessat(). If either of these flags are specified, then the wrapper function employs fstatat() to determine access permissions.
* MFC r283427:dchagin2016-01-0910-31/+32
| | | | | Where possible we will use M_LINUX malloc(9) type. Move M_FUTEX defines to the linux_common.ko.
* Regen for r293530.dchagin2016-01-095-0/+9225
|
* MFC r283424:dchagin2016-01-0913-0/+3265
| | | | Add preliminary support for x86-64 Linux binaries.
* MFC r283423:dchagin2016-01-092-3/+4
| | | | Move FEATURE macros for v4l and v4l2 to the common module.
* MFC r283422:dchagin2016-01-099-189/+164
| | | | | | | | | Refund the proc emuldata struct for future use. For now move flags from thread emuldata to proc emuldata as it was originally intended. As we can have both 64 & 32 bit Linuxulator running any eventhandler can be called twice for us. To prevent this move eventhandlers code from linux_emul.c to the linux_common.ko module.
* MFC r283421:dchagin2016-01-0921-526/+274
| | | | | | | | | | | | | | | | | | | Introduce a new module linux_common.ko which is intended for the following primary purposes: 1. Remove the dependency of linsysfs and linprocfs modules from linux.ko, which will be architecture specific on amd64. 2. Incorporate into linux_common.ko general code for platforms on which we'll support two Linuxulator modules (for both instruction set - 32 & 64 bit). 3. Move malloc(9) declaration to linux_common.ko, to enable getting memory usage statistics properly. Currently linux_common.ko incorporates a code from linux_mib.c and linux_util.c and linprocfs, linsysfs and linux kernel modules depend on linux_common.ko. Temporarily remove dtrace garbage from linux_mib.c and linux_util.c
* MFC r283447:dchagin2016-01-091-1/+0
| | | | Fix build with KTR option.
* MFC r283420:dchagin2016-01-091-0/+30
| | | | Add newfstatat system call for 64-bit Linuxulator.
* MFC r283419:dchagin2016-01-093-6/+8
| | | | Fix compilation with -DDEBUG option.
* MFC r283417:dchagin2016-01-092-2/+6
| | | | Add 64 bit support to the vdso.
* MFC r283416:dchagin2016-01-094-12/+22
| | | | | | x86_64 Linux do not use multiplexing on ipc system calls. Move struct ipc_perm definition to the MD path as it differs for 64 and 32 bit platform.
* MFC r283415:dchagin2016-01-095-14/+36
| | | | Disable i386 call for x86-64 Linux.
* MFC r283414:dchagin2016-01-091-2/+9
| | | | Print out proper procmap entry for 64 bit binaries.
* MFC r283413:dchagin2016-01-092-122/+146
| | | | | 64-bit paltforms, like x86_64, do not use multiplexing on socketcall system calls.
* MFC r283412:dchagin2016-01-091-10/+9
| | | | | | Get ready to commit x86_64 Linux emulation. All fields of type l_int in struct statfs are defined as l_long on i386 and amd64.
* MFC r283411:dchagin2016-01-092-2/+0
| | | | | Remove stale comment about a signal trampoline which is moved to the shared page at r219609.
* MFC r283410:dchagin2016-01-096-22/+22
| | | | | Put linux_platform into the vdso to avoid copying it onto the stack at every exec.
* MFC r283408:dchagin2016-01-092-3/+0
| | | | Eliminate a now unused global declaration of elf_linux_sysvec.
* MFC r283407:dchagin2016-01-0916-79/+874
| | | | | | | | Implement vdso - virtual dynamic shared object. Through vdso Linux exposes functions from kernel with proper DWARF CFI information so that it becomes easier to unwind through them. Using vdso is a mandatory for a thread cancelation && cleanup on a modern glibc.
* Regen for r293511.dchagin2016-01-0910-16/+90
|
* MFC r283403:dchagin2016-01-095-4/+90
| | | | Implement pselect6() system call.
* Regen for r293510.dchagin2016-01-0910-14/+68
|
* MFC r283401:dchagin2016-01-096-6/+82
| | | | Implement prlimit64() system call.
* Regen for r293508.dchagin2016-01-0910-14/+58
|
* MFC r283399:dchagin2016-01-095-4/+23
| | | | Implement dup3() system call.
* MFC r283398:dchagin2016-01-091-0/+7
| | | | | Sched_rr_get_interval returns EINVAL in case when the invalid pid specified. This silence the ltp tests.
* Regen for r293505.dchagin2016-01-0910-14/+58
|
* MFC r283396:dchagin2016-01-096-4/+60
| | | | Implement rt_sigqueueinfo() system call.
* Regen for r293503.dchagin2016-01-0910-16/+80
|
* MFC r283394:dchagin2016-01-096-4/+74
| | | | Implement waitid() system call.
* Regen for r293501.dchagin2016-01-095-7/+7
|
* MFC r283392:dchagin2016-01-091-1/+1
| | | | struct l_rusage does not defined for i386 Linuxulator due to it's nature.
* MFC r283391:dchagin2016-01-096-70/+47
| | | | | | To reduce code duplication introduce linux_copyout_rusage() method. Use it in linux_wait4() system call and move linux_wait4() to the MI path. While here add a prototype for the static bsd_to_linux_rusage().
* MFC r283390:dchagin2016-01-092-1/+31
| | | | Add a function for converting wait options.
* MFC r283389:dchagin2016-01-092-26/+114
| | | | Add a siginfo_t conversion function.
* MFC r283388:dchagin2016-01-091-4/+0
| | | | Remove a now unused define.
* MFC r283386:dchagin2016-01-092-4/+15
| | | | | | Introduce LINUX_VERSION_STR, LINUX_VERSION_CODE macro for use instead of harcoded pr_osrelease, pr_osrel values. This will be used later in the VDSO.
OpenPOWER on IntegriCloud