summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate OBJ_WRITEABLE. It hasn't been used in a long time.alc2006-07-211-7/+1
|
* Add a mutex to protect the list of interrupt config hooks. We do assumejhb2006-07-191-11/+21
| | | | | | | | | that the only remove hook operation that can occur while processing the hooks is to remove the currently executing hook. This should be safe as the existing code has assumed this already for a long time now. Reviewed by: scottl MFC after: 1 week
* Call change_dir() instead of duplicating the code in fchdir().jhb2006-07-192-16/+2
|
* Don't free the sockaddr in kern_bind() and kern_connect() as not alljhb2006-07-191-4/+6
| | | | | callers pass a sockaddr allocated via malloc() from M_SONAME anymore. Instead, free it in the callers when necessary.
* Separate functions with a newline.stefanf2006-07-171-0/+1
|
* Remove the NDEVFSINO and NDEVFSOVERFLOW options which no longer exists inphk2006-07-171-1/+0
| | | | | | DEVFS. Remove the opt_devfs.h file now that it is empty.
* Change comment on soabort() to more accurately describe how/whenrwatson2006-07-161-12/+12
| | | | soabort() is used. Remove trailing white space.
* Enable debug.mpsafevfs by default on arm. Since every architecture exceptalc2006-07-151-2/+1
| | | | | | | powerpc has debug.mpsafevfs enabled by default, it is shorter to enumerate the architectures on which debug.mpsafevfs is off. Tested by: cognet@
* Let native elf class be registered earlier.jkim2006-07-141-1/+1
|
* Remove duplicated #include.pjd2006-07-141-1/+0
|
* Backout the feature which can change thread's scheduling option, I reallydavidxu2006-07-131-42/+4
| | | | | | don't want to mix process and thread scheduling options together in these functions, now the thread scheduling option is implemented in new thr syscalls.
* regenerate.davidxu2006-07-132-2/+8
|
* Add syscalls thr_setscheduler, thr_getscheduler, and thr_setschedparam,davidxu2006-07-132-2/+167
| | | | | | | | these syscalls are designed to set thread's scheduling parameters and policy, because each syscall contains a size parameter, it is possible to support future scheduling option, e.g SCHED_SPORADIC, this option needs other fields in structure sched_param, current they are not avaiblable.
* Honor db_pager_quit in 'show threadchain', 'show allchains', andjhb2006-07-121-1/+7
| | | | | 'show lockchain'. This is especially helpful for the first 2 as a threadchain could get stuck in an infinite loop during a mutex deadlock.
* Simplify the pager support in DDB. Allowing different db commands tojhb2006-07-123-21/+13
| | | | | | | | | | | | | | | | install custom pager functions didn't actually happen in practice (they all just used the simple pager and passed in a local quit pointer). So, just hardcode the simple pager as the only pager and make it set a global db_pager_quit flag that db commands can check when the user hits 'q' (or a suitable variant) at the pager prompt. Also, now that it's easy to do so, enable paging by default for all ddb commands. Any command that wishes to honor the quit flag can do so by checking db_pager_quit. Note that the pager can also be effectively disabled by setting $lines to 0. Other fixes: - 'show idt' on i386 and pc98 now actually checks the quit flag and terminates early. - 'show intr' now actually checks the quit flag and terminates early.
* Use proper format specifier for pointers in debug printfs (turned offkib2006-07-121-8/+11
| | | | | | | by default). Approved by: pjd (mentor) MFC after: 2 weeks
* Use newkg to check if SCHED_OTHER is already inherited.davidxu2006-07-121-2/+1
|
* Return priority range 0..PRI_MAX_TIMESHARE-PRI_MIN_TIMESHARE fordavidxu2006-07-121-2/+2
| | | | | | | SCHED_OTHER, the same range as rtprio() is using. In old code, it returns nice range -20 .. 20, nice should be treated as process weight, it is really managed by getpriority() and setpriority() syscalls, they are different.
* Several protocol switch functions (pru_abort, pru_detach, pru_sosetlabel)rwatson2006-07-114-50/+4
| | | | | | return void, so don't implement no-op versions of these functions. Instead, consistently check if those switch pointers are NULL before invoking them.
* When pru_attach() fails, call sodealloc() on the socket rather thanrwatson2006-07-111-4/+1
| | | | | | using sorele() and the full tear-down path. Since protocol state allocation failed, this is not required (and is arguably undesirable). This matches the behavior of sonewconn() under the same circumstances.
* Reduce periods of simultaneous acquisition of various socket bufferrwatson2006-07-111-20/+28
| | | | | | | | | | locks and the unplock during uipc_rcvd() and uipc_send() by caching certain values from one structure while its locks are held, and applying them to a second structure while its locks are held. If done carefully, this should be correct, and will reduce the amount of work done with the global unp lock held. Tested by: kris (earlier version)
* Regen.jhb2006-07-112-3/+3
|
* - Add conditional VFS Giant locking to getdents_common() (linux ABIs),jhb2006-07-113-5/+23
| | | | | | | | ibcs2_getdents(), ibcs2_read(), ogetdirentries(), svr4_sys_getdents(), and svr4_sys_getdents64() similar to that in getdirentries(). - Mark ibcs2_getdents(), ibcs2_read(), linux_getdents(), linux_getdents64(), linux_readdir(), ogetdirentries(), svr4_sys_getdents(), and svr4_sys_getdents64() MPSAFE.
* Don't forget to check invalid policy!davidxu2006-07-111-7/+9
|
* Oops, remove debugger line.davidxu2006-07-111-2/+0
|
* Extended the POSIX scheduler APIs to accept lwpid as well, we've alreadydavidxu2006-07-112-57/+90
| | | | | | done this in ptrace syscall, when a pid is large than PID_MAX, the syscall will search a thread in current process. It permits 1:1 thread library to get and set a thread's scheduler attributes.
* For SCHED_OTHER, we always inherit current thread's interactive prioritydavidxu2006-07-111-6/+10
| | | | | | unless current thread is realtime thread, in such case, we set a new zero priority for it, notice we don't have per-thread nice, the priority passed by userland is ignored here.
* Add POSIX scheduler parameters support to thr_new syscall, this permitsdavidxu2006-07-111-4/+57
| | | | privileged process to create realtime thread.
* Create thread in separated ksegrp, so they always get correct user leveldavidxu2006-07-101-75/+11
| | | | priority.
* - Split out kern_accept(), kern_getpeername(), and kern_getsockname() forjhb2006-07-101-103/+169
| | | | | | | | | | | | | | | | | | | | use by ABI emulators. - Alter the interface of kern_recvit() somewhat. Specifically, go ahead and hard code UIO_USERSPACE in the uio as that's what all the callers specify. In place, add a new uioseg to indicate what type of pointer is in mp->msg_name. Previously it was always a userland address, but ABI emulators may pass in kernel-side sockaddrs. Also, remove the namelenp field and instead require the two places that used it to explicitly copy mp->msg_namelen out to userland. - Use the patched kern_recvit() to replace svr4_recvit() and the stock kern_sendit() to replace svr4_sendit(). - Use kern_bind() instead of stackgap use in ti_bind(). - Use kern_getpeername() and kern_getsockname() instead of stackgap in svr4_stream_ti_ioctl(). - Use kern_connect() instead of stackgap in svr4_do_putmsg(). - Use kern_getpeername() and kern_accept() instead of stackgap in svr4_do_getmsg(). - Retire the stackgap from SVR4 compat as it is no longer used.
* Explicitly use STAILQ_REMOVE_HEAD() when we know we are removing the headjhb2006-07-101-3/+2
| | | | | | | | element to avoid confusing Coverity. It's now also easier for humans to parse as well. Found by: Coverity Prevent(tm) CID: 1201
* Fix two more instances of using a linker_file_t object in TAILQ() macrosjhb2006-07-101-4/+5
| | | | | | | after free'ing it. Found by: Coverity Prevent(tm) CID: 1435
* Don't try to reuse the linker_file structure after we've freed it whenjhb2006-07-101-2/+2
| | | | | | | throwing out the kld's loaded by the loader that didn't successfully link. Found by: Coverity Prevent(tm) CID: 1435
* Use a sleep mutex instead of an sx lock for the kernel environment. Thisscottl2006-07-092-30/+32
| | | | | | allows greater flexibility for drivers that want to query the environment. Reviewed by: jhb, mux
* - Split ioctl() up into ioctl() and kern_ioctl(). The kern_ioctl() assumesjhb2006-07-081-37/+44
| | | | | | | | | that the 'data' pointer is already setup to point to a valid KVM buffer or contains the copied-in data from userland as appropriate (ioctl(2) still does this). kern_ioctl() takes care of looking up a file pointer, implementing FIONCLEX and FIOCLEX, and calling fi_ioctl(). - Use kern_ioctl() to implement xenix_rdchk() instead of using the stackgap and mark xenix_rdchk() MPSAFE.
* Add a kern_close() so that the ABIs can close a file descriptor w/o havingjhb2006-07-081-2/+10
| | | | to populate a close_args struct and change some of the places that do.
* Rework kern_semctl a bit to always assume the UIO_SYSSPACE case. Thisjhb2006-07-081-84/+87
| | | | | | | | | | | | | | | mostly consists of pushing a few copyin's and copyout's up into __semctl() as all the other callers were already doing the UIO_SYSSPACE case. This also changes kern_semctl() to set the return value in a passed in pointer to a register_t rather than td->td_retval[0] directly so that callers can only set td->td_retval[0] if all the various copyout's succeed. As a result of these changes, kern_semctl() no longer does copyin/copyout (except for GETALL/SETALL) so simplify the locking to acquire the semakptr mutex before the MAC check and hold it all the way until the end of the big switch statement. The GETALL/SETALL cases have to temporarily drop it while they do copyin/malloc and copyout. Also, simplify the SETALL case to remove handling for a non-existent race condition.
* Create bus_enumerate_hinted_children. This routine will allow driversimp2006-07-082-0/+56
| | | | | | | | | | to use the hinted child system. Bus drivers that use this need to implmenet the bus_hinted_child method, where they actually add the child to their bus, as they see fit. The bus is repsonsible for getting the attribtues for the child, adding it in the right order, etc. ISA hinting will be updated to use this method. MFC After: 3 days
* Move POSIX.1e-specific utility routines from kern_acl.c torwatson2006-07-063-1584/+13
| | | | | | | | | subr_acl_posix1e.c, leaving kern_acl.c containing only ACL system calls and utility routines common across ACL types. Add subr_acl_posix1e.c to the build. Obtained from: TrustedBSD Project
* - Explicitly acquire Giant around SYSINIT's and SYSUNINIT's since they arejhb2006-07-061-3/+10
| | | | | | | | not all known to be MPSAFE yet. - Actually remove Giant from the kernel linker by taking it out of the KLD_LOCK() and KLD_UNLOCK() macros. Pointy hat to: jhb (2)
* Add kern_setgroups() and kern_getgroups() and use them to implementjhb2006-07-061-25/+42
| | | | | | | | | ibcs2_[gs]etgroups() rather than using the stackgap. This also makes ibcs2_[gs]etgroups() MPSAFE. Also, it cleans up one bit of weirdness in the old setgroups() where it allocated an entire credential just so it had a place to copy the group list into. Now setgroups just allocates a NGROUPS_MAX array on the stack that it copies into and then passes to kern_setgroups().
* Audit the remaining parameters to the extattr system calls. Generatewsalamon2006-07-062-0/+56
| | | | | | | the audit records for those calls. Obtained from: TrustedBSD Project Approved by: rwatson (mentor)
* Remove now unneeded opt_mac.h and mac.h includes.rwatson2006-07-062-4/+0
|
* Regen the system calls files, picking up the extended attr events, and somewsalamon2006-07-052-18/+18
| | | | | | mount-related changes done previously. Approved by: rwatson (mentor)
* Back out my rev. 1.674. The better fix (rev. 1.637) is already in tree.kib2006-07-051-3/+3
| | | | Approved by: kan (mentor)
* Add audit events for the extended attribute system calls.wsalamon2006-07-051-22/+26
| | | | | Obtained from: TrustedBSD Project Approved by: rwatson (mentor)
* o Fix grammar in the comment, indent macros. No functional changes.maxim2006-07-021-7/+7
|
* o Remove rev. 1.57 leftover, not reached code.maxim2006-07-021-2/+0
|
* o Fix typo in the comment.maxim2006-06-301-1/+1
| | | | | PR: kern/99632 Submitted by: clsung
* Fix building with GCC 4.2: define data types before referring to them.obrien2006-06-291-0/+1
|
OpenPOWER on IntegriCloud