ƒ¹157374 146 867 178 3623 177 139 138 242 132 128 267 4478 179 514 314 144 784 784 898 215 220 777 262 1268 191 158 158 156 210 331 274 272 531 511 167 446 426 496 148 183 395 465 322 174 107 350 144 157 159 185 207 581 241 136 310 236 193 168 177 645 505 183 176 228 545 266 822 314 129 280 160 127 1040 2026 202 485 320 314 229 175 132 153 151 141 119 232 130 216 302 176 612 156 139 164 136 140 296 415 286 160 259 492 140 249 204 226 938 193 310 188 167 270 638 698 224 187 166 190 428 282 392 243 2879 235 266 357 181 193 151 213 206 640 198 159 206 150 246 305 231 305 882 219 324 233 139 205 144 K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-01T16:20:54.000000Z K 7 svn:log V 770 Update in_pcb-derived basic socket types following changes to pru_abort(), pru_detach(), and in_pcbdetach(): - Universally support and enforce the invariant that so_pcb is never NULL, converting dozens of unnecessary NULL checks into assertions, and eliminating dozens of unnecessary error handling cases in protocol code. - In some cases, eliminate unnecessary pcbinfo locking, as it is no longer required to ensure so_pcb != NULL. For example, in protocol shutdown methods, and in raw IP send. - Abort and detach protocol switch methods no longer return failures, nor attempt to free sockets, as the socket layer does this. - Invoke in_pcbfree() after in_pcbdetach() in order to free the detached in_pcb structure for a socket. MFC after: 3 months END K 10 svn:author V 3 phk K 8 svn:date V 27 2006-04-01T16:34:45.000000Z K 7 svn:log V 86 Make WITHOUT_DYNAMICROOT=foo work again: remember to reference libbsdxml and libsbuf. END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-01T16:36:36.000000Z K 7 svn:log V 3525 Update TCP for infrastructural changes to the socket/pcb refcount model, pru_abort(), pru_detach(), and in_pcbdetach(): - Universally support and enforce the invariant that so_pcb is never NULL, converting dozens of unnecessary NULL checks into assertions, and eliminating dozens of unnecessary error handling cases in protocol code. - In some cases, eliminate unnecessary pcbinfo locking, as it is no longer required to ensure so_pcb != NULL. For example, the receive code no longer requires the pcbinfo lock, and the send code only requires it if building a new connection on an otherwise unconnected socket triggered via sendto() with an address. This should significnatly reduce tcbinfo lock contention in the receive and send cases. - In order to support the invariant that so_pcb != NULL, it is now necessary for the TCP code to not discard the tcpcb any time a connection is dropped, but instead leave the tcpcb until the socket is shutdown. This case is handled by setting INP_DROPPED, to substitute for using a NULL so_pcb to indicate that the connection has been dropped. This requires the inpcb lock, but not the pcbinfo lock. - Unlike all other protocols in the tree, TCP may need to retain access to the socket after the file descriptor has been closed. Set SS_PROTOREF in tcp_detach() in order to prevent the socket from being freed, and add a flag, INP_SOCKREF, so that the TCP code knows whether or not it needs to free the socket when the connection finally does close. The typical case where this occurs is if close() is called on a TCP socket before all sent data in the send socket buffer has been transmitted or acknowledged. If INP_SOCKREF is found when the connection is dropped, we release the inpcb, tcpcb, and socket instead of flagging INP_DROPPED. - Abort and detach protocol switch methods no longer return failures, nor attempt to free sockets, as the socket layer does this. - Annotate the existence of a long-standing race in the TCP timer code, in which timers are stopped but not drained when the socket is freed, as waiting for drain may lead to deadlocks, or have to occur in a context where waiting is not permitted. This race has been handled by testing to see if the tcpcb pointer in the inpcb is NULL (and vice versa), which is not normally permitted, but may be true of a inpcb and tcpcb have been freed. Add a counter to test how often this race has actually occurred, and a large comment for each instance where we compare potentially freed memory with NULL. This will have to be fixed in the near future, but requires is to further address how to handle the timer shutdown shutdown issue. - Several TCP calls no longer potentially free the passed inpcb/tcpcb, so no longer need to return a pointer to indicate whether the argument passed in is still valid. - Un-macroize debugging and locking setup for various protocol switch methods for TCP, as it lead to more obscurity, and as locking becomes more customized to the methods, offers less benefit. - Assert copyright on tcp_usrreq.c due to significant modifications that have been made as part of this work. These changes significantly modify the memory management and connection logic of our TCP implementation, and are (as such) High Risk Changes, and likely to contain serious bugs. Please report problems to the current@ mailing list ASAP, ideally with simple test cases, and optionally, packet traces. MFC after: 3 months END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-01T16:54:37.000000Z K 7 svn:log V 81 White space consistency with kasserts. Minor style tweaks. MFC after: 3 months END K 10 svn:author V 3 phk K 8 svn:date V 27 2006-04-01T18:11:42.000000Z K 7 svn:log V 47 Have WITHOUT_BIND_MTREE imply WITHOUT_BIND_ETC END K 10 svn:author V 3 phk K 8 svn:date V 27 2006-04-01T18:34:30.000000Z K 7 svn:log V 46 Overlooked that src.conf was built from here. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-01T19:04:54.000000Z K 7 svn:log V 146 Don't hold the hardware mutex across getc(). It can wait indefinitely for a character to be received. Instead let getc() do any necesary locking. END K 10 svn:author V 3 phk K 8 svn:date V 27 2006-04-01T19:06:54.000000Z K 7 svn:log V 40 Add missing #if's for NO_FLOATING_POINT END K 10 svn:author V 6 mjacob K 8 svn:date V 27 2006-04-01T19:49:55.000000Z K 7 svn:log V 33 Fix fat-fingered version define. END K 10 svn:author V 3 jmg K 8 svn:date V 27 2006-04-01T20:15:39.000000Z K 7 svn:log V 174 mask out any action when copying the flags from the event to the knote.. Pointed out by: Václav Haisman Submitted by: Dan Nelson (slightly modifed patch) MFC after: 3 days END K 10 svn:author V 3 hrs K 8 svn:date V 27 2006-04-01T20:55:21.000000Z K 7 svn:log V 4384 Massive update of the -HEAD release notes (round 1, until Feb 2006): acpi(4) HPET time counter support, acpi_ibm(4) fan control support, ddb(4) show lock, ddb(4) show sleepq, firmware(9) added, random(4) MPSAFE, new sysctl kern.sigqueue.queue_sigchild, brandinfo BI_CAN_EXEC_DYN flag, new sysctl kern.forcesigexit, RedZone, a buffer corruption protection for kernel's malloc(9), security.mac.biba.interfaces_equal for mac_biba, POSIX_TIMERS support updated to 200112L, initial support for POSIX message queue, Xbox support, DEFAULTS kernel configuration files for each arch, cardbus(4) /dev/cardbus%d.cis device node added, ce(4) for Cronyx Tau-PCI/32 added, ipmi(4), OpenIPMI (Intelligent Platform Management Interface) driver added, kbdmux(4) integrated into syscons(4) and kbd, uart(4) now in GENERIC kernel, uart(4) LOM and RSC support, snd_atiixp(4) added and suspend/resume support, snd_solo(4) MPSAFE, speaker(4) amd64 support, uaudio(4) 24/32 bit audio support, ath(4) updated to version 0.9.16.16, bge(4) Jumbo frame support, big-endian arch support, MPSAFE, em(4) updated to version 3.2.18, big-endian arch support, performance improvement, suspend/resume support, iwi(4) big-endian arch support, le(4) for AMD Am7900 LANCE added, myri10ge(4) for Myricom Myri10GE adapter added, nve(4) updated to version 1.0-0310, ti(4) big-endian arch support, ufoma(4) for FOMA 3G mobile phone in Japan added, vgapci(4) stub driver added, arp(8) retransmission algorithm revised, new sysctl net.link.ether.inet.log_arp_permanent_modify, support for -i with -d -a, an experimental BPF Just-In-Time compiler added, if_bridge(4) span ports support added, if_bridge(4) RFC 3378 EtherIP support, ipfw(4) now supports action argument substitution from table lookup, ng_bpf(4) BPF Just-In-Time compiler support, bug related to NFS over TCP reconnection fixed, IPV6_V6ONLY now works for UDP, amr(4) performance improvement, ioctl support for MegaRaid Tools, ata(4) DMA for kernel dump and dumping to ataraid(4) devices, ataraid(4) now supports JMicron ATA RAID metadata, gmirror and graid3 disconnect_on_failure sysctls added, g_md.ko renamed to geom_md.ko, mpt(4) SAS HBA and 64-bit PCI support, twa(4) updated to 9.3.0.1, geli(8) now allows loading keyfiles before root file system is mounted, initial support for SGI's XFS added, ACPI-CA updated to 20051021, DRM updated to 20051202, TrustedBSD OpenBSM version 1.0 alpha 5 imported, bsnmpd(1) Host Resources MIB in RFC 2790 support, config(8) "nocpu" directive added, config(8) now reads DEFAULT if any before the specified config file, csh(1) NLS catalog support, csup(1), CVSup-compatible client written in C imported, devd(8) -f option, ftpd(8) change related to PID file creation, gbde(8) -k and -K option, gpt(8) GPT partition label setting support, gvinum(8) now supports to move a subdisk between drives, GSS-API version 2 (RFC2743 and RFC2744) implemented, jail(8) -J option, kdump(1) -H and -s option, kgdb(1) -w option, libarchive(3) tp format support, ln(1) -F option, locate(1) -I option, mdmfs(8) -P and -E option, mergemaster(8) -A option, mount(8) "nodev" option removed, netstat(1) IPsec protocol stats support, periodic(8) daily gmirror, graid3, gstripe, gconcat support, pkill(1) -I option, rfcomm_pppd(8) -c servicename support, rtld(1) ELF symbol versioning support, sh(1) "times" built-in command support, truss(1) -s option, truss(1) now works on FreeBSD/ppc, usbd(8) removed in favor of devd(8), xargs(1) -r option, rc.d/auditd added, rc.d/bluetooth, rc.d/hcsecd, rc.d/sdpd added, rc.d/ftpd added, rc.d/hostapd added, rc.d/netif ipv4_addrs_ support, rc.d/rcconf.sh removed and early_late_divider variable added, rc.initdiskless now uses tar(1) instead of pax(1), rc.d/pccard removed, rc.d/ppp-user added (renamed from ppp), removable_interfaces variable removed, bsnmpd updated from 1.11 to 1.12, pkg_add(1) -P option, pkg_add(1) and pkg_create(1) -K option, pkg_create(1) -x, -E, and -G options, local_startup directory now evaluated by rcorder(8) with scripts in the base system, suffix of startup scripts removed, variables "ldconfig_local_dirs" and "ldconfig_local32_dirs" added, @cwd in pkg-plist now allows no directory argument, and CHECKSUM.MD5's checksum in CHECKSUM.MD5 problem fixed. END K 10 svn:author V 6 scottl K 8 svn:date V 27 2006-04-01T21:19:15.000000Z K 7 svn:log V 84 Saying that asr(4) has a maintainer is like saying that a politician has integrity. END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-01T23:53:25.000000Z K 7 svn:log V 417 Properly handle an edge case previously not handled correctly: a socket can have a tcp connection that has entered time wait attached to it, in the event that shutdown() is called on the socket and the FINs properly exchange before close(). In this case we don't detach or free the inpcb, just leave the tcptw detached and freed, but we must release the inpcb lock (which we didn't previously). MFC after: 3 months END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-02T00:07:38.000000Z K 7 svn:log V 217 Add a short regression test that triggers a TCP socket to enter time wait while the socket is still open; one variant closes the socket while in time wait, and a second lets time wait expire while the socket is open. END K 10 svn:author V 3 sam K 8 svn:date V 27 2006-04-02T00:14:57.000000Z K 7 svn:log V 52 backout taskqueue changes Approved by: re (scottl) END K 10 svn:author V 3 cel K 8 svn:date V 27 2006-04-02T04:11:23.000000Z K 7 svn:log V 691 If an NFS server returns more than a few EJUKEBOX errors for a given RPC request, the FreeBSD NFS client will quickly back off to a excessively long wait (days, then weeks) before retrying the request. Change the behavior of the FreeBSD NFS client to match the behavior of the reference NFS client implementation (Solaris). This provides a fixed delay of 10 seconds between each retry by default. A sysctl, called nfs3_jukebox_delay, is now available to tune the delay. Unlike Solaris, the sysctl value on FreeBSD is in seconds, rather than in HZ. MFC revision 1.136 to RELENG_6 Sponsored by: Network Appliance, Incorporated Reviewed by: rick Approved by: re (kensmith), silby END K 10 svn:author V 3 cel K 8 svn:date V 27 2006-04-02T04:15:34.000000Z K 7 svn:log V 691 If an NFS server returns more than a few EJUKEBOX errors for a given RPC request, the FreeBSD NFS client will quickly back off to a excessively long wait (days, then weeks) before retrying the request. Change the behavior of the FreeBSD NFS client to match the behavior of the reference NFS client implementation (Solaris). This provides a fixed delay of 10 seconds between each retry by default. A sysctl, called nfs3_jukebox_delay, is now available to tune the delay. Unlike Solaris, the sysctl value on FreeBSD is in seconds, rather than in HZ. MFC revision 1.136 to RELENG_5 Sponsored by: Network Appliance, Incorporated Reviewed by: rick Approved by: re (kensmith), silby END K 10 svn:author V 3 cel K 8 svn:date V 27 2006-04-02T04:24:57.000000Z K 7 svn:log V 805 rick says: The following bug was just identified in OpenBSD and it looks like the same bug exists in the other BSDen NFS servers. A Linux client (don't know which version, but you can look at http://bugzilla.kernel.org/show_bug.cgi?id=6256) does a Setattr of mtime to the server's time, where the file is mode 0664 and the client user has group access (ie. caller is not the file owner). The BSD servers fail the Setattr with EPERM, since the VA_UTIMES_NULL flag isn't set before doing the VOP_SETATTR. It seems to me that this should be allowed, since it is allowed for a local utimes(2). If so, the fix is to set VA_UTIMES_NULL for the "set-time-to-server-time" cases of setting atime and/or mtime. Submitted by: rick@snowhite.cis.uoguelph.ca Reviewed by: cel Approved by: silby MFC after: 1 week END K 10 svn:author V 7 thompsa K 8 svn:date V 27 2006-04-02T04:41:53.000000Z K 7 svn:log V 118 MFC r1.57-58 Use m_dup rather than m_copypacket as we need a writable mbuf On behalf of: rik Approved by: re (hrs) END K 10 svn:author V 7 thompsa K 8 svn:date V 27 2006-04-02T04:42:37.000000Z K 7 svn:log V 123 MFC r1.57-58 Use m_dup rather than m_copypacket as we need a writable mbuf On behalf of: rik Approved by: re (hrs) END K 10 svn:author V 3 alc K 8 svn:date V 27 2006-04-02T05:45:05.000000Z K 7 svn:log V 684 Introduce pmap_try_insert_pv_entry(), a function that conditionally creates a pv entry if the number of entries is below the high water mark for pv entries. Use pmap_try_insert_pv_entry() in pmap_copy() instead of pmap_insert_entry(). This avoids possible recursion on a pmap lock in get_pv_entry(). Eliminate the explicit low-memory checks in pmap_copy(). The check that the number of pv entries was below the high water mark was largely ineffective because it was located in the outer loop rather than the inner loop where pv entries were allocated. Instead of checking, we attempt the allocation and handle the failure. Reviewed by: tegge Reported by: kris MFC after: 5 days END K 10 svn:author V 8 kientzle K 8 svn:date V 27 2006-04-02T07:13:11.000000Z K 7 svn:log V 164 If you see a broken symlink, don't try to follow it, just archive it as a symlink, even if -h was specified. Thanks to: Jin Guojun PR: bin/95175 MFC After: 1 week END K 10 svn:author V 3 hrs K 8 svn:date V 27 2006-04-02T07:56:48.000000Z K 7 svn:log V 1174 Update release notes (round 2, until Mar 2006): file descriptor handling bug fixed, support for copying console messages to remote gdb(1), kbdmux(4) now in GENERIC by default, scc(4) for generic serial devices added, net.inet.ip.portrange.reserved[high|low] for IPv6, ata(4) USB mass storage class support, gmirror kernel crash dump support, gmirror and graid3 parallel I/O request support, mfi(4) for LSI MegaRAID SAS controller family added, getfacl(1) -q option added, gvinum(8) resetconfig sub-command support, libarchive(3) tp format support removed, libarchive(3) POSIX.1e EA support added, libc symbol map added, libm symbol map added, ls(1) -U option added, mdconfig(8) XML device listing support, mdconfig(8) -u option now supports comma-separated multiple devices, BIND9 DNS resolver library imported, strtonum(3) from OpenBSD, rc.d/ike removed, GNU Readline library updated to 5.1, OpenSSH updated to 4.3p1, hostapd updated to 0.4.8, WPA supplicant updated to 0.4.8, zlib updated to 1.2.3, pkg_add(1) -F option added, portsnap(1) HTTP_PROXY_AUTH handling bug fixed, "make showconfig" in src/Makefile added, and /etc/src.conf added. END K 10 svn:author V 3 hrs K 8 svn:date V 27 2006-04-02T08:07:14.000000Z K 7 svn:log V 99 MFC: Fix version number when the feature was added. Spotted by: ceri Approved by: re (implicitly) END K 10 svn:author V 3 jmg K 8 svn:date V 27 2006-04-02T08:22:43.000000Z K 7 svn:log V 66 MFC: kern_event.c v1.96 fix race condition Approved by: re (hrs) END K 10 svn:author V 3 jmg K 8 svn:date V 27 2006-04-02T08:24:47.000000Z K 7 svn:log V 66 MFC: uart.4 v1.9 document uart's dev files Approved by: re (hrs) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-02T10:50:46.000000Z K 7 svn:log V 60 Add makefile for tcpsocktimewait missed in previous commit. END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-02T11:03:05.000000Z K 7 svn:log V 113 Pass the right pid into the parent and child tasks so that when a test fails, we kill the right partner process. END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-02T11:09:37.000000Z K 7 svn:log V 234 When running the second part of the test, kill off the server process from the first part before starting, or the TCP port we want to bind may be in use still. Sleep for a short period between tests. Use SIGTERM instead of SIGKILL. END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-02T11:10:38.000000Z K 7 svn:log V 177 Merge if_ppp.c:1.113 from HEAD to RELENG_6: Add IFF_NEEDSGIANT to kernel PPP support. I have no idea why this wasn't here, but it should have been. Approved by: re (hrs) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-02T11:14:10.000000Z K 7 svn:log V 175 Merge if_ppp.c:113 from HEAD to RELENG_5: Add IFF_NEEDSGIANT to kernel PPP support. I have no idea why this wasn't here, but it should have been. Approved by: re (hrs) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-02T11:15:52.000000Z K 7 svn:log V 434 Merge ipsec.c:1.44 from HEAD to RELENG_5: Remove manual assignment of m_pkthdr from one mbuf to another in ipsec_copypkt(), as this is already handled by the call to M_MOVE_PKTHDR(), which also knows how to correctly handle MAC m_tags. This corrects a panic when running with MAC and KAME IPSEC. PR: kern/94599 Submitted by: zhouyi zhou Reviewed by: bz Approved by: re (mux) END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2006-04-02T12:52:16.000000Z K 7 svn:log V 415 - Teach pmcstat(8) to log over the network; the -O option now takes a host:port specification. - Update the manual page and add an example showing how log over the network using pmcstat(8) and nc(1). Document the current inability to process logs in cross-platform manner. - Have pmcstat_open_log() call err(3) directly in case of an error; this simplifies error handling in its caller. MFC after: 1 week END K 10 svn:author V 7 delphij K 8 svn:date V 27 2006-04-02T14:14:37.000000Z K 7 svn:log V 71 MFen 1.903 -> 1.907 Obtained from: FreeBSD Simplified Chinese Project END K 10 svn:author V 3 hrs K 8 svn:date V 27 2006-04-02T14:25:12.000000Z K 7 svn:log V 353 Fix typos and the following incorrect entries: kbdmux(4) GENERIC support currently in amd64 and i386 only[1], uart(4) GENERIC support currently not in pc98[1], speaker(4) on amd64 entry needs arch="amd64"[2], hptmv(4) update entry needs arch="amd64,i386"[2], and OpenSSH 4.3p1 import has not been merged yet[2]. Spotted by: nyan[1] and delphij[2] END K 10 svn:author V 3 hrs K 8 svn:date V 27 2006-04-02T14:53:28.000000Z K 7 svn:log V 333 New release notes: hwpmc(4) and pmcstat(8) profiling support for dynamically-loaded objects, and pmcstat(8) network logging support added[1]. Fix incorrect entries: gmirror/graid3 uses parallel I/O request for synchronization now. The parallel I/O request itself has been already supported[2]. Spotted by: jkoshy[1] and pjd[2] END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-02T16:42:51.000000Z K 7 svn:log V 399 During reformulation of tcp_usr_detach(), the call to initiate TCP disconnect for fully connected sockets was dropped, meaning that if the socket was closed while the connection was alive, it would be leaked. Structure tcp_usr_detach() so that there are two clear parts: initiating disconnect, and reclaiming state, and reintroduce the tcp_disconnect() call in the first part. MFC after: 3 months END K 10 svn:author V 3 hrs K 8 svn:date V 27 2006-04-02T18:26:48.000000Z K 7 svn:log V 56 Fix a typo: s/&man.rfcomm.pppd.8;/&man.rfcomm.sppd.1;/. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-02T18:39:59.000000Z K 7 svn:log V 88 MFC rev. 1.109: In afd_describe(), don't initialize sizestring. Approved by: re (hrs@) END K 10 svn:author V 7 stefanf K 8 svn:date V 27 2006-04-02T18:43:33.000000Z K 7 svn:log V 298 Use -s to flag POSIX's "special built-in" utilities in builtins.def. Add a new member to struct builtincmd and set it to 1 if -s was specified. This is done because there are cases where special builtins must be treated differently from other builtins. Obtained from: NetBSD (builtins.def part) END K 10 svn:author V 7 stefanf K 8 svn:date V 27 2006-04-02T18:51:32.000000Z K 7 svn:log V 368 Issue an error when . (dot) is invoked without a filename. The synopsis is just ". file" according to POSIX, however many other shells allow arguments to be passed after the file. For compatibility (we even use that feature in buildworld) additional arguments are not considered to be an error, even though this shell does not do anything with the arguments at all. END K 10 svn:author V 7 stefanf K 8 svn:date V 27 2006-04-02T19:02:49.000000Z K 7 svn:log V 225 Add test cases that check utility syntax errors and redirection errors. For special built-in utilities they must terminate the shell, for other utilities only a error message shall be written. We currently fail both tests. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-02T20:59:40.000000Z K 7 svn:log V 79 Remove uart(4) as it's supported on all architectures and that is the default. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-02T21:00:17.000000Z K 7 svn:log V 12 Add scc(4). END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-02T21:45:54.000000Z K 7 svn:log V 254 Eliminate the sc_hasfifo flag from the softc. It was only used by the NS8250 class driver. The UART has FIFOs if sc_rxfifosz>1, so test for that instead. While here properly initialize sc_rxfifosz and sc_txfifosz in the case the UART doesn't have FIFOs. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-02T21:50:45.000000Z K 7 svn:log V 49 Don't claim a SAB82532. We have scc(4) for that. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-02T21:58:09.000000Z K 7 svn:log V 62 Remove unused variable 'error'. Forgotten in previous commit. END K 10 svn:author V 7 thompsa K 8 svn:date V 27 2006-04-02T23:55:05.000000Z K 7 svn:log V 63 Fix the build. Pointy hat: thompsa Approved by: re (implicit) END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-03T04:34:47.000000Z K 7 svn:log V 90 MFC 1.10: On ia64, the unaligned_print sysctl is a debugging knob. Approved by: re (hrs) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-03T09:01:17.000000Z K 7 svn:log V 110 Correct incorrect assertion in div_bind(): inp must not be NULL here. Reported by: tegge MFC after: 3 months END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-03T09:52:55.000000Z K 7 svn:log V 484 After checking for SO_ISDISCONNECTED in tcp_usr_accept(), return immediately rather than jumping to the normal output handling, which assumes we've pulled out the inpcb, which hasn't happened at this point (and isn't necessary). Return ECONNABORTED instead of EINVAL when the inpcb has entered INP_TIMEWAIT or INP_DROPPED, as this is the documented error value. This may correct the panic seen by Ganbold. MFC after: 1 month Reported by: Ganbold END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-03T10:08:35.000000Z K 7 svn:log V 144 Add a regression test to exercise the case where accept() is called and the next waiting socket has had a close on the remote endpoint already. END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-03T11:34:36.000000Z K 7 svn:log V 40 Add regression test for tcpdrop sysctl. END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-03T11:57:12.000000Z K 7 svn:log V 213 Fix up locking surrounding tcp_drop sysctl: in the new world order, we don't free inpcbs until after the socket is closed, so we always need to unlock an inpcb after calling tcp_drop() on it. MFC after: 3 months END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-03T11:57:41.000000Z K 7 svn:log V 139 Add a second pass to the close-before-accept test using a call to the tcp drop sysctl. This should exercise the ECONNABORTED accept case. END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-03T12:43:56.000000Z K 7 svn:log V 97 Clarify comment on handling of non-timewait TCP states in tcp_usr_detach(). MFC after: 3 months END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-03T12:52:13.000000Z K 7 svn:log V 72 Update comment on tcp_close() for new world order. MFC after: 3 months END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-03T12:59:27.000000Z K 7 svn:log V 81 Style tweaks: convert to ANSI from K&R function prototypes. MFC after: 3 months END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-03T13:33:55.000000Z K 7 svn:log V 548 Change inp_ppcb from caddr_t to void *, fix/remove associated related casts. Consistently use intotw() to cast inp_ppcb pointers to struct tcptw * pointers. Consistently use intotcpcb() to cast inp_ppcb pointers to struct tcpcb * pointers. Don't assign tp to the results to intotcpcb() during variable declation at the top of functions, as that is before the asserts relating to locking have been performed. Do this later in the function after appropriate assertions have run to allow that operation to be conisdered safe. MFC after: 3 months END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-03T14:07:50.000000Z K 7 svn:log V 408 In TCP notify routines, check inpcb for INP_TIMEWAIT and INP_DROPPED. The INP_DROPPED check replaces the current NULL checks; the INP_TIMEWAIT checks appear to have always been required, but not been there, which is/was a bug. This avoids unconditionally casting of in_ppcb to a tcpcb, when it may be a twtcb, which may have resulted in obscure ICMP-related panics in earlier releases. MFC after: 3 months END K 10 svn:author V 3 sam K 8 svn:date V 27 2006-04-03T17:18:22.000000Z K 7 svn:log V 91 MFC 1.37: stop device so we don't panic on card removal when active Approved by: re (hrs) END K 10 svn:author V 3 sam K 8 svn:date V 27 2006-04-03T17:21:05.000000Z K 7 svn:log V 84 MFC 1.46: implement set(IEEE80211_IOC_STA_STATS) for hostapd Approved by: re (hrs) END K 10 svn:author V 5 ariff K 8 svn:date V 27 2006-04-03T17:37:27.000000Z K 7 svn:log V 133 Add device ID for nForce 410 MCP audio controller. PR: kern/95257 Submitted by: cenix MFC after: 3 days END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-03T17:48:09.000000Z K 7 svn:log V 449 Replace critical_enter() and critical_exit() in kdb_trap() with intr_disable() and intr_restore() resp. Previously, critical regions would have interrupts disabled, but that was changed. Consequently, the debugger could run with interrupts enabled. This could cause problems for the low-level console code where received characters would trigger an interrupt that causes the interrupt handler to read the character instead of the cngetc() function. END K 10 svn:author V 3 sam K 8 svn:date V 27 2006-04-03T18:14:02.000000Z K 7 svn:log V 173 o add opt_ath.h enable tweaking various config parameters for the driver without modifying the source code o default debug msgs and diag support to off MFC after: 3 days END K 10 svn:author V 8 netchild K 8 svn:date V 27 2006-04-03T18:42:44.000000Z K 7 svn:log V 724 Milosz (sorry for not using the right 'l', it will not display corretly in the commit log) submitted support for some NO_* knobs for delete-old* and check-old. I converted it to the new WITHOUT_* knobs (more correctly: MK_*) and added some dummy ones so that people can see what's missing. Volunteers can have a look at http://phk.freebsd.dk/misc/build_options/ for a list of files. The location looks a little bit odd to me, but I don't care about the color of this bikeshed and follow the suggestion of our build infrastructure guru to place it "somewhere under src/tools/ please". [1] The build/mk/ directory looks more sane to me than the other ones there. Submitted by: milosz.galazka@gmail.com Suggested by: ru [1] END K 10 svn:author V 4 ceri K 8 svn:date V 27 2006-04-03T20:36:37.000000Z K 7 svn:log V 220 Add -Btime, -Bnewer, -Bmin, -newerB[Bacmt], -newer[acmt]B options to work with the st_birthtime field of struct stat. 'B' has been chosen to match the format specifier from stat(1). Approved by: jhb MFC after: 2 weeks END K 10 svn:author V 4 ceri K 8 svn:date V 27 2006-04-03T20:53:34.000000Z K 7 svn:log V 36 Bump .Dd for the birthtime options. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-03T20:55:52.000000Z K 7 svn:log V 184 In kdb_trap(), change the type of the local variable 'intr' from int to register_t, as intr_disable() returns the latter and register_t may be wider than int. Pointed out by: marius@ END K 10 svn:author V 5 peter K 8 svn:date V 27 2006-04-03T21:16:10.000000Z K 7 svn:log V 66 Remove the unused sva and eva arguments from pmap_remove_pages(). END K 10 svn:author V 5 peter K 8 svn:date V 27 2006-04-03T21:17:36.000000Z K 7 svn:log V 33 Update pmap_remove_pages(9) doc. END K 10 svn:author V 6 marius K 8 svn:date V 27 2006-04-03T21:27:01.000000Z K 7 svn:log V 944 - s,tramoline,trampoline, in a comment. - Use FBSDID in trap.c - Make the global trap_sig[] static as it's not used outside of trap.c. - In sendsig() remove an unused variable. - In trap() sync with the other archs; for fast data access MMU miss and data access protection traps set ksi_addr to the SFAR reg which contains the faulting address and otherwise to the TPC reg. Generally the TCP reg contains the address of the instruction that caused the exception, except for fast instruction access traps (and some others; more refinement may be needed here) it also contains the faulting address. Previously sendsig() always set si_addr to the SFAR reg which is wrong for most traps. - In sendsig() add support for FreeBSD old-style signals. These changes are inspired by kmacy's sun4v changes and allow libsigsegv to build on FreeBSD/sparc64, but it doesn't pass all checks and tests it actually should, yet. MFC after: 5 days END K 10 svn:author V 5 peter K 8 svn:date V 27 2006-04-03T21:36:01.000000Z K 7 svn:log V 1930 Shrink the amd64 pv entry from 48 bytes to about 24 bytes. On a machine with large mmap files mapped into many processes, this saves hundreds of megabytes of ram. pv entries were individually allocated and had two tailq entries and two pointers (or addresses). Each pv entry was linked to a vm_page_t and a process's address space (pmap). It had the virtual address and a pointer to the pmap. This change replaces the individual allocation with a per-process allocation system. A page ("pv chunk") is allocated and this provides 168 pv entries for that process. We can now eliminate one of the 16 byte tailq entries because we can simply iterate through the pv chunks to find all the pv entries for a process. We can eliminate one of the 8 byte pointers because the location of the pv entry implies the containing pv chunk, which has the pointer. After overheads from the pv chunk bitmap and tailq linkage, this works out that each pv entry has an effective size of 24.38 bytes. Future work still required, and other problems: * when running low on pv entries or system ram, we may need to defrag the chunk pages and free any spares. The stats (vm.pmap.*) show that this doesn't seem to be that much of a problem, but it can be done if needed. * running low on pv entries is now a much bigger problem. The old get_pv_entry() routine just needed to reclaim one other pv entry. Now, since they are per-process, we can only use pv entries that are assigned to our current process, or by stealing an entire page worth from another process. Under normal circumstances, the pmap_collect() code should be able to dislodge some pv entries from the current process. But if needed, it can still reclaim entire pv chunk pages from other processes. * This should port to i386 really easily, except there it would reduce pv entries from 24 bytes to about 12 bytes. (I have integrated Alan's recent changes.) END K 10 svn:author V 5 tegge K 8 svn:date V 27 2006-04-03T22:23:23.000000Z K 7 svn:log V 107 Eliminate softdep_flush() livelock by accounting for number of worklist items marked as being in progress. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-03T22:51:47.000000Z K 7 svn:log V 389 Eliminate HAVE_STOPPEDPCBS. On ia64 the PCPU holds a pointer to the PCB in which the context of stopped CPUs is stored. To access this PCB from KDB, we introduce a new define, called KDB_STOPPEDPCB. The definition, when present, lives in and abstracts where MD code saves the context. Define KDB_STOPPEDPCB on i386, amd64, alpha and sparc64 in accordance to previous code. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-03T23:56:40.000000Z K 7 svn:log V 224 Improve handling of IPI_STOP: o use atomic operations to fiddle with stopped_cpus and started_cpus. o disable interrupts while we're waiting to be started. o remove logic relating to cpustop_restartfunc as it's not used. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-04T00:40:20.000000Z K 7 svn:log V 218 Increment kdb_active after we stopped the other CPUs and decrement kdb_active before we restart them. This avoids false positives on restarted CPUs when they test for kdb_active while kdb_trap() is still finishing up. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-04T01:16:16.000000Z K 7 svn:log V 133 In z8530_divisor() return 0 if the calculated divisor is less than 0. This happens when the baudrate is too high for the given RCLK. END K 10 svn:author V 3 njl K 8 svn:date V 27 2006-04-04T02:22:38.000000Z K 7 svn:log V 83 Fix an off-by-one error in the port range detection. Cleanup some old whitespace. END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2006-04-04T02:26:45.000000Z K 7 svn:log V 37 Freshen a comment. Reviewed by: jhb END K 10 svn:author V 2 ps K 8 svn:date V 27 2006-04-04T02:36:04.000000Z K 7 svn:log V 62 Add support for Intel cpu model's 5 & 6. Approved by: jkoshy END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-04T02:44:51.000000Z K 7 svn:log V 56 The PC is register 16, not 18. Pointed out by: grehan@ END K 10 svn:author V 7 davidxu K 8 svn:date V 27 2006-04-04T02:57:09.000000Z K 7 svn:log V 45 WARNS level 4 cleanup, still has work to do. END K 10 svn:author V 7 davidxu K 8 svn:date V 27 2006-04-04T02:57:49.000000Z K 7 svn:log V 23 WARNS level 4 cleanup. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-04T03:00:20.000000Z K 7 svn:log V 136 Sync with i386: Map exceptions to signals in gdb_cpu_signal() so that kgdb(1) gets a SIGTRAP when it needs to. Pointed out by: grehan@ END K 10 svn:author V 3 gnn K 8 svn:date V 27 2006-04-04T03:12:21.000000Z K 7 svn:log V 38 Remove unintended DEBUG flag setting. END K 10 svn:author V 6 scottl K 8 svn:date V 27 2006-04-04T03:24:49.000000Z K 7 svn:log V 120 Add the MFI driver. Thanks to IronPort Systems, Dell, and Yahoo for their contributions towards this. Approved by: re END K 10 svn:author V 7 davidxu K 8 svn:date V 27 2006-04-04T03:26:06.000000Z K 7 svn:log V 205 Simplify _get_curthread() and _tcb_ctor because libc and rtld now already allocate thread pointer space in tls block for initial thread. Only i386 and amd64 have been done, others still have to be tested. END K 10 svn:author V 7 davidxu K 8 svn:date V 27 2006-04-04T03:35:26.000000Z K 7 svn:log V 80 Remove declaration of _thr_initial from MD header file, it is no longer needed. END K 10 svn:author V 6 jasone K 8 svn:date V 27 2006-04-04T03:51:47.000000Z K 7 svn:log V 516 Refactor per-run bitmap manipulation functions so that bitmap offsets only have to be calculated once per allocator operation. Make nil const. Update various comments. Remove/avoid division where possible. For the one division operation that remains in the critical path, add a switch statement that has a case for each small size class, and do division with a constant divisor in each case. This allows the compiler to generate optimized code that does not use hardware division [1]. Obtained from: peter [1] END K 10 svn:author V 6 scottl K 8 svn:date V 27 2006-04-04T04:08:07.000000Z K 7 svn:log V 61 Hook the MFI driver up to the kernel build. Approved by: re END K 10 svn:author V 6 scottl K 8 svn:date V 27 2006-04-04T04:11:55.000000Z K 7 svn:log V 44 The MFI driver appears first in FreeBSD 6.1 END K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 2006-04-04T04:11:56.000000Z K 7 svn:log V 68 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. END K 10 svn:author V 6 scottl K 8 svn:date V 27 2006-04-04T04:14:09.000000Z K 7 svn:log V 41 Add the mfi.4 man page. Approved by: re END K 10 svn:author V 6 scottl K 8 svn:date V 27 2006-04-04T04:39:35.000000Z K 7 svn:log V 45 Teach sysinstall about MFI. Approved by: re END K 10 svn:author V 4 jeff K 8 svn:date V 27 2006-04-04T06:44:21.000000Z K 7 svn:log V 202 - Properly check against B_DELWRI and B_NEEDSGIANT. This check was incorrectly written and caused some !NEEDSGIANT buffers to be put in the NEEDSGIANT queue. Sponsored by: Isilon Systems, Inc. END K 10 svn:author V 4 jeff K 8 svn:date V 27 2006-04-04T06:46:10.000000Z K 7 svn:log V 321 - VFS_LOCK_GIANT when recycling a vnode via getnewvnode. We may be recycling for an unrelated filesystem. I really don't like potentially acquiring giant in the context of a giantless filesystem but there are reasonable objections to removing the recycling from this path. Sponsored by: Isilon Systems, Inc. END K 10 svn:author V 2 dd K 8 svn:date V 27 2006-04-04T10:11:15.000000Z K 7 svn:log V 194 Remove unused variables s and error in key_detach. The previous revision removed their usage but did not remove the declaration. This caused a warning in my build, which was fatal with -Werror. END K 10 svn:author V 4 ceri K 8 svn:date V 27 2006-04-04T10:20:16.000000Z K 7 svn:log V 67 Note that all of the birthtime related primaries are non-standard. END K 10 svn:author V 3 flz K 8 svn:date V 27 2006-04-04T10:52:15.000000Z K 7 svn:log V 166 - Sync rc.subr with NetBSD. - Merge some documentation bits. Reviewed by: brooks, simon (doc) Approved by: cperciva (mentor) Obtained from: NetBSD MFC after: 3 days END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2006-04-04T12:26:07.000000Z K 7 svn:log V 395 Before dereferencing intotw() when INP_TIMEWAIT, check for inp_ppcb being NULL. We currently do allow this to happen, but may want to remove that possibility in the future. This case can occur when a socket is left open after TCP wraps up, and the timewait state is recycled. This will be cleaned up in the future. Found by: Kazuaki Oda MFC after: 3 months END K 10 svn:author V 5 jmelo K 8 svn:date V 27 2006-04-04T13:06:21.000000Z K 7 svn:log V 46 - Add my birthday Approved by: mnag (mentor) END K 10 svn:author V 7 glebius K 8 svn:date V 27 2006-04-04T14:24:03.000000Z K 7 svn:log V 152 To fix build of newer RELENG_6 on older ones, add gensnmptree to the list of bootstrap-tools. Submitted by: ru Tested by: osa Approved by: re (scottl) END K 10 svn:author V 3 flz K 8 svn:date V 27 2006-04-04T14:28:41.000000Z K 7 svn:log V 111 MFC: - Replace awk parts with shell. src/etc/rc.d/nsswitch: rev 1.5 -> 1.6 Approved by: re (scottl) END K 10 svn:author V 7 glebius K 8 svn:date V 27 2006-04-04T14:31:37.000000Z K 7 svn:log V 129 Add a tunable net.inet.tcp.maxtcptw, that allows to set a limit on tcptw zone independently from setting a limit on socket zone. END K 10 svn:author V 3 cel K 8 svn:date V 27 2006-04-04T15:29:51.000000Z K 7 svn:log V 845 rick says: The following bug was just identified in OpenBSD and it looks like the same bug exists in the other BSDen NFS servers. A Linux client (don't know which version, but you can look at http://bugzilla.kernel.org/show_bug.cgi?id=6256) does a Setattr of mtime to the server's time, where the file is mode 0664 and the client user has group access (ie. caller is not the file owner). The BSD servers fail the Setattr with EPERM, since the VA_UTIMES_NULL flag isn't set before doing the VOP_SETATTR. It seems to me that this should be allowed, since it is allowed for a local utimes(2). If so, the fix is to set VA_UTIMES_NULL for the "set-time-to-server-time" cases of setting atime and/or mtime. MFC of revision 1.140 to RELENG_6. Submitted by: rick@snowhite.cis.uoguelph.ca Reviewed by: cel Approved by: re (scottl), silby END K 10 svn:author V 3 sos K 8 svn:date V 27 2006-04-04T16:07:42.000000Z K 7 svn:log V 100 MFC: Make the ATAPI sense data accessible when using the ioctl interface Approved by: re@ (scottl) END K 10 svn:author V 4 emax K 8 svn:date V 27 2006-04-04T17:03:44.000000Z K 7 svn:log V 216 MFC: Add kbdmux(4) to GENERIC on i386 and amd64. Remove the USB keyboard hack now that KBDMUX is enabled by default. Allow it to be disabled if Safe Mode is selected. Requested by: scottl Approved by: re (scottl) END K 10 svn:author V 3 imp K 8 svn:date V 27 2006-04-04T17:08:40.000000Z K 7 svn:log V 96 Replace hard coded '0' with symbolic constant IIC_UNKNOWN to reflect what we're actually doing. END K 10 svn:author V 7 delphij K 8 svn:date V 27 2006-04-04T17:17:33.000000Z K 7 svn:log V 71 MFen 1.907 -> 1.910 Obtained from: FreeBSD Simplified Chinese Project END K 10 svn:author V 5 ariff K 8 svn:date V 27 2006-04-04T17:23:24.000000Z K 7 svn:log V 175 MFC (revision 1.39) Recover (?) support for AD1815 based ISA soundcards. PR: kern/94388 Submitted by: Krzysztof Kotlenga Approved by: re (scottl) END K 10 svn:author V 5 ariff K 8 svn:date V 27 2006-04-04T17:24:33.000000Z K 7 svn:log V 543 MFC (revision 1.6) Misc. fixups: - [1] Make the driver friendly towards kernel without PREEMPTION. Use msleep(9) instead of simple unlock-check_variable-lock mechanisme since the later not really effective in non-preemptible kernel (especially during codec detection routine). - Free most driver resources in a sane manner to avoid possible double free and panics especially during device detach and codec detection failure. Approved by: re (scottl) [1] http://lists.freebsd.org/pipermail/freebsd-questions/2006-March/116515.html END K 10 svn:author V 5 ariff K 8 svn:date V 27 2006-04-04T17:27:57.000000Z K 7 svn:log V 603 MFC (revision 1.63) Don't set primary resume interrupt flag during channel initialization since it can cause high interrupt rate (storm) and slowdown the entire system. Note: Please report back to me if this commit cause any abnormal behaviour, especially during suspend / resume. Reported/Submitted by: [1] Daan Vreeken [PA4DAN] Reported/Confirmed by: [2] Angka H. K. MFC (revision 1.64) Add device ID for nForce 410 MCP audio controller. PR: kern/95257 Submitted by: cenix Approved by: re (scottl) END K 10 svn:author V 5 ariff K 8 svn:date V 27 2006-04-04T17:30:59.000000Z K 7 svn:log V 129 MFC (revision 1.105) Fix memory leak in some failure cases. CID: 429 Found with: Coverity Prevent(tm) Approved by: re (scottl) END K 10 svn:author V 3 jmg K 8 svn:date V 27 2006-04-04T17:31:46.000000Z K 7 svn:log V 95 MFC: kern_event.c v1.97 clear any action flags on the register knote Approved by: re (scottl) END K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 2006-04-04T17:31:47.000000Z K 7 svn:log V 70 This commit was manufactured by cvs2svn to create branch 'RELENG_6_1'. END K 10 svn:author V 3 jmg K 8 svn:date V 27 2006-04-04T17:32:20.000000Z K 7 svn:log V 98 MFC: kern_event.c v1.97 clear any action flags on the register knote Approved by: re (scottl) END K 10 svn:author V 5 ariff K 8 svn:date V 27 2006-04-04T17:32:48.000000Z K 7 svn:log V 333 MFC (revision 1.37) A pointer was checked for NULL after dereferencing it. The check is not needed here, except there's a bug which results in detaching the device twice. Move the NULL pointer check to the beginning of the function and convert it into a KASSERT. CID: 483 Found with: Coverity Prevent(tm) Approved by: re (scottl) END K 10 svn:author V 6 marcel K 8 svn:date V 27 2006-04-04T17:33:08.000000Z K 7 svn:log V 186 The Z8530 on the MacIO has an interrupt per channel. Deal with this by having interrupt resource variables per channel. We don't set up different interrupt handlers per channel, though. END K 10 svn:author V 5 ariff K 8 svn:date V 27 2006-04-04T17:34:10.000000Z K 7 svn:log V 297 MFC (revision 1.20) Convert NULL checks into KASSERT (and move them before the first dereferencing) since a NULL value would be a bug here. Note: Both affected functions look very similar. A refactoring may be beneficial. CID: 483, 485 Found with: Coverity Prevent(tm) Approved by: re (scottl) END K 10 svn:author V 5 ariff K 8 svn:date V 27 2006-04-04T17:37:51.000000Z K 7 svn:log V 148 MFC (revision 1.109) Pointer align should be generic enough to handle awkward byte size especially for true 24bit format. Approved by: re (scottl) END K 10 svn:author V 5 ariff K 8 svn:date V 27 2006-04-04T17:43:49.000000Z K 7 svn:log V 2783 MFC: dsp.c revision 1.95 mixer.c revision 1.49 sound.c revision 1.103 sound.h revision 1.68 vchan.c revision 1.24 MEGA Fixes / Cleanup -------------------- Fix severe 8bit integer overflow during channel creation and destruction, especially for vchans. It turns out that channel numbering always depend on d->devcount counter (which keep increasing), while PCMMKMINOR() truncate everything to 8bit length. At some point the truncation cause the newly created character device overlapped with the existed one, causing erratic overall system behaviour and panic. Easily reproduce with something like: (Luckily, only root can reproduce this) while : ; do sysctl hw.snd.pcm0.vchans=200 sysctl hw.snd.pcm0.vchans=100 done - Enforce channel/chardev numbering within 8bit boundary. Return E2BIG if necessary. - Traverse d->channels SLIST and try to reclaim "free" counter during channel creation. Don't rely on d->devcount at all. - Determine open direction using 'flags', not 'mode'. This bug exist since past 4 years. - Don't allow opening the same device twice, be it in a same or different direction. - O_RDWR is allowed, provided that it is done by a single open (for example by mixer(8)) and the underlying hardware support true full-duplex operation. - Seal the fate of long standing memory leak (4 years, 7 months) during pcm_unregister(). While destroying cdevs, scan / detect possible children and free its SLIST placeholder properly. - Optimize channel allocation / numbering even further. Do brute cyclic checking only if the channel numbering screwed. - Mega vchan create/destroy cleanup: o Implement pcm_setvchans() so everybody can use it freely instead of implementing their own, be it through sysctl or channel auto allocation. o Increase vchan creation/destruction resiliency: + it's possible to increase/decrease total vchans even during busy playback/recording. Busy channel will be left alone, untouched. Abusive test sample: # play whatever... # while : ; do sysctl hw.snd.pcm0.vchans=1 sysctl hw.snd.pcm0.vchans=10 sysctl hw.snd.pcm0.vchans=100 sysctl hw.snd.pcm0.vchans=200 done # Play something else, leave above loop running frantically. + Seal another 4 years old bug where it is possible to destroy (virtual) channel even when its cdevs being referenced by other process. The "First Come First Served" nature of dsp_clone() is the main culprit of this issue, and usually manifest itself as dangling channel <-> process association. Ensure that all of its cdevs are free from being referenced before destroying it (through ORPHAN_CDEVT() macross). Approved by: re (scottl) END K 10 svn:author V 5 tegge K 8 svn:date V 27 2006-04-04T18:14:31.000000Z K 7 svn:log V 140 MFC: Eliminate softdep_flush() livelock by accounting for number of worklist items marked as being in progress. Approved by: re (hrs) END K 10 svn:author V 3 imp K 8 svn:date V 27 2006-04-04T19:30:47.000000Z K 7 svn:log V 173 Turn a file that was mostly style(9) compliant to a file that's really close to being completely style(9). The odd-ball indentation in a few places was really distracting. END K 10 svn:author V 6 jasone K 8 svn:date V 27 2006-04-04T19:46:28.000000Z K 7 svn:log V 261 Add init_lock, and use it to protect against allocator initialization races. This isn't currently necessary for libpthread or libthr, but without it external threads libraries like the linuxthreads port are not safe to use. Reported by: ganbold@micom.mng.net END K 10 svn:author V 3 ups K 8 svn:date V 27 2006-04-04T19:46:44.000000Z K 7 svn:log V 89 mfc: 1.117 src/sys/i386/i386/mem.c log: Fix race conditions. Approved by: re (scottl) END K 10 svn:author V 5 andre K 8 svn:date V 27 2006-04-04T19:50:02.000000Z K 7 svn:log V 99 MFC of import of OpenBSD's sys/sys/hash.h providing generic 32bit hash functions. Approved by: re END K 10 svn:author V 5 andre K 8 svn:date V 27 2006-04-04T19:56:46.000000Z K 7 svn:log V 57 MFC of import of OpenBSD's strtonum(3). Approved by: re END K 10 svn:author V 5 andre K 8 svn:date V 27 2006-04-04T19:59:52.000000Z K 7 svn:log V 118 MFC rev. 1.19: Add definitions for MD5_BLOCK_LENGTH, MD5_DIGEST_LENGTH and MD5_DIGEST_STRING_LENGTH. Approved by: re END K 10 svn:author V 5 andre K 8 svn:date V 27 2006-04-04T20:02:51.000000Z K 7 svn:log V 111 MFC rev. 1.32: Add link status descriptions and related structures for userland applications. Approved by: re END K 10 svn:author V 5 andre K 8 svn:date V 27 2006-04-04T20:07:23.000000Z K 7 svn:log V 545 MFC route.h rev. 1.65 and rtsock.c rev. 1.133: - Fill in the correct rtm_index for RTM_ADD and RTM_CHANGE messages. - Allow RTM_CHANGE to change a number of route flags as specified by RTF_FMASK. - The unused rtm_use field in struct rt_msghdr is redesignated as rtm_fmask field to communicate route flag changes in RTM_CHANGE messages from userland. The use count of a route was moved to rtm_rmx a long time ago. For source code compatibility reasons a define of rtm_use to rtm_fmask is provided. Approved by: re END K 10 svn:author V 5 peter K 8 svn:date V 27 2006-04-04T20:17:35.000000Z K 7 svn:log V 103 Convert pv_entry_frees and pv_entry_allocs stats counters from int to long, they wrap way too quickly. END K 10 svn:author V 5 andre K 8 svn:date V 27 2006-04-04T20:20:51.000000Z K 7 svn:log V 65 Undo damage from wrong MFC to HEAD. Pointed out by: jkim, remko END K 10 svn:author V 5 andre K 8 svn:date V 27 2006-04-04T20:24:19.000000Z K 7 svn:log V 111 MFC rev. 1.32: Add link status descriptions and related structures for userland applications. Approved by: re END K 10 svn:author V 6 jasone K 8 svn:date V 27 2006-04-04T20:27:53.000000Z K 7 svn:log V 55 Add malloc_usable_size() to the RETURN VALUES section. END K 10 svn:author V 6 mlaier K 8 svn:date V 27 2006-04-04T20:31:20.000000Z K 7 svn:log V 150 MFC pf.conf, 1.3: Document the user/group LOR in our sample pf.conf Submitted by: Devon H. O'Dell Reminded by: delphij Approved by: re (scottl) END K 10 svn:author V 3 gad K 8 svn:date V 27 2006-04-04T20:31:26.000000Z K 7 svn:log V 212 MFC 1.73->1.74: Fix the case where the user specifies an alternate heading for some output-format keyword, and the keyword they picked is an alias to some other keyword. PR: bin/57833 Approved by: re (scottl) END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2006-04-04T20:58:53.000000Z K 7 svn:log V 133 MFC: rev. 1.22 Add a standard boilerplate to the SYNOPSIS section that mentions how to load a kernel module. Approved by: re (hrs) END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2006-04-04T21:00:21.000000Z K 7 svn:log V 207 MFC: rev. 1.12 Convert the SYNOPSIS section to look like the ones used in other driver manpages. Don't mention the include file, it's not important for the operation of this driver. Approved by: re (hrs) END K 10 svn:author V 6 marius K 8 svn:date V 27 2006-04-04T21:00:44.000000Z K 7 svn:log V 786 For USIII CPUs the type of the trap caused by peeking/poking non-existent PCI devices apparently was changed from a special deferred trap with TPC pointing to the membar #Sync following the failing load/store instruction to a precise trap with TPC pointing to the failing load/store instruction. Thus remove the check the check whether TPC points to a membar #Sync in case of a data access trap as it's off-by-one for USIII CPUs and it should be sufficient to check whether the trap happend while in fasword*() to properly detect traps caused by peeking/poking. This also corresponds to what other OSs do. Note that also only the USIIi manual suggests to check the TPC for such traps while the USII one doesn't (in the public USIII manual device peeking/poking isn't mentioned at all). END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2006-04-04T21:01:05.000000Z K 7 svn:log V 121 MFC: rev. 1.15 Convert the SYNOPSIS section to look like the ones used in other driver manpages. Approved by: re (hrs) END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2006-04-04T21:02:17.000000Z K 7 svn:log V 226 MFC: Convert the SYNOPSIS section to look like the ones used in other driver manpages, mention module support. Also add the crypto and cryptodev devices as the drivers are kind of useless without them. Approved by: re (hrs) END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2006-04-04T21:03:08.000000Z K 7 svn:log V 135 MFC: Convert the SYNOPSIS section to look like the ones used in other driver manpages, mention module support. Approved by: re (hrs) END K 10 svn:author V 4 mnag K 8 svn:date V 27 2006-04-04T21:22:35.000000Z K 7 svn:log V 46 MFC: Sync with HEAD Approved by: re (scottl) END K 10 svn:author V 3 pjd K 8 svn:date V 27 2006-04-04T22:30:12.000000Z K 7 svn:log V 112 Don't call bfe_release_resources() twice. Found by: Coverity Prevent analysis tool CID: 600 MFC after: 1 week END K 10 svn:author V 9 alepulver K 8 svn:date V 27 2006-04-04T22:32:14.000000Z K 7 svn:log V 46 Add my birthday. Approved by: garga (mentor) END