Commit Graph

6295 Commits

Author SHA1 Message Date
ad a78ad62cfb cache_enter: inline LIST_INSERT_HEAD so that the membar_producer() can be
put in the right spot. The 'next' link in the new entry must become globally
visible before the list head is updated. This could have affected systems
with weak memory ordering like the alpha.
2008-04-12 17:34:26 +00:00
ad da60beabf5 softint_overlay: bind the stolen LWP to the current CPU while processing,
to prevent it blocking and migrating to another CPU.
2008-04-12 17:17:28 +00:00
ad b60416c0e2 Move the LW_BOUND flag into the thread-private flag word. It can be tested
by other threads/CPUs but that is only done when the LWP is known to be in a
quiescent state (for example, on a run queue).
2008-04-12 17:16:09 +00:00
ad 06e0894e76 Take the run queue management code from the M2 scheduler, and make it
mandatory. Remove the 4BSD run queue code. Effects:

- Pluggable scheduler is only responsible for co-ordinating timeshared jobs.
- All systems run with per-CPU run queues.
- 4BSD scheduler gets processor sets / affinity.
- 4BSD scheduler gets a significant peformance boost on some workloads.

Discussed on tech-kern@.
2008-04-12 17:02:08 +00:00
ad 3f5f5fa2a4 Maintain a circular queue of cpu_info's. 2008-04-11 15:31:34 +00:00
ad baba274422 mutex_vector_enter: reduce reads of mtx_owner slightly. 2008-04-11 15:28:34 +00:00
ad 1e11b07bfa Restructure the name cache code to eliminate most lock contention
resulting from forward lookups. Discussed on tech-kern@.
2008-04-11 15:25:24 +00:00
ad 4598f15028 rwlock changes, discussed on tech-kern:
- Use atomic ops directly, since rwlocks work the same way on all platforms.
- Try to make it a bit more cache efficient, and use branch hints.
- Fix a bug in rw_downgrade() where the turnstile lock was not released.
- Remove a couple of redundant assertions.
- Use atomic_swap instead of atomic_cas where it's safe to do so.
- After acquiring the turnstile lock in rw_vector_enter, check if the
  owner is running again and spin if so.
- Introduce and use rw_onproc() instead of abusing mutex_onproc().
- Change the handoff/release algorithm to reduce the window when a rwlock
  can held, but the owner not on a CPU.
2008-04-11 14:55:51 +00:00
wiz e47f3f6ebe Commit fix for the fdfile leak described in PR 38374.
Patch provided by YAMAMOTO Takashi.

Ok ad@
2008-04-09 19:36:59 +00:00
thorpej 0cfa6e7487 Make the percpu API a little more friendly:
- percpu_getptr() is now called percpu_getref() and implicitly disables
  preemption (via crit_enter()) when it is called.
- Added percpu_putref() which implicitly reenables preemption (via
  crit_exit()).
2008-04-09 05:11:20 +00:00
ad d49b125626 When accessing a block/char device, cache the D_MPSAFE flag on initial
access, in case the devsw record is modified.
2008-04-06 17:27:39 +00:00
tsutsui cde344d3be Allow MD cycle counter routines to pass their own optimized
tc_get_timecount function to MI cc_init().
2008-04-05 18:17:36 +00:00
yamt 3426b80b5e - l_wmesg is not always valid. check l_wchan when using l_wmesg.
should fix a crash reported by Juan RP on current-users@.
- ttyinfo: lock lwp when accessing l_wmesg.
- fill_lwp: add an assertion.
2008-04-05 14:03:16 +00:00
yamt c6f589405e assertions. 2008-04-05 13:58:12 +00:00
cegger 224670ae98 use device_xname() where appropriate
OK martin
2008-04-04 20:13:18 +00:00
ad f07d372316 When a timeshared LWP blocks on a turnstile, elevate its priority into the
PRI_KTHREAD range. This is kind of ugly, but needed because of direct handoff
with rwlocks, and because threads that block holding a mutex regularly hold
other locks/resources.

Problem addressed: priority lending works well where a thread blocking on a
turnstile has a high priority level (eg realtime). For timeshared threads
(low priority) it's unlikely to have much effect. In the latter case threads
awoken from a turnstile can and do compete for CPU time with regular waits
like disk I/O. On MP systems this can result in a feedback loop where
threads cannot quickly get access to a resource held by a thread waking from
a turnstile. The waking thread eventually runs when enough of the other
threads block waiting for it, freeing up the CPU. The end result is a lot of
idle time during builds.
2008-04-04 19:16:24 +00:00
ad 15efd9ad99 Do adaptive spinning for rwlocks, but only if the lock is write held and
there are no waiters. This gives a major boost to build.sh on larger
systems as directory vnode locks are exclusive for lookup, but are often
only held for a very short period of time.

This change has the potential to more readily expose lock order reversals
and other types of deadlock.
2008-04-04 17:25:09 +00:00
ad 61a0a96054 Maintain a bitmap of idle CPUs and add idle_pick() to find an idle CPU
and remove it from the bitmap.
2008-04-04 17:21:22 +00:00
ad 2940b88b72 sched_tick: only case a preemption if the current thread is hogging the CPU,
or if we are idle and should look for new work (matters with per-CPU queues).
2008-04-02 17:40:15 +00:00
ad 42bc09155e yield: don't drop priority to zero. libpthread doesn't make much use of
this any more but applications do and it now pessimizes benchmarks.
2008-04-02 17:38:16 +00:00
xtraeme 247cd610f6 Revert rev 1.126-1.128. The original code was correct and rmind and I
didn't look correctly at them.
2008-04-02 10:53:23 +00:00
xtraeme dcf3ee7d3b When copying l_name and l_wmesg use KI_LNAMELEN and KI_WMESGLEN
respectively, so that we don't care if l_name/wmesg is longer
than kl_name/wmesg and the KASSERTs added in previous can go away.
2008-04-01 21:05:37 +00:00
drochner 76ad1614e9 remove useless passing of the lwp from the KERNEL_LOCK() ABI
(not the API; this would be easy as well)
agreed (a while ago) by ad
2008-04-01 19:49:31 +00:00
xtraeme 3189c49560 Fix previous: use the length of l->l_foo not kl->l_foo and add
two KASSERTs to check for max lenght limits before copying.

As suggested by rmind@.
2008-04-01 18:06:06 +00:00
xtraeme 03c6a6aa65 fill_lwp: when copying l_wmesg and l_name, use the size of the string
not of the variable.

