summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
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@
2004-05-05Regen, spotted by form@pdp-11.org.ru.Alexander Yurchenko
ok miod@
2004-05-04Remove useless ``elm'' argument from the SIMPLEQ_REMOVE_HEAD macro.Alexander Yurchenko
This matches our SLIST behaviour and NetBSD's SIMPLEQ as well. ok millert krw deraadt
2004-05-03regenTodd C. Miller
2004-05-03POSIX says the length parameter for semop(2) and shmget(2) should be size_t.Todd C. Miller
Create new syscalls with the correct parameters and add compat versions for the old ones under COMPAT_35.
2004-04-25change sb_mbmax to: (sb_max/MCLBYTES) * (MSIZE+MCLBYTES); ok deraadtMarkus Friedl
CV ----------------------------------------------------------------------
2004-04-25fix typos/spelling in comments, from pedro martellettoJolan Luff
2004-04-25radix tree with multipath support. from kame. deraadt okJun-ichiro itojun Hagino
user visible changes: - you can add multiple routes with same key (route add A B then route add A C) - you have to specify gateway address if there are multiple entries on the table (route delete A B, instead of route delete A) kernel change: - radix_node_head has an extra entry - rnh_deladdr takes extra argument TODO: - actually take advantage of multipath (rtalloc -> rtalloc_mpath)
2004-04-19introduce a new km_page allocator that gets pages from kernel_map usingTed Unangst
an interrupt safe thread. use this as the new backend for mbpool and mclpool, eliminating the mb_map. introduce a sysctl kern.maxclusters which controls the limit of clusters allocated. testing by many people, works everywhere but m68k. ok deraadt@ this essentially deprecates the NMBCLUSTERS option, don't use it. this should reduce pressure on the kmem_map and the uvm reserve of static map entries.
2004-04-19also use sbcheckreserve() for setsockopt of SO_SNDBUF and SO_RCVBUFTheo de Raadt
2004-04-19this is only a work in progress, we can perfect afterwards, but it is timeTheo de Raadt
to get some experience with these ideas. add sbcheckreserve() api; called by accepting sockets. if over 95% of mbuf clusters are busy, consider this a resource starvation just like the other reasons for accept failing. also, if over 50% of mbuf clusters are busy, shrink recv & send sockbuf reserves to "the minimum".
2004-04-17Don't forget to apply the M_CLUSTER flag when copying flags in m_pullup2().Ryan Thomas McBride
Fixes pr3740. Confirmed with pb@, ok markus@.
2004-04-16not a pasto. ok millert@Ted Unangst
2004-04-15rework access to emulations slightly in an effort to both merge andTed Unangst
separate exec format from emulation. consistent naming of freebsd emuls. not much in the way of functional changes yet. testing and ok deraadt@ and others along the way.