summaryrefslogtreecommitdiffstats
path: root/sys/amd64/linux32
Commit message (Collapse)AuthorAgeFilesLines
...
* Regen for r283488.dchagin2015-05-245-10/+69
|
* Implement recvmmsg() and sendmmsg() system calls.dchagin2015-05-242-4/+6
|
* Reduce duplication between MD Linux code by moving msg relateddchagin2015-05-241-16/+0
| | | | struct definitions out into the compat/linux/linux_socket.h
* Regen for r283484.dchagin2015-05-245-7/+7
|
* Implement epoll_pwait() system call.dchagin2015-05-242-2/+1
|
* Regen for r283480.dchagin2015-05-245-8/+35
|
* Add utimensat() system call.dchagin2015-05-242-2/+2
| | | | | The patch developed by Jilles Tjoelker and Andrew Wilcox and adopted for lemul branch by me.
* Rework signal code to allow using it by other modules, like linprocfs:dchagin2015-05-243-93/+16
| | | | | | | | | | | | | | | | | 1. Linux sigset always 64 bit on all platforms. In order to move Linux sigset code to the linux_common module define it as 64 bit int. Move Linux sigset manipulation routines to the MI path. 2. Move Linux signal number definitions to the MI path. In general, they are the same on all platforms except for a few signals. 3. Map Linux RT signals to the FreeBSD RT signals and hide signal conversion tables to avoid conversion errors. 4. Emulate Linux SIGPWR signal via FreeBSD SIGRTMIN signal which is outside of allowed on Linux signal numbers. PR: 197216
* According to Linux man sigaltstack(3) shall return EINVAL if the ssdchagin2015-05-242-27/+0
| | | | | | | | | | | | | argument is not a null pointer, and the ss_flags member pointed to by ss contains flags other than SS_DISABLE. However, in fact, Linux also allows SS_ONSTACK flag which is simply ignored. For buggy apps (at least mono) ignore other than SS_DISABLE flags as a Linux do. While here move MI part of sigaltstack code to the appropriate place. Reported by: abi at abinet dot ru
* Regen for r283467.dchagin2015-05-244-5/+7
|
* Call nosys in case when the incorrect syscall number is specified.dchagin2015-05-242-1/+4
| | | | Reported by: trinity
* Regen for r283465.dchagin2015-05-245-7/+34
|
* Add preliminary fallocate system call implementationdchagin2015-05-242-3/+2
| | | | | | | to emulate posix_fallocate() function. Differential Revision: https://reviews.freebsd.org/D1523 Reviewed by: emaste
* Regen for r283451.dchagin2015-05-245-8/+40
|
* Implement ppoll() system call.dchagin2015-05-242-2/+2
| | | | | Differential Revision: https://reviews.freebsd.org/D1105 Reviewed by: trasz
* Include opt_compat.h, so that COMPAT_LINUX32 is defined, and we candchagin2015-05-241-0/+2
| | | | | | | | | access to the semop structs and functions. Submitted by: cognet@ Differential Revision: https://reviews.freebsd.org/D1095 Reviewed by: trasz
* Regen for r283444.dchagin2015-05-245-10/+39
|
* Implement eventfd system call.dchagin2015-05-242-4/+2
| | | | | Differential Revision: https://reviews.freebsd.org/D1094 In collaboration with: Jilles Tjoelker
* Put the correct value for the abi_nfdbits parameter of kern_select() fordchagin2015-05-241-0/+1
| | | | | | | all supported Linuxulators. Differential Revision: https://reviews.freebsd.org/D1093 Reviewed by: trasz
* Regen for r283441.dchagin2015-05-245-19/+129
|
* Implement epoll family system calls. This is a tiny wrapperdchagin2015-05-242-9/+8
| | | | | | | | | | | | 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@. Differential Revision: https://reviews.freebsd.org/D1092
* To avoid code duplication move open/fcntl definitions to the MIdchagin2015-05-241-36/+1
| | | | | | | header file. Differential Revision: https://reviews.freebsd.org/D1087 Reviewed by: trasz
* Use the BSD_TO_LINUX_SIGNAL() wherever there is no needdchagin2015-05-241-6/+2
| | | | | | to check the ABI as it is known. Differential Revision: https://reviews.freebsd.org/D1086
* Being exported through vdso the note.Linux section used by glibcdchagin2015-05-241-2/+2
| | | | | | | | | 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. Differential Revision: https://reviews.freebsd.org/D1081 Reviewed by: trasz
* Add AT_RANDOM and AT_EXECFN auxiliary vector entries which are used bydchagin2015-05-242-1/+27
| | | | | | glibc. At list since glibc version 2.16 using AT_RANDOM is mandatory. Differential Revision: https://reviews.freebsd.org/D1080
* Regen for r283428.dchagin2015-05-245-10/+5
|
* Change linux faccessat syscall definition to match actual linux one.dchagin2015-05-241-1/+2
| | | | | | | | | | 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. Differential Revision: https://reviews.freebsd.org/D1078 Reviewed by: trasz
* Refund the proc emuldata struct for future use. For now move flags fromdchagin2015-05-241-13/+0
| | | | | | | | | | 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. Differential Revision: https://reviews.freebsd.org/D1073
* Introduce a new module linux_common.ko which is intended for thedchagin2015-05-242-14/+8
| | | | | | | | | | | | | | | | | | | | | | | 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 Differential Revision: https://reviews.freebsd.org/D1072 In collaboration with: Vassilis Laganakos. Reviewed by: trasz
* x86_64 Linux do not use multiplexing on ipc system calls.dchagin2015-05-241-0/+10
| | | | | | | | Move struct ipc_perm definition to the MD path as it differs for 64 and 32 bit platform. Differential Revision: https://reviews.freebsd.org/D1068 Reviewed by: trasz
* Remove stale comment about a signal trampoline whichdchagin2015-05-241-1/+0
| | | | | | | is moved to the shared page at r219609. Differential Revision: https://reviews.freebsd.org/D1063 Reviewed by: trasz
* Put linux_platform into the vdso to avoid copying it onto the stack atdchagin2015-05-243-16/+16
| | | | | | | every exec. Differential Revision: https://reviews.freebsd.org/D1062 Reviewed by: trasz
* Eliminate a now unused global declaration of elf_linux_sysvec.dchagin2015-05-241-2/+0
| | | | | Differential Revision: https://reviews.freebsd.org/D1061 Reviewed by: trasz
* Implement vdso - virtual dynamic shared object. Through vdso Linuxdchagin2015-05-245-30/+256
| | | | | | | | | 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. Differential Revision: https://reviews.freebsd.org/D1060
* Regen for r283403.dchagin2015-05-245-8/+45
|
* Implement pselect6() system call.dchagin2015-05-242-2/+3
| | | | | Differential Revision: https://reviews.freebsd.org/D1051 Reviewed by: trasz
* Regen for r283401.dchagin2015-05-245-7/+34
|
* Implement prlimit64() system call.dchagin2015-05-242-3/+4
| | | | | Differential Revision: https://reviews.freebsd.org/D1050 Reviewed by: emaste, trasz
* Regen for r283399.dchagin2015-05-245-7/+29
|
* Implement dup3() system call.dchagin2015-05-242-2/+2
| | | | | Differential Revision: https://reviews.freebsd.org/D1049 Reviewed by: emaste
* Regen for r283396.dchagin2015-05-245-7/+29
|
* Implement rt_sigqueueinfo() system call.dchagin2015-05-242-2/+2
| | | | | Differential Revision: https://reviews.freebsd.org/D1047 Reviewed by: trasz
* Regen for r283394.dchagin2015-05-245-8/+40
|
* Implement waitid() system call.dchagin2015-05-242-2/+3
| | | | Differential Revision: https://reviews.freebsd.org/D1046
* To reduce code duplication introduce linux_copyout_rusage() method.dchagin2015-05-243-39/+16
| | | | | | | | 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(). Differential Revision: https://reviews.freebsd.org/D2138 Reviewed by: trasz
* Some style(9) && whitespaces fixes. No functional changes.dchagin2015-05-241-3/+3
| | | | | Differential Revision: https://reviews.freebsd.org/D1041 Reviewed by: emaste
* Switch linuxulator to use the native 1:1 threads.dchagin2015-05-242-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reasons: 1. Get rid of the stubs/quirks with process dethreading, process reparent when the process group leader exits and close to this problems on wait(), waitpid(), etc. 2. Reuse our kernel code instead of writing excessive thread managment routines in Linuxulator. Implementation details: 1. The thread is created via kern_thr_new() in the clone() call with the CLONE_THREAD parameter. Thus, everything else is a process. 2. The test that the process has a threads is done via P_HADTHREADS bit p_flag of struct proc. 3. Per thread emulator state data structure is now located in the struct thread and freed in the thread_dtor() hook. Mandatory holdig of the p_mtx required when referencing emuldata from the other threads. 4. PID mangling has changed. Now Linux pid is the native tid and Linux tgid is the native pid, with the exception of the first thread in the process where tid and pid are one and the same. Ugliness: In case when the Linux thread is the initial thread in the thread group thread id is equal to the process id. Glibc depends on this magic (assert in pthread_getattr_np.c). So for system calls that take thread id as a parameter we should use the special method to reference struct thread. Differential Revision: https://reviews.freebsd.org/D1039
* Regen for r283379.dchagin2015-05-245-26/+38
|
* Implement a Linux version of sched_getparam() && sched_setparam().dchagin2015-05-241-4/+4
| | | | | | | Temporarily use the first thread in proc. Differential Revision: https://reviews.freebsd.org/D1036 Reviewed by: trasz
* Remove a now unused include.dchagin2015-05-241-1/+0
| | | | | Differential Revision: https://reviews.freebsd.org/D1035 Reviewed by: trasz
OpenPOWER on IntegriCloud