Found and ok by rmind@.
2008-04-01 17:39:58 +00:00
ad 520b46da7e Use multiple kthreads to process config_interrupts tasks. Proposed on
tech-kern.
2008-04-01 10:37:42 +00:00
xtraeme bc77ebea72 Remove useless returns at the end of void functions. 2008-03-31 15:28:47 +00:00
ad 164f30df1b Don't report kernel lock spinouts if init has not yet started.
XXX This should be backed out when we are sure that the drivers
are good citizens and configure nicely with interrupts enabled /
the system running.
2008-03-30 15:39:46 +00:00
ad bd9b59aafe selwakeup: convert a while() loop into a do/while() since the first test
isn't needed.
2008-03-29 14:08:35 +00:00
ad 96a6231c10 callout_halt: remove unneeded extern decl. 2008-03-29 14:07:23 +00:00
ad c7e03d2b58 callout_destroy: fix assertion to not fire when a callout is destroying
its own handle. PR kern/38324.
2008-03-29 14:00:55 +00:00
ad 58420c122f mutex_vector_exit: add another panicstr check. 2008-03-28 22:19:39 +00:00
ad 6c180fd421 Pull in sys/cpu.h for cpu_intr_p(). 2008-03-28 21:58:43 +00:00
ad 03489e636c sleepq_block: use callout_halt, as we have to wait for the callout to
stop (it might be running on another CPU). Otherwise, 'curlwp' could
exit before it completes.
2008-03-28 20:48:36 +00:00
ad c3338aabf1 Enable blocking synchronization for callouts as discussed at length on
tech-kern last year. Instead of modifying callout_stop, add a new
routine (callout_halt) which will sleep if the callout is already in
flight. Note that if a callout can take locks, the caller of callout_halt
must not hold any of those locks - otherwise the two could deadlock.
2008-03-28 20:44:38 +00:00
ad 13c3856c4c Remove dead code from previous. 2008-03-28 16:23:39 +00:00
ad 4bd84ff96a Prevent overlapping calls to bind() and/or connect() on a Unix socket. 2008-03-28 12:14:22 +00:00
ad c2f3592995 Prevent listen() on a socket that is already connected - we already prevent
connect() on a listening socket.
2008-03-28 12:12:20 +00:00
dholland d868f7242f Yet another rename workaround - this time check for . and .. early because
relookup() objects to being asked to handle them.
2008-03-28 05:02:08 +00:00
ad bb61e73cd5 Add code for dynamically allocated mutexes, as posted on tech-kern. 2008-03-27 19:11:05 +00:00
ad be04ac4896 Make rusage collection per-LWP and collate in the appropriate places.
cloned threads need a little bit more work but the locking needs to
be fixed first.
2008-03-27 19:06:51 +00:00
ad feb4783fdf Replace use of CACHE_LINE_SIZE in some obvious places. 2008-03-27 18:30:15 +00:00
ad 2ffc44f47b Regen. 2008-03-27 17:14:21 +00:00
ad a19a515177 Put kqueue/kevent back as MPSAFE. 2008-03-27 17:13:25 +00:00
ad 78656b1e91 - kqueue_scan: work around problem noted by yamt@: if an event fires while
we have unlocked the kqueue to check its state, leave it queued and
  re-check later.
