summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* - During shutdown pending, when the last sack came in andrrs2007-08-2721-519/+832
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the last message on the send stream was "null" but still there, a state we allow, we could get hung and not clean it up and wait for the shutdown guard timer to clear the association without a graceful close. Fix this so that that we properly clean up. - Added support for Multiple ASCONF per new RFC. We only (so far) accept input of these and cannot yet generate a multi-asconf. - Sysctl'd support for experimental Fast Handover feature. Always disabled unless sysctl or socket option changes to enable. - Error case in add-ip where the peer supports AUTH and ADD-IP but does NOT require AUTH of ASCONF/ASCONF-ACK. We need to ABORT in this case. - According to the Kyoto summit of socket api developers (Solaris, Linux, BSD). We need to have: o non-eeor mode messages be atomic - Fixed o Allow implicit setup of an assoc in 1-2-1 model if using the sctp_**() send calls - Fixed o Get rid of HAVE_XXX declarations - Done o add a sctp_pr_policy in hole in sndrcvinfo structure - Done o add a PR_SCTP_POLICY_VALID type flag - yet to-do in a future patch! - Optimize sctp6 calls to reuse code in sctp_usrreq. Also optimize when we close sending out the data and disabling Nagle. - Change key concatenation order to match the auth RFC - When sending OOTB shutdown_complete always do csum. - Don't send PKT-DROP to a PKT-DROP - For abort chunks just always checksums same for shutdown-complete. - inpcb_free front state had a bug where in queue data could wedge an assoc. We need to just abandon ones in front states (free_assoc). - If a peer sends us a 64k abort, we would try to assemble a response packet which may be larger than 64k. This then would be dropped by IP. Instead make a "minimum" size for us 64k-2k (we want at least 2k for our initack). If we receive such an init discard it early without all the processing. - When we peel off we must increment the tcb ref count to keep it from being freed from underneath us. - handling fwd-tsn had bugs that caused memory overwrites when given faulty data, fixed so can't happen and we also stop at the first bad stream no. - Fixed so comm-up generates the adaption indication. - peeloff did not get the hmac params copied. - fix it so we lock the addr list when doing src-addr selection (in future we need to use a multi-reader/one writer lock here) - During lowlevel output, we could end up with a _l_addr set to null if the iterator is calling the output routine. This means we would possibly crash when we gather the MTU info. Fix so we only do the gather where we have a src address cached. - we need to be sure to set abort flag on conn state when we receive an abort. - peeloff could leak a socket. Moved code so the close will find the socket if the peeloff fails (uipc_syscalls.c) Approved by: re@freebsd.org(Ken Smith)
* o Fix bug I introduced in the previous commit (ipfw set extention):maxim2007-08-261-1/+4
| | | | | | | | | | | | pack a set number correctly. Submitted by: oleg o Plug a memory leak. Submitted by: oleg and Andrey V. Elsukov Approved by: re (kensmith) MFC after: 1 week
* Off-by-one bug in country ie construction, which will make HOSTAP send outsephe2007-08-261-1/+3
| | | | | | | malformatted beacons. Reviewed by: sam Approved by: re (bmah), sam (mentor)
* Fix following nits:sephe2007-08-261-1/+2
| | | | | | | | - Per ieee80211com sysctl ctx leakage on detach - getmgtframe incorrectly adjusts mbuf.m_data Reviewed by: sam Approved by: re (bmah), sam (mentor)
* Update the MFI driver to support new "1078" series of hardware. Thisscottl2007-08-254-24/+221
| | | | | | | | includes the upcoming Dell PERC6 series. Many thanks to LSI for contributing this code. Submitted by: LSI Approved by: re
* Fixes for 4 port and small packet optimizationkmacy2007-08-255-76/+125
| | | | | | | | | | | | | | | | | | | | | | | | - remove cpl->iff panic - we can't know the port number from the rspq on the 4-port - pick the ifnet based on the interface in the CPL header - switch to using qset 0 for egress on the 4-port for now - may change when we start using RSS - move ether_ifdetach to before the port lock gets deinitialized to avoid hang in the case where there are BPF peers (cxgb_ioctl is called indirectly when BPF peers are present) - don't call t3_mac_reset if multiport is set, this was causing tx errors by misconfiguring the MAC on the 4-port - change V_TXPKT_INTF to use txpkt_intf as the interfaces are not contiguous - free the mbuf immediately in the case where the payload is small enough to be copied into the rspq - only update the coalesce timer if for a queue if packets were taken off of it - add in missed 20ms DELAY in initializaton vsc8211 - prompt MFC as this only applies to the 4-port which is currently completely broken - OK'd by kensmith Supported by: Chelsio Approved by: re (blanket) MFC after: 0 days
* drop frames marked for encryption when no key is availablesam2007-08-241-0/+1
| | | | | | Reviewed by: avatar Approved by: re (kensmith) Obtained from: madwifi
* - Fix address add handling to clear cached routes and source addressesrrs2007-08-2423-269/+979
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when peer acks the add in case the routing table changes. - Fix sctp_lower_sosend to send shutdown chunk for mbuf send case when sndlen = 0 and sinfoflag = SCTP_EOF - Fix sctp_lower_sosend for SCTP_ABORT mbuf send case with null data, So that it does not send the "null" data mbuf out and cause it to get freed twice. - Fix so auto-asconf sysctl actually effect the socket's asconf state. - Do not allow SCTP_AUTO_ASCONF option to be used on subset bound sockets. - Memset bug in sctp_output.c (arguments were reversed) submitted found and reported by Dave Jones (davej@codemonkey.org.uk). - PD-API point needs to be invoked >= not just > to conform to socket api draft this fixes sctp_indata.c in the two places need to be >=. - move M_NOTIFICATION to use M_PROTO5. - PEER_ADDR_PARAMS did not fail properly if you specify an address that is not in the association with a valid assoc_id. This meant you got or set the stcb level values instead of the destination you thought you were going to get/set. Now validate if the stcb is non-null and the net is NULL that the sa_family is set and the address is unspecified otherwise return an error. - The thread based iterator could crash if associations were freed at the exact time it was running. rework the worker thread to use the increment/decrement to prevent this and no longer use the markers that the timer based iterator uses. - Fix the memleak in sctp_add_addr_to_vrf() for the case when it is detected that ifa is already pointing to a ifn. - Fix it so that if someone is so insane that they drop the send window below the minimal add mark, they still can send. - Changed all state for associations to use mask safe macro. - During front states in association freeing in sctp_inpcbfree, we had a locking problem where locks were not in place where they should have been. - Free association calls were not testing the return value in sctp_inpcb_free() properly... others should be cast void returns where we don't care about the return value. - If a reference count is held on an assoc, even from the "force free" we should not do the actual free.. but instead let the timer free it. - When we enter sctp_input(), if the SCTP_ASOC_ABOUT_TO_BE_FREED flag is set, we must NOT process the packet but handle it like ootb. This is because while freeing an assoc we release the locks to get all the higher order locks so we can purge all the hash tables. This leaves a hole if a packet comes in just at that point. Now sctp_common_input_processing() will call the ootb code in such a case. - Change MBUF M_NOTIFICATION to use M_PROTO5 (per Sam L). This makes it so we don't have a conflict (I think this is a covertity change). We made this change AFTER some conversation and looking to make sure that M_PROTO5 does not have a problem between SCTP and the 802.11 stuff (which is the only other place its used). - Fixed lock order reversal and missing atomic protection around locked_tcb during association lookup and the 1-2-1 model. - Added debug to source address selection. - V6 output must always do checksum even for loopback. - Remove more locks around inp that are not needed for an atomically added/subtracted ref count. - slight optimization in the way we zero the array in sctp_sack_check() - It was possible to respond to a ABORT() with bad checksum with a PKT-DROP. This lead to a PKT-DROP/ABORT war. Add code to NOT send a PKT-DROP to any ABORT(). - Add an option for local logging (useful for macintosh or when you need better performing during debugging). Note no commands are here to get the log info, you must just use kgdb. - The timer code needs to be aware of if it needs to call sctp_sack_check() to slide the maps and adjust the cum-ack. This is because it may be out of sync cum-ack wise. - Added threshold managment logging. - If the user picked just the right size, that just filled the send window minus one mtu, we would enter a forever loop not copying and at the same time not blocking. Change from < to <= solves this. - Sysctl added to control the fragment interleave level which defaults to 1. - My rwnd control was not being used to control the rwnd properly (we did not add and subtract to it :-() this is now fixed so we handle small messages (1 byte etc) better to bring our rwnd down more slowly. Approved by: re@freebsd.org (Bruce Mah)
* Add PCI IDs for two cards:emaste2007-08-231-0/+4
| | | | | | | | | - Adaptec RAID 3405 - Adaptec RAID 3805 Approved by: re (bmah) Submitted by: John Marra jmarra at nmu dot edu MFC After: 1 week
* Return EADDRNOTAVAIL instead of EDESTADDRREQ error whenemax2007-08-232-2/+2
| | | | | | | | listen(2) is called on improperly bound socket. Suggested by: Iain Hibbert Approved by: re (kensmith) MFC after: 3 days
* Export 4Gbps Fibre Channel link speed correctly with inquiry commands.jkim2007-08-231-9/+8
| | | | | Approved by: re (kensmith) MFC after: 3 days
* Style nits + more reliable Tj(max) detection + improved reporting ofdes2007-08-231-34/+42
| | | | | | | critical temperature + sched_unbind() after rdmsr + initialize sc_dev. Submitted by: Rui Paulo <rpaulo@fnop.net>, cnst Approved by: re (kensmith)
* When checking the sequence number of a TCP header embedded in andhartmei2007-08-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | ICMP error message, do not access th_flags. The field is beyond the first eight bytes of the header that are required to be present and were pulled up in the mbuf. A random value of th_flags can have TH_SYN set, which made the sequence number comparison not apply the window scaling factor, which led to legitimate ICMP(v6) packets getting blocked with "BAD ICMP" debug log messages (if enabled with pfctl -xm), thus breaking PMTU discovery. Triggering the bug requires TCP window scaling to be enabled (sysctl net.inet.tcp.rfc1323, enabled by default) on both end- points of the TCP connection. Large scaling factors increase the probability of triggering the bug. PR: kern/115413: [ipv6] ipv6 pmtu not working Tested by: Jacek Zapala Reviewed by: mlaier Approved by: re (kensmith)
* - Fix a bug which could cause a panic when enabling LROgallatin2007-08-225-24755/+25813
| | | | | | | | | | | on an down mxge interface - Fix a bug where mxge reported the link state as active when it wasn't (after ifconfig down). - Prevent spurious watchdog resets when link partner is not consuming - Add support for CX4 and popular XFP media detection - Update the firmware and associated header files to 1.4.25 Approved by: re (kensmith)
* Assign sizes to assembly language support functions.jkoshy2007-08-224-8/+77
| | | | Approved by: re (kensmith)
* Define an END() macro for use in i386 and amd64 assembly code, akinjkoshy2007-08-224-0/+7
| | | | | | to the one available on the ia64, sparc64, and sun4v architectures. Approved by: re (kensmith)
* Properly initialize the dev_priv before calling the i915_dma_cleanup().kib2007-08-211-3/+2
| | | | | | | | This fixes my rev. 1.5. Reviewed by: anholt Approved by: re (kensmith) MFC after: 2 weeks
* In general, when we map a page into the kernel's address space, we noalc2007-08-212-8/+6
| | | | | | | | | | | longer create a pv entry for that mapping. (The two exceptions are mappings into the kernel's exec and pipe submaps.) Consequently, there is no reason for get_pv_entry() to dig deep into the free page queues, i.e., use VM_ALLOC_SYSTEM, by default. This revision changes get_pv_entry() to use VM_ALLOC_NORMAL by default, i.e., before calling pmap_collect() to reclaim pv entries. Approved by: re (kensmith)
* Some times ago, vfs_getopts() was changed, so that it would set error tocognet2007-08-201-5/+5
| | | | | | | | | | | | ENOENT if the option wasn't provided, instead of setting it to 0. xfs however didn't catch up on this, so it assumed something went bad if vfs_getopts() sets the error to non-zero, and just returns the error. Unbreak xfs mount by just ignoring the error if vfs_getopts() sets the error to ENOENT, as we should have sane defaults. Reviewed by: kan Approved by: re (rwatson) Tested by: rpaulo
* Do not drop vm_map lock between doing vm_map_remove() and vm_map_insert().kib2007-08-203-18/+40
| | | | | | | | | | | For this, introduce vm_map_fixed() that does that for MAP_FIXED case. Dropping the lock allowed for parallel thread to occupy the freed space. Reported by: Tijl Coosemans <tijl ulyssis org> Reviewed by: alc Approved by: re (kensmith) MFC after: 2 weeks
* Destroy the kaio_mtx on the freeing the struct kaioinfo in thekib2007-08-201-1/+5
| | | | | | | | | | aio_proc_rundown. Do not allow for zero-length read to be passed to the fo_read file method by aio. Reported and tested by: Peter Holm Approved by: re (kensmith)
* - Improve runq_findbit_from() which is used by ULE's circular queue. Maskjeff2007-08-201-32/+22
| | | | | | | | | of the bits we want to ignore on the first pass rather than doing a linear scan. This puts us within a few instructions of the cost of runq_findbit() and removes this function from the top of profiling output for context switch heavy workloads. Approved by: re
* - Set steal_thresh to log2(ncpus). This improves idle-time load balancingjeff2007-08-201-0/+6
| | | | | | | | on 2cpu machines by reducing it to 1 by default. This improves loaded operation on 8cpu machines by increasing it to 3 where the extra idle time is not as critical. Approved by: re
* Always call sched_bind(), even if on the CPU in question. It is wrong tonjl2007-08-201-25/+15
| | | | | | | | check if we're already on that cpu and skip the bind since the thread could be migrated off in the meantime. Suggested by: jeff Approved by: re
* Use a different loop variable for the inner loop. This previous reuse couldnjl2007-08-191-4/+4
| | | | | | | | | have caused a hang, but we got lucky with the available multi-CPU states on actual hardware. Submitted by: Bjorn Koenig <bkoenig / alpha-tierchen.de> Approved by: re MFC after: 3 days
* Just wbinv if both PREREAD and PREWRITE are set.cognet2007-08-181-3/+9
| | | | | | | In PREREAD, just invalidate the cache lines, and do not write back them, if the buffer is properly aligned. Approved by: re (blanket)
* Remove comment that is no longer quite true.kib2007-08-181-3/+0
| | | | | Noted by: alc Approved by: re (kensmith)
* Fix the phys_pager in the way similar to the rev. 1.83 of thekib2007-08-181-22/+25
| | | | | | | | | | | | | | sys/vm/device_pager.c: Protect the creation of the phys pager with non-NULL handle with the phys_pager_mtx. Lookup of phys pager in the pagers list by handle is now synchronized with its removal from the list, and phys_pager_mtx is put before vm object lock in lock order. Dispose the phys_pager_alloc_lock and tsleep calls, together with acquiring Giant, since phys_pager_mtx now covers the same block. Reviewed by: alc Approved by: re (kensmith)
* If the STP state machine is stopped then clear the bridge-id and root-id.thompsa2007-08-181-8/+13
| | | | Approved by: re (kensmith)
* Add ng_send_fn() error handeling inside ng_con_nodes().mav2007-08-181-2/+5
| | | | | | | | Without it some errors may left unnoticed and unhandeled that will lead to hooks left in half-connected state. Reviewed by: julian@ Approved by: re (kensmith), glebius (mentor)
* Don't pass RB_BOOTINFO to the kernel. There's no bootinfo actuallyimp2007-08-171-1/+1
| | | | | | | passed into the kernel, and the kernel will soon grow that ability on arm. Approved by: re@ (blanket)
* forward port signedness fixes from RELENG_6kmacy2007-08-179-18/+31
| | | | | | fix compile error for case where MSI_SUPPORTED not defined Approved by: re (blanket)
* We don't need to call dcons_poll event handlers if KDB is not active.simokawa2007-08-171-3/+9
| | | | Approved by: re (kensmith)
* Some ZFS threads needs stack larger than the default 8kB, so use 16kB ofpjd2007-08-162-2/+16
| | | | | | alternate stack if the default is smaller than 16kB. Approved by: re (rwatson)
* MFp4: rework tmpfs_readdir() logic in terms of correctness.delphij2007-08-161-12/+15
| | | | | Approved by: re (tmpfs blanket) Tested with: fstest, fsx
* Regenerate.davidxu2007-08-169-3/+26
| | | | Approved by: re(kensmith)
* Add thr_kill2 compat32 syscall.davidxu2007-08-161-0/+1
| | | | | Submitted by: Tijl Coosemans tijl at ulyssis dot org Approved by: re (kensmith)
* Add thr_kill2 syscall which sends a signal to a thread in another process.davidxu2007-08-163-0/+69
| | | | | Submitted by: Tijl Coosemans tijl at ulyssis dot org Approved by: re (kensmith)
* - Remove extra comment for 7.0 (no GIANT here).rrs2007-08-167-63/+106
| | | | | | | | | | | - Remove unneeded WLOCK/UNLOCK of inp for getting TCB lock. - Fix panic that may occur when freeing an assoc that has partial delivery in progress (may dereference null socket pointer when queuing partial delivery aborted notification) - Some spacing and comment fixes. - Fix address add handling to clear cached routes and source addresses when peer acks the add in case the routing table changes. Approved by: re@freebsd.org (Bruce Mah)
* Use the sequence number comparison macro to compareqingli2007-08-161-2/+2
| | | | | | | | | | projected_offset against isn_offset to account for wrap around. Reviewed by: gnn, kmacy, silby Submitted by: yusheng.huang@bluecoat.com Approved by: re MFC: 3 days
* Add a driver for the on-die digital thermal sensor found on Intel Coredes2007-08-159-0/+297
| | | | | | | | | | | | | and newer CPUs (including Core 2 and Core / Core 2 based Xeons). The driver attaches to each cpu device and creates a sysctl node in that device's sysctl context (dev.cpu.N.temperature). When invoked, the handler binds to the appropriate CPU to ensure a correct reading. Submitted by: Rui Paulo <rpaulo@fnop.net> Sponsored by: Google Summer of Code 2007 Tested by: des, marcus, Constantine A. Murenin, Ian FREISLICH Approved by: re (kensmith) MFC after: 3 weeks
* On 6.x this works:jhb2007-08-153-14/+59
| | | | | | | | | | | | | | | | | | | | | | | % mount | grep home /dev/ad4s1e on /home (ufs, local, noatime, soft-updates) % mount -u -o atime /home % mount | grep home /dev/ad4s1e on /home (ufs, local, soft-updates) Restore this behavior for on 7.x for the following mount options: noatime, noclusterr, noclusterw, noexec, nosuid, nosymfollow In addition, on 7.x, the following are equivalent: mount -u -o atime /home mount -u -o nonoatime /home Ideally, when we introduce new mount options, we should avoid options starting with "no". :) Requested by: jhb Reported by: Karol Kwiat <karol.kwiat gmail com>, Scott Hetzel <swhetzel gmail com> Approved by: re (bmah) Proxy commit for: rodrigc
* Move callout initialization to the proper spot. This prevents panics duringscottl2007-08-143-8/+1
| | | | | | | error recovery. Approved by: re Found by: kan
* Make sure to take PHY out of power down mode in device attach.yongari2007-08-141-0/+22
| | | | | | | | | | | | | | | | | Without this the PHY wouldn't work as expected. This should fix dual-boot Windows XP machine where RealTek Windows drivers put the PHY in power down mode during shutdown. The magic PHY register accesses come from RealTek driver. No datasheets mention the magic PHY registers. In general, the PHY wakeup code should go into PHY driver. However it seems that it only apply to RTL8169S single chip and it would be another hack if we have rgephy(4) check what parent driver/chip model is attached. Reported by: lofi, Laurens Timmermans ( laurens AT timkapel DOT nl ) Tested by: lofi Obtained from: RealTek FreeBSD driver Approved by: re (Ken Smith)
* Improve vn_printf() by:pjd2007-08-131-7/+45
| | | | | | | | - adding missing vnode flags, - printing unknown flags as numbers, - using strlcat() instead of strcat(). Approved by: re (bmah)
* Fix a few nits relative to the previous changes:jhb2007-08-132-2/+9
| | | | | | | | | | - Don't leak the config lock if detach() fails due to the controller char dev being open. - Close a race between detach() and a process opening the controller char dev. MFC after: 1 week Approved by: re (bmah)
* Teach the mfi(4) driver to handle requests from userland managementjhb2007-08-135-29/+217
| | | | | | | | applications to add and remove volumes. MFC after: 1 week Approved by: re (bmah) Reviewed by: ambrisko, scottl
* Update to support ICH[678] chipsets (based on a patch by Takeharu KATO)des2007-08-132-76/+229
| | | | | | | | Fix a resource allocation bug (explained by jhb on -acpi) Thanks for Mike Tancsa for testing and helping track down the bug. Approved by: re (kensmith) MFC after: 3 weeks
* Expand the data structure returned by the ATA RAID status ioctl to includejhb2007-08-132-15/+39
| | | | | | | | | detailed status on each of the backing subdisks. This allows userland to see which subdisks are online, failed, missing, or a hot spare. MFC after: 1 week Approved by: re (bmah) Reviewed by: sos
* Make ng_h4(4) MPSAFE. Use similar to ng_tty(4) locking strategy.emax2007-08-136-191/+176
| | | | | | | | Reconnect ng_h(4) back to the build. Reviewed by: kensmith Approved by: re (kensmith) MFC after: 1 month
OpenPOWER on IntegriCloud