summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Mark sk(4) as capable of handling extended VLAN frames. NICsyar2005-10-112-0/+12
| | | | | | | | | based on XMAC II chip should be ready for this in their initial mode of operation, and Yukon-based NICs are configured so by the driver. PR: kern/79998 MFC after: 1 month
* Fix build: remove stale KASSERT() for mutex that no longer exists.wpaul2005-10-111-2/+0
|
* Add rc.d scripts for the hcsecd(8) and sdpd(8) daemons. Put defaults intoemax2005-10-113-0/+53
| | | | | | | | | /etc/defaults/rc.conf. Both daemons can run even if no Bluetooth devices are attached to the system. Both daemons depend on Bluetooth socket layer and thus disabled by default. Bluetooth sockets layer must be either loaded as a module or compiled into kernel before the daemons can run. MFC after: 1 month
* Fix a syntax nit (superfluous 'a').keramida2005-10-111-1/+1
| | | | Submitted by: Anders Hanssen <anders@rethink.no>
* Fix a regression introduced in rev. 1.107. If an item once had a writerglebius2005-10-111-22/+28
| | | | | | | | | | | | | | | | semantics, and then was reused for next node, it still would be applied as writer again. To fix the regression the decision is made never to alter item->el_flags after the item has been allocated. This requires checking for overrides both in ng_dequeue() and in ng_snd_item(). Details: - Caller of the ng_apply_item() knows what is the current access to node and specifies it to ng_apply_item(). The latter drops the given access after item has beem applied. - ng_dequeue() needs to be supplied with int pointer, where it stores the obtained access on node. - Check for node/hook access overrides in ng_dequeue().
* Correct a man-in-the-middle SSL version rollback vulnerability.cperciva2005-10-111-6/+1
| | | | Security: FreeBSD-SA-05:21.openssl
* Style and other fixes for the last commit.glebius2005-10-111-7/+9
| | | | Submitted by: ru
* Fixed range reduction for large multiples of pi/2 on systems withbde2005-10-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | broken assignment to floats (e.g., i386 with gcc -O, but not amd64 or ia64; i386 with gcc -O0 worked accidentally). Use an unnamed volatile temporary variable to trick gcc -O into clipping extra precision on assignment. It's surprising that only 1 place needed to be changed. For tanf() on i386 with gcc -O, the bug caused errors > 1 ulp with a density of 2.3% for args larger in magnitude than 128*pi/2, with a maximum error of 1.624 ulps. After this fix, exhaustive testing shows that range reduction for floats works as intended assuming that it is in within a factor of about 2^16 of working as intended for doubles. It provides >= 8 extra bits of precision for all ranges. On i386: range max error in double/single ulps extra precision ----- ------------------------------- --------------- 0 to 3*pi/4 0x000d3132 / 0.0016 9+ bits 3*pi/4 to 128*pi/2 0x00160445 / 0.0027 8+ 128*pi/2 to +Inf 0x00000030 / 0.00000009 23+ 128*pi/2 up, -O0 before fix 0x00000030 / 0.00000009 23+ 128*pi/2 up, -O1 before fix 0x10000000 / 0.5 1 The 23+ bits of extra precision for large multiples corresponds to almost perfect reduction to a pair of floats (24 extra would be perfect). After this fix, the maximum relative error (relative to the corresponding fdlibm double precision function) is < 1 ulp for all basic trig functions on all 2^32 float args on all machines tested: amd64 ia64 i386-O0 i386-O1 ------ ------ ------ ------ cosf: 0.8681 0.8681 0.7927 0.5650 sinf: 0.8733 0.8610 0.7849 0.5651 tanf: 0.9708 0.9329 0.9329 0.7035
* Fix typo.glebius2005-10-111-2/+1
| | | | | Submitted by: maxim MFC after: 3 days
* Do not unconditionally set a spanning tree port to forwarding as the link may bethompsa2005-10-111-1/+1
| | | | | | down when we attach. We wont get updated until a linkstate change happens. Go via bstp_ifupdstatus() which checks the media status first.
* IDs for generic card, airvast wm_100, i-o data wn-b11/cfzimp2005-10-111-1/+5
| | | | Some of these may have been obtained from OpenBSD...
* Buffalo LPC4/CLX IDimp2005-10-111-0/+1
|
* New OEM generic card. "10/100 Fast Ethernet PC Card". It has aimp2005-10-111-0/+1
| | | | | | generic sounding CIS "PCMCIA", "FAST ETHERENT CARD" and a bogus MANFID code (0xffff and 0x1090). However, since I'm not aware of 'generic' cards that aren't NE-2000oids, go with that and hope for the best.
* Make forwarding of connect/disconnect events optional. wpa_supplicantwpaul2005-10-102-3/+22
| | | | | seems to already be able to tell when it's associated and the extra events just confuse it. Only forward media-specific events by default.
* Fix a missing set of lock operations.scottl2005-10-101-0/+3
| | | | | Submitted by: green PR: 87191
* Fixed range reduction near (but not very near) medium-sized multiplesbde2005-10-101-3/+18
| | | | | | | | | | of pi/2 (1 line) and expand a comment about related magic (many lines). The bug was essentially the same as for the +-pi/2 case (a mistranslated mask), but was smaller so it only significantly affected multiples starting near +-13*pi/2. At least on amd64, for cosf() on all 2^32 float args, the bug caused 128 errors of >= 1 ulp, with a maximum error of 1.2393 ulps.
* Correct the former patch to the way it would have looked after review.sos2005-10-101-13/+13
|
* Properly react to allocation failures.sos2005-10-101-6/+11
| | | | Found by: imp@
* Avoid unintended VMIO on directories and symlinks due to leftover objecttegge2005-10-101-0/+1
| | | | not having been destroyed.
* Grrr. Add one more missing NDIS_UNLOCK().wpaul2005-10-101-1/+3
|
* Add missing NDIS_UNLOCK() in one of the failure cases in SIOCGPRIVATE_0.wpaul2005-10-101-1/+3
|
* Autogenerate hardware notes for snd_mss(4).joel2005-10-103-0/+5
|
* Enable -D ndis support in wpa_supplicant and add the ndis_events utility.wpaul2005-10-108-2/+944
| | | | | This allows wpa_supplicant to work with WPA and WPA2 compliant NDIS drivers.
* - Xref snd_mss(4).joel2005-10-101-9/+2
| | | | | - Remove a few items from the HARDWARE list. This support is already described in the snd_mss(4) manual page.
* Remove the driver_ndis files from the exclusion listwpaul2005-10-101-3/+0
|
* Add manual page for snd_mss(4) and hook it up to the build.joel2005-10-102-0/+101
| | | | Reviewed by: brueffer
* This commit was generated by cvs2svn to compensate for changes in r151208,wpaul2005-10-103-0/+1779
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Import the driver_ndis files from the 0.3.9 distribution.wpaul2005-10-103-0/+1779
| |
* | This commit makes a big round of updates and fixes many, many things.wpaul2005-10-1010-1227/+2537
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First and most importantly, I threw out the thread priority-twiddling implementation of KeRaiseIrql()/KeLowerIrq()/KeGetCurrentIrql() in favor of a new scheme that uses sleep mutexes. The old scheme was really very naughty and sought to provide the same behavior as Windows spinlocks (i.e. blocking pre-emption) but in a way that wouldn't raise the ire of WITNESS. The new scheme represents 'DISPATCH_LEVEL' as the acquisition of a per-cpu sleep mutex. If a thread on cpu0 acquires the 'dispatcher mutex,' it will block any other thread on the same processor that tries to acquire it, in effect only allowing one thread on the processor to be at 'DISPATCH_LEVEL' at any given time. It can then do the 'atomic sit and spin' routine on the spinlock variable itself. If a thread on cpu1 wants to acquire the same spinlock, it acquires the 'dispatcher mutex' for cpu1 and then it too does an atomic sit and spin to try acquiring the spinlock. Unlike real spinlocks, this does not disable pre-emption of all threads on the CPU, but it does put any threads involved with the NDISulator to sleep, which is just as good for our purposes. This means I can now play nice with WITNESS, and I can safely do things like call malloc() when I'm at 'DISPATCH_LEVEL,' which you're allowed to do in Windows. Next, I completely re-wrote most of the event/timer/mutex handling and wait code. KeWaitForSingleObject() and KeWaitForMultipleObjects() have been re-written to use condition variables instead of msleep(). This allows us to use the Windows convention whereby thread A can tell thread B "wake up with a boosted priority." (With msleep(), you instead have thread B saying "when I get woken up, I'll use this priority here," and thread A can't tell it to do otherwise.) The new KeWaitForMultipleObjects() has been better tested and better duplicates the semantics of its Windows counterpart. I also overhauled the IoQueueWorkItem() API and underlying code. Like KeInsertQueueDpc(), IoQueueWorkItem() must insure that the same work item isn't put on the queue twice. ExQueueWorkItem(), which in my implementation is built on top of IoQueueWorkItem(), was also modified to perform a similar test. I renamed the doubly-linked list macros to give them the same names as their Windows counterparts and fixed RemoveListTail() and RemoveListHead() so they properly return the removed item. I also corrected the list handling code in ntoskrnl_dpc_thread() and ntoskrnl_workitem_thread(). I realized that the original logic did not correctly handle the case where a DPC callout tries to queue up another DPC. It works correctly now. I implemented IoConnectInterrupt() and IoDisconnectInterrupt() and modified NdisMRegisterInterrupt() and NdisMDisconnectInterrupt() to use them. I also tried to duplicate the interrupt handling scheme used in Windows. The interrupt handling is now internal to ndis.ko, and the ndis_intr() function has been removed from if_ndis.c. (In the USB case, interrupt handling isn't needed in if_ndis.c anyway.) NdisMSleep() has been rewritten to use a KeWaitForSingleObject() and a KeTimer, which is how it works in Windows. (This is mainly to insure that the NDISulator uses the KeTimer API so I can spot any problems with it that may arise.) KeCancelTimer() has been changed so that it only cancels timers, and does not attempt to cancel a DPC if the timer managed to fire and queue one up before KeCancelTimer() was called. The Windows DDK documentation seems to imply that KeCantelTimer() will also call KeRemoveQueueDpc() if necessary, but it really doesn't. The KeTimer implementation has been rewritten to use the callout API directly instead of timeout()/untimeout(). I still cheat a little in that I have to manage my own small callout timer wheel, but the timer code works more smoothly now. I discovered a race condition using timeout()/untimeout() with periodic timers where untimeout() fails to actually cancel a timer. I don't quite understand where the race is, using callout_init()/callout_reset()/callout_stop() directly seems to fix it. I also discovered and fixed a bug in winx32_wrap.S related to translating _stdcall calls. There are a couple of routines (i.e. the 64-bit arithmetic intrinsics in subr_ntoskrnl) that return 64-bit quantities. On the x86 arch, 64-bit values are returned in the %eax and %edx registers. However, it happens that the ctxsw_utow() routine uses %edx as a scratch register, and x86_stdcall_wrap() and x86_stdcall_call() were only preserving %eax before branching to ctxsw_utow(). This means %edx was getting clobbered in some cases. Curiously, the most noticeable effect of this bug is that the driver for the TI AXC110 chipset would constantly drop and reacquire its link for no apparent reason. Both %eax and %edx are preserved on the stack now. The _fastcall and _regparm wrappers already handled everything correctly. I changed if_ndis to use IoAllocateWorkItem() and IoQueueWorkItem() instead of the NdisScheduleWorkItem() API. This is to avoid possible deadlocks with any drivers that use NdisScheduleWorkItem() themselves. The unicode/ansi conversion handling code has been cleaned up. The internal routines have been moved to subr_ntoskrnl and the RtlXXX routines have been exported so that subr_ndis can call them. This removes the incestuous relationship between the two modules regarding this code and fixes the implementation so that it honors the 'maxlen' fields correctly. (Previously it was possible for NdisUnicodeStringToAnsiString() to possibly clobber memory it didn't own, which was causing many mysterious crashes in the Marvell 8335 driver.) The registry handling code (NdisOpen/Close/ReadConfiguration()) has been fixed to allocate memory for all the parameters it hands out to callers and delete whem when NdisCloseConfiguration() is called. (Previously, it would secretly use a single static buffer.) I also substantially updated if_ndis so that the source can now be built on FreeBSD 7, 6 and 5 without any changes. On FreeBSD 5, only WEP support is enabled. On FreeBSD 6 and 7, WPA-PSK support is enabled. The original WPA code has been updated to fit in more cleanly with the net80211 API, and to eleminate the use of magic numbers. The ndis_80211_setstate() routine now sets a default authmode of OPEN and initializes the RTS threshold and fragmentation threshold. The WPA routines were changed so that the authentication mode is always set first, followed by the cipher. Some drivers depend on the operations being performed in this order. I also added passthrough ioctls that allow application code to directly call the MiniportSetInformation()/MiniportQueryInformation() methods via ndis_set_info() and ndis_get_info(). The ndis_linksts() routine also caches the last 4 events signalled by the driver via NdisMIndicateStatus(), and they can be queried by an application via a separate ioctl. This is done to allow wpa_supplicant to directly program the various crypto and key management options in the driver, allowing things like WPA2 support to work. Whew.
* | Correct typo.ceri2005-10-101-1/+1
| | | | | | | | Discussed with: glebius
* | Bug fix initialization on multi-core HTT CPUs.jkoshy2005-10-101-46/+59
| | | | | | | | | | Reported by: ps Tested by: ps
* | - Note that ng_iface(4) now supports ALTQ.glebius2005-10-102-5/+23
| | | | | | | | - Explain when ALTQ should be used on ng_iface(4) and when not.
* | ALTQ support for ng_iface(4). Before turning on please consult manual page.glebius2005-10-101-26/+68
| |
* | Replace "/etc/make.conf" with references to make.conf(5)yar2005-10-106-8/+10
| | | | | | | | | | | | | | | | | | where applicable. The main reason for this change is that the location of make.conf is not constant and can be modified via __MAKE_CONF. This change also improves hyper-text linkage in our manpages. MFC after: 2 weeks
* | Clarify the usage and effects of sys.mk, make.conf(5), and __MAKE_CONF.yar2005-10-102-35/+76
| | | | | | | | MFC after: 2 weeks
* | * pkg_version(1) exits if INDEX files is not found and -I is notkrion2005-10-102-5/+10
| | | | | | | | | | | | | | | | | | | | specified. The result is that the package will be listed with a '?' as if it was not found within the INDEX file, so fix this behaviour. * Remove trailing spaces. PR: bin/87136 Submitted by: Sean Farley <sean-freebsd at farley dot org> MFC after: 3 days
* | The pthread_attr_set_createsuspend_np was broken, fix it bydavidxu2005-10-101-1/+1
| | | | | | | | replacing THR_FLAGS_SUSPENDED with THR_FLAGS_NEED_SUSPEND.
* | Fix pkg_info(1) and pkg_delete(1) to handle properly packages whichkrion2005-10-102-2/+2
| | | | | | | | | | | | | | | | names start with a digit. PR: bin/76858 Submitted by: Matthew D. Fuller <fullermd@over-yonder dot net> MFC after: 3 days
* | Release clean buffer with wrong size and no dependencies also for non-VMIOtegge2005-10-091-2/+1
| | | | | | | | case.
* | Adjust totread argument passed to cluster_read() to account for offset nottegge2005-10-091-1/+1
| | | | | | | | being block aligned.
* | When breaking up a large request into smaller ones for the strategypeadar2005-10-091-1/+7
| | | | | | | | | | | | | | | | routine, create all the child bio objects before starting the requests, rather than starting them as created. This closes a race whereby some number of child operations could complete before the rest were ever created, and prematurely freeing the parent bio. This fixes the panics installing in VMWare and qemu
* | Fix numerous errors of >= 1 ulp for cosf(x) and sinf(x) (1 line)bde2005-10-091-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and add a comment about related magic (many lines)). __kernel_cos[f]() needs a trick to reduce the error to below 1 ulp when |x| >= 0.3 for the range-reduced x. Modulo other bugs, naive code that doesn't use the trick would have an error of >= 1 ulp in about 0.00006% of cases when |x| >= 0.3 for the unreduced x, with a maximum relative error of about 1.03 ulps. Mistransation of the trick from the double precision case resulted in errors in about 0.2% of cases, with a maximum relative error of about 1.3 ulps. The mistranslation involved not doing implicit masking of the 32-bit float word corresponding to to implicit masking of the lower 32-bit double word by clearing it. sinf() uses __kernel_cosf() for half of all cases so its errors from this bug are similar. tanf() is not affected. The error bounds in the above and in my other recent commit messages are for amd64. Extra precision for floats on i386's accidentally masks this bug, but only if k_cosf.c is compiled with -O. Although the extra precision helps here, this is accidental and depends on longstanding gcc precision bugs (not clipping extra precision on assignment...), and the gcc bugs are mostly avoided by compiling without -O. I now develop libm mainly on amd64 systems to simplify error detection and debugging.
* | Don't pretend that a failed sync write was succesful.tegge2005-10-091-3/+1
| |
* | Reduce probability for a deadlock that can occur when a snapshot inode istegge2005-10-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | updated by a process holding the snapshot lock. Another process updating a different inode in the same inodeblock will do copy on write checks and lock in the opposite direction. The snapshot code force a copy on write of these blocks manually (cf. start of expunge_ufs[12]) and these inode blocks are later put on snapblklist. This partial fix is to 'drain' the relevant ffs_copyonwrite() operation after installing new snapblklist. This is not a 100% solution since a failed block allocation can cause implicit fsync() which might deadlock before the new snapblklist has been installed.
* | Eliminate a deadlock that can occur when a dirty block belonging to a snapshottegge2005-10-091-0/+2
| | | | | | | | | | | | file is flushed by a process not holding snaplk (e.g. bufdaemon). Another process might hold snaplk and try to access the block due to ffs_copyonwrite processing.
* | Eliminate a deadlock that can occur during the cgaccount() processing due totegge2005-10-091-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | the cg map buffer being held when writing indirect blocks. The process ends up in ffs_copyonwrite(), attempting to get snaplk while holding the cg map buffer lock. Another process might be in ffs_copyonwrite(), trying to allocate a new block for a copy. It would hold snaplk while trying to get the cg map buffer lock. Release the cg map buffer early and use the copy for most of the cgaccount processing to avoid this deadlock.
* | Reduce the probability of low block numbers passed to ffs_snapblkfree() bytegge2005-10-091-55/+35
| | | | | | | | | | | | | | | | | | | | | | skipping the call from ffs_snapremove() if the block number is zero. Simplify snapshot locking in ffs_copyonwrite() and ffs_snapblkfree() by using the same locking protocol for low block numbers as for larger block numbers. This removes a lock leak that could happen if vn_lock() succeeded after lockmgr() failed in ffs_snapblkfree(). Check if snapshot is gone before retrying a lock in ffs_copyonwrite().
* | Reinitialize v_type and v_op fields in case vnode has been reused withouttegge2005-10-091-0/+5
| | | | | | | | | | | | reclamation. If the vnode previously was a fifo then v_op would point to ffs_fifoops[12] instead of the expected ffs_vnodeops[12], causing a panic at the end of ffsext_strategy.
* | Add RELENG_6_0.des2005-10-092-2/+2
| |
* | Rough implementation of the create and add verbs. The verbs causemarcel2005-10-092-44/+355
| | | | | | | | | | in-memory changes only and as such are only useful for prototyping and regression testing purposes.
OpenPOWER on IntegriCloud