summaryrefslogtreecommitdiff
path: root/sys/compat
AgeCommit message (Collapse)Author
2003-06-03fix various 3/4 licenses according to "terms" fileTheo de Raadt
2003-06-03Use an ISC-tyle license for all my code; it is simpler and more permissive.Todd C. Miller
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-06-02some license cleanupTheo de Raadt
2003-05-16Do the new-style EI_OSABI check first because it is cheaper.Todd C. Miller
2003-05-13De-hackify. Use proper defines now that we have EI_OSABI and ELFOSABI_FREEBSDTodd C. Miller
2003-05-12strlcpy; tedu okTheo de Raadt
2003-05-11syncTheo de Raadt
2003-05-11finish compat swapon cleanupTheo de Raadt
2003-05-10RegenMiod Vallat
2003-05-10Deprecate the swapon system call and move it to COMPAT_25 land, since swapctlMiod Vallat
has been introduced for this release. ok deraadt@ weingart@
2003-05-07string cleaning; ok art teduTheo de Raadt
2003-04-30RegenMiod Vallat
2003-04-30Oops, repair omsync deprecation lossage.Miod Vallat
2003-04-29Deprecate omsync syscall, and only enable it if COMPAT_25 is required.Miod Vallat
ok deraadt@
2003-04-05Add missing 230400 to linux_speeds array to match linux_spmasks.Todd C. Miller
Also make linux_spmasks const, since it is. deraadt@ OK
2003-03-11Hack to match new FreeBSD ELF binaries (such as opera). A properTodd C. Miller
version of this will go in after 3.3 is out and the tree unlocks. deraadt@ OK
2003-02-25fix off by one signal checks. thanks yichen's checkerTed Unangst
ok niklas@
2003-01-30regen now that setreuid/setregid have moved out of compat and into kernTodd C. Miller
2003-01-30Bring back setreuid(2) and setregid(2) as first class syscallsTodd C. Miller
(but still implemented via setres[ug]id(2)). Basically this just moves them from COMPAT_43 into kern_prot.c. Also fixes a typo in my old implementation. The userland portion will follow in a few days. deraadt@ OK
2003-01-21Do not do multiple stackgap_init calls in the same syscall execution,Niklas Hallqvist
chances are big that entities allocated early should live longer than later stackgap_init invocations. This fixes UDP problems in Linux emulation, most notably YP, and some DNS issues. ok fgsch@, jasoni@ & pvalchev@
2003-01-09Remove fetch(9) and store(9) functions from the kernel, and replace the fewMiod Vallat
remaining instances of them with appropriate copy(9) usage. ok art@, tested on all arches unless my memory is non-ECC
2003-01-04spellingTheo de Raadt
2002-12-17Make SysV-style shared memory and semaphore limits sysctl'able.Todd C. Miller
Instead of allocating a static amount of memory for the data structures via valloc() in allocsys(), allocate things dynamically using pool(9) when possible and malloc(9) when not. The various members of struct seminfo and struct shminfo are in kern.seminfo and kern.shminfo respectively (not all members of kern.seminfo are changable). The data structures used still leave something to be desired but things are not made worse in that respect by this commit.
2002-12-16unbust *stat64. From NetBSD.Federico G. Schwindt
deraadt@ ok.
2002-12-10Config.new is so old its frozen now, no need to mention it.Miod Vallat
2002-12-10pass p->p_emul to stackgap_init(), not 0 to be consistent.Federico G. Schwindt
2002-12-10fix setsockopt SO_REUSEADDR under linux emul; from NetBSD.Federico G. Schwindt
thanks to jpmp@fibertel.com.ar for the testbed. ish@ ok
2002-11-27do address translation for for socket syscalls that pass addresses inJason Ish
or out - this allows linux programs that use IPv6 to work (not ipv4 mapped addresses though) - from NetBSD
2002-11-06maintain refcnt correctly, ok art@Niklas Hallqvist
2002-10-30regenTodd C. Miller
2002-10-30Now that we have [gs]etres[ug]id() as a native system call, use itTodd C. Miller
for HP-UX, FreeBSD, and Linux emulations. Note that Linux has two versions of these system calls. One for 16bit uids and another for 32bit uids.
2002-10-30Implement osetre[ug]id() in terms of setres[ug]id().Todd C. Miller
2002-10-28getdents64 support, based on FreeBSD.Federico G. Schwindt
thanks to jpmk@fibertel.com.ar for providing a testbed; jasoni ok.
2002-10-28add getdents64.Federico G. Schwindt
2002-10-03Check for negative values here too. "makes sense" mickey@, ok deraadt@Thomas Nordin
2002-08-23Just like getvnode, make getsock FREF the file so that we can't get awayArtur Grabowski
with not refing it. Eyeballed by lurene@daemonkitty.net, fries@, nordin@ and fries@ Some additional cleanups by nordin@
2002-08-23Cleanup change. Since almost all callers (except one) of getvnode did a FREFArtur Grabowski
on the returned file, do the FREF inside getvnode so that people can't get away with avoiding FREF and FRELE. Eyeballed by various people.
2002-08-23FREF/FRELE cleanup/simplification, no functional changes; ok artPeter Valchev
2002-08-22Change the vnode locking in exec to not keep the vnode locked almost allArtur Grabowski
the time. This could lead to problems when a process wants to do an exec on the same vnode it's being run from and needs to copy in arguments from an uncached page in the data segment. When that happens uvm detects a vnode deadlock and returns an error causing execve() return EFAULT. This fixes the regress test in regress/sys/kern/exec_self Also, initialize scriptvp early in exec_script because it could be used uninitialized in a failure case.
2002-08-09Correct the size arg to copyout.Aaron Campbell
2002-08-09socket flags are not inherited via accept() on linux; found and testedFederico G. Schwindt
by gustavo, several ppl ok@
2002-08-02More possible int overflows found by Silvio Cesare.Todd C. Miller
ibcs2_stat.c one OK by provos@
2002-07-25Avoid time wrap at securelevel 2. ok millert@ fgsch@Thomas Nordin
2002-07-20Instead of copying out the signal trampoline on top of the stack, createArtur Grabowski
an uvm aobj, copy out the signal trampoline into it and share that page among all processes for the same emulation. This also requires us to actually be able to tell signal code where the trampoline is located, so introduce a new field in struct proc - p_sigcode that is a pointer to sigcode. This allows us to remove all the ugly calculations of the signal trampoline address done in every sendsig function in the tree (that's why so many files are changed). Tested by various people. ok deraadt@
2002-07-14More glue needed for cross-compilationMarcus Watts
2002-07-12Change the locking on the mountpoint slightly. Instead of using mnt_lockArtur Grabowski
to get shared locks for lookup and get the exclusive lock only with LK_DRAIN on unmount and do the real exclusive locking with flags in mnt_flags, we now use shared locks for lookup and an exclusive lock for unmount. This is accomplished by slightly changing the semantics of vfs_busy. Old vfs_busy behavior: - with LK_NOWAIT set in flags, a shared lock was obtained if the mountpoint wasn't being unmounted, otherwise we just returned an error. - with no flags, a shared lock was obtained if the mountpoint was being unmounted, otherwise we slept until the unmount was done and returned an error. LK_NOWAIT was used for sync(2) and some statistics code where it isn't really critical that we get the correct results. 0 was used in fchdir and lookup where it's critical that we get the right directory vnode for the filesystem root. After this change vfs_busy keeps the same behavior for no flags and LK_NOWAIT. But if some other flags are passed into it, they are passed directly into lockmgr (actually LK_SLEEPFAIL is always added to those flags because if we sleep for the lock, that means someone was holding the exclusive lock and the exclusive lock is only held when the filesystem is being unmounted. More changes: dounmount must now be called with the exclusive lock held. (before this the caller was supposed to hold the vfs_busy lock, but that wasn't always true). Zap some (now) unused mount flags. And the highlight of this change: Add some vfs_busy calls to match some vfs_unbusy calls, especially in sys_mount. (lockmgr doesn't detect the case where we release a lock noone holds (it will do that soon)). If you've seen hangs on reboot with mfs this should solve it (I repeat this for the fourth time now, but this time I spent two months fixing and redesigning this and reading the code so this time I must have gotten this right).
2002-07-06syncThomas Nordin
2002-07-06Remove kernel support for NTP. ok deraadt@ and tholo@Thomas Nordin
2002-06-05regenjasoni