summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* Commit the missing linux_videdev2_compat.h (lost somewhere betweennetchild2011-05-041-0/+137
| | | | | | commit tree patch generation -> successful compile tree build test -> commmit). Pointy hat to: netchild
* Add FEATURE macros for v4l and v4l2 to the linuxulator.netchild2011-05-041-0/+4
| | | | Suggested by: ae
* This is v4l2 support for the linuxulator. This allows to access FreeBSDnetchild2011-05-042-0/+403
| | | | | | | | | native devices which support the v4l2 API from processes running within the linuxulator, e.g. skype or flash can access the multimedia/pwcbsd or multimedia/webcamd supplied drivers. Submitted by: nox MFC after: 1 month
* Fix typo in comment, improve comment.netchild2011-05-041-2/+2
|
* Add explanation about the use-permission and FreeBSDify it.netchild2011-05-041-0/+15
|
* Copy the v4l2 header unchanged from the vendor branch.netchild2011-05-041-0/+1164
|
* Regen.mdf2011-04-185-5/+52
|
* Add the posix_fallocate(2) syscall. The default implementation inmdf2011-04-182-0/+16
| | | | | | | | | | | | | | vop_stdallocate() is filesystem agnostic and will run as slow as a read/write loop in userspace; however, it serves to correctly implement the functionality for filesystems that do not implement a VOP_ALLOCATE. Note that __FreeBSD_version was already bumped today to 900036 for any ports which would like to use this function. Also reserve space in the syscall table for posix_fadvise(2). Reviewed by: -arch (previous version)
* Remove stray semicolon.trasz2011-04-101-1/+1
|
* Use atomic load & store for TSC frequency. It may be overkill for amd64 butjkim2011-04-071-3/+5
| | | | | | | | | safer for i386 because it can be easily over 4 GHz now. More worse, it can be easily changed by user with 'machdep.tsc_freq' tunable (directly) or cpufreq(4) (indirectly). Note it is intentionally not used in performance critical paths to avoid performance regression (but we should, in theory). Alternatively, we may add "virtual TSC" with lower frequency if maximum frequency overflows 32 bits (and ignore possible incoherency as we do now).
* Add accounting for most of the memory-related resources.trasz2011-04-052-2/+7
| | | | | Sponsored by: The FreeBSD Foundation Reviewed by: kib (earlier version)
* Implement compat32 shims for PCIOCGETCONF.kib2011-04-021-0/+106
| | | | | | | | | | | | There is a generic problem with the shims for ioctls that receive pointers to the usermode data areas in the data argument. We either have to modify the handler to accept UIO_USERSPACE/UIO_SYSSPACE indicator, or allocate and fill a usermode memory for data buffer in the host format. The change goes the second route, in particular because we do not need to modify the handler. Submitted by: John Wehle <john feith com> MFC after: 2 weeks
* Provide the structures and ioctl number definition for handlingkib2011-04-022-0/+44
| | | | | | | PCIOCGETCONF compat32. Submitted by: John Wehle <john feith com> MFC after: 2 weeks
* Regenkib2011-04-014-20/+58
|
* Add support for executing the FreeBSD 1/i386 a.out binaries on amd64.kib2011-04-016-17/+124
| | | | | | | | | | | | | | | In particular: - implement compat shims for old stat(2) variants and ogetdirentries(2); - implement delivery of signals with ancient stack frame layout and corresponding sigreturn(2); - implement old getpagesize(2); - provide a user-mode trampoline and LDT call gate for lcall $7,$0; - port a.out image activator and connect it to the build as a module on amd64. The changes are hidden under COMPAT_43. MFC after: 1 month
* Revert r220032:linux compat: add SO_PASSCRED option with basic handlingavg2011-03-311-14/+0
| | | | | | | | | | I have not properly thought through the commit. After r220031 (linux compat: improve and fix sendmsg/recvmsg compatibility) the basic handling for SO_PASSCRED is not sufficient as it breaks recvmsg functionality for SCM_CREDS messages because now we would need to handle sockcred data in addition to cmsgcred. And that is not implemented yet. Pointyhat to: avg
* Regenerate.trasz2011-03-305-5/+165
|
* Add rctl. It's used by racct to take user-configurable actions basedtrasz2011-03-301-0/+15
| | | | | | | | on the set of rules it maintains and the current resource usage. It also privides userland API to manage that ruleset. Sponsored by: The FreeBSD Foundation Reviewed by: kib (earlier version)
* Regen.kib2011-03-305-12/+18
|
* Provide compat32 shims for kldstat(2).kib2011-03-303-2/+48
| | | | | Requested and tested by: jpaetzel MFC after: 1 week
* linux compat: add SO_PASSCRED option with basic handlingavg2011-03-261-0/+14
| | | | | | | | This seems to have been a part of a bigger patch by dchagin that either haven't been committed or committed partially. Submitted by: dchagin, nox MFC after: 2 weeks
* linux compat: improve and fix sendmsg/recvmsg compatibilityavg2011-03-264-53/+252
| | | | | | | | | | | | | | | | | - 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 compat32 MEMRANGE_GET and MEMRANGE_SET. This is needed tokib2011-03-252-0/+59
| | | | | | | run 32bit Xorg server with VESA driver. Submitted by: John Wehle <john feith com> MFC after: 1 week
* Fully emulate MDIOCLIST for compat32.kib2011-03-251-1/+9
| | | | MFC after: 1 week
* Remove unneccessary panics, that can be easily triggered by user.kib2011-03-251-8/+0
| | | | | | The copyin() function handles NULL as well as any other pointer. MFC after: 3 days
* Fix file leakage in the freebsd32_ioctl routines.kib2011-03-251-9/+11
| | | | | | | | | | | Code inspection shows freebsd32_ioctl calls fget for a fd and calls a subroutine to handle each specific ioctl. It is expected that the subroutine will call fdrop when done. However many of the subroutines will exit out early if copyin encounters an error resulting in fdrop never being called. Submitted by: John Wehle <john feith com> MFC after: 3 days
* Fix some locking nits with the p_state field of struct proc:jhb2011-03-241-2/+0
| | | | | | | | | | | | | | | | | | - Hold the proc lock while changing the state from PRS_NEW to PRS_NORMAL in fork to honor the locking requirements. While here, expand the scope of the PROC_LOCK() on the new process (p2) to avoid some LORs. Previously the code was locking the new child process (p2) after it had locked the parent process (p1). However, when locking two processes, the safe order is to lock the child first, then the parent. - Fix various places that were checking p_state against PRS_NEW without having the process locked to use PROC_LOCK(). Every place was already locking the process, just after the PRS_NEW check. - Remove or reduce the use of PROC_SLOCK() for places that were checking p_state against PRS_NEW. The PROC_LOCK() alone is sufficient for reading the current state. - Reorder fill_kinfo_proc() slightly so it only acquires PROC_SLOCK() once. MFC after: 1 week
* Staticize functions which are not used somewhere else, move thenetchild2011-03-152-6/+7
| | | | corresponding prototypes from the header to the code file.
* add DTrace systrace support for linux32 and freebsd32 on amd64 syscallsavg2011-03-121-0/+7881
| | | | | | | | | Regenerate system call and systrace support files. PR: kern/152822 Submitted by: Artem Belevich <fbsdlist@src.cx> Reviewed by: jhb (earlier version) MFC after: 3 weeks
* add DTrace systrace support for linux32 and freebsd32 on amd64 syscallsavg2011-03-122-3/+5
| | | | | | | | | | This commits makes necessary changes in syscall/sysent generation infrastructure. PR: kern/152822 Submitted by: Artem Belevich <fbsdlist@src.cx> Reviewed by: jhb (ealier version) MFC after: 3 weeks
* Style(9) fixes. No functional changes.dchagin2011-03-121-252/+261
| | | | MFC after: 2 Week
* Remove now-obsolete comment.jhb2011-03-101-6/+1
| | | | | Submitted by: netchild MFC after: 1 week
* Remove custom interrupt dispatcher. This is a pointless micro-optimizationjkim2011-03-091-23/+0
| | | | | | and it may cause problems if SS and SP are modified by real-mode code. MFC after: 1 month
* Indeed, remove bogus since r219405 check of the Linux ABI.dchagin2011-03-091-3/+0
| | | | | | Pointed out: jhb MFC after: 2 Week
* Extend struct sysvec with new method sv_schedtail, which is used for andchagin2011-03-084-3/+8
| | | | | | | | | | | | | | | explicit process at fork trampoline path instead of eventhadler(schedtail) invocation for each child process. Remove eventhandler(schedtail) code and change linux ABI to use newly added sysvec method. While here replace explicit comparing of module sysentvec structure with the newly created process sysentvec to detect the linux ABI. Discussed with: kib MFC after: 2 Week
* Export login class information via kinfo and make it possible to viewtrasz2011-03-051-1/+2
| | | | it using "ps -o class".
* Regenerate.trasz2011-03-054-5/+11
|
* Add two new system calls, setloginclass(2) and getloginclass(2). This makestrasz2011-03-051-0/+3
| | | | | | | | | it possible for the kernel to track login class the process is assigned to, which is required for RCTL. This change also make setusercontext(3) call setloginclass(2) and makes it possible to retrieve current login class using id(1). Reviewed by: kib (as part of a larger patch)
* Print out shared flag for debug purpose.dchagin2011-03-031-8/+8
| | | | MFC after: 1 Week
* Switch PROCESS_SHARE to AUTO_SHARE (as umtx do). Even for SHARED,dchagin2011-03-031-1/+1
| | | | | | | | if page mapped MAP_ANON linux uses private algorithm too. Disscussed with: jhb MFC after: 3 Days
* Regenerate system call files following addition of cap_enter(2),rwatson2011-03-014-8/+10
| | | | | | | | | | cap_getmode(2), and capabilities.conf. Reviewed by: anderson Discussed with: benl, kris, pjd Obtained from: Capsicum Project Sponsored by: Google, Inc. MFC after: 3 months
* Add initial support for Capsicum's Capability Mode to the FreeBSD kernel,rwatson2011-03-011-2/+2
| | | | | | | | | | | | | | | | | | compiled conditionally on options CAPABILITIES: Add a new credential flag, CRED_FLAG_CAPMODE, which indicates that a subject (typically a process) is in capability mode. Add two new system calls, cap_enter(2) and cap_getmode(2), which allow setting and querying (but never clearing) the flag. Export the capability mode flag via process information sysctls. Sponsored by: Google, Inc. Reviewed by: anderson Discussed with: benl, kris, pjd Obtained from: Capsicum Project MFC after: 3 months
* Use the cprd_mem field when setting the start and length for a memorybrucec2011-02-231-2/+2
| | | | | | | | | resource - the layout of cprd_port is identical but using cprd_mem makes the code easier to understand. PR: kern/118493 Submitted by: Weongyo Jeong <weongyo.jeong at gmail.com> MFC after: 3 days
* Use umtx_key objects to uniquely identify futexes. Private futexes injhb2011-02-231-17/+32
| | | | | | | | | | | | different processes that happen to use the same user address in the separate processes will now be treated as distinct futexes rather than the same futex. We can now honor shared futexes properly by mapping them to a PROCESS_SHARED umtx_key. Private futexes use THREAD_SHARED umtx_key objects. In conjunction with: dchagin Reviewed by: kib MFC after: 1 week
* Fix typos - remove duplicate "the".brucec2011-02-211-1/+1
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Do not clobber %rdx.dchagin2011-02-201-1/+0
| | | | | Before calling vfork() syscall the linux user-space stores the current PID in the %rdx and restore it when the parent process will leave the kernel.
* For realtime signals fill the sigval value.dchagin2011-02-151-0/+4
|
* Make a linux_rt_sigtimedwait() system call is actually working.dchagin2011-02-151-10/+6
| | | | | | | 1) Translate the native signal number in the appropriate Linux signal. 2) Remove bogus code, which can lead to a panic as it calls kern_sigtimedwait with same ksiginfo. 3) Return the corresponding signal number.
* Style(9) fix. Wrap long lines in linux_rt_sigtimedwait().dchagin2011-02-151-5/+8
|
* Put the macro declaration in the relevant include file for future use.dchagin2011-02-152-3/+3
|
OpenPOWER on IntegriCloud