elad
964f16c2b9
Make fork use kauth.
...
Been running in my tree for over a month at least.
Reviewed and okay yamt@, and special thanks to him as well as rittera@
for making this possible through fixing NDIS to not call fork1() with
l1 != curlwp.
2008-01-07 23:51:06 +00:00
dsl
0b5d0f6802
Actually copy the ras list onto the child process during fork() - hi ad.
...
Might fix the 'ras' part of kern/37650.
For some reason the itimers aren't inherited either.
2008-01-07 20:56:32 +00:00
ad
574389c2a0
Fix build if !MODULAR. Reported by elad@.
2008-01-07 20:42:48 +00:00
ad
b7dafc15be
Don't both about module name / ksyms until the name is known for sure.
2008-01-07 18:25:56 +00:00
ad
72506c7508
Regen.
2008-01-07 16:16:38 +00:00
ad
fe8aceeb5e
More MPSAFE syscalls.
2008-01-07 16:15:36 +00:00
ad
8b52263cd1
Hold kernel_lock across IFNET_FOREACH().
2008-01-07 16:13:49 +00:00
ad
77e0b2120f
Patch up sysctl locking:
...
- Lock processes, credentials, filehead etc correctly.
- Acquire a read hold on sysctl_treelock if only doing a query.
- Don't wire down the output buffer. It doesn't work correctly and the code
regularly does long term sleeps with it held - it's not worth it.
- Don't hold locks other than sysctl_lock while doing copyout().
- Drop sysctl_lock while doing copyout / allocating memory in a few places.
- Don't take kernel_lock for sysctl.
- Fix a number of bugs spotted along the way
2008-01-07 16:12:52 +00:00
ad
a32939fca4
bwrite, bdwrite: bufcache_lock must be held for reassignbuf.
2008-01-07 12:50:38 +00:00
ad
297c776822
Make VFS_SYNC() and friends functions, and have them acquire kernel_lock
...
if the FS is not marked MPSAFE.
2008-01-07 12:34:12 +00:00
yamt
2e8a5bee68
lwp_ctl_alloc: fix error handling.
2008-01-07 11:41:29 +00:00
simonb
cfde7482cd
Actually return the computed uptime in microuptime(). Fixes many
...
wierd timing issues on non-timecounter ports (tested on sbmips, and
omap ARM by Marty Fouts).
Also move the microtime() inside the splclock() block in the same
function - it may be possible for the "time" variable to be updated
after the call to microtime() but before we use it to calculate the
offset from mono_time.
2008-01-07 10:28:07 +00:00
ad
0805a9416a
Add MODULAR option. Include kernel linker stuff if MODULAR.
2008-01-06 18:03:58 +00:00
jmcneill
bf49138bfc
Fix off-by-one in kobj_read range checking for case KT_MEMORY
2008-01-06 15:13:07 +00:00
ad
b9e6d93835
- Allow loading ELF objects from memory. Based on a patch from jmcneill.
...
- Allow for changing object name later, once known.
- Split open/load of the objects.
2008-01-06 14:47:26 +00:00
ad
58dc3540b0
Add fgetdummy/fputdummy: allocate and free dummy 'struct file' entries
...
to be used when traversing filehead.
2008-01-05 23:53:21 +00:00
dsl
8a62c0f2a5
Use FILE_LOCK() and FILE_UNLOCK()
2008-01-05 19:08:48 +00:00
ad
21946bba05
Make acct_lock a rwlock.
2008-01-05 18:23:30 +00:00
ad
63baaccb6d
Serialize calls to tc_windup().
2008-01-05 18:00:37 +00:00
ad
4eefe3e642
Export log_lock.
2008-01-05 14:07:26 +00:00
dsl
b8bcdbe9e6
Don't pass 'curlwp' into trace_enter() and trace_exit().
2008-01-05 12:53:52 +00:00
dsl
463af8509e
Don't pass curlwp into process_stoptrace()
2008-01-05 12:41:43 +00:00
ad
212c50dd1b
Need sys/lock.h for SPINLOCK_SPIN_HOOK.
2008-01-05 12:39:27 +00:00
ad
ac85866313
simple_lock_only_held() is gone.
2008-01-05 12:31:39 +00:00
dsl
c9848793d9
Don't pass l (== curlwp) into the system call trace code.
...
Delete inclusion of opt_syscall_debug.h into systm.h, every kernel object
file doesn't need to depend on opt_syscall_debug.h!
2008-01-05 12:30:47 +00:00
ad
8a9b6ca32a
Need sys/lock.h for kernel_lock.
2008-01-04 21:54:49 +00:00
ad
070e98eb7b
Pull in sys/atomic.h for memory barriers.
2008-01-04 21:52:48 +00:00
xtraeme
9bb6b94d89
sys/lock.h is required now. ok ad
2008-01-04 21:31:06 +00:00
ad
0664a0459b
Start detangling lock.h from intr.h. This is likely to cause short term
...
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
2008-01-04 21:17:40 +00:00
ad
f479e1b23b
- Always include kprintf_slock.
...
- sys/lock.h -> sys/simplelock.h
2008-01-04 18:21:06 +00:00
ad
4c5e4edd5c
Add a kobj_stat() to get basic info about the object, and some other
...
minor changes.
2008-01-04 14:53:32 +00:00
ad
1dd75d2865
Add a simple in-kernel linker, derived from FreeBSD's link_elf_obj.c. Needs
...
more work but is enough to load simple LKMs. amd64 is untested.
Locking is caller provided. This is decoupled from the LKM framework because
kernel modules need not be loaded from the file system - they could be built
into the kernel and referenced via link set.
2008-01-04 12:26:20 +00:00
ad
c0cd2b871b
Ignore symbols marked undefined.
2008-01-04 11:28:13 +00:00
elad
86f224903e
Replace malloc/free usage with kmem_alloc/kmem_zalloc/kmem_free.
...
okay yamt@.
2008-01-03 17:51:05 +00:00
yamt
5661ec0901
- malloc -> kmem_alloc
...
- kill M_EXEC.
2008-01-03 14:36:57 +00:00
yamt
6184f2ada8
malloc -> kmem_alloc
2008-01-03 14:29:31 +00:00
yamt
97436a1e88
fix malloc type mismatches.
2008-01-03 14:25:49 +00:00
dyoung
a72fb242fe
Add tc_detach() for detaching a timecounter. It is good enough to
...
detach the AMD Geode SC1100 27 MHz clock, geodecntr(4), but there
may be synchronization problems on MP machines.
2008-01-03 04:42:13 +00:00
pooka
d53e261066
valloc -> vnalloc, vfree -> vnfree
...
Avoids collision with userland valloc(3).
no functional change
ad ok
2008-01-03 01:26:28 +00:00
yamt
2129f3c054
malloc: fix freelist corruption.
2008-01-03 01:21:08 +00:00
yamt
5da7542a9d
- elf_load_file: return ENOEXEC instead of 0 in the case of
...
e_phnum > MAXPHNUM.
- exec_elf_makecmds: return an interesting error rather than
always using ENOEXEC.
- reject e_phnum==0.
2008-01-02 22:04:56 +00:00
yamt
22d570119a
use kmem_alloc instead of malloc.
2008-01-02 19:44:36 +00:00
yamt
677860cb8a
use kmem_alloc instead of malloc.
2008-01-02 19:26:45 +00:00
yamt
c68e4b1c69
remove PIPE_WANTW, PIPE_WANTR and PIPE_WANTCLOSE. cv_waiters is enough.
...
this fixes a deadlock between pipe_direct_write and pipeclose.
XXX this code should be simplified.
it's mostly pointless to have two struct pipes linked together,
esp. when we don't support bi-directional pipes.
2008-01-02 19:16:00 +00:00
ad
a108410386
Regen.
2008-01-02 11:57:29 +00:00
ad
b4284a686b
Merge vmlocking2 to head.
2008-01-02 11:57:13 +00:00
ad
e871738d3d
Regen.
2008-01-02 11:51:15 +00:00
ad
4a780c9ae2
Merge vmlocking2 to head.
2008-01-02 11:48:20 +00:00
ad
fe8a16b16c
Hang the correct processes when no output/input available. PR kern/37603.
...
From christos@.
2007-12-31 21:11:13 +00:00
ad
2ecdf58c2c
Remove systrace. Ok core@.
2007-12-31 15:31:24 +00:00