Commit Graph

6523 Commits

Author SHA1 Message Date
ad ad507e54f8 _lwp_kill: set SI_LWP in the siginfo, not SI_USER. 2008-10-16 08:47:07 +00:00
wrstuden e27861f46e Add a weak alias for ktr_saupcall, so things build w/o KTRACE compiled. 2008-10-15 16:03:29 +00:00
pooka d31071b90c Mark a few network-related calls as RUMP (needs more work) 2008-10-15 13:01:15 +00:00
ad b5ff001c46 Correction to previous. 2008-10-15 08:25:28 +00:00
ad 1ec58d56ef - Rename cpu_lookup_byindex() to cpu_lookup(). The hardware ID isn't of
interest to MI code. No functional change.
- Change /dev/cpu to operate on cpu index, not hardware ID. Now cpuctl
  shouldn't print confused output.
2008-10-15 08:13:17 +00:00
wrstuden fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
pooka 2002727b2c Give maximum level of network softinterrupts a symbolic constant
(which happened to get bumbed from 32 to 33 (AF_MAX) now).
2008-10-14 17:15:20 +00:00
pooka a44cdde52c M_IOV is used all over the place, so stuff it in with malloc_stdtypes 2008-10-14 14:17:49 +00:00
ad 82e3c0b1ac Accept filters:
- Remove remaining #ifdef INET.
- Avoid holding locks so we don't need to do KM_NOSLEEP allocations.
- Use a rwlock to protect the accept filter list.
- Make it safe to unload accept filter modules.
- Minor KNF.
2008-10-14 13:45:26 +00:00
ad a68a7877a5 Correction to previous. 2008-10-14 09:17:23 +00:00
ad a65f991bb4 Redo kern_resource.c:1.146 by pooka@: change ui_sbsize to a u_long. 2008-10-14 09:16:32 +00:00
pooka 3a64aae825 Fix previous: weak symbols work so much better if they are exported
from the object as weak symbols...

There's also something to be said about "cosmetic" tweaks after
testing, but I do think I'll bother.
2008-10-13 18:16:33 +00:00
pooka cf05fbf706 Weak alias all rump system calls to rump_enosys() 2008-10-13 16:25:12 +00:00
plunky c827b856f4 fix problem pointed out by ad where sockopt may end up sleeping
inappropriately with the socket lock held.

    sockopt_init() may sleep

    sockopt_set() will not sleep

    sockopt_getmbuf() for legacy code will not sleep
