summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Fix a warning when NATM is not defined. In this case s is not used.harti2004-01-091-0/+2
|
* The private data section of ndis_packets has a 'packet flags' bytewpaul2004-01-094-4/+14
| | | | | | | | | | | | | | | which has two important flags in it: the 'allocated by NDIS' flag and the 'media specific info present' flag. There are two Windows macros for getting/setting media specific info fields within the ndis_packet structure which can behave improperly if these flags are not initialized correctly when a packet is allocated. It seems the correct thing to do is always set the NDIS_PACKET_ALLOCATED_BY_NDIS flag on all newly allocated packets. This fixes the crashes with the Intel Centrino wireless driver. My sample card now seems to work correctly. Also, fix a potential LOR involving ndis_txeof() in if_ndis.c.
* Sync with Creative's 8010.h rev 1.51.obrien2004-01-092-74/+147
|
* Dike out some very Linux-specific parts that we can't compile with.obrien2004-01-091-0/+8
| | | | Also protect AC97_MUTE which is also defined in our own ac97.h.
* This commit was generated by cvs2svn to compensate for changes in r124273,obrien2004-01-091-2/+42
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Vendor import revision 1.9 of ac97_codec.h (we renamed the file) fromobrien2004-01-091-2/+42
| | | | | | | | http://cvs.sourceforge.net/viewcvs.py/emu10k1/emu10k1/ac97_codec.h
* | Implement NdisOpenFile()/NdisCloseFile()/NdisMapFile()/NdisUnmapFile().wpaul2004-01-093-10/+125
| | | | | | | | | | | | | | | | | | By default, we search for files in /compat/ndis. This can be changed with a systcl. These routines are used by some drivers which need to download firmware or microcode into their respective devices during initialization. Also, remove extraneous newlines from the 'built-in' sysctl/registry variables.
* | Also, don't crash in the netgraph disconnect node if the interface isgreen2004-01-091-1/+2
| | | | | | | | detached from the other direction.
* | Don't try to ifpromisc() on an interface that's deleted already.green2004-01-091-4/+4
| |
* | Improve the expressiveness of ttyinfo (^T) when dealing with threadsrwatson2004-01-081-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in slightly less usual states: If the thread is on a run queue, display "running" if the thread is actually running, otherwise, "runnable". If the thread is sleeping, and it's on a sleep queue, display the name of the queue, otherwise "unknown" -- previously, in this situation we would display "iowait". If the thread is waiting on a lock, display *lockname. If the thread is suspended, display "suspended" -- previously, in this situation we would display "iowait". If the thread is waiting for an interrupt, display "intrwait" -- previously, in this situation we would display "iowait". If the thread is in a state not handled by the above, display "unknown" -- previously, we would print "iowait". Among other things, this avoids displaying "iowait" when the foreground process turns out to be suspended waiting for a debugger to properly attach.
* | Drop the sigacts mutex around calls to stopevent() to avoid sleepingrwatson2004-01-081-2/+10
| | | | | | | | | | | | | | | | | | holding the mutex. Because the sigacts pointer can't change while the process is "live" (proc locking (x)), we know our pointer is still valid. In communication with: truckman Reviewed by: jhb
* | - Enable recursive acquisition of the mutex synchronizing access to thealc2004-01-082-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | free pages queue. This is presently needed by contigmalloc1(). - Move a sanity check against attempted double allocation of two pages to the same vm object offset from vm_page_alloc() to vm_page_insert(). This provides better protection because double allocation could occur through a direct call to vm_page_insert(), such as that by vm_page_rename(). - Modify contigmalloc1() to hold the mutex synchronizing access to the free pages queue while it scans vm_page_array in search of free pages. - Correct a potential leak of pages by contigmalloc1() that I introduced in revision 1.20: We must convert all cache queue pages to free pages before we begin removing free pages from the free queue. Otherwise, if we have to restart the scan because we are unable to acquire the vm object lock that is necessary to convert a cache queue page to a free page, we leak those free pages already removed from the free queue.
* | Use the saved params for LBA-CHS conversion. Fixes PC98 bug.sos2004-01-081-4/+3
| |
* | Some integrated Davicom cards in sparc64 boxes have an all zerosmux2004-01-084-0/+54
| | | | | | | | | | | | | | | | | | | | MAC address in the EEPROM, and we need to get it from OpenFirmware. This isn't very pretty but time is lacking to do this in a better way this near 5.2-RELEASE. This is a RELENG_5_2 candidate. Original version by: Marius Strobl <marius@alchemy.franken.de> Tested by: Pete Bentley <pete@sorted.org> Reviewed by: jake
* | Limiters and sanity checks for TCP MSS (maximum segement size)andre2004-01-088-4/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resource exhaustion attacks. For network link optimization TCP can adjust its MSS and thus packet size according to the observed path MTU. This is done dynamically based on feedback from the remote host and network components along the packet path. This information can be abused to pretend an extremely low path MTU. The resource exhaustion works in two ways: o during tcp connection setup the advertized local MSS is exchanged between the endpoints. The remote endpoint can set this arbitrarily low (except for a minimum MTU of 64 octets enforced in the BSD code). When the local host is sending data it is forced to send many small IP packets instead of a large one. For example instead of the normal TCP payload size of 1448 it forces TCP payload size of 12 (MTU 64) and thus we have a 120 times increase in workload and packets. On fast links this quickly saturates the local CPU and may also hit pps processing limites of network components along the path. This type of attack is particularly effective for servers where the attacker can download large files (WWW and FTP). We mitigate it by enforcing a minimum MTU settable by sysctl net.inet.tcp.minmss defaulting to 256 octets. o the local host is reveiving data on a TCP connection from the remote host. The local host has no control over the packet size the remote host is sending. The remote host may chose to do what is described in the first attack and send the data in packets with an TCP payload of at least one byte. For each packet the tcp_input() function will be entered, the packet is processed and a sowakeup() is signalled to the connected process. For example an attack with 2 Mbit/s gives 4716 packets per second and the same amount of sowakeup()s to the process (and context switches). This type of attack is particularly effective for servers where the attacker can upload large amounts of data. Normally this is the case with WWW server where large POSTs can be made. We mitigate this by calculating the average MSS payload per second. If it goes below 'net.inet.tcp.minmss' and the pps rate is above 'net.inet.tcp.minmssoverload' defaulting to 1000 this particular TCP connection is resetted and dropped. MITRE CVE: CAN-2004-0002 Reviewed by: sam (mentor) MFC after: 1 day
* | Add the PCI ID for yet another bge chip: the Altima 1002.wpaul2004-01-082-0/+3
| | | | | | | | Submitted by: Pavel Gubin <pg@rainbow.ie.tusur.ru>
* | Add the NDISAPI option.wpaul2004-01-081-0/+1
| |
* | Always clean all files, including ones under ACPI_DEBUG when doing anjl2004-01-081-7/+9
| | | | | | | | "make clean".
* | * firewiresimokawa2004-01-083-18/+34
| | | | | | | | | | | | | | | | | | | | Add tcode_str[] and improve debug message. * sbp If max_speed is negative, use the maximum speed which the ohci chip supports. The default max_speed is -1. * if_fwe If tx_speed is negative, use the maximum speed which the ohci chip supports. The default tx_speed is 2.
* | If path mtu discovery is enabled set the DF bit in all cases weandre2004-01-082-0/+8
| | | | | | | | | | | | | | | | send packets on a tcp connection. PR: kern/60889 Tested by: Richard Wendland <richard@wendland.org.uk> Approved by: re (scottl)
* | Do not set the ip_id to zero when DF is set on packet andandre2004-01-081-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | restore the general pre-randomid behaviour. Setting the ip_id to zero causes several problems with packet reassembly when a device along the path removes the DF bit for some reason. Other BSD and Linux have found and fixed the same issues. PR: kern/60889 Tested by: Richard Wendland <richard@wendland.org.uk> Approved by: re (scottl)
* | Correct the definition of the ndis_miniport_interrupt structure:wpaul2004-01-083-10/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the ni_dpccountlock member is an ndis_kspin_lock, not an ndis_spin_lock (the latter is too big). Run if_ndis.c:ndis_tick() via taskqueue_schedule(). Also run ndis_start() via taskqueue in certain circumstances. Using these tweaks, I can now get the Broadcom BCM5701 NDIS driver to load and run. Unfortunately, the version I have seems to suffer from the same bug as the SMC 83820 driver, which is that it creates a spinlock during its DriverEntry() routine. I'm still debating the right way to deal with this.
* | The transmit frame status is stored in the last transmit descriptor for thetruckman2004-01-084-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | frame, not the first. It is probably also not safe to free the mbuf chain as soon as the OWN bit is cleared on the first descriptor since the chip may not be done copying the frame into the transmit FIFO. Revert the part of of busdma conversion (if_dc.c rev 1.115) which changed dc_txeof() to look for the status in the first descriptor and free the mbuf chain when processing the first descriptor for the frame, and revert the matching changes elsewhere in the driver. This part of the busdma change caused the driver to report spurious collisions and output errors, even when running in full-duplex mode. Reverting the mbuf chain handling slightly complicates dc_dma_map_txbuf(), since it is responsible for setting the OWN bits on the descriptors, but does not normally have direct access to the mbuf chain. Tested by: Dejan Lesjak <dejan.lesjak at ijs.si> alpha/<Intel 21143 10/100BaseTX> "Xin LI" <delphij at frontfree.net> i386/<Macronix 98713 10/100BaseTX> Wiktor Niesiobedzki <bsd at w.evip.pl> i386/<3Com OfficeConnect 10/100B> Reviewed by: mux
* | Remove extraneous unlock. This fixes a panic seen when manipulating staticsam2004-01-071-1/+1
| | | | | | | | entries in the ARP table.
* | Comsetic tweaks: use PCPU_GET(cpumask) and CPU_ABSENT().jhb2004-01-071-5/+5
| | | | | | | | Tested by: Dejan Lesjak <dejan.lesjak@ijs.si>
* | Correct and simplify the implementation of RtlEqualUnicodeString().wpaul2004-01-071-22/+23
| |
* | It appears drivers may call NdisWriteErrorLogEntry() with lockswpaul2004-01-071-3/+5
| | | | | | | | | | | | | | | | held. However, if we need to translate a unicode message table message, ndis_unicode_to_ascii() might malloc() some memory, which causes a warning from witness. Avoid this by using some stack space to hold the translated message. (Also bounds check to make sure we don't overrun the stack buffer.)
* | When draining the tx queue reclaim any node references held in packets.sam2004-01-071-1/+10
| | | | | | | | | | This fixes a problem when operating as an AP where clients would get stuck in the node table because the reference count never went to zero.
* | When ath_hal_stoptxdma returns an error dma is still likely stoppedsam2004-01-071-1/+1
| | | | | | | | | | so don't just stop trying to send a beacon frame or we'll be more likely to lose sync. This only seems to happen on some older chips.
* | use ath_reset instead of ath_init when recovering from a watchdog timeout:sam2004-01-071-1/+1
| | | | | | | | resetting the hardware is sufficient, no need to reset the 802.11 fsm
* | make hw.ath.debug a tunablesam2004-01-071-0/+1
| |
* | make hw.ath.outdoor and hw.ath.countrycode tunablessam2004-01-071-0/+2
| |
* | split debugging messages up into classes;sam2004-01-071-73/+109
| | | | | | | | ah_debug is now treated as a bit vector
* | Lock p->p_textvp before calling vn_fullpath() on it. Note therwatson2004-01-071-0/+2
| | | | | | | | | | | | | | | | potential lock order concern due to the vnode lock held simultaneously by the caller into procfs. Reported by: kuriyama Approved by: des
* | Fix a long-standing bug that had been introduced in rev 1.24 with thejoerg2004-01-071-1/+4
| | | | | | | | | | | | replacement of struct proc by struct thread. This bug could cause a NULL pointer dereferencation under certain circumstances (e. g. while running /etc/rc.d/pcvt).
* | Use atomic ops for the interlocked increment and decrement routineswpaul2004-01-072-14/+6
| | | | | | | | | | | | | | | | in subr_ndis and subr_ntoskrnl. This is faster and avoids potential LOR whinage from witness (an LOR couldn't happen with the old code since the interlocked inc/dec routines could not sleep with a lock held, but this will keep witness happy and it's more efficient anyway. I think.)
* | In subr_ndis.c: correct ndis_interlock_inc() and ndis_interlock_dec()wpaul2004-01-072-26/+14
| | | | | | | | | | | | | | | | | | | | | | | | so we increment the right thing. (All work and not enough parens make Bill something something...) This makes the RealTek 8139C+ driver work correctly. Also fix some mtx_lock_spin()s and mtx_unlock_spin()s that should have been just plain mtx_lock()s and mtx_unlock()s. In kern_ndis.c: remove duplicate code from ndis_send_packets() and just call the senddone handler (ndis_txeof()).
* | Enable the following TCP options by default to give it more exposure:andre2004-01-064-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | rfc3042 Limited retransmit rfc3390 Increasing TCP's initial congestion Window inflight TCP inflight bandwidth limiting All my production server have it enabled and there have been no issues. I am confident about having them on by default and it gives us better overall TCP performance. Reviewed by: sam (mentor)
* | According to RFC1812 we have to ignore ICMP redirects when weandre2004-01-061-1/+5
| | | | | | | | | | | | | | | | | | | | are acting as router (ipforwarding enabled). This doesn't fix the problem that host routes from ICMP redirects are never removed from the kernel routing table but removes the problem for machines doing packet forwarding. Reviewed by: sam (mentor)
* | Don't bother clearing PG_ZERO in contigmalloc1(), kmem_alloc(), oralc2004-01-062-3/+0
| | | | | | | | kmem_malloc(). It serves no purpose.
* | Remove `static' prototype from header file.nectar2004-01-061-1/+0
| |
* | - Use i8259A register defines from shared sys/dev/ic/i8259.h rather thanjhb2004-01-062-67/+20
| | | | | | | | | | | | from the i386-specific icu.h. - Replace PC98 magic numbers with equivalent register define values along with comments about PC-98 "quirks".
* | Use i8259A register defines from shared header sys/dev/ic/i8259.h insteadjhb2004-01-062-53/+4
| | | | | | | | of from the amd64-specific icu.h.
* | Add a header for the i8259A register definitions. This is based onjhb2004-01-061-0/+86
| | | | | | | | | | | | | | | | | | | | additions to sys/amd64/isa/icu.h from PIIX4 and other datasheets. I tweaked a few comments based on the NetBSD header of the same name when I merged the constants to sys/i386/isa/icu.h, but the vast majority of this file was created independently by Peter and not taken from any existing files. Submitted by: peter
* | Remove the AUTO_EOI_2 option for PC-98 as it has never done anything anywayjhb2004-01-062-8/+0
| | | | | | | | and was even commented out in NOTES.
* | Use ANSI C function definition for `_mcount' and remove `static'nectar2004-01-061-1/+0
| | | | | | | | | | | | prototype from header file. Discussed with: bde, maybe one year ago
* | Allow one to specify the com port settings for boot0sio.obrien2004-01-063-5/+11
| |
* | Clean up pe_get_message(). Allow the caller to obtain the resourcewpaul2004-01-063-28/+17
| | | | | | | | | | | | flag so that it can see if the message string is unicode or not and do the conversion itself rather than doing it in subr_pe.c. This prevents subr_pe.c from being dependent on subr_ndis.c.
* | Remove __P().simokawa2004-01-066-126/+126
| |
* | Fix register mis-alignment introduced in rev1.12.simokawa2004-01-061-33/+34
| |
OpenPOWER on IntegriCloud