summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
...
* While well intentionned the check to see it there is a packetjulian2002-09-191-3/+0
| | | | | | | | | | | header and return that length, was misguided. The check itself didn't take into account the fact that the mbuf pointer pased in may be null, and the function is defined specifically for cases where the caller knows what it wants. Rather than fix the check I'm removing it as phk suggested. Submitted by: phk@freebsd.org
* fix style.. Return in the kernel always has () around the arguments.julian2002-09-191-1/+1
|
* Compiler was correct:julian2002-09-191-1/+1
| | | | m WAS being used uninitialized..
* If M_PKTHDR is set then we don't need to do a loop to find the total length.darrenr2002-09-191-0/+3
|
* Regen for added syscalls.alfred2002-09-192-0/+28
|
* Add the rest of the kernel support for the sem_ API in kern/uipc_sem.c.alfred2002-09-193-3/+30
| | | | | | | | | | Option 'P1003_1B_SEMAPHORES' to compile them in, or load the "sem" module to activate them. Have kern/makesyscalls.sh emit an include for sys/_semaphore.h into sysproto.h to pull in the typedef for semid_t. Add the syscalls to the syscall table as module stubs.
* Bring in my implementation of kernel support for posix realtime semaphoresalfred2002-09-181-0/+835
| | | | | | | that are shareable between processes. There will be a cleanup shortly along with the necessary changes made to libc, libc_r, libpthread as well as the hooks into sys/conf and sys/modules.
* Remove un-needed stack variable 'ops'.rwatson2002-09-181-3/+2
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* style nit: unsigned -> u_int in the kernel, particularly tobmilekic2002-09-181-11/+11
| | | | | | | stay consistent in this file, and keep m_length() and m_fixhdr() consistent with their prototypes in mbuf.h Inspired by: bde
* Remove any VOP_PRINT that redundantly prints the tag.njl2002-09-181-8/+8
| | | | | | Move lockmgr_printinfo() into vprint() for everyone's benefit. Suggested by: bde
* Use m_length() instead of home-rolled versions.phk2002-09-182-42/+20
|
* Make m_length() and m_fixhdr() return unsigned.phk2002-09-181-4/+4
| | | | Suggested by: arr
* Introduce the m_length() function which will return the accumulatedphk2002-09-181-6/+19
| | | | length of an mbuf-chain and optionally a pointer to the last mbuf.
* Move m_fixhdr() from "mbchain" to "mbuf" where it belongs.phk2002-09-182-14/+14
|
* - Split UMA_ZFLAG_OFFPAGE into UMA_ZFLAG_OFFPAGE and UMA_ZFLAG_HASH.jeff2002-09-181-33/+9
| | | | | | | - Remove all instances of the mallochash. - Stash the slab pointer in the vm page's object pointer when allocating from the kmem_obj. - Use the overloaded object pointer to find slabs for malloced memory.
* Add a toggle to disable VM enforcement.rwatson2002-09-181-0/+7
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* At the cost of seeming a little gauche, make use of more traditionalrwatson2002-09-181-4/+4
| | | | | | | alphabetization for mac_enforce_pipe sysctl. Obtained from: TrustedBSD Project Sponsored by: DAPRA, NAI Labs
* Don't call VOP_LEASE() while holding the accounting mutex.rwatson2002-09-181-1/+1
|
* Argh. I've been reading makefiles for too long. Change comment to apeter2002-09-172-8/+16
| | | | C-style comment.
* Stub out the calls to get_mcontext and set_mcontext which only exist onpeter2002-09-172-0/+20
| | | | | i386. This stuff should not be prototyped in MD inludes if the interface is expected to be MI.
* Initiate deorbit burn for the i386-only a.out related support. Moves arepeter2002-09-172-16/+0
| | | | | | | | | | | | | | | under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that. Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now. Tested on: i386 (extensively), alpha
* Add kernel support needed for the KSE-aware libpthread:mini2002-09-166-245/+491
| | | | | | | | | | | | - Use ucontext_t's to store KSE thread state. - Synthesize state for the UTS upon each upcall, rather than saving and copying a trapframe. - Deliver signals to KSE-aware processes via upcall. - Rename kse mailbox structure fields to be more BSD-like. - Store the UTS's stack in struct proc in a stack_t. Reviewed by: bde, deischen, julian Approved by: -arch
* Add a cast to make this file compile in userland on sparc64 withoutphk2002-09-161-1/+1
| | | | warnings.
* fcntl(..., F_SETLKW, ...) takes a pointer to a struct flock just liketmm2002-09-161-0/+1
| | | | | F_SETLK does, so it also needs this structure copied in in fnctl() before calling kern_fcntl().
* Allocate KSEs and KSEGRPs separatly and remove them from the proc structure.julian2002-09-159-125/+213
| | | | | | | | | next step is to allow > 1 to be allocated per process. This would give multi-processor threads. (when the rest of the infrastructure is in place) While doing this I noticed libkvm and sys/kern/kern_proc.c:fill_kinfo_proc are diverging more than they should.. corrective action needed soon.
* s/Danglish/English/phk2002-09-151-4/+5
| | | | | | | Some style issues. Change the timeout to be hz/10 instead of hz. Brucification by: bde.
* Un-inline the non-trivial "trivial" bio* functions.phk2002-09-141-0/+39
| | | | Untangle devstat_end_transaction_bio()
* Add additional information returned to userland by the device queryingimp2002-09-141-0/+5
| | | | | | | | | | | | | functions. We add pnpinfo, locationinfo, devflags (the newbus flags on the device), flags (the flags that device_get_flags returns) and state to the list of things we return. pnpinfo and locationinfo are place holders at the moment that will be filled in by the device's parent (optionally). Userland programs will likely use this information from time to time and take appropriate actions. Improvements to devinfo to follow.
* Move setugidsafety() call outside of process lock. This prevents a locknjl2002-09-141-3/+5
| | | | | | | recursion when closef() calls pfind() which also wants the proc lock. This case only occurred when setugidsafety() needed to close unsafe files. Reviewed by: truckman
* Remove a conditional #include <sys/kernel.h>, it is alreadymux2002-09-141-1/+0
| | | | | | included unconditionally before. Submitted by: Olivier Houchard <cognet@ci0.org>
* Remove all use of vnode->v_tag, replacing with appropriate substitutes.njl2002-09-144-20/+24
| | | | | | | | | | | | v_tag is now const char * and should only be used for debugging. Additionally: 1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK 2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP. Suggested by: phk Reviewed by: bde, rwatson (earlier version)
* Apparently something down in the guts of vm/uvm still needs giantjulian2002-09-142-0/+4
| | | | Obtained from: mini via P4 KSE tree.
* Fix fcntl(..., F_GETOWN, ...) and fcntl(..., F_SETOWN, ...) on sparc64tmm2002-09-131-3/+5
| | | | | by not passing a pointer to a register_t or intptr_t when the code in the lower layers expects one to an int.
* Oops, broke the build there. Uninline biodone() now that it is non-trivial.phk2002-09-131-0/+28
| | | | | | | | | Introduce biowait() function. Currently there is a race condition and the mitigation is a timeout/retry. It is not obvious what kind of locking (if any) is suitable for BIO_DONE, since the majority of users take are of this themselves, and only a few places actually rely on the wakeup. Sponsored by: DARPA & NAI Labs.
* Drop the proc lock while calling fdcheckstd() which may block to allocatetruckman2002-09-131-1/+8
| | | | | | memory. Reviewed by: jhb
* Fixed style bugs in resource_list_add_next().bde2002-09-121-5/+5
|
* - Fix two obvious locking bugs; 1) returning with lock held when it neededarr2002-09-121-3/+16
| | | | | | | to be dropped, 2) attempting to lock acct_mtx while already holding it. Sorry to those who experienced pain. - Added two comments referring to two areas in which acct_mtx is held over vnode operations that might sleep. Patch in the works for this.
* - Change utrace ktrace events to malloc the work buffer before getting ajhb2002-09-111-9/+10
| | | | | | | | | | request structure. - Re-optimize the case of utrace being disabled by doing an explicit KTRPOINT check instead of relying on the one in ktr_getrequest() so that we don't waste time on a malloc in the non-tracing case. - Change utrace() to return an error if the copyin() fails. Before it would just ignore the request but still return success. This last is a change in behavior and can be backed out if necessary.
* Remove support for synchronous ktrace requests now that none exist anymore.jhb2002-09-111-33/+11
| | | | They were an ugly, gross hack.
* - Change ktrace genio events to only copy up to ktr_geniosize bytes of ajhb2002-09-111-18/+18
| | | | | | | | | | | | | transfer to a malloc'd buffer and use that bufer for the ktrace event. This means that genio ktrace events no longer need to be synchronous. - Now that ktr_buffer isn't overloaded to sometimes point to a cached uio pointer for genio requests and always points to a malloc'd buffer if not NULL, free the buffer in ktr_freerequest() instead of in ktr_writerequest(). This closes a memory leak for ktrace events that used a malloc'd buffer that had their vnode ripped out from under them while they were on the todo list. Suggested by: bde (1, in principle)
* - Add a kern.ktrace sysctl node.jhb2002-09-111-2/+9
| | | | | | | | - Rename kern.ktrace_request_pool tunable/sysctl to kern.ktrace.request_pool. - Add a variable to control the max amount of data to log for genio events. This variable is tunable via the tunable/sysctl kern.ktrace.genio_size and defaults to one page.
* Change namei and syscall ktrace events to malloc work buffers beforejhb2002-09-111-7/+14
| | | | | obtaining a ktr_request structure from the free pool so we can avoid starving other threads of ktr_request structures.
* Indentation does not make a block.. need curly braces too.julian2002-09-111-1/+2
| | | | Submitted by: Eagle-eyes evans <bde@freebsd.org>
* Completely redo thread states.julian2002-09-1120-370/+252
| | | | Reviewed by: davidxu@freebsd.org
* Include <vm/uma.h> instead of depending on namespace pollution inbde2002-09-111-7/+10
| | | | | | | <sys/malloc.h>. Sorted includes as much as possible. Removed banal comment(s) attached to includes.
* Clarify the return value from child_present.imp2002-09-111-0/+7
|
* - Lock down the accounting code globals with a subsystem mutex.arr2002-09-111-5/+27
| | | | Reviewed by: jhb, mdodd
* Include <sys/malloc.h> instead of depending on namespace pollution 2bde2002-09-101-8/+5
| | | | | | layers deep in <sys/proc.h> or <sys/vnode.h>. Removed unused includes. Sorted includes.
* vfs_syscalls.c:bde2002-09-102-14/+6
| | | | | | | | | | | | | | | | | | | | | | Changed rename(2) to follow the letter of the POSIX spec. POSIX requires rename() to have no effect if its args "resolve to the same existing file". I think "file" can only reasonably be read as referring to the inode, although the rationale and "resolve" seem to say that sameness is at the level of (resolved) directory entries. ext2fs_vnops.c, ufs_vnops.c: Replaced code that gave the historical BSD behaviour of removing one link name by checks that this code is now unreachable. This fixes some races. All vnodes needed to be unlocked for the removal, and locking at another level using something like IN_RENAME was not even attempted, so it was possible for rename(x, y) to return with both x and y removed even without any unlink(2) syscalls (one process can remove x using rename(x, y) and another process can remove y using rename(y, x)). Prodded by: alfred MFC after: 8 weeks PR: 42617
* Add security.mac.mmap_revocation, a flag indicating whether werwatson2002-09-091-0/+8
| | | | | | | should revoke access to memory maps on a process label change. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
OpenPOWER on IntegriCloud