- knote_dequeue: fold into knote_detach since nothing else uses it.
- Note a couple more problems.
2008-03-26 13:32:32 +00:00
yamt 91ae756395 - for some ports, especially for ones without pmap_growkernel,
buf_memcalc is used by bootstrap as well.  fix NULL dereference for them.
- limit kva usage for each cache to 20% of vm_map.  XXX a bit arbitrary.
- add a comment.
2008-03-25 23:21:42 +00:00
ad 8910b668ba mount_domount: hold an additional reference to the mountpoint across the
call to VFS_START. The file system can be unmounted before VFS_START
returns. Partially addresses PR kern/38291.
2008-03-25 22:13:32 +00:00
yamt ef630703b1 regen. 2008-03-24 23:47:06 +00:00
yamt f725bfefcf after yamt-lazymbuf merge, mark send/recv syscalls MPSAFE.
pointed out by Andrew Doran.
2008-03-24 23:46:43 +00:00
yamt 2acbe71698 regen. 2008-03-24 12:25:42 +00:00
yamt 9a4b7dd279 merge yamt-lazymbuf branch. 2008-03-24 12:24:37 +00:00
yamt 8df658c8ca add some DEBUG checks. 2008-03-24 09:09:55 +00:00
yamt d3d0ab9bb2 kqueue_scan: skip markers correctly. 2008-03-23 22:39:48 +00:00
ad 36cd74d4d8 Undo 1.150 (Don't make root an exception when enforcing rlimits). No other
Unix behaves this way and it breaks too many things, e.g. web servers.
2008-03-23 17:40:25 +00:00
ad 28a2c8b191 Reorder a code block slightly, to allow proclist_mutex to be an adaptive
mutex (purely for testing).
2008-03-23 16:53:45 +00:00
ad 25b10dbb15 lwp_ctl_alloc: initialize lcp_kaddr to vm_map_min(kernel_map), in order to
prevent uvm_map() from spuriously failing.
2008-03-23 16:39:34 +00:00
ad 3acbed8e48 Split select/poll into their own file. 2008-03-23 14:02:49 +00:00
yamt 93109cd91b when calculating some cache sizes, consider the amount of available kva.
PR/33185.
2008-03-23 10:39:52 +00:00
yamt d3bb744af3 make buf_map static. 2008-03-23 10:33:15 +00:00
rmind 579caa1e17 - Support for select/poll.
- Convert pool to pool-cache.
- Wrap long lines, adjust the license.
2008-03-23 00:44:15 +00:00
ad 40379c8716 Commit the "per-CPU" select patch. This is the result of much work and
testing by rmind@ and myself.

Which approach to use is still being discussed, but I would like to get
this out of my working tree. If we decide to use a different approach
there is no problem with revisiting this.
2008-03-22 18:04:42 +00:00
ad 5214147407 LWP_CACHE_CREDS: instead of testing (l_cred != p_cred), use a per-LWP
flag bit to indicate a pending cred update. Avoids touching one item of
shared state in the syscall path.
2008-03-22 17:53:34 +00:00
christos 4897e6c085 bring some stuff from time_t=64...
- add sysalign parameter to syscalls.conf
- add compat_50
2008-03-22 15:11:01 +00:00
ad 527a0b7dab Regen. 2008-03-22 14:20:30 +00:00
ad f5405b27b2 Unmark kevent/kqueue as MPSAFE. There seems to be some kind of deadlock
involving kernel_lock.
2008-03-22 14:20:09 +00:00
yamt 9adad93037 wrap a long line. 2008-03-22 10:24:17 +00:00
rmind cbb7f92857 unp_gc: unlock filelist_lock in a case of restart. 2008-03-21 23:38:40 +00:00
ad 40607e5bba Regen. 2008-03-21 21:59:27 +00:00
ad bc370563bc Mark kqueue/kevent MPSAFE. 2008-03-21 21:58:57 +00:00
ad a9ca7a3734 Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
2008-03-21 21:54:58 +00:00
ad c743ad7159 File descriptor changes, discussed on tech-kern:
- Redo reference counting to be sane.  LWPs accessing files take a short
  term reference on the local file descriptor.  This is the most common
  case.  While a file is in a process descriptor table, a reference is
  held to the file.  The file reference count only changes during control
  operations like open() or close().  Code that comes at files from an
  unusual direction (i.e. foreign to the process) like procfs or sysctl
  takes a reference on the file (f_count), and not on a descriptor.

- Remove knowledge of reference counting and locking from most code that
  deals with files.

- Make the usual case of file descriptor lookup lockless.

- Make kqueue MP and MT safe. PR kern/38098, PR kern/38137.

- Fix numerous file handling bugs, and bugs in the descriptor code that
  affected multithreaded processes.

- Split descriptor system calls out into sys_descrip.c.

- A few stylistic changes: KNF, remove unused casts now that caddr_t is
  gone. Replace dumb gotos with loop control in a few places.

- Don't do redundant pointer passing (struct proc, lwp, filedesc *) unless
  the routine is likely to be inlined.  Most of the time it's about the
  current process.
2008-03-21 21:53:35 +00:00
plunky 606c30fdca add devsw_name2chr() function to look up character devices 2008-03-21 19:32:07 +00:00
ad 5e7d890908 - Extract the guts of soo_poll() into sopoll(), which takes a struct socket *.
This is for netsmb which wants to poll sockets directly.
- When polling a socket, first check for pending I/O without acquring any
  locks. If no I/O seems to be pending, acquire locks/spl and check again
  doing selrecord() if necessary.
2008-03-20 19:23:15 +00:00
ad a0bce9fd99 softint_execute: add more assertions. 2008-03-20 19:12:23 +00:00
njoly d5bb355fe9 Handle rumpcalls/rumpcallshdr differently by always defining a default
value, which can be overwritten with syscalls.conf defines (just like
sys_nosys).

This fix a problem where rump awk variables are set to 0 value,
leading to the creation of an unexpected file with that name.

ok by pooka.
2008-03-18 12:36:15 +00:00
mrg 5e0e0b0a59 need <sys/atomic.h> now. 2008-03-18 02:49:15 +00:00
ad 1b558d1305 uid_find:
- Issue membar_producer() before inserting the new uidinfo.
- Optimize slightly and fix a couple of KNF nits.
- Need sys/atomic.h.
2008-03-18 02:35:29 +00:00
rmind 33928e0f83 - Replace uihashtbl_lock and struct uidinfo::ui_lock with atomic operations.
This make uid_find(), chgproccnt(), chgsbsize() and lf_alloc(), lf_free()
  functions lock-less.
- Increase the size of uihashtbl in case of MP system, as suggested by <ad>.
- Add HASH_SLIST type for hashinit().

Reviewed by <ad>.
2008-03-17 21:16:03 +00:00
ad c796b0c73a Add a boolean parameter to syncobj_t::sobj_unsleep. If true we want the
existing behaviour: the unsleep method unlocks and wakes the swapper if
needs be. If false, the caller is doing a batch operation and will take
care of that later. This is kind of ugly, but it's difficult for the caller
to know which lock to release in some situations.
2008-03-17 18:01:44 +00:00
ad ad4f28d1e9 Make them compile again. 2008-03-17 17:05:54 +00:00
ad c42a4d1422 Add a boolean parameter to syncobj_t::sobj_unsleep. If true we want the
existing behaviour: the unsleep method unlocks and wakes the swapper if
needs be. If false, the caller is doing a batch operation and will take
care of that later. This is kind of ugly, but it's difficult for the caller
to know which lock to release in some situations.
2008-03-17 16:54:51 +00:00
yamt a67bae0b7b - simplify ASSERT_SLEEPABLE.
- move it from proc.h to systm.h.
- add some more checks.
- make it a little more lkm friendly.
2008-03-17 08:27:50 +00:00
ad 2d19d2a3e9 Process group and session structures are allocated so infrequently that
there is no point having seperate caches for them. Just use kmem_alloc().
2008-03-17 00:52:56 +00:00
rmind 05595560a2 - Initialize uihashtbl in resource_init();
- Make some variables static, remove the externs from header;
- Wrap few long lines, misc;

No functional changes are intended.
2008-03-17 00:18:24 +00:00
rmind ae5c2ec2bd Workaround the case, when l_cpu changes to l_target_cpu, and causes
the locking against oneself. Will be revisited. OK by <ad>.
2008-03-16 23:11:30 +00:00
dyoung 3df2b2feb5 Use device_t and its accessors throughout. Use aprint_*_dev().
Improve PMF-ability.

        Add a 'flags' argument to suspend/resume handlers and
        callers such as pmf_system_suspend().

        Define a flag, PMF_F_SELF, which indicates to PMF that a
        device is suspending/resuming itself.  Add helper routines,
        pmf_device_suspend_self(dev) and pmf_device_resume_self(dev),
        that call pmf_device_suspend(dev, PMF_F_SELF) and
        pmf_device_resume(dev, PMF_F_SELF), respectively.  Use
        PMF_F_SELF to suspend/resume self in ath(4), audio(4),
        rtw(4), and sip(4).

        In ath(4) and in rtw(4), replace the icky sc_enable/sc_disable
        callbacks, provided by the bus front-end, with
        self-suspension/resumption.  Also, clean up the bus
        front-ends.  Make sure that the interrupt handler is
        disestablished during suspension.  Get rid of driver-private
        flags (e.g., RTW_F_ENABLED, ath_softc->sc_invalid); use
        device_is_active()/device_has_power() calls, instead.

        In the network-class suspend handler, call if_stop(, 0)
        instead of if_stop(, 1), because the latter is superfluous
        (bus- and driver-suspension hooks will 'disable' the NIC),
        and it may cause recursion.

        In the network-class resume handler, prevent infinite
        recursion through if_init() by getting out early if we are
        self-suspending (PMF_F_SELF).

rtw(4) improvements:

        Destroy rtw(4) callouts when we detach it.  Make rtw at
        pci detachable.  Print some more information with the "rx
        frame too long" warning.

Remove activate() methods:

        Get rid of rtw_activate() and ath_activate().  The device
        activate() methods are not good for much these days.

Make ath at cardbus resume with crypto functions intact:

        Introduce a boolean device property, "pmf-powerdown".  If
        pmf-powerdown is present and false, it indicates that a
        bus back-end should not remove power from a device.

        Honor this property in cardbus_child_suspend().

        Set this property to 'false' in ath_attach(), since removing
        power from an ath at cardbus seems to lobotomize the WPA
        crypto engine.  XXX Should the pmf-powerdown property
        propagate toward the root of the device tree?

Miscellaneous ath(4) changes:

        Warn if ath(4) tries to write crypto keys to suspended
        hardware.

        Reduce differences between FreeBSD and NetBSD in ath(4)
        multicast filter setup.

        Make ath_printrxbuf() print an rx descriptor's status &
        key index, to help debug crypto errors.

        Shorten a staircase in ath_ioctl().  Don't check for
        ieee80211_ioctl() return code ERESTART, it never happens.
2008-03-12 18:02:21 +00:00
ad 7b0b5fdc9d +2008 for the copyright 2008-03-12 11:05:01 +00:00
ad 727b89a296 Add a preemption counter to lwpctl_t, to allow user threads to detect that
they have been preempted.
2008-03-12 11:00:43 +00:00
pooka a5d0e14cb0 regen this too, not that it changes except for rcsid 2008-03-11 22:55:35 +00:00
pooka de0571f1e7 regen 2008-03-11 22:52:37 +00:00
pooka 5354d1092b Add locations for rump_syscalls.[hc] files 2008-03-11 22:51:51 +00:00
pooka f2976c3905 Generate syscalls entry points which can be called directly without
going through a syscall trap.  These are currently useful for rumps.
As all the standard syscalls are not compiled into librump, mark
relevant ones with RUMP in syscalls.master.  To do e.g. a mkdir
"system call" from a rump, one would call

  rump_sys_mkdir("/dir", mode, &eval);

where the last value represents something to store errno into.
2008-03-11 22:50:10 +00:00
rmind ca99f7a582 - Perform periodical balancing of CPU-bound threads, which tends to
never sleep.  Should fix PR/37245 by <yamt>.
- Fix a regression - dissalow catching of bound threads.  Also, allow
  migration of non-bound kthreads, this restriction seems pointless.
- Few micro-optimisations, misc.
2008-03-11 18:18:49 +00:00
matt 1746cafd1c Add device_lookup_private() which is just device_private(device_lookup(&cd, i))
Most callers don't want the device_t, they want their softc and that's what
device_lookup_private returns.
2008-03-11 02:42:41 +00:00
ad 6b4e6438d8 Add casts to avoid potential compiler warnings. 2008-03-11 02:26:47 +00:00
ad a108a15f5d Make context switch + syscall counters optionally per-CPU and accumulate
in schedclock() at "about 16 hz".
2008-03-11 02:24:43 +00:00
martin d8788e7fd7 Use cpu index instead of the machine dependend, not very expressive
cpuid when naming user-visible kernel entities.
2008-03-10 22:20:14 +00:00
njoly fcf1e44d76 Do not hardcode sys_stub to the string "sys_nosys" for the not ignored
case. Just use the corresponding variable instead, to allow emulation
to use their own defined value.
2008-03-10 14:06:46 +00:00
rmind 92ae34c400 Remove include of sys/pset.h in sys/lwp.h header.
Include it in few appropriate sources.
2008-03-09 15:39:14 +00:00
yamt 60381203e0 kpsignal2: enqueue SA_STOP signals and let issignal handle it rather
than trying to stop the process by ourselves.  this fixes SIGTSTP masking.
ok'ed by Andrew Doran.  PR/37603, PR/38060.
2008-03-08 07:56:53 +00:00
ad 32b8f98e7d lwp_ctl_exit: fix a use-after-free that caused the following:
_lwp_ctl()	<- works
execve()	<- tears down lwpctl state
_lwp_ctl()	<- fails erroneously
2008-03-07 18:06:04 +00:00
dyoung 8705e09ae4 PMF: synchronize device suspension and resumption. 2008-03-07 07:03:06 +00:00
dyoung 954c0a60d9 Stop the kernel from panicking when it detaches sysbeep0: do not
try to free the device driver-private storage if dv_private is
NULL.
2008-03-07 06:29:20 +00:00
ad 89d4a45927 selclear() while exiting netsmb's custom copy of select(). PR kern/38123. 2008-03-05 18:09:57 +00:00
ad efbd47af45 - Add cv_is_valid(), for use in assertions. Performs basic sanity checks.
- Add more assertions.
2008-03-05 17:05:21 +00:00
dyoung 7419d9a660 Remove a couple of bogus KASSERTs. 2008-03-05 15:37:55 +00:00
njoly 425fc32da6 s/Minimal/Maximal/ in kern.sched.pri_max sysctl node description. 2008-03-05 12:47:13 +00:00
dyoung 4902571538 Synchronize readers and writers of the device tree.
Add a device iterator object, deviter_t, and methods deviter_init(),
deviter_first(), and deviter_next() for visiting each device in
the device tree.

Take care not to re-shutdown a device in the event that the machine
panics during reboot and the operator types 'reboot' at the kernel
debugger prompt.

While I'm here, sprinkle PMF_FN_ARGS, PMF_FN_PROTO, et cetera.
2008-03-05 07:09:18 +00:00
dyoung 134a0e4bac Introduce PMF_FN_{ARGS,PROTO}1, and use PMF_FN_{ARGS,PROTO} more
widely, further helping me to introduce PMF API changes piecemeal.
2008-03-05 04:54:24 +00:00
cube 88566e4bc8 Report a change from the cube-autoconf branch to allow
device_private(NULL).  That will ease the conversion of drivers to splitted
softc/device_t which is mandatory for cube-autoconf and will be done in
HEAD.
2008-03-04 11:52:37 +00:00
yamt 59a00111af pool_do_put: remove pa_starved_p check for now as it seems to cause
more problems than it solves.  PR/37993 from Greg A. Woods.
2008-03-02 12:19:58 +00:00
jmmv 3fd8e29a11 Add support for load-time parameters for modules, which are passed through
a dictionary.  As discussed in tech-kern@.
2008-03-02 11:18:43 +00:00
rmind c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
yamt a890fa326d update a comment. 2008-02-29 12:10:09 +00:00
yamt cfc68c3385 fix a livelock with multiple readers by separating condvar. 2008-02-29 12:04:48 +00:00
matt e48401e466 Add support for CTLTYPE_BOOL 2008-02-29 02:28:35 +00:00
elad 67470a76a1 Factor out the guts of get/setparam so it can be used from the compat code.
Make the FreeBSD and Linux compat code convert the parameters to their
native representation and call the native routines.

Remove KAUTH_PROCESS_SCHEDULER_GET/SET.

Update documentation and examples.

XXX: For now, only the Linux compat code does the priority conversion
XXX: right.

Linux priority conversion code from yamt@, thanks!

Okay yamt@.
2008-02-28 16:09:18 +00:00
drochner 0e748e633e Extend the pmf suspend/resume hooks by a shutdown method, so drivers
can register a shutdown handler explicitely.
Install a pci bus shutdown handler which disables bus master accesses
for all childs, so the drivers don't need to care.
This will hopefully be sufficient to replace the shutdownhooks
(together with the powerhooks). (It has been suggested to use some
general event notification framework for shutdown handlers, but there
might be cases where shutdown handlers must be run in an order following
the device hierarchy, which wouldn't be easy with event handlers
not tied to drivers.)
approved by David Young
2008-02-28 14:25:12 +00:00
matt 49cf9ad72a constify dkdriver 2008-02-28 04:55:47 +00:00
matt c8f6e9fb17 Allow PRIV_ALLOC devices to have no private data. 2008-02-27 19:59:05 +00:00
matt 5baf734b61 Convert to ansi definitions from old-style definitons.
Remember that func() is not ansi, func(void) is.
2008-02-27 19:57:32 +00:00
matt 6d6aefbf45 Convert to ansi definitions from old-style definitons. 2008-02-27 19:57:18 +00:00
matt 362b5ff0c5 make socketops const 2008-02-27 19:56:33 +00:00
matt a918cf0e3a Convert stragglers to ansi definitions from old-style definitons.
Remember that func() is not ansi, func(void) is.
2008-02-27 19:55:59 +00:00
yamt 8b793ad476 nanosleep1: handle kpause spontaneous wakeups. 2008-02-25 12:25:03 +00:00
dholland 974f37c3af typo patrol 2008-02-24 23:16:24 +00:00
christos 3aa2f8095e Check for number of processes resource violation in execve(). 2008-02-24 21:46:04 +00:00
christos d90e9f98a8 Don't return 0 if the count is not changed in chgproccnt()! 2008-02-24 21:44:51 +00:00
dsl 5546b33571 Set p->p_trace_enabled in fork and whenever the controlling falgs change
instead of doing it in syscall_intern().
Note that syscall_intern() must still be called when the flags change
since many ports use a different copy of the syscall entry code when
tracing is enabled.
2008-02-24 18:30:07 +00:00
martin 93cbe0f210 Regen (old posix_fadvise ignored) 2008-02-24 12:53:47 +00:00
martin a8ed8bb731 Desupport compatibility for the old posix_fadvise syscall per yamt's
request and just ignore it.
2008-02-24 12:52:54 +00:00
martin a032b8dad3 Add a new syscall type IGNORED which just calls nullop (always succeeds
and does nothing).
2008-02-24 12:51:42 +00:00
chris 2ff98bbc26 Add missing pmap_update(pmap_kernel()); calls after pmap_kenter_pa and
pmap_remove.
2008-02-23 16:05:17 +00:00
ad 9a0b455f25 - Add a one line comment indicating what this file does.
- Move the check for PK_SYSTEM to a more sane place.
2008-02-22 23:10:12 +00:00
rmind 9850c0557d sys__sched_getparam and sys__sched_getaffinity: Do not assume that LWP
with LID=1 exists, use LIST_FIRST(&p->p_lwps) instead.
Fixes PR/37987 by <yamt>.

While here, adjust license.
2008-02-22 22:32:49 +00:00
drochner d22ab0209e Don't call pmf_system_shutdown() from doshutdownhooks() -- it does way
too much in the RB_HALT case, making the "press a key to reboot" prompt
a bad joke. doshutdownhooks() should do shutdownhooks, not more.
Since it is md code which decides about halt/poweroff etc,
pmf_system_shutdown() should be called from there if appropriate.
2008-02-20 23:30:13 +00:00
drochner 6bc03e0cc0 On system suspend, first get rid of the X server because it doesn't
respect the kernel device tree. (It is arguably ugly to special-case
wscons here, but as long as there is only one driver to be dealt with
it is not worth to introduce another set of hooks.)
Resume the X server at the end of resume, if everything went well.
Acquire the big KERNEL_LOCK before the device tree is walked on
suspend, until after the walk on resume. This is needed to avoid
device accesses by secondary CPUs, and it effectively keeps user
programs from interfering with the suspend process. This might be
revisited when all drivers are using private locks for MP-safeness
(but FreeBSD still does the same afaics).
It should be unnecessary now to switch secondary CPUs offline in
the powerd suspend script.
2008-02-20 22:52:55 +00:00
matt e2ca3f7504 Merge all the *different* definitions of bufqueues into one common one. 2008-02-20 17:13:29 +00:00
njoly a10d333001 Make cnt of type size_t, to avoid uiomove() overrun its iovecs.
This makes write(2) works with large buffers (>=4GB).

Fix from pooka, tested by myself.
2008-02-20 15:08:14 +00:00
yamt c5bb0d332c reduce code duplication. no functional changes are intended. 2008-02-20 11:48:46 +00:00
matt e463f28885 For each symtab, remember which symbols have the minimum and maximum value.
When returning a "close" symbol, make sure the value being searched for is
within the symtab.  This prevents ddb matching addresses beyond the end of
the kernel.
2008-02-20 02:30:51 +00:00
drochner cc0caabca7 fix sched_setparam() error reporting (broken by recent kauth changes) 2008-02-19 19:38:18 +00:00
yamt 68be78c456 L_PENDSIG -> LW_PENDSIG in a comment. 2008-02-19 16:16:06 +00:00
yamt 63e70ec982 wrap long lines. no functional change. 2008-02-19 14:21:56 +00:00
yamt 60b5013421 nanosleep1: whitespace. no functional change. 2008-02-19 14:17:39 +00:00
yamt b1eaff3725 constify 2008-02-19 12:24:34 +00:00
yamt 31a3a6f1a1 update a comment. (L_PENDSIG -> LW_PENDSIG) 2008-02-19 12:22:44 +00:00
yamt 70e552c2cb sigpause -> sigsuspend in comments. 2008-02-19 12:20:02 +00:00
yamt aa57485fe2 sys__sched_setparam: fix a lock leak. 2008-02-19 09:44:26 +00:00
dogcow ed79311de3 Always include <sys/cpu.h>, to pick up CPU_INFO_ITERATOR et al. 2008-02-19 07:46:51 +00:00
ad a08d993d2c knote_fdclose: acquire kernel_lock because many objects that can be
polled do not have locking of their own.
2008-02-18 22:41:13 +00:00
ad 057adba179 Make it compile if !LOCKDEBUG. 2008-02-18 18:31:10 +00:00
ad 7eb6056f9a Try to prevent more than one CPUs panicing when an error is detected. 2008-02-18 16:02:41 +00:00
ad 5408e000be panic: allow only one CPU to panic. Try to make the panicing thread bound
and try take all CPUs offline, in case we can block at some point in the
future.
2008-02-18 14:46:58 +00:00
yamt 146e2f8297 sys__sched_setparam: use a correct lwp. 2008-02-18 02:00:08 +00:00
elad 0bb7f5ccb3 PR/37986: YAMAMOTO Takashi: any user can hog the all cpu with
_sched_setparam.

Pass proper context to kauth(9) for a decision to made based on the
scheduling policy and priority.
2008-02-17 19:22:35 +00:00
elad e99760e7e4 Fold KAUTH_REQ_PROCESS_SCHEDULER_* to KAUTH_PROCESS_SCHEDULER_*. In other
words, don't pass an action and a request, and just use a single action to
indicate what is the operation in question.

This is the first step in fixing PR/37986, which calls for policy/priority
checking in the secmodel code. Right now we're lacking room for another
parameter required to make a decision, and this change makes room for such.
2008-02-16 16:39:34 +00:00
ad fb00b83874 Give bbusy() an interlock argument. If the we need to wait for the buffer,
the interlock is dropped and reacquired when awoken. This allows for
busying buffers attached to a list that is not locked by bufcache_lock.
2008-02-15 13:46:04 +00:00
ad b2fa822a33 The buffer LOCKED flag need not be under the protection of bufcache_lock,
BUSY is enough.
2008-02-15 13:30:56 +00:00
ad b0dbb911e1 Regen. 2008-02-15 13:10:23 +00:00
ad 653195d46d Mark mount/unmount MPSAFE. PR kern/38034. 2008-02-15 13:09:57 +00:00
ad 13df0c89b3 vflush: yield at least every 100ms. PR kern/38034. 2008-02-15 13:06:02 +00:00
ad ac336fcd77 Remove 'contributed to' text from the TNF license on this file, so that
it can not be complained about.
2008-02-14 15:01:45 +00:00
ad 60c1b8843d Make schedstate_percpu::spc_lwplock an exernally allocated item. Remove
the hacks in sparc/cpu.c to reinitialize it. This should be in its own
cache line but that's another change.
2008-02-14 14:26:57 +00:00
yamt 8ae4ab89dd use time_uptime instead of getmicrotime() for ph_time. 2008-02-14 11:45:24 +00:00
matt 88f1e662d1 #include <sys/cpu.h> for curlwp 2008-02-13 18:43:16 +00:00
joerg e69482d49d Introduce device_find_by_xname and device_find_by_driver_unit to replace
alldevs iterations all over src.

Patch discussed with and improved on suggestioned from cube@.
2008-02-12 17:30:57 +00:00
dyoung 7afb2e620f Use LIST_FOREACH(). Join lines. 2008-02-11 22:20:11 +00:00
ad 59c1cd1667 Disable the event counters by default, since they create terrible cache
behaviour on MP systems.
2008-02-10 13:56:17 +00:00
yamt 8caf8b71e7 regen. 2008-02-09 17:09:13 +00:00
yamt 16b042cbdb from rmind@,
- revert struct sched_param changes to restore ABI.
- instead, add 'policy' arguments to _sched_{get,set}param syscalls.
  (this is an API/ABI change.)
- correct kauth_authorize_process arguments.

while i'm here,
- don't bother to kmem_alloc for 4-byte structure.
2008-02-09 16:58:01 +00:00
yamt 67ab67abb3 if DEBUG, over-allocate 1 byte to detect overrun. 2008-02-09 12:56:20 +00:00
ad f23e4dd8ed sonewconn: inherit FNONBLOCK from the parent. 2008-02-07 12:14:43 +00:00
dsl c2a8c787c3 Remove the 'args' parameter to 'trace_exit()' it is no longer used.
Instead of passing the (un)real system call code and syscall table pointer,
just pass the number of arguments - which is what ktrace really wants.
Ride forthcoming 4.99.53
2008-02-06 22:12:39 +00:00
ad d7f6ec471c Don't lock the socket to set/clear FNONBLOCK. Just set it atomically. 2008-02-06 21:57:53 +00:00
ad fb4dec8738 - Shrink 'struct file' to 60 bytes on 32-bit platforms.
- Align 'struct file' and 'struct filedesc' to CACHE_LINE_SIZE.
2008-02-06 21:51:36 +00:00
drochner 214b89d525 The tricks done in device_foreach_child() still don't make it safe to use
by config_detach_children(), because the latter can work recursively
and remove any number of devices, so rewrite config_detach_children()
to restart list traversal after each call of config_detach(), and since
only one user of device_foreach_child() is left (in kern_drvctl.c),
and it is simpler to open-code the loop than to deal with callbacks,
just remove it.
2008-02-06 20:24:17 +00:00
yamt caca6daa1a softint_dispatch: fix softint_timing. 2008-02-06 15:34:36 +00:00
ad 70c9f5392a vrevoke: if the vnode is already being cleaned out, then ignore it. We
don't need to do anything. PR kern/27622.
2008-02-05 15:13:25 +00:00
ad 22c6a20ebd Lock v_knlist with the vnode interlock. PR kern/37881. 2008-02-05 14:19:52 +00:00
ad b993799944 Lock p->p_klist. 2008-02-05 13:33:35 +00:00
ad 396ea241b5 vprint: print lock addresses. 2008-02-05 13:32:09 +00:00
skrll fa0da8dc36 Revert previous as requested by yamt. 2008-02-05 10:11:19 +00:00
elad e43f626d03 Add, document, and use KAUTH_REQ_PROCESS_KTRACE_PERSISTENT. 2008-02-02 21:04:40 +00:00
elad 4240d37675 KTRFAC_ROOT -> KTRFAC_PERSISTENT, and update comments.
Discussed with christos@ and yamt@.
2008-02-02 20:42:18 +00:00
skrll 6b8ce99a9e Check alignment against pp->pr_align not pp->pr_alloc->pa_pagesz.
DIAGNOSTIC kernels on hppa boot again.

OK'd by ad.
2008-02-02 20:21:55 +00:00
hannken 35f84b8843 BO_COWDONE -> B_COWDONE: this flag is tested/modified from the thread owning
the buffer and therefore needs no protection by a mutex.

Ok: Andrew Doran <ad@netbsd.org>
2008-02-02 16:51:34 +00:00
elad cd23f36378 Replace a KAUTH_GENERIC_ISSUSER in the cpuctl code with a proper kauth
request.

Reviewed by ad@, tested by me.
2008-02-01 20:01:06 +00:00
skrll f5dc52a3c1 Initialise mnt_renamelock in vfs_rootmountalloc. 2008-02-01 08:53:19 +00:00
dyoung cb8aa1ff9b Constify both struct disk->dk_name and the `name' argument to
disk_init().
2008-01-31 18:30:55 +00:00
elad 17bc624c06 EACCES -> EPERM. 2008-01-31 01:21:17 +00:00
rmind 116ffc8d57 sigpost: convert to the new, inverted priorities.
From <drochner>.
2008-01-31 00:50:32 +00:00
rmind fb513e5cf5 - sched_cpuattach: fix address calculation, use roundup2();
Fixes the problems with systems having > 2GB of memory;
  From <drochner>, thanks for catching this!
- Convert pool to pool-cache;
- Adjust copyright while here;
2008-01-31 00:46:55 +00:00
njoly 1a6eaef2f2 Fix shm_cv/newshm_cv offset value by using the correct sizeof argument
(kcondvar_t -> struct shmid_ds).

ok by rmind@
2008-01-30 21:09:41 +00:00
elad fb37bad459 Use proper kauth(9) actions/requests for native scheduler stuff and the
recently introduced processor-sets.

Discussed with and okay rmind@, yamt@, and christos@.
2008-01-30 17:54:55 +00:00
ad a3f53add72 Back out previous to let rump compile. Needs to be handled differently. 2008-01-30 15:00:52 +00:00
ad e872dcb05d +#include <sys/atomic.h> 2008-01-30 14:56:44 +00:00
ad 0430885280 Goodbye lockmgr(). 2008-01-30 14:54:25 +00:00
ad 4df5af489b vlockstatus: return LK_EXCLOTHER as appropriate, for LFS. XXX 2008-01-30 14:53:41 +00:00
ad abbfb97dd2 vlockmgr: return EBUSY when trylock fails, not EDEADLK.
Pointed out by yamt@.
2008-01-30 12:33:45 +00:00
ad 25153c3ec9 PR kern/37706 (forced unmount of file systems is unsafe):
- Do reference counting for 'struct mount'. Each vnode associated with a
  mount takes a reference, and in turn the mount takes a reference to the
  vfsops.
- Now that mounts are reference counted, replace the overcomplicated mount
  locking inherited from 4.4BSD with a recursable rwlock.
2008-01-30 11:46:59 +00:00
ad 3490efcc63 Replace struct lock on vnodes with a simpler lock object built on
krwlock_t. This is a step towards removing lockmgr and simplifying
vnode locking. Discussed on tech-kern.
2008-01-30 09:50:19 +00:00
jmcneill a9ec01ccfb pmf_event_deregister was passing M_WAITOK to free instead of M_DEVBUF,
pointed out by simonb
2008-01-30 00:50:17 +00:00
ad ec93662039 Another locking botch. 2008-01-30 00:43:47 +00:00
ad 1b6e5c8b2e Remove reference to lockmgr(). 2008-01-29 18:06:14 +00:00
yamt c73d250f0f uid_find: use kmem_alloc rather than malloc. 2008-01-29 12:41:59 +00:00
yamt 94259462ac sbreserve: curlwp can't be NULL these days.
XXX these code seems to need an overhaul.
2008-01-29 12:39:39 +00:00
yamt 64c4bfc90e sbrelease: unwrap a short line. 2008-01-29 09:31:22 +00:00
ad a77566d7d5 Authorize using the LWP cached credentials, not process credentials. 2008-01-28 20:09:06 +00:00
ad eb97d34997 More file/proc locking fixes. 2008-01-28 20:05:21 +00:00
ad 5ba557a53c - Update global counters using atomics before allocating. When freeing,
update the couters afterwards.
- Cosmetic / code generation changes.
2008-01-28 20:01:50 +00:00
ad 40fb254ec2 Fix error in previous. Spotted by yamt@. 2008-01-28 19:58:32 +00:00
dyoung a2a7fac20f Don't open-code CIRCLEQ, but use CIRCLEQ_*() macros, instead. 2008-01-28 18:24:05 +00:00
dyoung deacc0dc3b Don't run ctags on unichromreg.h, its #definitions cover important
symbols.
2008-01-28 18:22:36 +00:00
dholland 717e1785a5 Fix some race conditions in rename.
Introduce a per-FS rename lock and new vfsops to manipulate it.
Get this lock while renaming. Also add another relookup() in do_sys_rename,
which is a hack to kludge around some of the worst deficiencies of
ufs_rename.
reviewed-by: pooka (and an earlier rev by ad)
posted on tech-kern with no objections.
2008-01-28 14:31:15 +00:00
yamt 1a5be26b7e wrap a long line. 2008-01-28 12:23:42 +00:00
yamt 52838e34f5 remove a special allocator for uareas, which is no longer necessary.
use pool_cache instead.
2008-01-28 12:22:46 +00:00
yamt aa144d4a0b regen. 2008-01-28 10:33:32 +00:00
yamt 80d10710d5 check off_t alignment. 2008-01-28 10:31:37 +00:00
yamt 4ad8bf4c8a pool_cache_get_paddr: don't bother to clear pcgo_va unless DIAGNOSTIC. 2008-01-28 10:26:12 +00:00
yamt 21832401a4 lwp_free: add assertions. 2008-01-28 10:24:45 +00:00
pooka eb6074e41f Replace vrelel() 010101-mania with a flags parameter. However,
leave flags unimplemented for a while (no change in functionality).
2008-01-27 22:47:31 +00:00
dsl 460b556c90 Move the prototype for do_posix_fadvise() somewhere useful. 2008-01-27 19:48:52 +00:00
rmind 4c26b5ddf3 - sys_shmget: size type must be size_t, not int. Should avoid possible
problems with huge allocations.
- shmrealloc: use newshmni for calculation of new sz, shminfo.shmmni
  was a mistake.  Convert sz to size_t type.
2008-01-27 18:37:50 +00:00
martin 2e87d89112 Implement new version of posix_fadvise as a stub callinig the real
worker function, and compatibility stub doing the same with old argument
sturcture.
2008-01-27 16:16:50 +00:00
martin a870c2e30e Regen (posix_fadvise got a pad arg) 2008-01-27 16:14:59 +00:00
martin 65badb72df Version the posix_fadvise syscall and add the missing "pad" argument,
so that it does not only work on i386 (no padding) and 64bit archs (all
args padded to 64bit).
2008-01-27 16:13:39 +00:00
dyoung ae1c071d6f Patch /dev/drvctl and drvctl(8) to let us suspend/resume device
sub-trees, and to let us list the children of a device.

While I am here, add -p to the drvctl(8) usage message.
2008-01-27 01:38:33 +00:00
pooka a8d02d0b1a opt_inet.h is no longer necessary 2008-01-26 22:53:10 +00:00
rmind b5e9addd22 sched_setparam: fix the case when incorrect (according to the class)
in-kernel priority is used.  Reported by <drochner>.

Minor fixes for scheduling calls to conform the POSIX:
- If pid is equal to zero, use the calling process;
- In case of permission problem, return EPERM instead of EACESS;
- sched_setscheduler() should return previously used policy;
- pthread_* calls should return the error code or zero;

Should fix the namespace problems (and builds of some packages):
- Move cpuset_t defintion from pset.h to sched.h;
- Remove the #include of pset.h in pthread.h;
2008-01-26 17:55:29 +00:00
ad ea9faa6742 lockstat: no longer track lockmgr() events. 2008-01-26 14:29:31 +00:00
ad 2763af2195 rw_write_held: return true only if held by the current LWP. 2008-01-26 14:13:37 +00:00
ad 501eb05cc2 - Prevent LOCKDEBUG from complaining if we do rw_tryenter() on a lock
that we already own.
- Add an assembly stub for rw_tryenter().
2008-01-25 19:02:31 +00:00
ad e0f8c5ca59 vrelel: remove a bogus KASSERT. 2008-01-25 16:59:31 +00:00
ad 38076b60ea vn_setrecurse: if no lock is exported, use v_lock. Works around issue
described in PR kern/37808. The ideal solution here is to kill vnode
lock recursion, which should not be hard once it is understood what
the two remaining callers of vn_setrecurse() are doing.
2008-01-25 14:37:33 +00:00
ad dcc13a2839 Regen. 2008-01-25 14:32:46 +00:00
ad 1997a1e1f4 Remove VOP_LEASE. Discussed on tech-kern. 2008-01-25 14:32:11 +00:00
ad 0eb1c668c6 Regen. 2008-01-25 13:39:24 +00:00
ad baa4a2209f Mark the extattr syscalls MPSAFE. 2008-01-25 13:38:57 +00:00
pooka 625cda7eb5 vn_write: include f_advice in VOP_WRITE 2008-01-25 06:32:20 +00:00
ad 6da461f692 Fix broken assertion. 2008-01-24 21:04:12 +00:00
ad d9231f613d Fix 'panic: dangling vnode'. 2008-01-24 18:31:52 +00:00
ad 1de89e3a92 vclean: fix inverted test. 2008-01-24 17:57:14 +00:00
ad 703069c0e9 specfs changes for PR kern/37717 (raidclose() is no longer called on
shutdown). There are still problems with device access and a PR will be
filed.

- Kill checkalias(). Allow multiple vnodes to reference a single device.

- Don't play dangerous tricks with block vnodes to ensure that only one
  vnode can describe a block device. Instead, prohibit concurrent opens of
  block devices. As a bonus remove the unreliable code that prevents
  multiple file system mounts on the same device. It's no longer needed.

- Track opens by vnode and by device. Issue cdev_close() when the last open
  goes away, instead of abusing vnode::v_usecount to tell if the device is
  open.
2008-01-24 17:32:52 +00:00
rmind aa633f0365 Fix the return values to conform the standard and/or be compatible with
other systems.  Reported by <drochner>.
2008-01-24 14:41:12 +00:00
ad fef8681585 Mark some callouts/workqueues/kthreads MPSAFE. 2008-01-24 13:57:52 +00:00
elad 142877c301 Forgot to commit these two as well. Spotted by hannken@.
Adapt to "CAN" removal.
2008-01-23 17:56:53 +00:00
elad aabadd15ea Forgot to commit this in latest commit, spotted by hannken@.
Adapt to "CAN" removal...
2008-01-23 17:52:32 +00:00
elad c27d5f30b6 Tons of process scope changes.
- Add a KAUTH_PROCESS_SCHEDULER action, to handle scheduler related
    requests, and add specific requests for set/get scheduler policy and
    set/get scheduler parameters.

  - Add a KAUTH_PROCESS_KEVENT_FILTER action, to handle kevent(2) related
    requests.

  - Add a KAUTH_DEVICE_TTY_STI action to handle requests to TIOCSTI.

  - Add requests for the KAUTH_PROCESS_CANSEE action, indicating what
    process information is being looked at (entry itself, args, env,
    open files).

  - Add requests for the KAUTH_PROCESS_RLIMIT action indicating set/get.

  - Add requests for the KAUTH_PROCESS_CORENAME action indicating set/get.

  - Make bsd44 secmodel code handle the newly added rqeuests appropriately.

All of the above make it possible to issue finer-grained kauth(9) calls in
many places, removing some KAUTH_GENERIC_ISSUSER requests.

  - Remove the "CAN" from KAUTH_PROCESS_CAN{KTRACE,PROCFS,PTRACE,SIGNAL}.

Discussed with christos@ and yamt@.
2008-01-23 15:04:38 +00:00
joerg 3615cf7715 Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
2008-01-20 18:09:03 +00:00