summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.h
Commit message (Collapse)AuthorAgeFilesLines
* MFC r283480:dchagin2016-01-091-0/+3
| | | | Add utimensat() system call.
* MFC r283443:dchagin2016-01-091-0/+3
| | | | | Put the correct value for the abi_nfdbits parameter of kern_select() for all supported Linuxulators.
* MFC r283431:dchagin2016-01-091-0/+3
| | | | | 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.
* MFC r283421:dchagin2016-01-091-0/+4
| | | | | | | | | | | | | | | | | | | 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 r283410:dchagin2016-01-091-1/+1
| | | | | Put linux_platform into the vdso to avoid copying it onto the stack at every exec.
* MFC r283407:dchagin2016-01-091-0/+2
| | | | | | | | 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.
* MFC r283401:dchagin2016-01-091-0/+1
| | | | Implement prlimit64() system call.
* MFC r283394:dchagin2016-01-091-0/+6
| | | | Implement waitid() system call.
* MFC r283390:dchagin2016-01-091-1/+12
| | | | Add a function for converting wait options.
* MFC r283388:dchagin2016-01-091-4/+0
| | | | Remove a now unused define.
* MFC r283383:dchagin2016-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch linuxulator to use the native 1:1 threads. 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.
* Reduce duplication between i386/linux/linux.h and amd64/linux32/linux.hjhb2013-01-291-0/+48
| | | | | | | by moving bits that are MI out into headers in compat/linux. Reviewed by: Chagin Dmitry dmitry | gmail MFC after: 2 weeks
* linux compat: improve and fix sendmsg/recvmsg compatibilityavg2011-03-261-0/+2
| | | | | | | | | | | | | | | | | - implement baseic stubs for capget, capset, prctl PR_GET_KEEPCAPS and prctl PR_SET_KEEPCAPS. - add SCM_CREDS support to sendmsg and recvmsg - modify sendmsg to ignore control messages if not using UNIX domain sockets This should allow linux pulse audio daemon and client work on FreeBSD and interoperate with native counter-parts modulo the differences in pulseaudio versions. PR: kern/149168 Submitted by: John Wehle <john@feith.com> Reviewed by: netchild MFC after: 2 weeks
* Implement a variation of the linux_common_wait() which shoulddchagin2011-01-281-0/+5
| | | | | | | | | be used by linuxolator itself. Move linux_wait4() to MD path as it requires native struct rusage translation to struct l_rusage on linux32/amd64. MFC after: 1 Month.
* Rework r189362, r191883.dchagin2009-05-101-0/+2
| | | | | | | | | The frequency of the statistics clock is given by stathz. Use stathz if it is available, otherwise use hz. Pointed out by: bde Approved by: kib (mentor)
* A better fix for handling different FPU initial control words for differentjhb2009-03-051-0/+5
| | | | | | | | | | | | | | | | ABIs: - Store the FPU initial control word in the pcb for each thread. - When first using the FPU, load the initial control word after restoring the clean state if it is not the standard control word. - Provide a correct control word for Linux/i386 binaries under FreeBSD/amd64. - Adjust the control word returned for fpugetregs()/npxgetregs() when a thread hasn't used the FPU yet to reflect the real initial control word for the current ABI. - The Linux/i386 ABI for FreeBSD/i386 now properly sets the right control word instead of trashing whatever the current state of the FPU is. Reviewed by: bde
* Add AT_PLATFORM, AT_HWCAP and AT_CLKTCK auxiliary vector entries whichdchagin2009-03-041-0/+15
| | | | | | | | | | | | | | are used by glibc. This silents the message "2.4+ kernel w/o ELF notes?" from some programs at start, among them are top and pkill. Do the assignment of the vector entries in elf_linux_fixup() as it is done in glibc. Fix some minor style issues. Submitted by: Marcin Cieslak <saper at SYSTEM PL> Approved by: kib (mentor) MFC after: 1 week
* Sanitize arguments to linux_mremap().kib2008-02-221-0/+3
| | | | | | | | Check that only MREMAP_FIXED and MREMAP_MAYMOVE flags are specified. Check for the page alignment of the addr argument. Submitted by: rdivacky MFC after: 1 week
* MFp4:netchild2006-12-311-8/+10
| | | | | | - semi-automatic style fixes - spelling fixes in comments - add some comments
* MFP4:netchild2006-10-281-0/+43
Implement prctl(). Submitted by: rdivacky Tested with: LTP
OpenPOWER on IntegriCloud