ƒ·196511 135 1404 1107 300 641 126 282 309 479 280 762 572 233 240 220 265 141 198 131 584 186 159 455 295 471 420 458 440 470 141 155 806 351 125 592 230 147 398 155 419 646 317 131 379 147 491 660 766 507 613 274 159 187 159 310 287 501 383 404 766 123 387 364 364 600 319 685 296 662 146 152 226 221 216 216 221 221 282 191 571 664 238 290 761 588 565 137 249 226 124 115 1160 1162 172 558 165 133 213 363 999 200 224 131 237 1076 715 694 173 307 334 572 1181 489 443 524 302 759 654 343 295 482 433 675 865 525 252 363 342 132 217 1102 648 398 297 176 517 K 10 svn:author V 8 netchild K 8 svn:date V 27 2009-08-24T13:10:55.910748Z K 7 svn:log V 1305 - Update config to doxygen 1.5.2 (I use this with 1.5.9). - Add linprocfs and linsysfs to the linuxulator dox. - Take the generated includes from the .m files from a subdirectory instead of putting everything into $(.OBJDIR). This imporves the human readbility of the source directory contents a lot, if you do not create a separate OBJDIR. - Assume UTF-8 encoding for every input file. - Strip the source and dest path from the output, we are not interested in the absolute location on the machine where the docs are created, relative the the root of the FreeBSD source is what interests us. - Exclude .svn directories. - Switch to alphabetic index. - Use one line per INCLUDE_PATH member in the common dox-config. - Bump the __FreeBSD__ version to 9. [MFC: to 8] - Switch from hardcoded .m files to an run-time generated one. Takes a little bit more time to get started with actual work, but at least is more future-proof. If you generate dox for all subsystems, the time to find all .m files in the source is magnitutes lower than producing the docs. - Make the *DEST_PATH overidable from the environment. This allows to produce the output directly in the docroot of a webserver. - Fix the path when telling the user where he can find the API docs. MFC after: 1 month (after 8.0) END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-24T16:19:47.216224Z K 7 svn:log V 1014 Fix handling of .note.ABI-tag section for GNU systems [1]. Handle GNU/Linux according to LSB Core Specification 4.0, Chapter 11. Object Format, 11.8. ABI note tag. Also check the first word of desc, not only name, according to glibc abi-tags specification to distinguish between Linux and kFreeBSD. Add explicit handling for Debian GNU/kFreeBSD, which runs on our kernels as well [2]. In {amd64,i386}/trap.c, when checking osrel of the current process, also check the ABI to not change the signal behaviour for Linux binary processes, now that we save an osrel version for all three from the lists above in struct proc [2]. These changes make it possible to run FreeBSD, Debian GNU/kFreeBSD and Linux binaries on the same machine again for at least i386 and amd64, and no longer break kFreeBSD which was detected as GNU(/Linux). PR: kern/135468 Submitted by: dchagin [1] (initial patch) Suggested by: kib [2] Tested by: Petr Salinger (Petr.Salinger seznam.cz) for kFreeBSD Reviewed by: kib MFC after: 3 days END K 10 svn:author V 5 brian K 8 svn:date V 27 2009-08-24T17:18:17.442289Z K 7 svn:log V 205 When realloc()ing device memory for transfer to another ppp process, don't continue to use the realloc()d pointer - it might have changed! Remove some stray diagnostics while I'm here. MFC after: 3 days END K 10 svn:author V 5 brian K 8 svn:date V 27 2009-08-24T17:19:45.081984Z K 7 svn:log V 546 When ``ppp -direct'' is invoked by a program that uses pipe(2) to create stdin and stdout, don't blindly try to use stdin as a bi-directional channel. Instead, detect the pipe and set up a special exec handler that indirects write() calls through stdout. This fixes the problem where ``set device "!ssh -e none host ppp -direct label"'' no longer works with an openssh-5.2 server side as that version of openssh ignores the USE_PIPES config setting and *always* uses pipes (rather than socketpair) for stdin/stdout channels. MFC after: 3 days END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2009-08-24T18:43:22.789190Z K 7 svn:log V 29 Update example for RELENG_8. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2009-08-24T18:58:13.673014Z K 7 svn:log V 185 Add RTL8168DP/RTL8111DP device id. While I'm here append "8111D" to the description of RTL8168D as RL_HWREV_8168D can be either RTL8168D or RTL8111D. PR: kern/137672 MFC after: 3 days END K 10 svn:author V 7 yongari K 8 svn:date V 27 2009-08-24T20:37:15.406311Z K 7 svn:log V 212 Don't try to power down PHY when alc(4) failed to map the device. This fixes system crash when mapping alc(4) device failed in device attach. Reported by: Jim < stapleton.41 <> gmail DOT com > MFC after: 3 days END K 10 svn:author V 3 jfv K 8 svn:date V 27 2009-08-24T20:41:51.543812Z K 7 svn:log V 386 A couple of changes: first, make header split on by default and remove from its dependency on LRO, my tests have shown that its always beneficial, even when doing bridging. Second, fix up a few problems in the statistics code, the adapter dependencies had gotten lost so some code that should only run on 82599 was always running, this resulted in bogus flow control numbers on 82598. END K 10 svn:author V 3 jfv K 8 svn:date V 27 2009-08-24T21:04:51.642245Z K 7 svn:log V 187 When bridging LRO is causing a problem, the believe that it would work as long as all interfaces have TSO seems to be false, until the matter gets sorted out just disable LRO completely. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-24T21:51:46.744137Z K 7 svn:log V 669 Tweak the way that the ACPI and ISA bus drivers match hint devices to BIOS-enumerated devices: - Assume a device is a match if the memory and I/O ports match even if the IRQ or DRQ is wrong or missing. Some BIOSes don't include an IRQ for the atrtc device for example. - Add a hack to better match floppy controller devices. Many BIOSes do not include the starting port of the floppy controller listed in the hints (0x3f0) in the resources for the device. So far, however, all the BIOS variations encountered do include the 'port + 2' resource (0x3f2), so adjust the matching for "fdc" devices to look for 'port + 2'. Reviewed by: imp MFC after: 3 days END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-24T21:55:43.168747Z K 7 svn:log V 479 Fix a few issues with the lib32 dist so that it includes ldd32. - Use a better find invocation to purge empty directories from all the dist trees during a release build. The previous version did not purge directories whose contents were all empty directories. - Explicitly blacklist a few files from the lib32 dist instead of using a whitelist. A better longterm solution is to fix the few offenders to not install data files during a lib32 install. MFC after: 3 days END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-24T21:56:41.807194Z K 7 svn:log V 140 Invoke the recently added mm-mtree.sh release script to store a pre-built mergemaster mtree database in the 'base' dist. MFC after: 3 days END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-24T22:05:08.228355Z K 7 svn:log V 145 Improve the case test to detect the presence of lo0 in the list of network_interfaces. Submitted by: Christoph Mallon END K 10 svn:author V 7 delphij K 8 svn:date V 27 2009-08-24T22:35:53.164731Z K 7 svn:log V 123 Fix VESA modes and allow 8bit depth modes. PR: i386/124902 Submitted by: paradox MFC after: 2 months END K 10 svn:author V 7 delphij K 8 svn:date V 27 2009-08-24T23:44:07.166807Z K 7 svn:log V 168 Consider flag == 0 as the same of flag == R_NEXT. This change will restore a historical behavior that has been changed by revision 190491, and has seen to break exim. END K 10 svn:author V 7 delphij K 8 svn:date V 27 2009-08-25T01:04:15.411527Z K 7 svn:log V 45 Add a missing .El. Founded by: make manlint END K 10 svn:author V 8 charnier K 8 svn:date V 27 2009-08-25T04:09:09.686224Z K 7 svn:log V 100 ANSIfy functions declarations, adjust prototypes. Rename local variable to not conflict with err(). END K 10 svn:author V 4 lulf K 8 svn:date V 27 2009-08-25T06:21:45.729834Z K 7 svn:log V 38 - Add a SIGINFO handler for savecore. END K 10 svn:author V 3 imp K 8 svn:date V 27 2009-08-25T06:25:59.429097Z K 7 svn:log V 491 Rather than havnig enabled/disabled, implement a max queue depth. While usually not an issue, this firewalls bugs in the code that may run us out of memory. Fix a memory exhaustion in the case where devctl was disabled, but the link was bouncing. The check to queue was in the wrong place. Implement a new sysctl hw.bus.devctl_queue to control the depth. Make compatibility hacks for hw.bus.devctl_disable to ease transition. Reviewed by: emaste@ Approved by: re@ (kib) MFC after: asap END K 10 svn:author V 5 brian K 8 svn:date V 27 2009-08-25T07:52:09.921925Z K 7 svn:log V 92 Document that ppp handles pipe(2) descriptors specially in -direct mode. MFC after: 3 days END K 10 svn:author V 3 raj K 8 svn:date V 27 2009-08-25T09:30:03.154387Z K 7 svn:log V 67 Eliminate platform_pmap_init() to simplify Marvell bootstrap code. END K 10 svn:author V 3 raj K 8 svn:date V 27 2009-08-25T09:35:50.551230Z K 7 svn:log V 362 Properly handle initial state of power mgmt. Modules on Marvell SOC can be selectively PM-disabled, and we must not access disabled devices' registers (attempt to initialize them) unconditionally, as this leads to the system hang. This patch introduces graceful handling of the PM state during devices init. Submitted by: Michal Hajduk Obtained from: Semihalf END K 10 svn:author V 3 raj K 8 svn:date V 27 2009-08-25T09:39:11.208246Z K 7 svn:log V 202 Exclude common Kirkwood settings so they can be shared among various platforms based on this SOC. This is a preliminary step for SheevaPlug support. Submitted by: Michal Hajduk Obtained from: Semihalf END K 10 svn:author V 3 raj K 8 svn:date V 27 2009-08-25T09:47:12.987106Z K 7 svn:log V 378 Introduce MII_ADDR_BASE option on ARM, which allows to override the default per platform requirements. Notes: - Only used by mge(4) at the moment. - This is very simplified approach and should be replaced by some long-term solution for managing the board/platform configuration (among others the MAC-PHY binding info). Submitted by: Michal Hajduk Obtained from: Semihalf END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-25T09:52:38.860348Z K 7 svn:log V 323 Use locks specific to the lltable code, rather than borrow the ifnet list/index locks, to protect link layer address tables. This avoids lock order issues during interface teardown, but maintains the bug that sysctl copy routines may be called while a non-sleepable lock is held. Reviewed by: bz, kmacy MFC after: 3 days END K 10 svn:author V 3 raj K 8 svn:date V 27 2009-08-25T10:09:25.791560Z K 7 svn:log V 365 Introduce SheevaPlug support. - The device is based on Marvell 88F6281 system on chip. - More info about the platform at http://www.plugcomputer.org - To build the FreeBSD kernel: make buildkernel TARGET_ARCH=arm KERNCONF=SHEEVAPLUG - Installation notes at: http://wiki.freebsd.org/FreeBSDMarvell Submitted by: Michal Hajduk Obtained from: Semihalf END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-25T11:44:17.261072Z K 7 svn:log V 348 MFC r182841: Add a second KASSERT checking for len >= 0 in the tcp output path. This is different to the first one (as len gets updated between those two) and would have caught various edge cases (read bugs) at a well defined place I had been debugging the last months instead of triggering (random) panics further down the call graph. END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-25T12:32:16.166319Z K 7 svn:log V 378 MFC r182842: Catch a possible NULL pointer deref in case the offsets got mangled somehow. As a consequence we may now get an unexpected result(*). Catch that error cases with a well defined panic giving appropriate pointers to ease debugging. (*) While the concensus was that the case should never happen unless there was a bug, noone was definitively sure. END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-25T13:01:51.256857Z K 7 svn:log V 50 MFC r191433: Compare protosw pointer with NULL. END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-25T13:04:13.701429Z K 7 svn:log V 64 MFC r191529: Whitespace (use tabs like for all other lines). END K 10 svn:author V 3 bms K 8 svn:date V 27 2009-08-25T13:39:14.519015Z K 7 svn:log V 713 MFC r179014: Add support for /conf/T/M/remount_optional. The rc.initdiskless functionality is used by NanoBSD to allow configuration files to live on a separate configuration slice, which acts as NVRAM, whilst the system image is mounted read-only. Normally, if the remount command fails during boot, this is regarded as a fatal error. If /conf/T/M/remount_optional is present, this error is non-fatal. If the file is not present, the default behaviour is unchanged. This is very useful for people building live CD images using FreeBSD, where the NVRAM lives somewhere completely differently from the system image, and may be present on removable media which is not present during the initial boot. END K 10 svn:author V 3 bms K 8 svn:date V 27 2009-08-25T13:40:46.163323Z K 7 svn:log V 258 MFC r182895: Add support to rc.initdiskless for /conf/T/M/remount_subdir. This allows the location of the configuration data to be relocated within the filesystem containing it. A nullfs mount is used in order to achieve this. Obtained from: XORP, Inc. END K 10 svn:author V 7 glebius K 8 svn:date V 27 2009-08-25T14:08:33.386653Z K 7 svn:log V 29 Fix build broken in r196524. END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-25T15:54:52.918991Z K 7 svn:log V 500 Backout r191596: Document an issue of jail(8) in conjunction with cpuset(1). MFC r191639: Prevent a superuser inside a jail from modifying the dedicated root cpuset of that jail. Processes inside the jail will still be able to change child sets. A superuser outside of a jail will still be able to change the jail cpuset and thus limit the number of cpus available to the jail. Problem reported by: 000.fbsd@quip.cz (Miroslav Lachman) PR: kern/134050 Reviewed by: jeff END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-25T15:58:07.515639Z K 7 svn:log V 138 MFC r191403: Correct a comment: the function name given had never existed in any (relevant) version of this file orany of my patches. END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-25T16:56:33.699234Z K 7 svn:log V 56 MFC r187939: Remove 4 entirely unsued ip6 variables. END K 10 svn:author V 7 thompsa K 8 svn:date V 27 2009-08-25T16:59:55.113465Z K 7 svn:log V 301 It is possible for all the kthreads to exit (hci modules unloaded) which in turn ends our usb process. This means the proc pointer becomes invalid and will panic if a new kthread is added. Count the number of threads and clear the proc pointer on the last one. Suggested by: julian MFC after: 3 days END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-25T17:00:24.801118Z K 7 svn:log V 64 MFC r187936: Use NULL rather than 0 when comparing pointers. END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-25T19:04:22.318405Z K 7 svn:log V 327 MFC r187946: Like with r185713 make sure to not leak a lock as rtalloc1(9) returns a locked route. Thus we have to use RTFREE_LOCKED(9) to get it unlocked and rtfree(9)d rather than just rtfree(9)d. PR: kern/129793 Submitted by: Dheeraj Reddy Originally committed from: Bugathon #6 END K 10 svn:author V 7 delphij K 8 svn:date V 27 2009-08-25T19:07:26.416042Z K 7 svn:log V 549 Add a new rc.d script, static_arp, which enables the administrator to statically bind IPv4 <-> MAC address at boot time. In order to use this, the administrator needs to configure the following rc.conf(5) variable: - static_arp_pairs: A list of names for static bind pairs, and, - a series of static_arp_(name): the arguments that is being passed to ``arp -S'' operation. Example: static_arp_pairs="gw" static_arp_gw="192.168.1.1 00:01:02:03:04:05" See the rc.conf(5) manual page for more details. Reviewed by: -rc@ MFC after: 2 weeks END K 10 svn:author V 6 mlaier K 8 svn:date V 27 2009-08-25T19:30:32.027359Z K 7 svn:log V 221 Fix argument ordering to memcpy as well as the size of the copy in the (theoretical) case that pfi_buffer_cnt should be greater than ~_max. Submitted by: pjd Reviewed by: {krw,sthen,markus}@openbsd.org MFC after: 3 days END K 10 svn:author V 7 delphij K 8 svn:date V 27 2009-08-25T20:05:51.390315Z K 7 svn:log V 35 Localize 'e'. Submitted by: dougb END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-25T20:21:16.926253Z K 7 svn:log V 282 Break out allocation of new ifindex values from if_alloc() and if_vmove(), and centralize in a single function ifindex_alloc(). Assert the IFNET_WLOCK, and add missing IFNET_WLOCK in if_alloc(). This does not close all known races in this code. Reviewed by: bz MFC after: 3 days END K 10 svn:author V 6 jilles K 8 svn:date V 27 2009-08-25T20:33:37.866829Z K 7 svn:log V 52 Add some tests for poll(2)/shutdown(2) interaction. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-25T20:35:57.656730Z K 7 svn:log V 398 - Use the headers from ACPI-CA to define various constants and structures for table layouts, etc. rather than homerolling our own structures and constants in acpidump.h. - Verify the extended checksum on the RSDP. - Handle new ACPI 3.0 fields in MADT including X2APIC entries and UIDs for local SAPICs. - Add handling for new ACPI 3.0 flags in the FADT. Reviewed by: jkim MFC after: 1 month END K 10 svn:author V 6 jilles K 8 svn:date V 27 2009-08-25T21:44:14.490029Z K 7 svn:log V 564 Fix poll() on half-closed sockets, while retaining POLLHUP for fifos. This reverts part of r196460, so that sockets only return POLLHUP if both directions are closed/error. Fifos get POLLHUP by closing the unused direction immediately after creating the sockets. The tools/regression/poll/*poll.c tests now pass except for two other things: - if POLLHUP is returned, POLLIN is always returned as well instead of only when there is data left in the buffer to be read - fifo old/new reader distinction does not work the way POSIX specs it Reviewed by: kib, bde END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-25T21:51:47.564680Z K 7 svn:log V 674 MFC r185713 (from csjp): in_rtalloc1(9) returns a locked route, so make sure that we use RTFREE_LOCKED() here. This macro makes sure the reference count on the route is being managed properly. MFC r187946: Like with r185713 make sure to not leak a lock as rtalloc1(9) returns a locked route. Thus we have to use RTFREE_LOCKED(9) to get it either rtfree(9)d or the reference count decremented and unlocked depending on the reference count. [Note: the original commit message was bogus here]. RELENG_6 had a few more places that either had changed or were already fixed in HEAD/7 at the time above revisions were done so just fixed them along with the MFCs. END K 10 svn:author V 8 cperciva K 8 svn:date V 27 2009-08-26T03:30:06.331644Z K 7 svn:log V 409 Don't try to mmap the contents of empty files. This behaviour was harmless prior to r195693, since historical behaviour of mmap(2) was to silently ignore length-zero mmap requests; but mmap now returns EINVAL, which caused look(1) to emit an error message and fail. Among other things, this makes `freebsd-update fetch` on a newly installed 8.0-BETA3 system print bogus warning messages. MFC after: 3 days END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-26T11:13:10.284116Z K 7 svn:log V 516 Add IFNET_HOLD reserved pointer value for the ifindex ifnet array, which allows an index to be reserved for an ifnet without making the ifnet available for management operations. Use this in if_alloc() while the ifnet lock is released between initial index allocation and completion of ifnet initialization. Add ifindex_free() to centralize the implementation of releasing an ifindex value. Use in if_free() and if_vmove(), as well as when releasing a held index in if_alloc(). Reviewed by: bz MFC after: 3 days END K 10 svn:author V 3 kib K 8 svn:date V 27 2009-08-26T14:32:37.012196Z K 7 svn:log V 181 Honor the vfs.timestamp_precision sysctl settings for utimes(path, NULL) and similar calls. Obtained from: Petr Salinger, Debian GNU/kFreeBSD, Debian bug #489894 MFC after: 3 days END K 10 svn:author V 5 peter K 8 svn:date V 27 2009-08-26T19:45:17.700616Z K 7 svn:log V 65 MFC r194304: Fix ticks overflow in the handling of t_badtrxtwin. END K 10 svn:author V 5 peter K 8 svn:date V 27 2009-08-26T19:50:27.772772Z K 7 svn:log V 93 MFC: r196410: fix timewait expiration code when ticks goes negative after 24 days of uptime. END K 10 svn:author V 5 peter K 8 svn:date V 27 2009-08-26T19:51:54.732722Z K 7 svn:log V 65 MFC r194304: Fix ticks overflow in the handling of t_badtrxtwin. END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-26T20:57:21.539650Z K 7 svn:log V 215 MFC 196434: Add a script to create the /var/db/mergemaster.mtree file for new releases so that when users subsequently update their source trees they can make use of mergemaster's -U option. Approved by: re (kib) END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-26T21:05:17.007059Z K 7 svn:log V 192 MFC 196434: Add a script to create the /var/db/mergemaster.mtree file for new releases so that when users subsequently update their source trees they can make use of mergemaster's -U option. END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-26T21:08:41.340285Z K 7 svn:log V 406 MFC 196436; Move is_wired_interface() from rc.d/wpa_supplicant into network.subr, simplify it a bit, and make use of that method to determine if an interface is a candidate for IPv6 rtsol rather than listing all of the possible wireless interfaces that should _not_ get rtsol'ed. This change is only relevant for 8.0+ unless the "wlan mandatory" code gets ported back to RELENG_7. Approved by: re (kib) END K 10 svn:author V 6 marius K 8 svn:date V 27 2009-08-26T21:10:47.695724Z K 7 svn:log V 287 Add a temporary workaround which just lets init die instead of causing a panic if it is killed due to a unsolved stack overflow seen very late during shutdown on sparc64 when the gmirror worker process exists, which is a regression introduced in 8.0. Reviewed by: kib MFC after: 3 days END K 10 svn:author V 4 stas K 8 svn:date V 27 2009-08-26T21:14:28.452508Z K 7 svn:log V 310 - Add quirk for Sony DSC digital cameras. This umass devices fail to attach without these quirks applied. PR: usb/137035 URL: http://lists.freebsd.org/pipermail/freebsd-current/2009-August/010852.html Reported by: Henri Hennebert , Andrey V. Elsukov MFC after: 1 week END K 10 svn:author V 6 qingli K 8 svn:date V 27 2009-08-26T21:32:50.867500Z K 7 svn:log V 670 When multiple interfaces exist in the system, with each interface having an IPv6 address assigned to it, and if an incoming packet received on one interface has a packet destination address that belongs to another interface, the routing table is consulted to determine how to reach this packet destination. Since the packet destination is an interface address, the route table will return a host route with the loopback interface as rt_ifp. The input code must recognize this fact, instead of using the loopback interface, the input code performs a search to find the right interface that owns the given IPv6 address. Reviewed by: bz, gnn, kmacy MFC after: immediately END K 10 svn:author V 5 kmacy K 8 svn:date V 27 2009-08-26T21:42:16.459865Z K 7 svn:log V 29 de-inline to track down bugs END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-26T22:32:14.562350Z K 7 svn:log V 292 MFC r196435: The svnversion string is only relevant when newvers.sh is called during the kernel build process, the other places that call the script do not make use of that information. So restrict execution of the svnversion-related code to the kernel build context. Approved by: re (kib) END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-26T22:50:14.223670Z K 7 svn:log V 269 MFC r196435: The svnversion string is only relevant when newvers.sh is called during the kernel build process, the other places that call the script do not make use of that information. So restrict execution of the svnversion-related code to the kernel build context. END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-26T22:51:14.446738Z K 7 svn:log V 269 MFC r196435: The svnversion string is only relevant when newvers.sh is called during the kernel build process, the other places that call the script do not make use of that information. So restrict execution of the svnversion-related code to the kernel build context. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2009-08-27T00:45:00.983572Z K 7 svn:log V 503 Fix a problem introduced when MFCing the rw_try_wlock() operation from HEAD: __rw_wunlock() relies on the cookie state to not be cleanly 'tid' when some conditions needing of special care happens, and lock recursion is among those. Dirty the cookie by adding the RW_LOCK_RECURSE flag in the case of a successfull try lock operation. This is not a problem on -CURRENT and STABLE_8 where the unlocking algorithm works differently. Submitted by: Andrew Brampton END K 10 svn:author V 5 brian K 8 svn:date V 27 2009-08-27T07:05:46.000341Z K 7 svn:log V 224 MFC: When realloc()ing device memory for transfer to another ppp process, don't continue to use the realloc()d pointer - it might have changed! Remove some stray diagnostics while I'm here. Approved by: re (kib) END K 10 svn:author V 5 brian K 8 svn:date V 27 2009-08-27T07:07:38.906789Z K 7 svn:log V 590 MFC: When ``ppp -direct'' is invoked by a program that uses pipe(2) to create stdin and stdout, don't blindly try to use stdin as a bi-directional channel. Instead, detect the pipe and set up a special exec handler that indirects write() calls through stdout. This fixes the problem where ``set device "!ssh -e none host ppp -direct label"'' no longer works with an openssh-5.2 server side as that version of openssh ignores the USE_PIPES config setting and *always* uses pipes (rather than socketpair) for stdin/stdout channels. Approved by: re (kib) END K 10 svn:author V 5 brian K 8 svn:date V 27 2009-08-27T07:10:57.518097Z K 7 svn:log V 201 MFC: When realloc()ing device memory for transfer to another ppp process, don't continue to use the realloc()d pointer - it might have changed! Remove some stray diagnostics while I'm here. END K 10 svn:author V 5 brian K 8 svn:date V 27 2009-08-27T07:11:47.175903Z K 7 svn:log V 567 MFC: When ``ppp -direct'' is invoked by a program that uses pipe(2) to create stdin and stdout, don't blindly try to use stdin as a bi-directional channel. Instead, detect the pipe and set up a special exec handler that indirects write() calls through stdout. This fixes the problem where ``set device "!ssh -e none host ppp -direct label"'' no longer works with an openssh-5.2 server side as that version of openssh ignores the USE_PIPES config setting and *always* uses pipes (rather than socketpair) for stdin/stdout channels. END K 10 svn:author V 3 pjd K 8 svn:date V 27 2009-08-27T08:28:34.279000Z K 7 svn:log V 54 Fix an obvious topology lock leak. MFC after: 3 days END K 10 svn:author V 3 pjd K 8 svn:date V 27 2009-08-27T08:40:51.328311Z K 7 svn:log V 60 There's no need for checking result of M_WAITOK allocation. END K 10 svn:author V 5 edwin K 8 svn:date V 27 2009-08-27T12:22:50.334167Z K 7 svn:log V 131 MFV of r195792: Import of tzdata2009k to head. - Changes in Mauritius and Bangladesh - No leapsecond at the end of December 2009 END K 10 svn:author V 5 edwin K 8 svn:date V 27 2009-08-27T12:24:21.169540Z K 7 svn:log V 126 MFV of r196350 Import of tzdata2009l - Egypt will go to Wintertime on 21 August 2009 - Heads up for a possible DST in Samoa END K 10 svn:author V 5 edwin K 8 svn:date V 27 2009-08-27T12:27:06.056720Z K 7 svn:log V 121 MFC of r196581: Import of tzdata2009k - Changes in Mauritius and Bangladesh - No leapsecond at the end of December 2009 END K 10 svn:author V 5 edwin K 8 svn:date V 27 2009-08-27T12:27:19.624187Z K 7 svn:log V 121 MFC of r196581: Import of tzdata2009k - Changes in Mauritius and Bangladesh - No leapsecond at the end of December 2009 END K 10 svn:author V 5 edwin K 8 svn:date V 27 2009-08-27T12:29:22.986218Z K 7 svn:log V 126 MFC of r196582: Import of tzdata2009l - Egypt will go to Wintertime on 21 August 2009 - Heads up for a possible DST in Samoa END K 10 svn:author V 5 edwin K 8 svn:date V 27 2009-08-27T12:29:23.683913Z K 7 svn:log V 126 MFC of r196582: Import of tzdata2009l - Egypt will go to Wintertime on 21 August 2009 - Heads up for a possible DST in Samoa END K 10 svn:author V 5 edwin K 8 svn:date V 27 2009-08-27T12:36:15.481883Z K 7 svn:log V 187 MFV of r195794 MFV of tzcode2009k zic.c: Do not end a binary file with a POSIX-style time zone string for locations that end up in permanent DST (thanks to Andreas Schwab). END K 10 svn:author V 8 blackend K 8 svn:date V 27 2009-08-27T13:18:59.327431Z K 7 svn:log V 94 Update some comments to match the removal of the docset compilation during the release build. END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-27T15:24:26.666706Z K 7 svn:log V 476 In the loop through the list of interfaces in network6_interface_setup() rtsol_interface gets reset to "yes" each time through the loop, but rtsol_available does not. If a user has lo0 first in their list of interfaces rtsol_available will get set to "no" the first time through the loop and subsequent interfaces will not get rtsol'ed when they should. Therefore change the conditional for the is_wired() test to _interface. Noticed by: Dimitry Andric END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-27T15:48:58.914811Z K 7 svn:log V 571 MFC 181019, 183474, 191277, and 191626: - Move the code for doing out-of-memory grass from vm_pageout_scan() into the separate function vm_pageout_oom(). Supply a parameter for vm_pageout_oom() describing a reason for the call. - Call vm_pageout_oom() from the swp_pager_meta_build() when swap zone is exhausted. - In both pageout oom handler and vm_daemon, acquire the reference to the vmspace of the examined process instead of directly accessing its vmspace, that may change. Also, as an optimization, check for P_INEXEC flag before examining the process. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-27T16:15:32.422008Z K 7 svn:log V 145 MFC 196382: Explicitly line up the CPU state labels with the calculated starting column that takes into account the width of the largest CPU ID. END K 10 svn:author V 5 jamie K 8 svn:date V 27 2009-08-27T16:15:51.505665Z K 7 svn:log V 195 Fix a LOR between allprison_lock and vnode locks by releasing allprison_lock before releasing a prison's root vnode. PR: kern/138004 Reviewed by: kib Approved by: bz (mentor) MFC after: 3 days END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-27T16:34:04.578793Z K 7 svn:log V 668 MFC 196520: Tweak the way that the ACPI and ISA bus drivers match hint devices to BIOS-enumerated devices: - Assume a device is a match if the memory and I/O ports match even if the IRQ or DRQ is wrong or missing. Some BIOSes don't include an IRQ for the atrtc device for example. - Add a hack to better match floppy controller devices. Many BIOSes do not include the starting port of the floppy controller listed in the hints (0x3f0) in the resources for the device. So far, however, all the BIOS variations encountered do include the 'port + 2' resource (0x3f2), so adjust the matching for "fdc" devices to look for 'port + 2'. Approved by: re (kib) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-27T17:16:23.927874Z K 7 svn:log V 495 MFC 196521: Fix a few issues with the lib32 dist so that it includes ldd32. - Use a better find invocation to purge empty directories from all the dist trees during a release build. The previous version did not purge directories whose contents were all empty directories. - Explicitly blacklist a few files from the lib32 dist instead of using a whitelist. A better longterm solution is to fix the few offenders to not install data files during a lib32 install. Approved by: re (kib) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-27T17:16:42.894189Z K 7 svn:log V 472 MFC 196521: Fix a few issues with the lib32 dist so that it includes ldd32. - Use a better find invocation to purge empty directories from all the dist trees during a release build. The previous version did not purge directories whose contents were all empty directories. - Explicitly blacklist a few files from the lib32 dist instead of using a whitelist. A better longterm solution is to fix the few offenders to not install data files during a lib32 install. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-27T17:24:05.000514Z K 7 svn:log V 45 Move mergeinfo for 180008 up to src/release. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-27T17:25:58.815295Z K 7 svn:log V 156 MFC 196522: Invoke the recently added mm-mtree.sh release script to store a pre-built mergemaster mtree database in the 'base' dist. Approved by: re (kib) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-27T17:26:09.474655Z K 7 svn:log V 133 MFC 196522: Invoke the recently added mm-mtree.sh release script to store a pre-built mergemaster mtree database in the 'base' dist. END K 10 svn:author V 3 sam K 8 svn:date V 27 2009-08-27T17:32:58.810471Z K 7 svn:log V 32 recognie invalid register names END K 10 svn:author V 3 sam K 8 svn:date V 27 2009-08-27T17:33:44.842811Z K 7 svn:log V 23 enable mesh by default END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-27T17:34:13.622153Z K 7 svn:log V 1067 MFC r196512: Fix handling of .note.ABI-tag section for GNU systems [1]. Handle GNU/Linux according to LSB Core Specification 4.0, Chapter 11. Object Format, 11.8. ABI note tag. Also check the first word of desc, not only name, according to glibc abi-tags specification to distinguish between Linux and kFreeBSD. Add explicit handling for Debian GNU/kFreeBSD, which runs on our kernels as well [2]. In {amd64,i386}/trap.c, when checking osrel of the current process, also check the ABI to not change the signal behaviour for Linux binary processes, now that we save an osrel version for all three from the lists above in struct proc [2]. These changes make it possible to run FreeBSD, Debian GNU/kFreeBSD and Linux binaries on the same machine again for at least i386 and amd64, and no longer break kFreeBSD which was detected as GNU(/Linux). PR: kern/135468 Submitted by: dchagin [1] (initial patch) Suggested by: kib [2] Tested by: Petr Salinger (Petr.Salinger seznam.cz) for kFreeBSD Reviewed by: kib Approved by: re (kensmith) END K 10 svn:author V 2 bz K 8 svn:date V 27 2009-08-27T17:36:59.927022Z K 7 svn:log V 1069 MFC r196512: Fix handling of .note.ABI-tag section for GNU systems [1]. Handle GNU/Linux according to LSB Core Specification 4.0, Chapter 11. Object Format, 11.8. ABI note tag. Also check the first word of desc, not only name, according to glibc abi-tags specification to distinguish between Linux and kFreeBSD. Add explicit handling for Debian GNU/kFreeBSD, which runs on our kernels as well [2]. In {amd64,i386}/trap.c, when checking osrel of the current process, also check the ABI to not change the signal behaviour for Linux binary processes, now that we save an osrel version for all three from the lists above in struct proc [2] (slightly different to HEAD). These changes make it possible to run FreeBSD, Debian GNU/kFreeBSD and Linux binaries on the same machine again for at least i386 and amd64, and no longer break kFreeBSD which was detected as GNU(/Linux). PR: kern/135468 Submitted by: dchagin [1] (initial patch) Suggested by: kib [2] Tested by: Petr Salinger (Petr.Salinger seznam.cz) for kFreeBSD Reviewed by: kib END K 10 svn:author V 3 sam K 8 svn:date V 27 2009-08-27T17:42:37.768206Z K 7 svn:log V 80 change default regdomain for thailand Obtained from: linux-wireless@kernel.org END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-27T17:53:25.691265Z K 7 svn:log V 463 MFC 196589: In the loop through the list of interfaces in network6_interface_setup() rtsol_interface gets reset to "yes" each time through the loop, but rtsol_available does not. If a user has lo0 first in their list of interfaces rtsol_available will get set to "no" the first time through the loop and subsequent interfaces will not get rtsol'ed when they should. Therefore change the conditional for the is_wired() test to _interface. Approved by: re (kib) END K 10 svn:author V 3 sam K 8 svn:date V 27 2009-08-27T17:55:44.134229Z K 7 svn:log V 73 revert r196600; didn't notice it'd been done already Submitted by: jhay END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-27T18:52:55.245872Z K 7 svn:log V 41 Tidy up some confused mergeinfo in sys/. END K 10 svn:author V 6 jilles K 8 svn:date V 27 2009-08-27T22:23:23.213720Z K 7 svn:log V 117 Add some tests for a fixed bug in an uncommitted patch. (Trying to get syntax errors for sh -c ':; do' and `:; do`.) END K 10 svn:author V 6 qingli K 8 svn:date V 27 2009-08-28T05:37:31.895569Z K 7 svn:log V 267 Do not try to free the rt_lle entry of the cached route in ip_output() if the cached route was not initialized from the flow-table. The rt_lle entry is invalid unless it has been initialized through the flow-table. Reviewed by: kmacy, rwatson MFC after: immediately END K 10 svn:author V 6 qingli K 8 svn:date V 27 2009-08-28T07:01:09.529233Z K 7 svn:log V 903 In ip_output(), the flow-table module must not try to cache L2/L3 information for interface of IFF_POINTOPOINT or IFF_LOOPBACK type. Since the L2 information (rt_lle) is invalid for these interface types, accidental caching attempt will trigger panic when the invalid rt_lle reference is accessed. When installing a new route, or when updating an existing route, the user supplied gateway address may be an interface address (this is particularly true for point-to-point interface related modules such as ppp, if_tun, if_gif). Currently the routing command handler always set the RTF_GATEWAY flag if the gateway address is given as part of the command paramters. Therefore the gateway address must be verified against interface addresses or else the route would be treated as an indirect route, thus making that route unusable. Reviewed by: kmacy, julia, rwatson Verified by: marcus MFC after: 3 days END K 10 svn:author V 6 tuexen K 8 svn:date V 27 2009-08-28T08:41:59.695643Z K 7 svn:log V 104 Fix a bug where vlan interfaces are not supported by SCTP. Approved by: rrs (mentor) MFC after: 3 days END K 10 svn:author V 7 rodrigc K 8 svn:date V 27 2009-08-28T08:49:35.923952Z K 7 svn:log V 127 - add some help output - add a -B flag to specify path of shared stage tree - make sure ssh-agent is running before we run svn END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-28T10:23:40.773694Z K 7 svn:log V 40 Hook up the pty(4) module to the build. END K 10 svn:author V 7 rodrigc K 8 svn:date V 27 2009-08-28T10:25:01.839602Z K 7 svn:log V 140 - add some help - make sure that ssh-agent is running before invoking svn - pass -F and -m flags down to svn, to facilitate specifying logs END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-28T10:25:26.165674Z K 7 svn:log V 984 MFC r196508: Our implementation of granpt(3) could be valid in the future. When I wrote the pseudo-terminal driver for the MPSAFE TTY code, Robert Watson and I agreed the best way to implement this, would be to let posix_openpt() create a pseudo-terminal with proper permissions in place and let grantpt() and unlockpt() be no-ops. This isn't valid behaviour when looking at the spec. Because I thought it was an elegant solution, I filed a bug report at the Austin Group about this. In their last teleconference, they agreed on this subject. This means that future revisions of POSIX may allow grantpt() and unlockpt() to be no-ops if an open() on /dev/ptmx (if the implementation has such a device) and posix_openpt() already do the right thing. I'd rather put this in the manpage, because simply mentioning we don't comply to any standard makes it look worse than it is. Right now we don't, but at least we took care of it. Approved by: re (kib) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-28T14:06:55.820009Z K 7 svn:log V 622 Extend the device pager to support different memory attributes on different pages in an object. - Add a new variant of d_mmap() currently called d_mmap2() which accepts an additional in/out parameter that is the memory attribute to use for the requested page. - A driver either uses d_mmap() or d_mmap2() for all requests but not both. The current implementation uses a flag in the cdevsw (D_MMAP2) to indicate that the driver provides a d_mmap2() handler instead of d_mmap(). This is done to make the change ABI compatible with existing drivers and MFC'able to 7 and 8. Submitted by: alc MFC after: 1 month END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-28T14:22:01.016797Z K 7 svn:log V 601 MFC 196224: Adjust the handling of the local APIC PMC interrupt vector: - Provide lapic_disable_pmc(), lapic_enable_pmc(), and lapic_reenable_pmc() routines in the local APIC code that the hwpmc(4) driver can use to manage the local APIC PMC interrupt vector. - Do not enable the local APIC PMC interrupt vector by default when HWPMC_HOOKS is enabled. Instead, the hwpmc(4) driver explicitly enables the interrupt when it is succesfully initialized and disables the interrupt when it is unloaded. This avoids enabling the interrupt on unsupported CPUs which may result in spurious NMIs. END K 10 svn:author V 7 rodrigc K 8 svn:date V 27 2009-08-28T16:45:34.831316Z K 7 svn:log V 77 Specify -B flag when re-invoking jgetsrc to check out additional directories END K 10 svn:author V 7 yongari K 8 svn:date V 27 2009-08-28T17:34:22.313297Z K 7 svn:log V 210 MFC r196516: Add RTL8168DP/RTL8111DP device id. While I'm here append "8111D" to the description of RTL8168D as RL_HWREV_8168D can be either RTL8168D or RTL8111D. PR: kern/137672 Approved by: re (kib) END K 10 svn:author V 7 yongari K 8 svn:date V 27 2009-08-28T18:01:37.259940Z K 7 svn:log V 237 MFC r196517: Don't try to power down PHY when alc(4) failed to map the device. This fixes system crash when mapping alc(4) device failed in device attach. Reported by: Jim < stapleton.41 <> gmail DOT com > Approved by: re (kib) END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-28T19:08:56.588573Z K 7 svn:log V 479 MFC r196501: When registering a protocol to an existing protocol domain via pf_proto_register(), iterate over all existing vnets to call protosw_init() and thus the appropriate .pr_init() handler in the context of each vnet. NB in the future we probably want to separate pr_init() handlers into two, i.e. per-vnet and global, functions. This change has no impact on nooptions VIMAGE builds. Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-28T19:10:58.003204Z K 7 svn:log V 1087 MFC r196502: Introduce a div_destroy() function which takes over per-vnet cleanup tasks from the existing modevent / MOD_UNLOAD handler, and register div_destroy() in protosw as per-vnet .pr_destroy() handler for options VIMAGE builds. In nooptions VIMAGE builds, div_destroy() will be invoked from the modevent handler, resulting in effectively identical operation as it was prior this change. div_destroy() also tears down hashtables used by ipdivert, which were previously left behind on ipdivert kldunloads. For options VIMAGE builds only, temporarily disable kldunloading of ipdivert, because without introducing additional locking logic it is impossible to atomically check whether all ipdivert instances in all vnets are idle, and proceed with cleanup without opening a race window for a vnet to open an ipdivert socket while ipdivert tear-down is in progress. While here, staticize div_init(), because it is not used outside of ip_divert.c. In cooperation with: julian Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-28T19:12:44.374730Z K 7 svn:log V 396 MFC r196503: Fix NFS panics with options VIMAGE kernels by apropriately setting curvnet context inside the RPC code. Temporarily set td's cred to mount's cred before calling socreate() via __rpc_nconf2socket(). Submitted by: rmacklem (in part) Reviewed by: rmacklem, rwatson Discussed with: dfr, bz Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-28T19:15:17.489117Z K 7 svn:log V 350 MFC r196505: When "jail -c vnet" request fails, the current code actually creates and leaves behind an orphaned vnet. This change ensures that such vnets get released. This change affects only options VIMAGE builds. Submitted by: jamie Discussed with: bz Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-28T19:18:20.942298Z K 7 svn:log V 431 MFC r196504: When moving ifnets from one vnet to another, and the ifnet has ifaddresses of AF_LINK type which thus have an embedded if_index "backpointer", we must update that if_index backpointer to reflect the new if_index that our ifnet just got assigned. This change affects only options VIMAGE builds. Submitted by: bz Reviewed by: bz Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) END K 10 svn:author V 7 delphij K 8 svn:date V 27 2009-08-28T19:48:06.610492Z K 7 svn:log V 205 MFC r196525: Consider flag == 0 as the same of flag == R_NEXT. This change will restore a historical behavior that has been changed by revision 190491, and has seen to break exim. Approved by: re (kib) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-28T20:06:02.300914Z K 7 svn:log V 662 Merge r196481 from head to stable/8: Rework global locks for interface list and index management, correcting several critical bugs, including race conditions and lock order issues: Replace the single rwlock, ifnet_lock, with two locks, an rwlock and an sxlock. Either can be held to stablize the lists and indexes, but both are required to write. This allows the list to be held stable in both network interrupt contexts and sleepable user threads across sleeping memory allocations or device driver interactions. As before, writes to the interface list must occur from sleepable contexts. Reviewed by: bz, julian Approved by: re (kib) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-28T20:07:38.373026Z K 7 svn:log V 557 Merge r196482 from head to stable/8: Rather than using IFNET_RLOCK() when iterating over (and modifying) the ifnet list during if_ef load, directly acquire the ifnet_sxlock exclusively. That way when if_alloc() recurses the lock, it's a write recursion rather than a read->write recursion. This code structure is arguably a bug, so add a comment indicating that this is the case. Post-8.0, we should fix this, but this commit resolves panic-on-load for if_ef. Discussed with: bz, julian Reported by: phk Approved by: re (kib) END K 10 svn:author V 6 mlaier K 8 svn:date V 27 2009-08-28T20:26:00.359267Z K 7 svn:log V 247 MFC r196551: Fix argument ordering to memcpy as well as the size of the copy in the (theoretical) case that pfi_buffer_cnt should be greater than ~_max. Submitted by: pjd Reviewed by: {krw,sthen,markus}@openbsd.org Approved by: re (kib) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-28T21:07:43.762472Z K 7 svn:log V 198 Merge r196510 from head to stable/8: Make if_grow static -- it's not used outside of if.c, and with the internals destined to change, it's better if it remains that way. Approved by: re (kib) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-28T21:10:26.561089Z K 7 svn:log V 385 Merge r196535 from head to stable/8: Use locks specific to the lltable code, rather than borrow the ifnet list/index locks, to protect link layer address tables. This avoids lock order issues during interface teardown, but maintains the bug that sysctl copy routines may be called while a non-sleepable lock is held. Reviewed by: bz, kmacy, qingli Approved by: re (kib) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-28T21:12:38.939994Z K 7 svn:log V 336 Merge r196553 from head to stable/8: Break out allocation of new ifindex values from if_alloc() and if_vmove(), and centralize in a single function ifindex_alloc(). Assert the IFNET_WLOCK, and add missing IFNET_WLOCK in if_alloc(). This does not close all known races in this code. Reviewed by: bz Approved by: re (kib) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-28T21:14:04.900717Z K 7 svn:log V 578 Merge r196559 from head to stable/8: Add IFNET_HOLD reserved pointer value for the ifindex ifnet array, which allows an index to be reserved for an ifnet without making the ifnet available for management operations. Use this in if_alloc() while the ifnet lock is released between initial index allocation and completion of ifnet initialization. Add ifindex_free() to centralize the implementation of releasing an ifindex value. Use in if_free() and if_vmove(), as well as when releasing a held index in if_alloc(). Reviewed by: bz Approved by: re (kib) END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-28T22:30:55.753107Z K 7 svn:log V 772 Introduce a separate sx lock for protecting lists of vnet sysinit and sysuninit handlers. Previously, sx_vnet, which is a lock designated for protecting the vnet list, was (ab)used for protecting vnet sysinit / sysuninit handler lists as well. Holding exclusively the sx_vnet lock while invoking sysinit and / or sysuninit handlers turned out to be problematic, since some of the handlers may attempt to wake up another thread and wait for it to walk over the vnet list, hence acquire a shared lock on sx_vnet, which in turn leads to a deadlock. Protecting vnet sysinit / sysuninit lists with a separate lock mitigates this issue, which was first observed with flowtable_flush() / flowtable_cleaner() in sys/net/flowtable.c. Reviewed by: rwatson, jhb MFC after: 3 days END K 10 svn:author V 6 jilles K 8 svn:date V 27 2009-08-28T22:41:25.158935Z K 7 svn:log V 429 sh: Fix crash with empty functions (f() { }) introduced in r196483 Empty pairs of braces are represented by a NULL node pointer, just like empty lines at the top level. Support for empty pairs of braces may be removed later. They make the code more complex, have inconsistent behaviour (may or may not change $?), are not specified by POSIX and are not allowed by some other shells like bash, dash and ksh93. Reported by: kan END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-28T22:51:07.335323Z K 7 svn:log V 159 Fix a few panics in linuxulator + VIMAGE due to curvnet not being set. This change affects only options VIMAGE builds. Reviewed by: julian MFC after: 3 days END K 10 svn:author V 3 imp K 8 svn:date V 27 2009-08-29T01:34:42.019103Z K 7 svn:log V 270 Connect bwi up to the build. While there are some problems with this driver still, it generally works well for most people most of the time. It is still too green for GENERIC, however. Submitted by: many (latest being kwm@) MFC after: 2 days (before RC1 if possible) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-29T02:17:40.781722Z K 7 svn:log V 249 Mark the fake pages constructed by the OBJT_SG pager valid. This was accidentally lost at one point during the PAT development. Without this fix vm_pager_get_pages() was zeroing each of the pages. Submitted by: czander @ NVidia MFC after: 3 days END K 10 svn:author V 8 kientzle K 8 svn:date V 27 2009-08-29T03:17:24.630583Z K 7 svn:log V 35 Style: Remove trailing whitespace. END K 10 svn:author V 5 brian K 8 svn:date V 27 2009-08-29T04:15:37.076848Z K 7 svn:log V 122 MFC r196530: Document that ppp handles pipe(2) descriptors specially in -direct mode. Approved by: re (kib) END K 10 svn:author V 3 kib K 8 svn:date V 27 2009-08-29T13:28:02.439045Z K 7 svn:log V 1008 Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stack size is equial to the actual, and reallocate the stack if sizes differ [1]. This fixes the bug introduced by r173361 that was committed several days after r173004 and consisted of kthread_add(9) ignoring the non-default kernel stack size. Also, r173361 removed the caching of the kernel stacks for a non-first thread in the process. Introduce separate kernel stack cache that keeps some limited amount of preallocated kernel stacks to lower the latency of thread allocation. Add vm_lowmem handler to prune the cache on low memory condition. This way, system with reasonable amount of the threads get lower latency of thread creation, while still not exhausting significant portion of KVA for unused kstacks. Submitted by: peter [1] Discussed with: jhb, julian, peter Reviewed by: jhb Tested by: pho MFC after: 1 week END K 10 svn:author V 5 simon K 8 svn:date V 27 2009-08-29T15:21:50.131914Z K 7 svn:log V 553 MFC r196474: Merge DTLS fixes from vendor-crypto/openssl/dist: - Fix memory consumption bug with "future epoch" DTLS records. - Fix fragment handling memory leak. - Do not access freed data structure. - Fix DTLS fragment bug - out-of-sequence message handling which could result in NULL pointer dereference in dtls1_process_out_of_seq_message(). Note that this will not get FreeBSD Security Advisory as DTLS is experimental in OpenSSL. Security: CVE-2009-1377 CVE-2009-1378 CVE-2009-1379 CVE-2009-1387 Approved by: re (kib) END K 10 svn:author V 7 thompsa K 8 svn:date V 27 2009-08-29T15:42:06.227035Z K 7 svn:log V 301 MFC r196547 It is possible for all the kthreads to exit (hci modules unloaded) which in turn ends our usb process. This means the proc pointer becomes invalid and will panic if a new kthread is added. Count the number of threads and clear the proc pointer on the last one. Approved by: re (kib) END K 10 svn:author V 7 rnoland K 8 svn:date V 27 2009-08-29T16:01:21.841441Z K 7 svn:log V 200 Swap the start/end virtual addresses in pmap_invalidate_cache_range(). This fixes the functionality on non SelfSnoop hardware. Found by: rnoland Submitted by: alc Reviewed by: kib MFC after: 3 days END K 10 svn:author V 3 kib K 8 svn:date V 27 2009-08-29T18:01:02.112758Z K 7 svn:log V 84 Dispose the kernel stack of the proper thread. Submitted by: alc MFC after: 1 week END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-29T19:45:03.676527Z K 7 svn:log V 422 MFC 196478: Prior to the dire warning about values of network_interfaces other than AUTO the biggest mistake users made was leaving lo0 off the list. Since lo0 is effectively mandatory, check for it and add it to the list if it's not there. MFC 196523: Improve the case test to detect the presence of lo0 in the list of network_interfaces. Submitted by: Christoph Mallon Approved by: re (kib) END