2008-10-12 09:26:50 +00:00
tls cef30423d3 Address problems with accept filters noted by ad in his source-changes
mail: http://mail-index.netbsd.org/source-changes/2008/10/10/msg211109.html

	* Scary-looking socket locking stubs (changed to KASSERT of locked)

	* depends on INET inappropriately (though now you must add new
	  accept filter names to the uipc_accf.c line in conf/files if
	  you aren't using dataready or httpready)

	* New code uses MALLOC/FREE -- changed to kmem_alloc/kmem_free;
	  could be pool_cache, these are all fixed-size allocations.

We need to verify that this works as expected with protocols with per-socket
locking, like PF_LOCAL.  I'm a little concerned about the case where the
lock on the listen socket isn't the same lock as on the eventual connected
socket.
2008-10-11 16:39:07 +00:00
pooka 7e5aba5af0 Move uidinfo to its own module in kern_uidinfo.c and include in rump.
No functional change to uidinfo.
2008-10-11 13:40:57 +00:00
pooka dc2ebb63b8 Put ui_lock back and use it to modify the socket buffer size.
Typecasting quad_t * to long * and using atomic_add_long can't
possibly be expected to work!

Another fine error caught by the gcc type-punning warning.  That
really really should be on by default in the kernel.
2008-10-11 13:04:39 +00:00
skrll af82972758 RCSID police. 2008-10-10 23:09:19 +00:00
plunky d56f5b8302 use kmem_alloc/kmem_free rather than malloc() for sockokpt 2008-10-10 19:49:49 +00:00
ad 22191248b6 Update CALLOUT_INVOKING correctly, seems to have been lost. 2008-10-10 11:42:58 +00:00
ad fbc0e2e6d3 Redo 1.169 correctly (dsl's fix doesn't do what I intended, either!). 2008-10-10 11:20:15 +00:00
pooka 6dbf67cea1 Atomic ops are unnecessary here. pointed out by ad 2008-10-09 12:14:06 +00:00
pooka 225570303b Rewrite once to use global locks and atomic ops to get rid of the
static simplelock initializer (and simplelock too).  The fastpath
is still lockless, so doesn't make a difference in terms of
performance.

Also fixes a hanging bug if the once routine returned an error.
It does not retry after an error occurs, as I can't really imagine
fruitful semantics for that.
2008-10-09 10:48:21 +00:00
rmind 337b081fed - Replace lwp_t::l_sched_info with union: pointer and timeslice.
- Change minimal time-quantum to ~20 ms.
- Thus remove unneeded pool in M2, and unused sched_lwp_exit().
- Do not increase l_slptime twice for SCHED_4BSD (regression fix).
2008-10-07 09:48:27 +00:00
rmind 68121d6afa - Allow changing of kern.ipc.shmmax, just to avoid confusion.
- Change type of kern.ipc.shmmax to CTLTYPE_QUAD.
2008-10-07 09:35:03 +00:00
ad 139d645eee PR kern/39681 ddb doesn't work with new MODULAR modules
Complete initialization of new symbol table record.
2008-10-06 11:49:44 +00:00
ad 1b31761afa kobj_read: plug a leak. 2008-10-06 10:46:58 +00:00
pooka b9a8d2f75a hardclock() itself doesn't schedule callout softintrs any more,
so update comment - less is more.
2008-10-05 21:57:20 +00:00
njoly ab896e4008 Small fix to make setpriority(2) with PRIO_PROCESS return ESRCH when
no valid process can be found.
2008-09-30 17:28:47 +00:00
rmind ae626d791a - Schedule bound threads even if CPU is offline. Might be revisited later,
when decision what to do with already bound threads will be made.
- Do not allow to assign offline CPU to the processor-set.

Quick fix for PR/39349.
2008-09-30 16:28:45 +00:00
njoly 6d60715500 Make setpriority(2) return EINVAL for incorrect which values. 2008-09-29 21:30:12 +00:00
rmind 03fe669395 - Fix message queue permissions problems.
- Rake into account umask when creating mqueue.
- Restore DDB command, which was accidentally lost (hi martin).
- Misc.
2008-09-29 10:27:53 +00:00
pooka a709cdbf1f RCS Id polizei 2008-09-27 16:58:03 +00:00
reinoud fec4bb5bba Add generic FS agnostic directory hashing support. Currently only in use by
UDF. Future users could be msdosfs, ufs, nilfs2 (when ready), cd9660 etc.

Note that its not the same as UFS's DIRHASH support; UFS would need a good
cleanup/splitout of directory operations to adopt to this new directory
hashing support since most directory operations are interweaved with the
vnops itself. This is a TODO.
2008-09-27 13:01:07 +00:00
wrstuden 53908c9c0a Pull in a fix from wrstuden-revivesa:
Let's look for threads in the TARGET process, not in the
debugger process (gdb). Noticed when a KASSERT fired while
running gdb on a threaded app.

I will adjust wrstuden-revivesa-base-3 to include this change.
2008-09-27 03:52:24 +00:00
pooka 44367b7199 Split rate-checking routines into their own module for easier reuse. 2008-09-25 17:17:10 +00:00
pooka dd1721fa8d Move global malloc types from kern_malloc into a separate module. 2008-09-25 16:23:45 +00:00
wiz 43a9cced05 Fix typo in comment. 2008-09-25 14:37:30 +00:00
ad 43f2119341 PR kern/39307 (mfs will sometimes panic at umount time)
Change dounmount() so that it never drops the caller provided reference.
Garbage collecting 'struct mount' is up to the caller.
2008-09-25 14:17:29 +00:00
ad c63b8853fe PR kern/30525 remounting ffs read-only (mount -ur) does not sync metadata
Prevent r/w to r/o downgrade until such time as someone has verified all
the relevant file system code.
2008-09-24 10:07:19 +00:00
ad b72735bab2 PR kern/39307 mfs will sometimes panic at umount time
Don't drop reference to the mount if VFS_START() fails - that's for unmount
to do.
2008-09-24 09:44:09 +00:00
ad edd4d8eda9 PR kern/39307 mfs will sometimes panic at umount time
In vfs_destroy, assert that the refcount is not dropping below zero.
2008-09-24 09:33:40 +00:00
hannken bc62834f44 Resolve a race when physio_done signals completion before it tries to
free a buffer.  This will fail if the buffer owner has a chance to
modify the BC_DONTFREE flag before putphysbuf() examines it.

Fix by removing get/putphysbuf() and BC_DONTFREE.  Physio_done() now
has an explicit test for a buffer coming from the call of physio().

Observed by Lars Nordlund when writing a DVD with growisofs, see PR kern/39536.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
2008-09-24 08:19:19 +00:00
pooka 2134732d08 Move [hH][eE][xX][dD][iI][gG][iI][tT][sS](*) from subr_prf to subr_prf2
for use with rumps.

*) yes, I just had to.  Notably though, there were only two
   symbols instead of 128.
2008-09-23 22:20:24 +00:00
christos 93aed8f8e3 fix half-assed change usec -> nsec that broke non-real timers. 2008-09-23 16:44:49 +00:00
rmind ea71ae9284 Fix the aligning of memory blocks again, finally...
Tested by <martin> on his sparc64 box.
2008-09-19 11:21:33 +00:00
hannken 8de1a273e1 Replace the fss unmount hook with a vfs_hook.
fssvar.h:       struct device * -> device_t.
fss.c:          establish unmount hook on first attach, remove on last detach.
vfs_syscalls.c: remove the call of fss_umount_hook().
vfs_trans.c:    destroy cow handlers on unmount as fstrans_unmount() will be
                called before vfs_hooks.
2008-09-17 14:49:25 +00:00
pooka 66523e99f5 remove M_PIPE (hi rmind!) 2008-09-17 14:00:41 +00:00
rmind ffb8ec88e1 Replace intptr_t with uintptr_t in few more places.
OK by <matt>.
2008-09-15 18:12:56 +00:00
rmind 38d7b7ba2e Replace intptr_t in few places to uintptr_t. 2008-09-15 10:43:29 +00:00