Commit Graph

4990 Commits

Author SHA1 Message Date
yamt e1b6afe136 todo. 2006-11-04 13:25:52 +00:00
jmmv d4cb7c851a Fix matching of options with common prefixes (e.g. console and console_speed).
While here remove an useless assignment and bind a variable to a loop.
2006-11-04 11:37:12 +00:00
elad 9477ac30bc Add "@uid" keyword translation, to translate effective user-id of the
process.
2006-11-04 10:14:00 +00:00
elad fe9e2303fd Change KAUTH_SYSTEM_RAWIO to KAUTH_DEVICE_RAWIO_SPEC (moving the raw i/o
requests to the device scope) and add KAUTH_DEVICE_RAWIO_PASSTHRU.

Expose iskmemdev() through sys/conf.h.

okay yamt@
2006-11-04 09:30:00 +00:00
ad 5bfcdd68c1 - ltsleep(): for now, stay at splsched() when releasing sched_lock, or we
may allow wakeup() to occur before switching away.  PR/32962.
- mi_switch(): don't inspect p->p_cred or send signals without holding the
  kernel lock.
2006-11-03 20:46:00 +00:00
ad 1cffc415cb - issignal(): acquire the kernel lock before inspecting signal state
- lwp_exit2(): don't drop the kernel lock until after doing wakeup()
2006-11-03 19:46:03 +00:00
yamt 0ae566badc fix deadlocks due to ksiginfo_pool spl problems. 2006-11-03 12:18:41 +00:00
yamt 1cd3142c15 make siginfo_pool and ksiginfo_pool static. 2006-11-03 11:41:07 +00:00
yamt 4d91d6d252 ltsleep: fix a race with wakeup(). 2006-11-02 16:26:25 +00:00
elad d6bdd9bb62 printf() -> log(). 2006-11-01 22:45:14 +00:00
christos 3f78162b5c implement kern.arandom properly, instead of lying about it and only filling
the first 4 bytes of the array with random data.
2006-11-01 22:27:43 +00:00
cbiere 7aa8c7d98c Pointing one element past an array is fine, pointing before it isn't. 2006-11-01 11:37:59 +00:00
yamt 1a7bc55dcc remove some __unused from function parameters. 2006-11-01 10:17:58 +00:00
yamt caa14e011b kill signal "dolock" hacks.
related to PR/32962 and PR/34895.  reviewed by matthew green.
2006-11-01 09:46:14 +00:00
yamt 86a24f7e0c - remove an unnecessary #include.
- make some variables static.
2006-11-01 09:36:28 +00:00
yamt 60392d9383 kill sched_psignal.
related to PR/32962 and PR/34895.  reviewed by matthew green.
2006-11-01 09:33:45 +00:00
yamt dd706203e4 mi_switch: move rlimit and autonice handling out of sched_lock in order to
simplify locking.
related to PR/32962 and PR/34895.  reviewed by matthew green.
2006-11-01 09:32:52 +00:00
mjf a2be0ed655 Revert the changes I introduced trying to solve tmpfs' NFS export problem.
Requested by yamt@
2006-10-31 08:12:46 +00:00
elad 52d8744717 Use integers, not pointers to integers, for KAUTH_REQ_NETWORK_SOCKET_OPEN.
Reminded by yamt@, thanks!
2006-10-30 16:53:48 +00:00
elad ff7c31739a Use consistent logging messages. 2006-10-30 11:29:12 +00:00
christos ce42f55037 add the emulation in kinfo_proc2 2006-10-29 22:34:07 +00:00
christos d165928f40 check for negative length in PT_COREDUMP (from Neil) 2006-10-28 17:58:22 +00:00
elad 066e9189c4 Adapt to changes suggested by yamt@ to get rid of __UNCONST() stuff.
While here, don't leak pathbuf on success.
2006-10-28 11:43:45 +00:00
mrg 8f3077c34d avoid allocating from ksiginfo_pool when we know we aren't going to
use it.  idea partly from yamt.  assert SCHED_ASSERT_UNLOCKED() in
all the places we call ksiginfo_queue() without a ksiginfo.

fixes recent panics detected by LOCKDEBUG.
2006-10-28 08:09:31 +00:00
elad 145a8382e1 Don't leak handle. 2006-10-27 22:17:09 +00:00
christos 31a62606ea Merge kernel and userland rmd160 and sha2 implementation.
XXX: We still install rmd160.h and sha2.h in /usr/include/crypto, unlike
the other hash functions which get installed in /usr/include for compatibility.
2006-10-27 21:20:48 +00:00
elad 52bab3d8ab Don't allocate MAXPATHLEN on the stack.
Prompted by and initial diff okay yamt@
2006-10-27 20:16:10 +00:00
yamt 17685f3fdc vmem: use correct function names for ASSERT_SLEEPABLE. 2006-10-27 15:05:16 +00:00
thorpej 1342c5a275 Use prop_dictionary_set_int32() to set the error number. 2006-10-26 05:08:01 +00:00
elad adf8d7aab2 Introduce KAUTH_REQ_NETWORK_SOCKET_OPEN, to check if opening a socket is
allowed. It takes three int * arguments indicating domain, type, and
protocol. Replace previous KAUTH_REQ_NETWORK_SOCKET_RAWSOCK with it (but
keep it still).

