summaryrefslogtreecommitdiff
path: root/sys/compat
AgeCommit message (Collapse)Author
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
2013-11-03Remove a bunch of a.out related macros.Paul Irofti
2013-11-03Regenerate.Paul Irofti
a.out removal led to linux_sys_uselib being obsoleted.
2013-11-03Remove a.out support from compat_linux(8).Paul Irofti
Tested with the syscall regression test suite from IBM and Opera. Requested by deraadt@.
2013-10-31Fix readdir_with_callback() after cookies removal.Paul Irofti
The non-cookie path was probably always broken and never used. The file descriptor offset was never updated after a read so glibc and other syscall consumers would end-up in an infinite loop. Tested with the syscalls regression suite from IBM and with opera.
2013-10-25RegenPhilip Guenther
2013-10-25Unimplement stime() and settimeofday(): why are you using a Linux-compatPhilip Guenther
binary to change the system time? ok pirofti@
2013-10-25regenPhilip Guenther
2013-10-25Start to deal with the time_t change's effect on compat/linux:Philip Guenther
- 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@
2013-09-14miod completed the ELF conversion (and didn't even use this compat bit),Philip Guenther
so this old compat is dead
2013-08-13regenPhilip Guenther
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
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@
2013-05-10compat_linux: Add support for future time_t and ino_t size enlargements.Paul Irofti
Reviewed by guenther@.
2013-04-10futex: Prevent multiple futex pool initializations.Paul Irofti
This is a temporary (ugly) fix, the pool init call should be moved from linux_elf_probe into a better place.
2013-04-10futex: Sprinkle a few debug printfs that helped me in the past.Paul Irofti
2013-04-10futex: Assert that the refcount is larger than 0 when doing futex_put.Paul Irofti
2013-04-09knf. even old ttys need love.Ted Unangst
2013-03-28it is believed that the comment is referring to the define below.Ted Unangst
all thinking performed by tim van der molen
2013-03-26update define name to reflect fact this is openbsd. kill dead code.Ted Unangst
ok deraadt
2013-03-26remove the old_?magic aout exec functions which are never used.Ted Unangst
ok deraadt
2013-01-15Process futex requeuing even when the thread times out or is signaled.Philip Guenther
Bug report from frantisek holop (minusf at obiit.org) ok pirofiti@
2012-11-19Use a more descriptive name for the userland cas operation.Paul Irofti
Substitute atomic_ucas_32 with futex_atomic_ucas_int32 to make it obvious who's using this api. Suggested by and okay kettenis@.
2012-09-11Remove the 'OLF method' used for the transition from a.out to ELF andTheo de Raadt
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
2012-09-05struct orlimit is only used by linux compat now, and can stop pollutingTheo de Raadt
the system .h files
2012-06-26Don't ignore SOCK_CLOEXEC and SOCK_NONBLOCK.Paul Irofti
CAVEATS: Assumes that a new socket can't have any of the FCNTLFLAGS set on it, which _is_ true, currently... (guenther@) Okay guenther@, deraadt@.
2012-06-20Copy the set_tls_base flag when forking.Paul Irofti
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@.
2012-06-19Count should always start from zero.Paul Irofti
Doesn't matter if we need to relocate or not. Makes sense to jasper@
2012-06-19Set the appropiate return value on futex wait.Paul Irofti
Okay jasper@
2012-06-19Avoid eternal sleep.Paul Irofti
Sleep on the actual data address and not on the stack address of the pointer to the data. Okay jasper@
2012-06-19Add extra argument validation for the futex syscall.Paul Irofti
Okay jasper@
2012-06-19- remove outdated comment, we already do an equivalent of linux' access_ok()Jasper Lievisse Adriaanse
using copyin() anyway. ok pirofti@