summaryrefslogtreecommitdiffstats
path: root/sys/compat (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove the Linux emulation code, no longer referenced by anythingnaddy2016-03-0260-16756/+0
|
* typo in nd variable used for adding ni_pledge notesemarie2015-11-071-2/+2
| | | | ok deraadt@
* These NDINIT run out of the context of the process doing execve,deraadt2015-11-051-1/+5
| | | | | so PS_PLEDGE is active. PLEDGE_EXEC must be noted for the namei operations, so that the action is understood by the namei check code.
* Rename __sysctl syscall to just sysctl, as the userland wrapper is no longerguenther2015-09-131-3/+3
| | | | | | necessary ok deraadt@ jsing@
* The futex_pool and futex_wp_pool pools never get used in interrupt context.kettenis2015-09-041-4/+4
| | | | ok mlarkin@
* Pass a thread pointer instead of its file descriptor table to getvnode(9).mpi2015-05-071-2/+2
| | | | Input and ok millert@
* Pass a thread pointer instead of its file descriptor table to getsock(9).mpi2015-05-061-2/+2
| | | | | | Diff from Vitaliy Makkoveev. Manpage tweak and ok millert@
* emul_native is only used for kernel threads which can't dump core, soguenther2015-05-051-3/+2
| | | | | | | | | | | delete coredump_trad(), uvm_coredump(), cpu_coredump(), struct md_coredump, and various #includes that are superfluous. This leaves compat_linux processes without a coredump callback. If that ability is desired, someone should update it to use coredump_elf32() and verify the results... ok kettenis@
* add missing splx callsjsg2015-05-021-3/+7
| | | | ok krw@
* Indroduce fd_getfile_mode() and use it were fd_getfile() is directlympi2015-04-302-14/+4
| | | | | | | followed by a mode check. This will simplify the ref/unref dance as soon as fd_getfile() will increment fp's reference counter. Idea from and ok guenther@, ok millert@
* Remove forgotten empty files, from miod, thanksratchov2015-04-224-0/+0
|
* Remove emulation of oss audio ioctls from linux emulation.ratchov2015-04-196-1073/+2
| | | | ok armani, guenther, sthen
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* make sigprocmask(2) not take the kernel lockpelikan2015-02-091-20/+9
| | | | | | Tests on a 4-core CPU show setjmp(3) run four times as fast under load. discussed on tech@ some time ago, now by kettenis and guenther, ok deraadt
* Fix mbuf leak in Linux compat setsockopt() in the error path whenmillert2015-01-301-4/+5
| | | | optval is not valid. Found by Maxime Villard. OK bluhm@
* Move the "stackgap" from the stack into its own page at a random address.kettenis2015-01-261-10/+16
| | | | | | | This allows us the unmap the initial part of the stack, such that it can't be used as a staging area for ROP (or other) attacks. ok guenther@, tedu@
* Ubreak the tree by using "struct ifreq" instead of "struct linux_ifreq".mpi2015-01-211-2/+2
|
* Delete option COMPAT_43: support for pre-sa_len binaries has been obsoleteguenther2015-01-211-8/+22
| | | | | | | | for a couple decades. Keep the OSIOCGIFCONF ioctl to support COMPAT_LINUX but move the rest of the Linux-specific ioctl() handling into linux_socket.c This lets struct osockaddr finally move from sys/socket.h to protocols/talkd.h ok krw@ deraadt@ mpi@
* Prefer linux_sockaddr over osockaddr, so the latter can go away.guenther2015-01-193-193/+68
| | | | | | | | | | | sys_socket() supports SOCK_{CLOEXEC,NONBLOCK} now, so build on that. doaccept() supports the non-inheriting-of-O_NONBLOCK, so build on that. Merge compat_sys_{accept,send,recv}() into their only callers. Lie a little and use struct sockaddr in the linux socket syscall args when it's a return argument to avoid a bunch a casts. Delete many other unnecessary sockaddr casts verified with a curl Linux binary
* must include lock.h to play with lockstedu2014-12-161-1/+2
|
* primary change: move uvm_vnode out of vnode, keeping only a pointer.tedu2014-12-161-1/+3
| | | | | | objective: vnode.h doesn't include uvm_extern.h anymore. followup changes: include uvm_extern.h or lock.h where necessary. ok and help from deraadt
* Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.mpi2014-12-051-1/+2
| | | | ok mikeb@, krw@, bluhm@, tedu@
* Replace a plethora of historical protection options with justderaadt2014-11-161-3/+3
| | | | | | | PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
* Remove unnecessary netinet/in_systm.h include.lteo2014-10-251-2/+1
| | | | | | | Compiles on i386, which is the only architecture where COMPAT_LINUX is enabled at the moment. "If it compiles, go ahead" pirofti@
* remove uneeded proc.h includesjsg2014-09-144-8/+4
| | | | ok mpi@ kspillner@
* Avoid possible use of uninitialized variable.mlarkin2014-09-101-2/+2
| | | | | | From Maxime Villard via a post to tech@ a long time ago ok guenther@, doug@
* Delete procfs; it's always had races and is now unused: no one noticed forguenther2014-09-082-7/+2
| | | | | | months that I broke it before the 5.5 release. confirmed as not being required by ports by sthen@, ajacoutot@, dcoppa@
* Make this consistent with sys/kern/Makefile: require the 'syscalls' targetguenther2014-09-011-1/+6
|
* sync generated filesdoug2014-09-014-9/+9
|
* Sync readlink(2) with IEEE Std 1003.1-2008.doug2014-09-011-3/+3
| | | | discussion, help and ok guenther@
* Release CPU mutexes on EINVAL.doug2014-08-201-2/+3
| | | | ok guenther@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-124-11/+11
| | | | after discussions with beck deraadt kettenis.
* Delete an obsolete commentguenther2014-07-091-7/+1
|
* Don't use meaningless MAP_TRYFIXED flag in compat_linuxmatthew2014-06-281-2/+2
| | | | Pointed out by deraadt
* Retire kernel support for SO_DONTROUTE, this time without breakingmpi2014-04-071-3/+1
| | | | | | | | | | | localhost connections. The plan is to always use the routing table for addresses and routes resolutions, so there is no future for an option that wants to bypass it. This option has never been implemented for IPv6 anyway, so let's just remove the IPv4 bits that you weren't aware of. Tested a least by lteo@, guenther@ and chrisz@, ok mikeb@, benno@
* Eliminates struct pcred by moving the real and saved ugids intoguenther2014-03-302-29/+29
| | | | | | | | | struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
* revert "Retire kernel support for SO_DONTROUTE" diff, which does bad thingssthen2014-03-281-1/+3
| | | | for localhost connections. discussed with deraadt@
* Retire kernel support for SO_DONTROUTE, since the plan is to alwaysmpi2014-03-271-3/+1
| | | | | | | | use the routing table there's no future for an option that wants to bypass it. This option has never been implemented for IPv6 anyway, so let's just remove the IPv4 bits that you weren't aware of. Tested by florian@, man pages inputs from jmc@, ok benno@
* Move p_emul and p_sigcode from proc to process.guenther2014-03-2612-70/+70
| | | | | | | | | Tweak the handling of ktrace EMUL when changing ktracing: only generate one per process (not one per thread) and pass the correct proc pointer down to the VFS layer. Permit generating of NAMI and CSW records inside ktrace(2) itself. ok deraadt@ millert@
* The kernel isn't involved in times(3); <sys/times.h> should never beguenther2014-03-241-2/+1
| | | | included there
* Instead of iterating over the per-interface list of addresses tompi2014-02-131-12/+9
| | | | | | | find the link-layer address of an interface, use the pointer to the sockaddr_dl already present in the interface's descriptor. Tested for regression by pirofti@ with opera.
* Eliminate the exit sig handling, which was only invokable via theguenther2014-02-122-14/+9
| | | | | | | | Linux-compat clone() syscall when *not* using CLONE_THREAD. pirofti@ confirms Opera runs in compat without this, so out it goes; one less hair to choke on in kern_exit.c ok tedu@ pirofti@
* Try to cope better with void pointer to int usage cases.pirofti2014-01-231-3/+5
| | | | | | | Use intptr_t for such cases. More casts/types should be improved in this file. Tested with syscall regression tests from IBM.
* adjust a comment or twotedu2014-01-232-11/+12
|
* bzero -> memsettedu2014-01-212-7/+7
|
* Threads can't be zombies, only processes, so change zombproc to zombprocess,guenther2014-01-201-8/+2
| | | | | | | | make it a list of processes, and change P_NOZOMBIE and P_STOPPED from thread flags to process flags. Add allprocess list for the code that just wants to see processes. ok tedu@
* remove functions that were uses by other (non-linux) compat; andderaadt2014-01-153-60/+11
| | | | convert to ANSI protos while here
* Remove the 4.3BSD tty(4) compatibility shims. RIP. ok millert@naddy2013-12-131-485/+0
|
* Remove unsigned comparison < 0.brad2013-12-081-2/+2
| | | | | | Pointed out by LLVM. ok pirofti@
* spelling; from Maxime Villardderaadt2013-12-021-2/+2
|