rmind
554a0142dc
Initialise struct emul members by name (it is readable now and one can search
...
them in the tree).
2009-10-25 01:14:03 +00:00
rmind
33963b1448
Avoid #ifndef __NO_CPU_LWP_FREE, only ia64 is missing cpu_lwp_free
...
routines and it can/should provide stubs.
2009-10-22 22:28:57 +00:00
rmind
30d0b02e57
Make lwp_park_sobj and lwp_park_tab static.
...
Wrap long lines while here.
2009-10-22 13:12:47 +00:00
rmind
40cf6f3659
Remove uarea swap-out functionality:
...
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.
Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).
Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
jym
de3d6f78cf
Fix a bug where on MP systems, pool_cache_invalidate(9) could be called
...
early during boot, just after CPUs are attached but before they are marked
as running.
This will result in a list of CPUs without the SPCF_RUNNING flag set, and
will trigger the 'KASSERT(xc_tailp < xc_headp)' in xc_lowpri() as no cross
call is issued.
Bug reported and patch tested by tron@.
See also http://mail-index.netbsd.org/tech-kern/2009/10/19/msg006293.html
2009-10-20 17:24:22 +00:00
snj
07ce40632e
Follow upstream's lead and remove third and fourth clauses (except on
...
from usr.sbin/mopd/common/pf.c, where only the ad clause is removed,
because it has a shared UCB copyright) on Mats O Jansson's files.
thorpej OK'd usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c, where he shares
copyright.
2009-10-20 00:51:13 +00:00
snj
4968c04d96
Move Eduardo Horvath's license to 2 clause. OK eeh@.
2009-10-19 18:12:37 +00:00
jnemeth
30d0592bd3
allow passing a NULL proplib dictionary to modctl(MODCTL_LOAD, ...)
2009-10-16 00:27:07 +00:00
thorpej
1f59a448f4
- pool_cache_invalidate(): broadcast a cross-call to drain the per-CPU
...
caches before draining the global cache.
- pool_cache_invalidate_local(): remove.
2009-10-15 20:50:12 +00:00
pooka
624234c0c5
Generate scheduling points around rump vnode operations.
2009-10-15 00:29:40 +00:00
dsl
931ac5949a
Error out of ptcread() if the uio length supplied is zero before the code
...
has a chance to panic in ureadc().
2009-10-14 19:25:39 +00:00
pooka
ddc943db02
regen: fix rump varargs syscalls prototypes
2009-10-13 21:57:52 +00:00
pooka
0d8bdf6131
For varargs syscalls, create rump prototypes which match the regular
...
system call counterparts, e.g.:
open(const char *, int, mode_t) -> open(const char *, int, ...)
2009-10-13 21:54:29 +00:00
yamt
e894729250
sys___aio_suspend50, sys_lio_listio:
...
- fix the buffer sizes.
- use kmem_alloc instead of kmem_zalloc for buffers which we will
overwrite soon.
2009-10-12 23:43:13 +00:00
yamt
29e552b036
wrap long lines. no functional changes.
2009-10-12 23:38:08 +00:00
yamt
b8562be527
make aio_worker static.
2009-10-12 23:36:56 +00:00
yamt
5873138145
constify
2009-10-12 23:36:02 +00:00
yamt
28bf72b353
fix KMEM_SIZE vs KMEM_GUARD
2009-10-12 23:35:09 +00:00
yamt
de25ce6a4c
remove no longer necessary include of drvctl.h
2009-10-12 23:33:02 +00:00
yamt
199e4526f3
aio_suspend1: fix a double free bug.
2009-10-12 23:31:59 +00:00
dsl
65dd100015
Check for zero length read here - and return zero.
...
Most times we've come through spec_read() which has already done the test,
but not always (eg pty with ptsfs mounted).
Without this there is a simple local-user panic in ureadc().
Noted Matthew Mondor on tech-kern.
2009-10-11 17:20:48 +00:00
dsl
270307174b
Fix locking when collecting pt_read and pt_ucntl.
2009-10-11 08:08:32 +00:00
jym
31629a1342
Add pool_cache_invalidate_local() to the pool_cache(9) API, to permit
...
per-CPU objects invalidation when cached in the pool cache.
See http://mail-index.netbsd.org/tech-kern/2009/10/05/msg006206.html .
Reviewed by bouyer@. Thanks!
2009-10-08 21:54:45 +00:00
elad
2cb56be586
Add a (weak aliased) machdep_init() as a place to do machdep initialization
...
that can't happen as early as the other init functions as called from
cpu_startup() -- for example, register kauth(9) listeners.
Put unprivileged policy in the x86 code; used by i386, amd64, and xen.
2009-10-06 21:07:05 +00:00
elad
756638cf95
Factor out a block of code that appears in three places (Veriexec, keylock,
...
and securelevel) so that others can use it as well.
2009-10-06 04:28:10 +00:00
rmind
c9a5a18df3
mq_timedsend/mq_timedreceive: timeout value is absolute, not relative.
...
While here, drop unecessary (since fdesc API changes) lwp_t arguments.
Bug reported by Stathis Kamperis, thanks!
2009-10-05 23:49:46 +00:00
rmind
5503429772
shmexit: simplify a lot by avoiding unnecessary memory allocations, since
...
it is a last reference, just re-lock and check mapping list again. Often
there wont be re-locks at all, moreover, shm_lock is not contended at all.
2009-10-05 23:47:04 +00:00
rmind
c3a98b4c87
semu_alloc: simplify a little.
2009-10-05 23:46:02 +00:00
rmind
ac8f63538a
Convert cpu_number(), which can be sparse, to cpu_index(), which is MI.
2009-10-05 23:39:27 +00:00
elad
4c9fcb77c3
- Add usermount_common_policy() that implements some common (everything
...
but access control) user mounting policies: enforced MNT_NOSUID and
MNT_NODEV, no MNT_EXPORT, MNT_EXEC propagation. This can be useful for
secmodels that are interested in simply adding finer grained user mount
support.
- Add a mount subsystem listener for KAUTH_REQ_SYSTEM_MOUNT_GET.
2009-10-05 04:20:13 +00:00
elad
fa69dc186a
Install floppies (haha) don't get built with ktrace/ptrace, so they don't
...
include kern/sys_process.c. Move proc_uidmatch() to kern/kern_proc.c which
always gets built instead.
Pointed out by Kurt Schreiner on current-users@:
http://mail-index.netbsd.org/current-users/2009/10/03/msg010745.html
2009-10-04 03:15:08 +00:00
elad
b2f3768346
- Move sched_listener and co. from kern_synch.c to sys_sched.c, where it
...
really belongs (suggested by rmind@),
- Rename sched_init() to synch_init(), and introduce a new sched_init()
in sys_sched.c where we (a) initialize the sysctl node (no more
link-set) and (b) listen on the process scope with sched_listener.
Reviewed by and okay rmind@.
2009-10-03 22:32:56 +00:00
elad
458410e7b5
Oops, forgot to make sched_listener static. Pointed out by rmind@, thansk!
2009-10-03 21:21:56 +00:00
elad
54d08ac134
Update a comment. No functional change.
2009-10-03 21:03:55 +00:00
elad
a39251ecc2
Introduce time_wraps() to check if setting the time will wrap it (or
...
close to it). Useful for secmodels.
Replace open-coded form with it in secmodel code (securelevel, keylock).
Note: I need to find a way to make secmodel_keylock.c ~<100 lines.
2009-10-03 20:48:42 +00:00
elad
7f720ad562
KAUTH_GENERIC_CANSEE -> KAUTH_REQ_NETWORK_SOCKET_CANSEE.
...
Not quite the same semantics but it's okay. Once our sockets have
credentials (and they will) it's all the same.
2009-10-03 20:24:39 +00:00
elad
5b3a96a24d
Move KAUTH_NETWORK_BIND::KAUTH_REQ_NETWORK_BIND_PORT policy back to the
...
subsystem (or close to it).
Note: Revisit KAUTH_REQ_NETWORK_BIND_PRIVPORT.
2009-10-03 03:59:39 +00:00
elad
82ce55ed44
Move policies for KAUTH_PROCESS_{CANSEE,CORENAME,STOPFLAG,FORK} back to
...
the subsystem.
Note: Consider killing the signal listener and sticking
KAUTH_PROCESS_SIGNAL here as well.
2009-10-03 03:38:31 +00:00
elad
111de3833c
Finish moving socket policy to the subsystem.
2009-10-03 01:41:39 +00:00
elad
452ced03bd
Move sched policy back to the subsystem.
2009-10-03 01:30:25 +00:00
elad
212f5fa214
Move kevent policy back to the subsystem.
2009-10-03 00:14:07 +00:00
elad
abc7a4290b
Put module loading policy back in the subsystem.
...
Revisit: consider moving kauth_init() above module_init() in main().
2009-10-03 00:06:37 +00:00
elad
1f98cab201
Put the tty opening policy back in the subsystem.
...
Remove include we don't need from the secmodel code.
2009-10-02 23:58:53 +00:00
elad
510083464f
Move some of the socket policy back to the subsystem.
...
Remove include we don't need in the secmodel code.
2009-10-02 23:50:16 +00:00
elad
8751f894d8
Put signal delivery policy back in the subsystem.
2009-10-02 23:24:15 +00:00
elad
09f3ac9e2f
Stick nice policy in its own subsystem and call the listener "resource"
...
rather than "rlimit"...
2009-10-02 22:46:18 +00:00
elad
bcc5014bd0
Move rlimit policy back to the subsystem.
...
For this we needed proc_uidmatch() exposed, which makes a lot of sense,
so put it back in sys_process.c for use in other places as well.
2009-10-02 22:38:45 +00:00
elad
2ae3a70827
Move ptrace's security policy back to the subsystem itself.
...
Add a ptrace_init() so we have a place to register the listener; called
next to ktrinit().
2009-10-02 22:18:56 +00:00
elad
40cc528a28
Move psets security policy back to the subsystem and keep suser logic only
...
in the suser secmodel code.
2009-10-02 21:56:28 +00:00
elad
932cd15f91
Move ktrace's subsystem security policy to the subsystem itself, and keep
...
just the suser-related logic in the suser secmodel.
2009-10-02 21:47:35 +00:00