Places that used to explicitly check for privileged context now don't
need it anymore, so I replaced these with XXX comment indiacting it for
future reference.

Documented and updated examples as well.
2006-10-25 22:49:22 +00:00
cbiere 9e6aff1165 Added missing whitespace in sysctl description string. PR kern/34915. 2006-10-25 20:55:11 +00:00
christos 5ce26ddf80 enable namecache enter reverse for linux procfs lookups.
XXX: how expensive is that?
2006-10-25 18:56:38 +00:00
christos 1b7ad03044 Defer the vnode test for directory until after the cache lookup. This makes
getcwd work with plain files too, if we allow plain files in the vnode->name
cache.
2006-10-25 18:55:49 +00:00
jmmv 133d7c5ba4 Add a function (ksyms_init_explicit) to add a symbol table when we know the
exact address of the symtab and strtab ELF sections contents beforehand.

This will be used in i386's Multiboot code to add the initial kernel ksyms
without having to prepare a minimal ELF image that matches the format
expected by the reguluar ksyms_init function.

This part was reviewed by cube@ and successfully passes a full i386 release
build.
2006-10-25 13:46:36 +00:00
thorpej 3c6ae35ab2 - Add a new disk ioctl (DIOCGDISKINFO) to get the disk-info dictionary
for the disk.
- Add a new function, disk_ioctl(), that does generic disk ioctl handling.
  DIOCGDISKINFO is handled here now, and others will be added in the future.
- In the wd driver, fill in the dk_info member of struct disk and use the
  new disk_ioctl() function.
2006-10-25 04:04:45 +00:00
elad 2d8eaf9b86 Various cleanups.
Make some "#ifdef DIAGNOSTIC" blocks always compiled in; others
convert to KASSERT() where appropriate.

Add some sanity checks and comments while here.
2006-10-24 22:38:41 +00:00
mjf 84bd46b9f9 Add support to allow a file system to not permit being exported over NFS.
Approved by elad@ and wrstuden@
2006-10-24 21:53:10 +00:00
hannken 8ea60a7f23 Remove specificdata_setspecific_nowait() as result of discussion on tech-kern.
Add _lwp_getspecific_by_lwp() to get lwp specific data from other lwp's.
Protected by #ifdef _LWP_API_PRIVATE.

Approved by: Jason Thorpe <thorpej@netbsd.org>
2006-10-24 10:05:45 +00:00
yamt 5239dc5a67 qc_init: fix a problem introduced by rev.1.13.
namely, use quantum-size alignment rather than no alignment.
PR/34879 from Peter Postma.
2006-10-23 13:36:33 +00:00
elad c2da5d160e PR/34873: Ryo Shimizu: sendmsg() can cause kernel panic
Patch applied, thanks!
2006-10-23 10:37:22 +00:00
mrg a37172bb09 avoid a problem in kpsignal2() holding sched_lock while wanting to call
pool_get().  pre-allocate the ksiginfo_t before taking sched_lock and
use it if necessary, or freeing it if it is unused.

rename ksiginfo_{get,put}() to ksiginfo_{dequeue,queue}() (idea from chuq.)


this fixes PR#32962.  thanks to christos, chuq and go for help/ideas.
2006-10-22 20:48:45 +00:00
christos 8c71201d08 make ktruser enforce the maximum buffer length, and return an error. 2006-10-22 18:19:49 +00:00
pooka 96d8335980 kauth_cred_uucvt() -> kauth_uucred_to_cred(), introduce kauth_cred_to_uucred()
per tech-kern proposal
2006-10-22 13:07:15 +00:00
elad 54c1c4a4dc Remove todo that has been documented for a long time now. 2006-10-22 10:37:19 +00:00
yamt 982b4f66e8 remove a todo which has been done. 2006-10-22 10:19:25 +00:00
yamt 0d14f90ef6 qc_init: when initializing pools, use align==1 (ie. no alignment)
rather than align==0, which is converted to ALIGN(1) by pool_init.
2006-10-22 09:42:30 +00:00
mrg 7a4c53719e avoid yet another GCC warning only exposed at -O3. 2006-10-22 00:48:14 +00:00
pooka e2d2f0dc15 pool_get(): use PR_WAITOK, not M_WAITOK (which happens to be PR_NOWAIT ..)
XXX: not the first time this mistake has been made
2006-10-21 17:01:56 +00:00
kardel d094ff8f40 Avoid printf() the selected timecounter as it is called in the path of hardclock().
The information is available via sysctl anyway.
2006-10-21 07:16:54 +00:00
elad a5d447aee5 Add an XXX to remind me why it's there when grepping. (securelevel ref) 2006-10-20 22:22:48 +00:00