summaryrefslogtreecommitdiff
path: root/sys/compat
AgeCommit message (Collapse)Author
2010-07-26Correct the links between threads, processes, pgrps, and sessions,Philip Guenthe
so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
2010-07-05remove compat_bsdos supportTed Unangst
2010-07-02remove sunos compat filesTed Unangst
2010-07-013.5 compat is old, but relied upon by other compats still in tree. theTed Unangst
fhstat syscall, however, isn't needed and can go away. ok deraadt
2010-07-01another day, another compat gets removed. today is ibcs2's turnTed Unangst
2010-07-01compat_o43 and compat_23 can dieTheo de Raadt
2010-06-30Merge from NetBSD: "Linux's getsid(2) does in fact return a pid,Philip Guenthe
not a pointer." So just use the native implementation. ok deraadt@
2010-06-30delete osf1 compat filesTed Unangst
2010-06-29Remove COMPAT_HPUX. No one wanted to support it and its fewmets werePhilip Guenthe
blocking other cleanups ok miod@
2010-06-29and the ultrix files go into the attic. ok deraadt miodTed Unangst
2010-06-28<sys/time.b> is for ftime(), which is just in libcompat and not the kernel,Philip Guenthe
so stop including it in kernel .c files. "sure" deraadt@
2010-06-26Don't #include <sys/user.h> into files that don't need the stuffPhilip Guenthe
it defines. In some cases, this means pulling in uvm.h or pcb.h instead, but most of the inclusions were just noise. Tested on alpha, amd64, armish, hppa, i386, macpcc, sgi, sparc64, and vax, mostly by krw and naddy. ok krw@
2010-05-25Fix previous. s/sfs->f_typename/bfs->fs_typename andThordur I. Bjornsson
add a missing ')'. i386 can now build kernels.
2010-05-25Zero out svr4_statvfs and svr4_statvfs64 before using and copy theTodd C. Miller
correct number of bytes into f_fstr. OK kettenis@ deraadt@ nicm@
2010-05-23syncTheo de Raadt
2010-05-23use __alpha__ not alpha for the ifdefTheo de Raadt
2010-05-18dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisDavid Gwynne
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include <sys/dkio.h> to the places that actually want and use the disk ioctls. this became an issue when krw@'s X build failed when he was testing a change to dkio.h. tested by krw@ help from and ok miod@
2010-04-28s/i386/__i386__/, no binary change.Mark Kettenis
2010-04-20remove proc.h include from uvm_map.h. This has far reaching effects, asTed Unangst
sysctl.h was reliant on this particular include, and many drivers included sysctl.h unnecessarily. remove sysctl.h or add proc.h as needed. ok deraadt
2010-01-28regenMiod Vallat
2010-01-28HP-UX getpgrp2() is documented as returning the same value than getpgid(),Miod Vallat
with the same error conditions. So reimplement it as the real thing. ok guenther@
2010-01-28Make sure the process tree is is loop-free by forbidding ptrace()Philip Guenthe
of a direct ancestor, closing a localhost DoS. As an exception, do permit ptrace() of pid 1 and have inferiors() stop climbing if it hits that. ok tedu@ hpux_compat suggestion from miod@
2010-01-04Previous commit was too restrictive: just ignore the CLONE_FS flagPhilip Guenthe
when not doing CLONE_THREAD, like we did before, instead of treating it as an error. This unbreaks Opera running in linux compat. Also, Linux completely ignores CLONE_DETACHED, so do that too, and consistently refer to the flags in comment via their Linux names without trying to abbreviate them further. Problem found and fix confirmed by sturm@
2009-12-28Sanity check flags in fork1(), banning some combos we don't supportPhilip Guenthe
and catching FORK_THREAD when RTHREADS wasn't compiled in. Simplify sys_rfork() based on that. Flesh out the Linux clone support with more flags, but stricter checks for missing support or bad combos. Still not enough for NPTL to work, mind you. ok kettenis@
2009-12-20svr4_sys_waitsys() was seemingly implemented by copying sys_wait4()Philip Guenthe
and hacking on it. Since then, some of the details of finishing a wait have changed (p_exitsig handling), so factor out the common bit into into proc_finish_wait() and have both sys_wait4() and svr4_sys_waitsys() call that to kill the divergence. "looks good" deraadt@
2009-12-15- instead of rolling a macro that is functional equivalent to nitems(),Jasper Lievisse Adriaanse
just use nitems(). (this leaves NENTS() alone for now) ok deraadt@ krw@
2009-12-09Add entries in compat signal mapping arrays for SIGTHR.Jonathan Gray
Prompted by parfait noticing overflows in ibcs2/svr4 which are now changed to being NSIG sized like the others as suggested by tedu. ok tedu@ miod@ guenther@
2009-10-28Add compat errno mappings for the ENOTSUP errno addition.Jonathan Gray
ok deraadt@
2009-09-05Fix various cases of stackgap_alloc() size arguments not being computedMiod Vallat
correctly, usually yielding the right value on 32 bit machines because sizeof int == sizeof pointer.
2009-07-09Remove the VREF() macro and replaces all instances with a call to verf(),Thordur I. Bjornsson
which is exactly what the macro does. Macro's that are nothing more then: #define FUNCTION(arg) function(arg) are almost always pointless and should go away. OK blambert@ Agreed by many.
2009-06-01Move ibcs2_sendsig into compat. Quit poluting machdep.Tobias Weingartner
Ok guenther@
2009-03-05Make ELF platforms generate ELF core dumps. Somewhat based on code fromMark Kettenis
NetBSD. ok kurt@, drahn@, miod@
2009-02-19sys/types.h or sys/param.h MUST BE FIRSTTheo de Raadt
2009-01-29Switch struct stat's timespec members to the names standardized inPhilip Guenthe
POSIX 1003.1-2008, with compatibility macros for the names used in previous version of OpenBSD. Update all the references in the kernel to use the new, standard member names. ok'ed by miod@, otto@; ports build test by naddy@
2009-01-07Fix an occurance of __attribute which should have been __attribute__Jonathan Gray
by converting the entire line to __packed. ok kettenis@
2008-11-01change all callers of enterpgrp() to pre-allocate a pgrp or session ifTheo de Raadt
it might be needed later -- before calling pfind(), so that enterpgrp() can operate without sleeping ok tedu
2008-09-23Fix uninitialized value.Miod Vallat
2008-09-19Fix a bunch of problems and races with posix file locking.Artur Grabowski
- file descriptor table becomes the owner of the lock instead of the proc. - When grabbing the lock, we check if the fd hasn't changed under our feet, this is more or less impossible to solve without a hack like this. I've banged my head against the wall, I figured out a solution, but implementing it correctly would cost me 12 gray hairs. Screw it, this is ugly, but it works. - Wait until usecount drains before releasing the posix lock in closef. - Add missing FREF/FRELE to sys_flock - keep the pid in the flock struct instead of abusing the fact that we used to use the proc as the lock owner. Pointed out by and discussed with Al Viro, big thanks. miod@ ok
2008-08-19When failing to acquire the vnode lock in readdir_with_callback(), don'tPedro Martelletto
try to release it before returning, okay fgsch@ and tedu@.
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-06-12Be more permissive and try to run non-branded non-static binaries if we canMiod Vallat
find their interpreter, as the linux ld.so name is unique and not likely to be found in another /emul/foo hierarchy; allows Opera to run again. Noticed by sturm@
2008-06-12Do not attempt to recognize foreign ELF binaries if emulation is disabled;Miod Vallat
also recognize modern Linux binaries without branding, but with a ``GNU'' ABI note.
2008-06-10Allow linux binaries to call setsockopt(,TCPNODELAY,) on a AF_LOCALMatthieu Herrb
socket, since some of them do that. ok deraadt@, henning@.
2008-05-01spl0() is not your friend, use splx() instead.Miod Vallat
2008-04-12bring in changes as found in libossaudioJacob Meuser
ok ratchov@, brad@ a while ago (except SETTRIGGER parts, which changed recently in libossaudio)
2008-03-16Widen some struct statfs fields to support large filesystem stataOtto Moerbeek
and add some to be able to support statvfs(2). Do the compat dance to provide backward compatibility. ok thib@ miod@
2008-03-09use the right capitalization for platform namesIgor Sobrado
ok jsing@
2008-01-05regenMiod Vallat
2008-01-05Mark vadvise(2) as obsolete and remove its implementation, so instead ofMiod Vallat
returning EINVAL, you'll get ENOSYS. No serious code has used this system call in at least fifteen years. The libc stub will be removed at the next major crank time. ok henning@ deraadt@ krw@ toby@
2007-11-28delete the compat_09_sys_uname code hereTheo de Raadt