summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Remove a couple of __P() stragglers.peter2002-06-299-21/+21
|
* more caddr_t removal.alfred2002-06-299-35/+26
|
* Add another Intel chipset (i82562).silby2002-06-291-0/+1
| | | | | | PR: 39974 Submitted by: Morten Aaboe Jensen <morten@codemonkey.dk> MFC after: 1 day
* More caddr_t removal, make fo_ioctl take a void * instead of a caddr_t.alfred2002-06-2912-71/+66
|
* catch up with mextadd callback taking a void argument instead of a caddr_t.alfred2002-06-295-8/+8
|
* catch up with ext_free prototype change.alfred2002-06-293-6/+6
|
* More caddr_t removal.alfred2002-06-298-32/+32
| | | | Change struct knote's kn_hook from caddr_t to void *.
* nuke more instances of caddr_talfred2002-06-291-23/+19
|
* m_extadd takes a void (*freef)(void *, void *) now, not aalfred2002-06-291-1/+1
| | | | void (*freef)(caddr_t, void *).
* remove or replace caddr_t with void.alfred2002-06-283-36/+33
| | | | make the mbuf external free function take a void * rather than caddr_t.
* nuke caddr_t.alfred2002-06-284-26/+23
|
* change struct socket -> so_pcb from caddr_t to void *.alfred2002-06-281-1/+1
|
* Remove unneeded casts to caddr_t.alfred2002-06-282-62/+62
|
* change f_data field in struct file from caddr_t to void *.alfred2002-06-281-1/+1
|
* document that the pipe fo_stat routine doesn't need locks because it'salfred2002-06-281-0/+4
| | | | | | a read operation. Requested by: rwatson
* In namei(), we use a NULL thread for uio_td when doing a VOP_READLINK().jhb2002-06-284-16/+15
| | | | | | | | | | | | nfs_readlink() calls nfs_bioread() which passes in uio_td as the thread argument to nfs_getcacheblk(). In nfs_getcacheblk() we dereference the thread pointer to get a process pointer to pass to nfs_sigintr(). This obviously results in a panic. :) Rather than change nfs_getcacheblk() to check if the thread pointer is NULL when calling nfs_sigintr() like other callers do, change nfs_sigintr() to take a thread as the last argument instead of a process so none of the callers have to care if the thread is NULL or not.
* Add two new submodes to the AES encryption method.phk2002-06-281-11/+121
| | | | | | This method is now suitable for encrypting swap spaces. Sponsored by: DARPA & NAI Labs.
* Improve the VOP locking assertsjeff2002-06-282-5/+24
| | | | | | | - Add vfs_badlock_print to control whether or not we print lock violations - Add vfs_badlock_panic to control whether we panic on lock violations Both default to on to mimic the original behavior if DEBUG_VFS_LOCKS is on.
* In vn_mkdir(), use vrele() instead of vput() on the parent directoryiedowse2002-06-282-2/+18
| | | | | | | | | | | vnode in the case that the target exists and is the same vnode as the parent (i.e. "mkdir ."). The namei() call does not leave the vnode locked in this case even though you might expect it to. This bug was mostly harmless in practice because unlocking an already unlocked vnode currently does not trigger any panics or warnings. Reviewed by: jeff
* One possible code path for syncache_respond() is:jlemon2002-06-281-1/+7
| | | | | | | | | | syncache_respond(A), ip_output(), ip_input(), tcp_input(), syncache_badack(B) Which winds up deleting a different entry from the syncache. Handle this by not utilizing the next entry in the timer chain until after syncache_respond() completes. The case of A == B should not be possible. Problem found by: Don Bowman <don@sandvine.com>
* Clean up vn_rdwr locking.jeff2002-06-281-6/+12
| | | | | - Do shared locks on read. - Only do vn_{start,finished}_write when writing.
* Fix a case where a vnode got explicitly unlocked after the pointer to itgreen2002-06-281-1/+1
| | | | | | got set to NULL. Revision 1.355: in the box
* Fix warning.dfr2002-06-281-1/+1
| | | | Reviewed by: luigi
* bring Makefile up to date with new ipfwjulian2002-06-281-1/+1
| | | | Submitted by: luigi
* Fix a botched flag clear operation. Rumor has it that this also fixesscottl2002-06-281-1/+1
| | | | | | | the funky-volume-settings-on-startup problem. Reviewed by: the channel that shall not be named MFC after: 7 days
* Remove a printf and add a comment on an assumption that could beluigi2002-06-271-3/+10
| | | | occasionally violated by device drivers.
* The new ipfw code.luigi2002-06-275-277/+2953
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code makes use of variable-size kernel representation of rules (exactly the same concept of BPF instructions, as used in the BSDI's firewall), which makes firewall operation a lot faster, and the code more readable and easier to extend and debug. The interface with the rest of the system is unchanged, as witnessed by this commit. The only extra kernel files that I am touching are if_fw.h and ip_dummynet.c, which is quite tied to ipfw. In userland I only had to touch those programs which manipulate the internal representation of firewall rules). The code is almost entirely new (and I believe I have written the vast majority of those sections which were taken from the former ip_fw.c), so rather than modifying the old ip_fw.c I decided to create a new file, sys/netinet/ip_fw2.c . Same for the user interface, which is in sbin/ipfw/ipfw2.c (it still compiles to /sbin/ipfw). The old files are still there, and will be removed in due time. I have not renamed the header file because it would have required touching a one-line change to a number of kernel files. In terms of user interface, the new "ipfw" is supposed to accepts the old syntax for ipfw rules (and produce the same output with "ipfw show". Only a couple of the old options (out of some 30 of them) has not been implemented, but they will be soon. On the other hand, the new code has some very powerful extensions. First, you can put "or" connectives between match fields (and soon also between options), and write things like ipfw add allow ip from { 1.2.3.4/27 or 5.6.7.8/30 } 10-23,25,1024-3000 to any This should make rulesets slightly more compact (and lines longer!), by condensing 2 or more of the old rules into single ones. Also, as an example of how easy the rules can be extended, I have implemented an 'address set' match pattern, where you can specify an IP address in a format like this: 10.20.30.0/26{18,44,33,22,9} which will match the set of hosts listed in braces belonging to the subnet 10.20.30.0/26 . The match is done using a bitmap, so it is essentially a constant time operation requiring a handful of CPU instructions (and a very small amount of memmory -- for a full /24 subnet, the instruction only consumes 40 bytes). Again, in this commit I have focused on functionality and tried to minimize changes to the other parts of the system. Some performance improvement can be achieved with minor changes to the interface of ip_fw_chk_t. This will be done later when this code is settled. The code is meant to compile unmodified on RELENG_4 (once the PACKET_TAG_* changes have been merged), for this reason you will see #ifdef __FreeBSD_version in a couple of places. This should minimize errors when (hopefully soon) it will be time to do the MFC.
* Delay the AC97 calibration until after the system clock has beenscottl2002-06-271-5/+22
| | | | | | | | | | calibrated. This fixes the problem where playback and recording do not run at the correct speed. It probably also eliminates the need for the hacks/workarounds/sysctl's that were previously devised to deal with this, but I will leave that for a different time. Reviewed by: orion
* Lots of people have had to hack around the fixed address for cardbusimp2002-06-271-1/+1
| | | | | | bridges in modern hardware (that hardware w/ lots of RAM). Raise the address from 0x44000000 to 0x88000000 to match what we do with NEWCARD. However, this really should be done in the pci layer.
* Fix a bug that prevented the deletion of non-default ACLs from beingrwatson2002-06-273-3/+3
| | | | | | | | passed down the VFS stack. While I'm here, replace a '0' with a 'NULL' to make the code more readable. Sponsored by: DARPA, NAI Labs Obtained from: TrustedBSD Project
* A bit of whitespace magic.rwatson2002-06-273-15/+15
|
* Leave it to a non-native speaker of English to catch another typo: "do do" ->imp2002-06-271-1/+1
| | | | | | "to do" submitted by: marius@alchemy.franken.de
* Spell less like a 'merkin and more like a speaker of Englishimp2002-06-271-1/+1
|
* GENERIC now builds with -Werror, so remove NO_WERROR.mux2002-06-271-1/+0
| | | | Approved by: jake
* Warning fixes for 64 bits platforms. With this last fix,mux2002-06-272-2/+2
| | | | | | I can build a GENERIC sparc64 kernel with -Werror. Reviewed by: luigi
* Fix for the problem stated below by Tor Egge:arr2002-06-272-2/+2
| | | | | | | | | | | | (from: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=832566+0+ \ current/freebsd-current) "Too many pages were prefaulted in pmap_object_init_pt, thus the wrong physical page was entered in the pmap for the virtual address where the .dynamic section was supposed to be." Submitted by: tegge Approved by: tegge's patches never fail
* Set the UMA_ZONE_VM flag on the pvzone to avoid kmem_map recursion.jeff2002-06-271-1/+1
|
* Just a comment on some additional consistency checks that couldluigi2002-06-261-0/+5
| | | | be added here.
* Avoid using the 64-bit vm_pindex_t in a few places where 64-bitiedowse2002-06-265-18/+21
| | | | | | | | | | | | | types are not required, as the overhead is unnecessary: o In the i386 pmap_protect(), `sindex' and `eindex' represent page indices within the 32-bit virtual address space. o In swp_pager_meta_build() and swp_pager_meta_ctl(), use a temporary variable to store the low few bits of a vm_pindex_t that gets used as an array index. o vm_uiomove() uses `osize' and `idx' for page offsets within a map entry. o In vm_object_split(), `idx' is a page offset within a map entry.
* Use an explicit cast to avoid relying on sign extension to do theiedowse2002-06-261-2/+2
| | | | | | right thing in code such as `vm_pindex_t x = ~SWAP_META_MASK'. Reviewed by: dillon
* Remove the kernel file-size limit for UFS2, so that only the limitiedowse2002-06-261-5/+7
| | | | | | | | | | imposed by the filesystem structure itself remains. With 16k blocks, the maximum file size is now just over 128TB. For now, the UFS1 file size limit is left unchanged so as to remain consistent with RELENG_4, but it too could be removed in the future. Reviewed by: mckusick
* - Remove the Giant acquisition from linux_socket_ioctl() as it was reallyarr2002-06-261-11/+2
| | | | | | | | there to protect fdrop() (which in turn can call vrele()), however, fdrop_locked() grabs Giant for us, so we do not have to. Reviewed by: jhb Inspired by: alc
* At long last, commit the zero copy sockets code.ken2002-06-2630-10498/+14477
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAKEDEV: Add MAKEDEV glue for the ti(4) device nodes. ti.4: Update the ti(4) man page to include information on the TI_JUMBO_HDRSPLIT and TI_PRIVATE_JUMBOS kernel options, and also include information about the new character device interface and the associated ioctls. man9/Makefile: Add jumbo.9 and zero_copy.9 man pages and associated links. jumbo.9: New man page describing the jumbo buffer allocator interface and operation. zero_copy.9: New man page describing the general characteristics of the zero copy send and receive code, and what an application author should do to take advantage of the zero copy functionality. NOTES: Add entries for ZERO_COPY_SOCKETS, TI_PRIVATE_JUMBOS, TI_JUMBO_HDRSPLIT, MSIZE, and MCLSHIFT. conf/files: Add uipc_jumbo.c and uipc_cow.c. conf/options: Add the 5 options mentioned above. kern_subr.c: Receive side zero copy implementation. This takes "disposable" pages attached to an mbuf, gives them to a user process, and then recycles the user's page. This is only active when ZERO_COPY_SOCKETS is turned on and the kern.ipc.zero_copy.receive sysctl variable is set to 1. uipc_cow.c: Send side zero copy functions. Takes a page written by the user and maps it copy on write and assigns it kernel virtual address space. Removes copy on write mapping once the buffer has been freed by the network stack. uipc_jumbo.c: Jumbo disposable page allocator code. This allocates (optionally) disposable pages for network drivers that want to give the user the option of doing zero copy receive. uipc_socket.c: Add kern.ipc.zero_copy.{send,receive} sysctls that are enabled if ZERO_COPY_SOCKETS is turned on. Add zero copy send support to sosend() -- pages get mapped into the kernel instead of getting copied if they meet size and alignment restrictions. uipc_syscalls.c:Un-staticize some of the sf* functions so that they can be used elsewhere. (uipc_cow.c) if_media.c: In the SIOCGIFMEDIA ioctl in ifmedia_ioctl(), avoid calling malloc() with M_WAITOK. Return an error if the M_NOWAIT malloc fails. The ti(4) driver and the wi(4) driver, at least, call this with a mutex held. This causes witness warnings for 'ifconfig -a' with a wi(4) or ti(4) board in the system. (I've only verified for ti(4)). ip_output.c: Fragment large datagrams so that each segment contains a multiple of PAGE_SIZE amount of data plus headers. This allows the receiver to potentially do page flipping on receives. if_ti.c: Add zero copy receive support to the ti(4) driver. If TI_PRIVATE_JUMBOS is not defined, it now uses the jumbo(9) buffer allocator for jumbo receive buffers. Add a new character device interface for the ti(4) driver for the new debugging interface. This allows (a patched version of) gdb to talk to the Tigon board and debug the firmware. There are also a few additional debugging ioctls available through this interface. Add header splitting support to the ti(4) driver. Tweak some of the default interrupt coalescing parameters to more useful defaults. Add hooks for supporting transmit flow control, but leave it turned off with a comment describing why it is turned off. if_tireg.h: Change the firmware rev to 12.4.11, since we're really at 12.4.11 plus fixes from 12.4.13. Add defines needed for debugging. Remove the ti_stats structure, it is now defined in sys/tiio.h. ti_fw.h: 12.4.11 firmware. ti_fw2.h: 12.4.11 firmware, plus selected fixes from 12.4.13, and my header splitting patches. Revision 12.4.13 doesn't handle 10/100 negotiation properly. (This firmware is the same as what was in the tree previously, with the addition of header splitting support.) sys/jumbo.h: Jumbo buffer allocator interface. sys/mbuf.h: Add a new external mbuf type, EXT_DISPOSABLE, to indicate that the payload buffer can be thrown away / flipped to a userland process. socketvar.h: Add prototype for socow_setup. tiio.h: ioctl interface to the character portion of the ti(4) driver, plus associated structure/type definitions. uio.h: Change prototype for uiomoveco() so that we'll know whether the source page is disposable. ufs_readwrite.c:Update for new prototype of uiomoveco(). vm_fault.c: In vm_fault(), check to see whether we need to do a page based copy on write fault. vm_object.c: Add a new function, vm_object_allocate_wait(). This does the same thing that vm_object allocate does, except that it gives the caller the opportunity to specify whether it should wait on the uma_zalloc() of the object structre. This allows vm objects to be allocated while holding a mutex. (Without generating WITNESS warnings.) vm_object_allocate() is implemented as a call to vm_object_allocate_wait() with the malloc flag set to M_WAITOK. vm_object.h: Add prototype for vm_object_allocate_wait(). vm_page.c: Add page-based copy on write setup, clear and fault routines. vm_page.h: Add page based COW function prototypes and variable in the vm_page structure. Many thanks to Drew Gallatin, who wrote the zero copy send and receive code, and to all the other folks who have tested and reviewed this code over the years.
* Enforce RLIMIT_VMEM on growable mappings (aka the primary stack or anydillon2002-06-261-0/+14
| | | | | | MAP_STACK mapping). Suggested by: alc
* - Remove Giant acquisition from modevent(), modfnext(), modstat() andarr2002-06-261-27/+11
| | | | | | | modfind(). Giant is no longer needed by these functions for safe execution. Reviewed by: jhb
* Part I of RLIMIT_VMEM implementation. Implement core functionality fordillon2002-06-263-1/+15
| | | | | | | | | | | | a new resource limit that covers a process's entire VM space, including mmap()'d space. (Part II will be additional code to check RLIMIT_VMEM during exec() but it needs more fleshing out). PR: kern/18209 Submitted by: Andrey Alekseyev <uitm@zenon.net>, Dmitry Kim <jason@nichego.net> MFC after: 7 days
* - Alleviate jail() from having the burden of acquiring Giant by simplyarr2002-06-261-3/+0
| | | | | | | removing. We can do this since we no longer need Giant to safely execute jail(). Reviewed by: rwatson, jhb
* Complete the initial set of VM changes required to support fulliedowse2002-06-255-20/+12
| | | | | | | | | | | 64-bit file sizes. This step simply addresses the remaining overflows, and does attempt to optimise performance. The details are: o Use a 64-bit type for the vm_object `size' and the size argument to vm_object_allocate(). o Use the correct type for index variables in dev_pager_getpages(), vm_object_page_clean() and vm_object_page_remove(). o Avoid an overflow in the i386 pmap_object_init_pt().
* Turn VM_ALLOC_ZERO into a flag.jeff2002-06-252-5/+7
| | | | | Submitted by: tegge Reviewed by: dillon
* Reduce the amount of code that runs with the zone lock held in slab_zalloc().jeff2002-06-251-6/+8
| | | | This allows us to run the zone initialization functions without any locks held.
OpenPOWER on IntegriCloud