summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2004-07-18return EINVAL if ftruncate(2) is passed a negative offsetAnil Madhavapeddy
ok millert@, miod@, marius@
2004-07-15syncTheo de Raadt
2004-07-153 functions had inexact types; millert okTheo de Raadt
2004-07-15regenTodd C. Miller
2004-07-15Rename structs oipc_perm, omsqid_ds, osemid_ds, oshmid_ds to ipc_perm23,Todd C. Miller
etc to avoid confusion and for consistency with the *35 ones. Remove *n2o functions that don't belong outside of compat.
2004-07-14regen for new {msg,sem,shm}ctl syscalls.Todd C. Miller
2004-07-14Because mode_t is used in struct ipc_perm we need new versions ofTodd C. Miller
the msgctl, semctl, and shmctl system calls. This moves the old versions to COMPAT_35 and adds new ones. WARNING: While this fixes things like shared memory in the X server for old (pre-mode_t change) binaries, it will break binaries that use shared memory built between the time of the mode_t change (Jul 13th) and now. If you rebuild X during that interval you will need to do it again after updating the rest of userland.
2004-07-14Move the guts of the {sem,msg,shm}ctl system calls into a new functionTodd C. Miller
which also takes two function pointers for copyin/copyout. For the real syscalls these are just the normal copyin/copyout functions. For the compat routines, these are funtions that convert between the new and old foo_ds structs automagically. OK deraadt@
2004-07-14regenTodd C. Miller
2004-07-14fhstat(2) uses struct stat too and so needs replacing as well.Todd C. Miller
OK miod@
2004-07-13regen after stat/mode_t/nlink_t changesTodd C. Miller
2004-07-13Change mode_t and nlink_t from 16bit to 32bit. This allows us toTodd C. Miller
use mode_t in syscalls.master and to use mode_t in more places in the kernel. It also makes lint much more useful on kernel code. I've also added a placeholder for st_birthtime to make a UFS2 import easier at some future date. Requested by and OK deraadt@
2004-07-11save an (eventually existent) namei process context when going overPedro Martelletto
symbolic links. fixes pr 3842, ok tedu@, art@
2004-07-09regenTodd C. Miller
2004-07-09Rename ostat -> stat43 to disambiguate from upcoming struct stat changes.Todd C. Miller
Idea from NetBSD, OK deraadt@
2004-07-09go away staticsNiklas Hallqvist
2004-07-07fix an issue when scripts are exec'd under systrace wheremarius eriksen
the argv[0] would be normalized, and hence break scripts that depend on how they were called. this fixes an issue in the ports builds. ok provos@ deraadt@; lots of testing during hackathon sturm@ naddy@
2004-07-04proc_stop needs sched_lock locked. From art, verified with NetBSD.Niklas Hallqvist
2004-07-03if vinvalbuf() fails, unlock the vnode and release it. ok marius@Pedro Martelletto
2004-06-28splhigh around ec_count fetches -- sorry art; ok aaronTheo de Raadt
2004-06-28Add new, generic ``evcount'' event counter API to the kernel. From art@,Aaron Campbell
with modifications from me. Includes code for generic interrupt counter fetching via sysctl. deraadt@ tholo@ drahn@ millert@ ok
2004-06-26Don't sleep forever on short nanosleeps.Thomas Nordin
2004-06-25Instead of accessing ci_dev (that's an MI field), provide a marco thatArtur Grabowski
translates a cpu_info structure into a human-readable cpu number. drahn@ deraadt@ ok
2004-06-24Remove the 8 page limit for sysctl_proc_args after discussing with Theo.Todd C. Miller
Add trivial support for passing a NULL pointer for the argv buffer; currently just returns ARG_MAX for KERN_PROC_ARGV and KERN_PROC_ENV.
2004-06-24This moves access to wall and uptime variables in MI code,Thorsten Lockert
encapsulating all such access into wall-defined functions that makes sure locking is done as needed. It also cleans up some uses of wall time vs. uptime some places, but there is sure to be more of these needed as well, particularily in MD code. Also, many current calls to microtime() should probably be changed to getmicrotime(), or to the {,get}microuptime() versions. ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others "Oh, that is not your problem!" from miod@
2004-06-23a few fixes to systracemarius eriksen
- add an exec message so that whenever a set-uid/gid process exec's a new image which we may control, the exec does not go by unnoticed. - take special care to check for P_SUGIDEXEC as well as P_SUGID, corresponding to the same changes that were made in the ptrace code a while ago ok niels@, sturm@; thanks to naddy for testing
2004-06-21First step towards more sane time handling in the kernel -- this changesThorsten Lockert
things such that code that only need a second-resolution uptime or wall time, and used to get that from time.tv_secs or mono_time.tv_secs now get this from separate time_t globals time_second and time_uptime. ok art@ niklas@ nordin@
2004-06-20Another merge error from smp branch.Artur Grabowski
Found by otto@drijf.net deraadt@ ok
2004-06-20Merge error in smp merge. It's a miracle that people haven't noticed theArtur Grabowski
scheduling errors on non-i386 yet. deraadt@ aaron@ ok
2004-06-20Fix inversed logic in handling the "nowait/waitok" flags. Bugs in two placesArtur Grabowski
in malloc_debug. Also, add an assert-like function to sprinkle in code you're debugging at the moment. Those asserts are _not_ supposed to be ever comitted, just use them while debugging. beck@ ok
2004-06-16export cpu# instead of apid#; art okTheo de Raadt
2004-06-13regenNiklas Hallqvist
2004-06-13debranch SMP, have funNiklas Hallqvist
2004-06-11vm->vm_minsaddr was uninitialized (nothing realy uses it anyway)Michael Shalayeff
2004-06-09in theory, vnlock should alays be NULL in the generic lock (sic) functions.Ted Unangst
in reality, sometimes it's not. we don't trust vnlock, and since it's 100% guaranteed to panic if it gets here, just completely stop using it. crash by henning, ok deraadt
2004-06-09Merge in a piece of the SMP branch into HEAD.Artur Grabowski
Introduce the cpu_info structure, p_cpu field in struct proc and global scheduling context and various changed code to deal with this. At the moment no architecture uses this stuff yet, but it will allow us slow and controlled migration to the new APIs. All new code is ifdef:ed out. ok deraadt@ niklas@
2004-06-08pull ncpus support from smp tree into main branch.Marco S Hyman
remove alpha specific definition of ncpus. OK (and tested on alpha) deraadt@
2004-06-05retval may be NULL in fork1, take 2Ted Unangst
2004-06-02rearrange the allocators we provide for general use.Ted Unangst
the new one remains the default and _nointr. _kmem is restored to its former position, and _oldnointr is introduced. this is to allow some pool users who don't like the new allocator to continue working. testing/ok beck@ cedric@
2004-05-30Devices hot plugging support.Alexander Yurchenko
The hotplug pseudo-device passes device attachment and detachment events to userland. When a device attaches or detaches, the corresponding event is queued. The events can then be obtained from the queue through the read(2) call on the /dev/hotplug device file. Each event consists of event type (attach/detach), device class (DV_*) and device name (sd1 e.g.). We have hotplug pseudo-device on alpha, amd64, i386, macppc and sparc64. Since it was tested only on i386 other archs has it commented out in GENERIC until tested. The idea liked peter@ tedu@ drahn@ millert@ marco@ henning@. Ok deraadt@.
2004-05-27syncTed Unangst
2004-05-27make acct(2) optional with ACCOUNTINGTed Unangst
ok art@ deraadt@
2004-05-27shutdown accounting before shutting down vfs. should prevent some panics.Ted Unangst
ok david@ millert@ (iirc)
2004-05-27apm restores perflevel after resume; some cpus are forgetful.Ted Unangst
update cpu even with 100 -> 100 setperf changes, in case saved value has gotten out of sync. from grange@ ok deraadt@ grange@
2004-05-27change uvm_km_getpage to take waitok argument and sleep if appropriate.Ted Unangst
change both the nointr and default pool allocators to using uvm_km_getpage. change pools to default to a maxpages value of 8, so they hoard less memory. change mbuf pools to use default pool allocator. pools are now more efficient, use less of kmem_map, and a bit faster. tested mcbride, deraadt, pedro, drahn, miod to work everywhere
2004-05-24No way: This breaks nearly every architectureTheo de Raadt
2004-05-23bad stuff escaped by accidentTed Unangst
2004-05-23according to fork1(9), retval is optional. make it so.Ted Unangst
from form@pdp-11.org.ru via mpech. ok millert
2004-05-14use pool for namei pathbuf. testing ok millert@ tdeval@Ted Unangst
2004-05-10when doing user mounts, inherit the MNT_NOEXEC flag from the coveredPedro Martelletto
vnode's mount point. this makes it impossible for a user to bypass the noexec protection of a mount point by null-mounting it on top of itself. ok tedu@ millert@