summaryrefslogtreecommitdiff
path: root/sys/compat
AgeCommit message (Collapse)Author
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
2002-06-05provide local versions of getpid, getuid and getgid that do notjasoni
stuff a value in retval[1] as newer linux libs puke on it.
2002-06-03compatiblity -> compatibilityTheo de Raadt
decriptor -> descriptor authentciated -> authenticated transmition -> transmission
2002-06-02withough -> withoutTheo de Raadt
2002-05-07minor style.jasoni
2002-05-07support TIOCLINUX ioctljasoni
- from NetBSD
2002-04-25unfudge size_t vs. unsigned int parameters.Marc Espie
2002-04-23In mount.h, rename field export -> export_info, to avoid collision with C++.Marc Espie
Synch files that use that field. (This argument is an internal interface specific to OpenBSD, so it won't cause compatibility problems.) (No bump, not an ABI change). ok art, millert...
2002-03-14remove ambiguity in version,ostype,osversion,osrelease and their constanity, ↵Michael Shalayeff
they are and declarre 'em accordingly also removing private externies of those
2002-03-14Final __P removal plus some cosmetic fixupsTodd C. Miller
2002-03-14First round of __P removal in sysTodd C. Miller
2002-03-14Regen after syscall changes (option PTRACE)Miod Vallat
2002-03-14Turn the ptrace(2) syscall into a kernel compile option, option PTRACE inMiod Vallat
your kernel configuration file. By default, GENERIC will enable this. When PTRACE is not enabled, several ptrace-like features of the procfs filesystem will be disabled as well (namely, the ability to read and write any process' registers, as well as attching, single stepping and detaching to/from processes). This should help paranoid people build better sandboxens, and us to build smaller ramdisks.
2002-03-11Since all archs implement PT_GETREGS and PT_SETREGS, make then unoptional.Artur Grabowski
They still stay in MD code for backwards compatibility, but a check in ptrace.h checks if they are defined. Note - the same thing will be done with PT_{GET,SET}FPREGS once vax implements them and with PT_STEP when it's implemented by sparc, sparc64 and alpha.
2002-02-22Extended Attribute support from FreeBSD/TrustedBSD ok art@, deraadt@Dale Rahn
2002-02-16Make this compile.Miod Vallat
2002-02-14More FREF/FRELE fixesPeter Valchev
2002-02-13Ooops. unbreak after last.Artur Grabowski
noted by pvalchev@
2002-02-13FREF/FRELE where required due to fd_getfile.jasoni
- ok art@
2002-02-13More FREF/FRELE on relevant places. Now, only sys_mmap and a bunch of ioctl ↵Artur Grabowski
functions in sys/compat are left.
2002-02-12test before commitTheo de Raadt
2002-02-12More FREF/FRELE protection. This time all users of getvnode.Artur Grabowski
2002-02-12Fix all users of getsock to use FREF/FRELE properly.Artur Grabowski
2002-02-08Opps. unbreak.Artur Grabowski
2002-02-08- Rename FILE_{,UN}USE to FREF and FRELE. USE is a bad verb and we don't haveArtur Grabowski
the same semantics as NetBSD anyway, so it's good to avoid name collissions. - Always fdremove before freeing the file, not the other way around. - falloc FREFs the file. - have FILE_SET_MATURE FRELE the file (It feels like a good ortogonality to falloc FREFing the file). - Use closef as much as possible instead of ffree in error paths of falloc:ing functions. closef is much more careful with the fd and can deal with the fd being forcibly closed by dup2. Also try to avoid manually calling *fo_close when closef can do that for us (this makes some error paths mroe complicated (sys_socketpair and sys_pipe), but others become simpler (sys_open)).
2002-02-08Remove some commented out FILE_UNUSE (incorrect)Artur Grabowski
2002-02-06emulate linux behaviour by passing ioctl's down to the underlying devicejasoni
> From NetBSD; ok art@
2002-02-04syncNiels Provos
2002-02-04fcntl64 support; okay deraadt@Niels Provos
2002-02-02Be more consistent about using fd_getfile where it matters.Artur Grabowski
2002-01-30Move SET/CLR/ISSET macros to param.h. fgsch@ and millert@ okThomas Nordin
2002-01-22call osf1_exec_ecoff_hook for osf1 bin'sEric Jackson
2002-01-16Don't include <sys/map.h> when you don't need what's in it.Miod Vallat
2001-11-30Only m68k-based architectures need to include <machine/psl.h> here.Miod Vallat
2001-11-28Sync in more uvm changes from NetBSD.Artur Grabowski
This time we're getting rid of KERN_* and VM_PAGER_* error codes and use errnos instead.
2001-11-27sync. -mojMats O Jansson
2001-11-27Add clock_gettime. -moj ok art@Mats O Jansson