summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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-143-6/+3
| | | | 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-122-5/+5
| | | | 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-2610-65/+65
| | | | | | | | | 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 unsigned comparison < 0.brad2013-12-081-2/+2
| | | | | | Pointed out by LLVM. ok pirofti@
* spelling; from Maxime Villardderaadt2013-12-021-2/+2
|
* memory leak if copystr() fails, from Maxime Villardderaadt2013-12-021-3/+4
|
* Remove a bunch of a.out related macros.pirofti2013-11-031-29/+1
|
* Regenerate.pirofti2013-11-034-15/+7
| | | | a.out removal led to linux_sys_uselib being obsoleted.
* Remove a.out support from compat_linux(8).pirofti2013-11-033-383/+4
| | | | | | Tested with the syscall regression test suite from IBM and Opera. Requested by deraadt@.
* Regenguenther2013-10-254-26/+14
|
* Unimplement stime() and settimeofday(): why are you using a Linux-compatguenther2013-10-252-32/+4
| | | | | | binary to change the system time? ok pirofti@
* regenguenther2013-10-254-40/+66
|
* Start to deal with the time_t change's effect on compat/linux:guenther2013-10-257-116/+412
| | | | | | | | | | | | | | - add Linux versions of struct rusage, timeval, and itimerval and conversion functions for them - add Linux versions of getrusage(), gettimeofday(), {set,get}itimer(), and nanosleep() - fix various inconsistencies in naming of Linux versions of types and conversion functions - add mappings for LINUX_CLOCK_{PROCESS,THREAD}_CPUTIME_ID to the native versions Originally written months ago as part of the time_t work; long memory, prodding, and ok from pirofti@
* regenguenther2013-08-134-17/+17
|
* Switch time_t, ino_t, clock_t, and struct kevent's ident and dataguenther2013-08-132-10/+9
| | | | | | | | | | | | | | | | | | | | members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
* compat_linux: Add support for future time_t and ino_t size enlargements.pirofti2013-05-107-48/+124
| | | | Reviewed by guenther@.
* futex: Prevent multiple futex pool initializations.pirofti2013-04-101-5/+10
| | | | | This is a temporary (ugly) fix, the pool init call should be moved from linux_elf_probe into a better place.
* futex: Sprinkle a few debug printfs that helped me in the past.pirofti2013-04-101-1/+8
|
* futex: Assert that the refcount is larger than 0 when doing futex_put.pirofti2013-04-101-1/+2
|
* Process futex requeuing even when the thread times out or is signaled.guenther2013-01-151-12/+24
| | | | | Bug report from frantisek holop (minusf at obiit.org) ok pirofiti@
* Use a more descriptive name for the userland cas operation.pirofti2012-11-191-2/+2
| | | | | | | Substitute atomic_ucas_32 with futex_atomic_ucas_int32 to make it obvious who's using this api. Suggested by and okay kettenis@.
* Remove the 'OLF method' used for the transition from a.out to ELF andderaadt2012-09-112-7/+4
| | | | | | | for all the compat layers which are now gone. Linux compat still works because it always used another method in any case, and nothing looks at p_os anymore. ok jsing
* struct orlimit is only used by linux compat now, and can stop pollutingderaadt2012-09-051-3/+9
| | | | the system .h files
* Don't ignore SOCK_CLOEXEC and SOCK_NONBLOCK.pirofti2012-06-262-4/+39
| | | | | | | CAVEATS: Assumes that a new socket can't have any of the FCNTLFLAGS set on it, which _is_ true, currently... (guenther@) Okay guenther@, deraadt@.
* Copy the set_tls_base flag when forking.pirofti2012-06-201-1/+2
| | | | | | | | | | This enables the linux_child_return bits that set the TLS base in the newly forked process. Before this, processes that had the flag set would get a null pointer and segfault when trying to access the TLS area. Chased down and fixed by me. Turned into a proper one line diff by guenther@.