summaryrefslogtreecommitdiff
path: root/sys/compat
AgeCommit message (Collapse)Author
2015-11-07typo in nd variable used for adding ni_pledge noteSebastien Marie
ok deraadt@
2015-11-05These NDINIT run out of the context of the process doing execve,Theo de Raadt
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.
2015-09-13Rename __sysctl syscall to just sysctl, as the userland wrapper is no longerPhilip Guenther
necessary ok deraadt@ jsing@
2015-09-04The futex_pool and futex_wp_pool pools never get used in interrupt context.Mark Kettenis
ok mlarkin@
2015-05-07Pass a thread pointer instead of its file descriptor table to getvnode(9).Martin Pieuchot
Input and ok millert@
2015-05-06Pass a thread pointer instead of its file descriptor table to getsock(9).Martin Pieuchot
Diff from Vitaliy Makkoveev. Manpage tweak and ok millert@
2015-05-05emul_native is only used for kernel threads which can't dump core, soPhilip Guenther
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@
2015-05-02add missing splx callsJonathan Gray
ok krw@
2015-04-30Indroduce fd_getfile_mode() and use it were fd_getfile() is directlyMartin Pieuchot
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@
2015-04-22Remove forgotten empty files, from miod, thanksAlexandre Ratchov
2015-04-19Remove emulation of oss audio ioctls from linux emulation.Alexandre Ratchov
ok armani, guenther, sthen
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2015-02-09make sigprocmask(2) not take the kernel lockMartin Pelikan
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
2015-01-30Fix mbuf leak in Linux compat setsockopt() in the error path whenTodd C. Miller
optval is not valid. Found by Maxime Villard. OK bluhm@
2015-01-26Move the "stackgap" from the stack into its own page at a random address.Mark Kettenis
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@
2015-01-21Ubreak the tree by using "struct ifreq" instead of "struct linux_ifreq".Martin Pieuchot
2015-01-21Delete option COMPAT_43: support for pre-sa_len binaries has been obsoletePhilip Guenther
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@
2015-01-19Prefer linux_sockaddr over osockaddr, so the latter can go away.Philip Guenther
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
2014-12-16must include lock.h to play with locksTed Unangst
2014-12-16primary change: move uvm_vnode out of vnode, keeping only a pointer.Ted Unangst
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
2014-12-05Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.Martin Pieuchot
ok mikeb@, krw@, bluhm@, tedu@
2014-11-16Replace a plethora of historical protection options with justTheo de Raadt
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
2014-10-25Remove unnecessary netinet/in_systm.h include.Lawrence Teo
Compiles on i386, which is the only architecture where COMPAT_LINUX is enabled at the moment. "If it compiles, go ahead" pirofti@
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-09-10Avoid possible use of uninitialized variable.Mike Larkin
From Maxime Villard via a post to tech@ a long time ago ok guenther@, doug@
2014-09-08Delete procfs; it's always had races and is now unused: no one noticed forPhilip Guenther
months that I broke it before the 5.5 release. confirmed as not being required by ports by sthen@, ajacoutot@, dcoppa@
2014-09-01Make this consistent with sys/kern/Makefile: require the 'syscalls' targetPhilip Guenther
2014-09-01sync generated filesDoug Hogan
2014-09-01Sync readlink(2) with IEEE Std 1003.1-2008.Doug Hogan
discussion, help and ok guenther@
2014-08-20Release CPU mutexes on EINVAL.doug
ok guenther@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-09Delete an obsolete commentPhilip Guenther
2014-06-28Don't use meaningless MAP_TRYFIXED flag in compat_linuxMatthew Dempsky
Pointed out by deraadt
2014-04-07Retire kernel support for SO_DONTROUTE, this time without breakingMartin Pieuchot
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@
2014-03-30Eliminates struct pcred by moving the real and saved ugids intoPhilip Guenther
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@
2014-03-28revert "Retire kernel support for SO_DONTROUTE" diff, which does bad thingsStuart Henderson
for localhost connections. discussed with deraadt@
2014-03-27Retire kernel support for SO_DONTROUTE, since the plan is to alwaysMartin Pieuchot
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@
2014-03-26Move p_emul and p_sigcode from proc to process.Philip Guenther
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@
2014-03-24The kernel isn't involved in times(3); <sys/times.h> should never bePhilip Guenther
included there
2014-02-13Instead of iterating over the per-interface list of addresses toMartin Pieuchot
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.
2014-02-12Eliminate the exit sig handling, which was only invokable via thePhilip Guenther
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@
2014-01-23Try to cope better with void pointer to int usage cases.Paul Irofti
Use intptr_t for such cases. More casts/types should be improved in this file. Tested with syscall regression tests from IBM.
2014-01-23adjust a comment or twoTed Unangst
2014-01-21bzero -> memsetTed Unangst
2014-01-20Threads can't be zombies, only processes, so change zombproc to zombprocess,Philip Guenther
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@
2014-01-15remove functions that were uses by other (non-linux) compat; andTheo de Raadt
convert to ANSI protos while here
2013-12-13Remove the 4.3BSD tty(4) compatibility shims. RIP. ok millert@Christian Weisgerber
2013-12-08Remove unsigned comparison < 0.Brad Smith
Pointed out by LLVM. ok pirofti@
2013-12-02spelling; from Maxime VillardTheo de Raadt
2013-12-02memory leak if copystr() fails, from Maxime VillardTheo de Raadt