summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Fix synchronization in gmirror and graid3 which I broken. Synchronizationpjd2006-09-132-6/+12
| | | | | | | | request can still have bio_to set to sc_provider (this is READ part of a synchronization request) and in this case g_{mirror,raid3}_sync() wasn't called as it should be. MFC after: 1 week
* Remove unessary includes and follow common ordering style.andre2006-09-131-10/+2
|
* Rewrite of TCP syncookies to remove locking requirements and to enhanceandre2006-09-135-208/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functionality: - Remove a rwlock aquisition/release per generated syncookie. Locking is now integrated with the bucket row locking of syncache itself and syncookies no longer add any additional lock overhead. - Syncookie secrets are different for and stored per syncache buck row. Secrets expire after 16 seconds and are reseeded on-demand. - The computational overhead for syncookie generation and verification is one MD5 hash computation as before. - Syncache can be turned off and run with syncookies only by setting the sysctl net.inet.tcp.syncookies_only=1. This implementation extends the orginal idea and first implementation of FreeBSD by using not only the initial sequence number field to store information but also the timestamp field if present. This way we can keep track of the entire state we need to know to recreate the session in its original form. Almost all TCP speakers implement RFC1323 timestamps these days. For those that do not we still have to live with the known shortcomings of the ISN only SYN cookies. The use of the timestamp field causes the timestamps to be randomized if syncookies are enabled. The idea of SYN cookies is to encode and include all necessary information about the connection setup state within the SYN-ACK we send back and thus to get along without keeping any local state until the ACK to the SYN-ACK arrives (if ever). Everything we need to know should be available from the information we encoded in the SYN-ACK. A detailed description of the inner working of the syncookies mechanism is included in the comments in tcp_syncache.c. Reviewed by: silby (slightly earlier version) Sponsored by: TCP/IP Optimization Fundraise 2005
* Remove duplicated code. Declare functions non-static that shouldn't bescottl2006-09-131-43/+33
| | | | inlined.
* Fix a lock leak in an error case.pjd2006-09-131-1/+1
| | | | | Reported by: netchild Reviewed by: rwatson
* document that PAE kernels needs twice the value of non-PAE kernelsjmg2006-09-131-1/+5
| | | | | | for KVA_PAGES, and that it it likely needed for >4GB memory boxes.. MFC after: 3 days
* Busmaster DMA address fix in VIA 6421 case.sos2006-09-121-1/+1
|
* Format mask lacks one bit.sos2006-09-121-1/+1
| | | | Reported by: jkim
* Put the osta.c license on osta.h. The license is the same.imp2006-09-121-0/+15
| | | | Approved by: scottl@
* Trim some unneeded includes.jhb2006-09-121-2/+0
|
* Introduce a new entry point, mac_create_mbuf_from_firewall. This entry pointcsjp2006-09-1212-7/+131
| | | | | | | | | | | | | | | | | | | | | | exists to allow the mandatory access control policy to properly initialize mbufs generated by the firewall. An example where this might happen is keep alive packets, or ICMP error packets in response to other packets. This takes care of kernel panics associated with un-initialize mbuf labels when the firewall generates packets. [1] I modified this patch from it's original version, the initial patch introduced a number of entry points which were programmatically equivalent. So I introduced only one. Instead, we should leverage mac_create_mbuf_netlayer() which is used for similar situations, an example being icmp_error() This will minimize the impact associated with the MFC Submitted by: mlaier [1] MFC after: 1 week This is a RELENG_6 candidate
* - Revert making bus_generic_add_child() the default for BUS_ADD_CHILD().jhb2006-09-112-1/+2
| | | | | | | | | Instead, we want busses to explicitly specify an add_child routine if they want to support identify routines, but by default disallow having outside drivers add devices. - Give smbus(4) an explicit bus_add_child() method. Requested by: imp
* Fix issues found by Coverity (223392, 223393) due to TSO additionspdeuskar2006-09-111-2/+4
| | | | Submitted by: Matthew Jacob
* Minor overhaul of SMBus support:jhb2006-09-1116-281/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Change smbus_callback() to pass a void * rather than caddr_t. - Change smbus_bread() to pass a pointer to the count and have it be an in/out parameter. The input is the size of the buffer (same as before), but on return it will contain the actual amount of data read back from the bus. Note that this value may be larger than the input value. It is up to the caller to treat this as an error if desired. - Change the SMB_BREAD ioctl to write out the updated struct smbcmd which will contain the actual number of bytes read in the 'count' field. To preserve the previous ABI, the old ioctl value is mapped to SMB_OLD_BREAD which doesn't copy the updated smbcmd back out to userland. I doubt anyone actually used the old BREAD anyway as it was rediculous to do a bulk-read but not tell the using program how much data was actually read. - Make the smbus driver and devclass public in the smbus module and push all the DRIVER_MODULE()'s for attaching the smbus driver to various foosmb drivers out into the foosmb modules. This makes all the foosmb logic centralized and allows new foosmb modules to be self-contained w/o having to hack smbus.c everytime a new smbus driver is added. - Add a new SMB_EINVAL error bit and use it in place of EINVAL to return an error for bad arguments (such as invalid counts for bread and bwrite). - Map SMB bus error bits to EIO in smbus_error(). - Make the smbus driver call bus_generic_probe() and require child drivers such as smb(4) to create device_t's via identify routines. Previously, smbus just created one anonymous device during attach, and if you had multiple drivers that could attach it was just random chance as to which driver got to probe for the sole device_t first. - Add a mutex to the smbus(4) softc and use it in place of dummy splhigh() to protect the 'owner' field and perform necessary synchronization for smbus_request_bus() and smbus_release_bus(). - Change the bread() and bwrite() methods of alpm(4), amdpm(4), and viapm(4) to only perform a single transaction and not try to use a loop of multiple transactions for a large request. The framing and commands to use for a large transaction depend on the upper-layer protocol (such as SSIF for IPMI over SMBus) from what I can tell, and the smb(4) driver never allowed bulk read/writes of more than 32-bytes anyway. The other smb drivers only performed single transactions. - Fix buffer overflows in the bread() methods of ichsmb(4), alpm(4), amdpm(4), amdsmb(4), intpm(4), and nfsmb(4). - Use SMB_xxx errors in viapm(4). - Destroy ichsmb(4)'s mutex after bus_generic_detach() to avoid problems from child devices making smb upcalls that would use the mutex during their detach methods. MFC after: 1 week Reviewed by: jmg (mostly)
* Add a new ddb command 'show lapic' to dump details about the local APICjhb2006-09-112-0/+140
| | | | | | registers for the current CPU. MFC after: 3 days
* Actually hook up the IPI_INVLCACHE IDT vectors backingjhb2006-09-112-2/+9
| | | | | | | | | pmap_invalidate_cache() in the SMP case so pmap_mapdev() in multiuser doesn't panic with a trap 30. I broke this many months ago when I added pmap_invalidate_cache() as early parts of the PAT work. Patience from: jmg Pointy hat: jhb
* Fix a NULL pointer dereference of ro->ro_rt->rt_flags by checking for theandre2006-09-111-1/+1
| | | | | | | validity of ro->ro_rt first. This prevents crashing on any non-normally routed IP packet. Coverity CID: 162 (incorrectly, it was re-introduced by previous commit)
* Add support for a few more Serverworks and lookalikes chips.sos2006-09-112-9/+15
|
* Update to fit latest USB cleanup crusade.sos2006-09-111-2/+2
|
* Add prototype for bus_generic_add_child() missed in previous commit.jhb2006-09-111-0/+3
|
* Add a default method for BUS_ADD_CHILD() that just callsjhb2006-09-112-1/+8
| | | | | | | | | | | | | device_add_child_ordered(). Previously, a device driver that wanted to add a new child device in its identify routine had to know if the parent driver had a custom bus_add_child method and use BUS_ADD_CHILD() in that case, otherwise use device_add_child(). Getting it wrong in either direction would result in panics or failure to add the child device. Now, BUS_ADD_CHILD() always works isolating child drivers from having to know intimate details about the parent driver. Discussed with: imp MFC after: 1 week
* Give the ACPI I/O rman's unique description strings to make 'devinfo -u'jhb2006-09-111-2/+2
| | | | | | output less confusing. MFC after: 3 days
* - Fix rman_manage_region() to be a lot more intelligent. It now checksjhb2006-09-113-25/+47
| | | | | | | | | | | for overlaps, but more importantly, it collapses adjacent free regions. This is needed to cope with BIOSen that split up ports for system devices (like IPMI controllers) across multiple system resource entries. - Now that rman_manage_region() is not so dumb, remove extra logic in the x86 nexus drivers to populate the IRQ rman that manually coalesced the regions. MFC after: 1 week
* CF devices are ATA not ATAPI.sos2006-09-111-1/+3
|
* null commit to provide commit message to previousmjacob2006-09-111-1/+1
| | | | | | at the request of Sam Leffler: The previous commit established min and maxtags for VMware pseudo disks to fix a submitted PR.
* PR: 103130mjacob2006-09-111-1/+1
| | | | | Submitted by: Shusuke Shinomiya MFC after: 1 day
* Add support for MCP61 and MCP65 adaptors.obrien2006-09-112-0/+36
| | | | Submitted by: Peer Chen at nVIDIA
* The run_filter() procedure is a means of working around DMA engine bugs inscottl2006-09-111-33/+55
| | | | | | | | | | | | | | | | | old/broken hardware. Unfortunately, it adds cache pressure and possible mispredicted branches to the fast path of the bus_dmamap_load collection of functions. Since it's meant for slow path exception processing, de-inline it and allow its conditions to be pre-computed at tag_create time and thus short-circuited at runtime. While here, cut down on the size of _bus_dmamap_load_buffer() by pushing the bounce page logic into a non-inlined function. Again, this helps with cache pressure and mispredicted branches. According to the TSC, this shaves off a few cycles on average. Unfortunately, the data varies quite a bit due to interrupts and preemption, so it's hard to get a good measurement. Real world measurements of network PPS are welcomed. A merge to amd64 and other arches is pending more testing.
* Fix style(9) issues in the TSO specific changes.pdeuskar2006-09-101-154/+152
| | | | Pointed out by: jmallett
* make use of the host route's mtu for processing. This means we can nowjmg2006-09-101-18/+25
| | | | | | support a network w/ split mtu's by assigning each host route the correct mtu. an aspiring programmer could write a daemon to probe hosts and find out if they support a larger mtu.
* New sockets created by incoming connections into listen sockets shouldandre2006-09-101-1/+4
| | | | | | | | | | | | inherit all settings and options except listen specific options. Add the missing send/receive timeouts and low watermarks. Remove inheritance of the field so_timeo which is unused. Noticed by: phk Reviewed by: rwatson Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 days
* Fix locking race in ttymodem(). The locking of the proctree happens too latembr2006-09-101-2/+2
| | | | | | | | | | | | and opens a small race window before tp->t_session->s_leader is accessed. In case tp->t_session has just been set to NULL elsewhere, we get a panic(). This fix is a bandaid until someone else fixes the whole locking in the tty subsystem. Definitly more work needs to be done. MFC after: 1 week Reviewed by: mlaier PR: kern/103101
* Yank FreeBSD specific code out from under ifdef.trhodes2006-09-101-127/+0
| | | | | | Remove compatibility ifdefs. Reviewed/Ok'ed by: imp
* The Linux unlink syscall uses a different errno value when trying to unlinknetchild2006-09-101-0/+7
| | | | | | | | | a directory. PR: 102897 [1] Noticed by: Knut Anders Hatlen <kahatlen@gmail.com>, testrun with LTP [1] Submitted by: Marcin Cieslak <saper@SYSTEM.PL> Tested by: netchild (LTP test run)
* Delay an orphan event if provider has still in-flight I/O requests.pjd2006-09-101-1/+4
| | | | | | | | | | | This way GEOM classes can safely detach from provider when an orphan event is received. This fixes 'detach with active requests' panic for gstripe/gconcat under load. PR: kern/102766 Submitted by: mjacob OK'ed by: phk MFC after: 1 week
* move created/detected/activated under debug level 1 to quiet the common case..jmg2006-09-092-10/+13
| | | | | | | | | | add count of active and total components to the launched line so you can see at a glance if your mirror/raid3 is complete... now: GEOM_MIRROR: Device mirror/sam launched (2/2). Reviewed by: pjd
* Second attempt at fixing module buildpdeuskar2006-09-091-1/+1
| | | | Pointyhat: pdeuskar
* Fix build breakage while compiling em as a module.pdeuskar2006-09-091-0/+1
|
* Build linprocfs and linsysfs as modules on amd64.netchild2006-09-091-0/+2
| | | | | Sponsored by: Google SoC 2006 Submitted by: rdivacky
* - Extend the coverage of PROC_LOCK to cover wakeup(&p->p_emuldata);netchild2006-09-091-1/+3
| | | | | | | | - Lock the emuldata in a case when we just created it. Sponsored by: Google SoC 2006 Submitted by: rdivacky Suggested by: jhb
* Add struct msg to the forwarded declared data structures in mac_policy.h.rwatson2006-09-092-0/+2
| | | | Obtained from: TrustedBSD Project
* Change futex lock from mutex to sx. Make futex_get atomic (protected by thenetchild2006-09-093-14/+10
| | | | | | | | futex lock). Sponsored by: Google SoC 2006 Submitted by: rdivacky Suggested by: jhb
* Remove slightly oddly placed suser() call from the KTR/ALQ setup sysctl:rwatson2006-09-091-3/+0
| | | | | | | | | it was present only in the enable path, not the disable path, which one presumes would be equally of interest. Either way, it was not needed, as the sysctl framework already calls suser() if the operation is a write operation, which configuration requests are. Sponsored by: nCircle Network Security, Inc.
* Fix the check where we want to use the end of the supported range if thenetchild2006-09-091-1/+1
| | | | | | | value is out of the supported range. Noticed by: Ed Schouten <ed@fxq.nl> Reviewed by: Kazuhito HONDA <kazuhito@ph.noda.tus.ac.jp>
* - don't wake every sleeper just the first one [1]netchild2006-09-091-5/+2
| | | | | | - remove debuging printf [2] Submitted by: intron <mag@intron.ac> [1], rdivacky [2]
* Add a BSM conversion switch case for AUE_GETCWD, so that a consolerwatson2006-09-091-0/+3
| | | | | | | warning isn't generated when __getcwd() is invoked. MFC after: 3 days Obtained from: TrustedBSD Project
* Small style cleanup.rwatson2006-09-091-3/+2
| | | | MFC after: 3 days
* Audit sysarch() operation argument.rwatson2006-09-091-0/+3
| | | | MFC after: 3 days
* Add support for TSO. Thanks to Andre for adding support in the stackpdeuskar2006-09-092-29/+203
| | | | | | and Jack Vogel for driver changes. Submitted by: Jack Vogel
* Bump __FreeBSD_version for rev. 1.117 of libexec/rtld-elf/rtld.c.kib2006-09-091-1/+1
| | | | | Requested by: jkim Approved by: kan (mentor)
OpenPOWER on IntegriCloud