ƒ³w196369 142 804 481 478 382 318 353 353 238 215 385 416 778 791 365 460 483 359 498 512 319 323 213 237 806 813 350 402 416 365 375 906 929 587 150 249 264 183 276 243 388 1661 286 1734 414 428 263 393 406 754 745 320 314 500 556 731 739 160 153 158 112 124 434 374 187 210 274 350 465 162 163 245 112 110 157 165 94 106 138 107 106 124 313 169 461 203 119 227 209 154 265 230 494 395 408 370 161 172 172 477 122 156 266 206 361 330 609 329 176 174 324 143 388 697 586 355 225 278 219 246 258 463 349 368 222 205 264 201 172 140 890 565 546 534 1124 442 465 399 1732 610 1050 281 249 K 10 svn:author V 5 kmacy K 8 svn:date V 27 2009-08-18T20:39:35.798895Z K 7 svn:log V 709 MFC 196368 - change the interface to flowtable_lookup so that we don't rely on the mbuf for obtaining the fib index - check that a cached flow corresponds to the same fib index as the packet for which we are doing the lookup - at interface detach time flush any flows referencing stale rtentrys associated with the interface that is going away (fixes reported panics) - reduce the time between cleans in case the cleaner is running at the time the eventhandler is called and the wakeup is missed less time will elapse before the eventhandler returns - separate per-vnet initialization from global initialization (pointed out by jeli@) Reviewed by: sam@ Approved by: re@ END K 10 svn:author V 4 stas K 8 svn:date V 27 2009-08-18T21:07:39.187902Z K 7 svn:log V 387 - Do not try to reevaluate current RX production index on each loop iteration as it can be updated by the card while we process the RX ring forcing us to process RX descriptors for which DMA synchronisation operation has not been performed. This fixes the bug when bge(4) drops packets under high load. Discussed with: yongari, marius Approved by: re (kib) MFC after: 1 week END K 10 svn:author V 4 stas K 8 svn:date V 27 2009-08-18T21:13:00.513427Z K 7 svn:log V 384 - MFC r196370. Do not try to reevaluate current RX production index on each loop iteration as it can be updated by the card while we process the RX ring forcing us to process RX descriptors for which DMA synchronisation operation has not been performed. This fixes the bug when bge(4) drops packets under high load. Discussed with: yongari, marius Approved by: re (kib) END K 10 svn:author V 6 mlaier K 8 svn:date V 27 2009-08-19T00:10:10.919149Z K 7 svn:log V 286 If we cannot immediately get the pf_consistency_lock in the purge thread, restart the scan after acquiring the lock the hard way. Otherwise we might end up with a dead reference. Reported by: pfsense Reviewed by: eri Initial patch by: eri Tested by: pfsense Approved by: re (kib) END K 10 svn:author V 6 mlaier K 8 svn:date V 27 2009-08-19T00:17:00.586286Z K 7 svn:log V 222 MFC r196372: If we cannot immediately get the pf_consistency_lock in the purge thread, restart the scan after acquiring the lock the hard way. Otherwise we might end up with a dead reference. Approved by: re (kib) END K 10 svn:author V 5 edwin K 8 svn:date V 27 2009-08-19T03:52:15.327605Z K 7 svn:log V 258 - Make note of the update of tzdata from 2008h to 2009j - Make note of the update of tzcode from 2004a to 2009h Add an extra alert that people who update via source or via freebsd-update will have to run the tzsetup(8) utility. Approved by: re (Kostik) END K 10 svn:author V 5 edwin K 8 svn:date V 27 2009-08-19T03:58:12.125041Z K 7 svn:log V 258 - Make note of the update of tzdata from 2008h to 2009j - Make note of the update of tzcode from 2004a to 2009h Add an extra alert that people who update via source or via freebsd-update will have to run the tzsetup(8) utility. Approved by: re (Kostik) END K 10 svn:author V 6 tuexen K 8 svn:date V 27 2009-08-19T12:02:28.086571Z K 7 svn:log V 142 Fix a bug in the handling of unreliable messages which results in stalled associations. Approved by: re, rrs (mentor) MFC after: immediately END K 10 svn:author V 6 tuexen K 8 svn:date V 27 2009-08-19T12:12:51.574214Z K 7 svn:log V 119 Fix a bug in the handling of unreliable messages which results in stalled associations. Approved by: re, rrs (mentor) END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-19T14:30:46.255088Z K 7 svn:log V 293 Small changes to the warning message generated by pty(4): - Only print the warning once, instead of filling up the screen. - Use the word "legacy" for the pty_warningcnt description, to prevent confusion. - Use log() instead of printf(). Discussed with: rwatson, jhb Approved by: re (kib) END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-19T14:38:43.886789Z K 7 svn:log V 324 MFC r196378: Small changes to the warning message generated by pty(4): - Only print the warning once, instead of filling up the screen. - Use the word "legacy" for the pty_warningcnt description, to prevent confusion. - Use log() instead of printf(). Discussed with: rwatson, jhb Approved by: re (kib) END K 10 svn:author V 3 raj K 8 svn:date V 27 2009-08-19T14:39:08.509950Z K 7 svn:log V 685 Fix USB cache sync operations for platforms with non-coherent DMA. - usb_pc_cpu_invalidate() is called between [consecutive] reads from a device, so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. Note we cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC flags, as the low level bus dma sync operation is implementation dependent and we cannot assume the required order of operations to be guaranteed. - usb_pc_cpu_flush() is called before writing to a device, so BUS_DMASYNC_PREWRITE should be used. Submitted by: Grzegorz Bernacki Reviewed by: HPS, arm@, usb@ ML Tested by: HPS, Mike Tancsa Approved by: re (kib) Obtained from: Semihalf END K 10 svn:author V 3 raj K 8 svn:date V 27 2009-08-19T14:48:59.395045Z K 7 svn:log V 698 MFC r196380 Fix USB cache sync operations for platforms with non-coherent DMA. - usb_pc_cpu_invalidate() is called between [consecutive] reads from a device, so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. Note we cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC flags, as the low level bus dma sync operation is implementation dependent and we cannot assume the required order of operations to be guaranteed. - usb_pc_cpu_flush() is called before writing to a device, so BUS_DMASYNC_PREWRITE should be used. Submitted by: Grzegorz Bernacki Reviewed by: HPS, arm@, usb@ ML Tested by: HPS, Mike Tancsa Approved by: re (kib) Obtained from: Semihalf END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-19T15:17:13.233073Z K 7 svn:log V 272 Explicitly line up the CPU state labels with the calculated starting column that takes into account the width of the largest CPU ID. On systems with > 10 CPUs the labels for the first 10 CPUs were not lined up properly otherwise. Approved by: re (kib) MFC after: 1 week END K 10 svn:author V 6 marcel K 8 svn:date V 27 2009-08-19T16:29:20.878434Z K 7 svn:log V 364 Remove the dependency on the kernel -- in particular the gctl request to the GEOM_BSD class -- to translate the absolute offsets in the label to relative ones. This makes bslabel(8) work correctly with GEOM_PART and also when the BSD label is nested under arbitrary partitioning schemes. Inspired by: Eygene Ryabinkin Approved by: re (kib) END K 10 svn:author V 6 marcel K 8 svn:date V 27 2009-08-19T16:40:45.688612Z K 7 svn:log V 387 MFC change 196383: Remove the dependency on the kernel -- in particular the gctl request to the GEOM_BSD class -- to translate the absolute offsets in the label to relative ones. This makes bslabel(8) work correctly with GEOM_PART and also when the BSD label is nested under arbitrary partitioning schemes. Inspired by: Eygene Ryabinkin Approved by: re (kib) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-19T17:45:58.726470Z K 7 svn:log V 266 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. On systems with > 10 CPUs the labels for the first 10 CPUs were not lined up properly otherwise. Approved by: re (kib) END K 10 svn:author V 7 delphij K 8 svn:date V 27 2009-08-19T17:59:41.247321Z K 7 svn:log V 401 Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP. Without this changeset there will be no way to prevent these NICs from sending ARP, which is harmful in server farms that is configured as "Direct Server Return" behind a load balancer. A better fix would remove the whole hack completely but it would be later than 8.0-RELEASE. Reviewed by: jfv, yongari Approved by: re (kib) END K 10 svn:author V 7 delphij K 8 svn:date V 27 2009-08-19T18:08:50.912460Z K 7 svn:log V 415 MFC r196386: Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP. Without this changeset there will be no way to prevent these NICs from sending ARP, which is harmful in server farms that is configured as "Direct Server Return" behind a load balancer. A better fix would remove the whole hack completely but it would be later than 8.0-RELEASE. Reviewed by: jfv, yongari Approved by: re (kib) END K 10 svn:author V 5 kmacy K 8 svn:date V 27 2009-08-19T20:13:09.039859Z K 7 svn:log V 224 This change fixes a comment and addresses a complaint by kib@ by moving a frequently executed flowtable syslog statement from being conditional on bootverbose to conditional on a per-vnet flowtable sysctl. Approved by: re@ END K 10 svn:author V 5 kmacy K 8 svn:date V 27 2009-08-19T20:17:36.474145Z K 7 svn:log V 228 This change fixes a comment and addresses a complaint by kib@ by moving a frequently executed flowtable syslog statement from being conditional on bootverbose to conditional on a per-vnet flowtable sysctl. Approved by: re@ END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-19T20:39:33.555717Z K 7 svn:log V 121 Make the MacBookPro3,1 hardware boot again. Tested by: Patrick Lamaiziere Approved by: re (kib) END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-19T20:44:22.012678Z K 7 svn:log V 145 MFC r196390: Make the MacBookPro3,1 hardware boot again. Tested by: Patrick Lamaiziere Approved by: re (kib) END K 10 svn:author V 5 simon K 8 svn:date V 27 2009-08-19T20:47:31.513882Z K 7 svn:log V 711 Add support for backing up the old kernel when installing a new kernel using freebsd-update. This applies to using freebsd-update in "upgrade mode" and normal freebsd-update on a security branch. The backup kernel will be written to /boot/kernel.old, if the directory does not exist, or the directory was created by freebsd-update in a previous backup. Otherwise freebsd-update will generate a new directory name for use by the backup. By default symbol files are not backed up to save diskspace and avoid filling up the root partition. This feature is fully configurable in the freebsd-update config file, but defaults to enabled. MFC after: 1 week (stable/7) Reviewed by: cperciva Approved by: re (kib) END K 10 svn:author V 5 simon K 8 svn:date V 27 2009-08-19T21:01:32.943328Z K 7 svn:log V 718 MFC 196392: Add support for backing up the old kernel when installing a new kernel using freebsd-update. This applies to using freebsd-update in "upgrade mode" and normal freebsd-update on a security branch. The backup kernel will be written to /boot/kernel.old, if the directory does not exist, or the directory was created by freebsd-update in a previous backup. Otherwise freebsd-update will generate a new directory name for use by the backup. By default symbol files are not backed up to save diskspace and avoid filling up the root partition. This feature is fully configurable in the freebsd-update config file, but defaults to enabled. Reviewed by: cperciva Approved by: re (kib) END K 10 svn:author V 5 simon K 8 svn:date V 27 2009-08-19T21:33:09.405580Z K 7 svn:log V 255 MFC r193629: Make "human-readable" (-H/-h) output also "humanize" inode counts. Base 10 is always used for the inode counts as I could not think of any reason base 2 inode counts would be useful. Minor mdoc markup fix to df(1) while here anyway. END K 10 svn:author V 3 pjd K 8 svn:date V 27 2009-08-20T00:05:29.671707Z K 7 svn:log V 309 Our libc doesn't implement control method for XDR (only kernel does) and it will always return failure. Fix this by bringing userland implementation of xdrmem_control() back. This allow 'zpool import' to work again. Reported by: Thomas Backman Reviewed by: kmacy Approved by: re (kib) END K 10 svn:author V 3 pjd K 8 svn:date V 27 2009-08-20T00:08:58.044995Z K 7 svn:log V 323 MFC r196395: Our libc doesn't implement control method for XDR (only kernel does) and it will always return failure. Fix this by bringing userland implementation of xdrmem_control() back. This allow 'zpool import' to work again. Reported by: Thomas Backman Reviewed by: kmacy Approved by: re (kib) END K 10 svn:author V 4 will K 8 svn:date V 27 2009-08-20T02:33:12.712978Z K 7 svn:log V 271 Fix CARP memory leaks on carp_if's malloc'd using M_CARP. This occurs when CARP tries to free them using M_IFADDR after the last address for a virtual host is removed and when detaching from the parent interface. Reviewed by: mlaier Approved by: re (kib), ken (mentor) END K 10 svn:author V 4 will K 8 svn:date V 27 2009-08-20T02:49:43.141423Z K 7 svn:log V 281 MFC r196397 from head: Fix CARP memory leaks on carp_if's malloc'd using M_CARP. This occurs when CARP tries to free them using M_IFADDR after the last address for a virtual host is removed and when detaching from the parent interface. Approved by: re (kib), ken (mentor) END K 10 svn:author V 3 avg K 8 svn:date V 27 2009-08-20T10:57:14.465504Z K 7 svn:log V 813 fstat: fix fsid comparison when executed on systems with 64-bit long This affects only fstat on zfs and devfs, only on 64-bit systems and only when fsid is greater than 2^31 - 1. When fstat examines a file via stat(2) it takes uint32_t st_dev and assigns to (signed) (64-bit) long fsid, this results in a positive value. When fstat examines opened files it takes int32_t f_fsid.val[0] and assigns to (signed) (64-bit) long fsid, this results in a negative value. So, while initially st_dev and f_fsid.val[0] have the same bit values they get promoted to different 64-bit values because of the signed-vs-unsigned difference. A fix is to use "more natural" positive numbers by introducing intermediate unsigned cast for f_fsid.val[0]. Reviewed by: jhb, lulf Approved by: re (kib) MFC after: 1 week (to stable/7) END K 10 svn:author V 3 avg K 8 svn:date V 27 2009-08-20T11:04:31.903462Z K 7 svn:log V 836 MFC 196399: fstat: fix fsid comparison when executed on systems with 64-bit long This affects only fstat on zfs and devfs, only on 64-bit systems and only when fsid is greater than 2^31 - 1. When fstat examines a file via stat(2) it takes uint32_t st_dev and assigns to (signed) (64-bit) long fsid, this results in a positive value. When fstat examines opened files it takes int32_t f_fsid.val[0] and assigns to (signed) (64-bit) long fsid, this results in a negative value. So, while initially st_dev and f_fsid.val[0] have the same bit values they get promoted to different 64-bit values because of the signed-vs-unsigned difference. A fix is to use "more natural" positive numbers by introducing intermediate unsigned cast for f_fsid.val[0]. Reviewed by: jhb, lulf Approved by: re (kib) MFC after: 1 week (to stable/7) END K 10 svn:author V 5 edwin K 8 svn:date V 27 2009-08-20T13:59:52.342112Z K 7 svn:log V 492 New datafiles for the share/msgdef collection. The data files contain the unicode encoded character for the locale msgdef data. This can be converted to either UTF-8 (which will be the main file) and symlinked where possible or to other charactermaps. This way we don't end up with high-ascii or otherwise encoded data files in the repository and we will be able to edit the files without having to worry about the right characters because they later get converted into the right encoding. END K 10 svn:author V 5 edwin K 8 svn:date V 27 2009-08-20T14:20:56.445039Z K 7 svn:log V 56 Proper create zh_CN things. Also CCNLLINKS -> CCLNLINKS END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-20T19:17:53.019723Z K 7 svn:log V 156 Temporarily revert the new-bus locking for 8.0 release. It will be reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-20T19:23:58.278299Z K 7 svn:log V 171 Change the 'resid' parameter to sglist_consume_uio() from an int to a size_t to match the recent type change of the uio_resid member of struct uio. Approved by: re (kib) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-20T20:23:28.561365Z K 7 svn:log V 91 MFC 196403: Temporarily revert the new-bus locking for 8.0 release. Approved by: re (kib) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-20T20:53:36.580216Z K 7 svn:log V 183 MFC 196404: Change the 'resid' parameter to sglist_consume_uio() from an int to a size_t to match the recent type change of the uio_resid member of struct uio. Approved by: re (kib) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-20T21:14:52.555611Z K 7 svn:log V 146 Merge r196263 from head to stable/8: Remove unused if_rawoutput() macro; it has been unused since at least FreeBSD 2. Approved by: re (kib) END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-20T21:29:49.232714Z K 7 svn:log V 291 Merge r196267 from head to stable/8: Rather than fix questionable ifnet list locking in the implementation of the kern.polling.enable sysctl, remove the sysctl. It has been deprecated since FreeBSD 6 in favour of per-ifnet polling flags. Reviewed by: luigi Approved by: re (kib) END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-20T22:39:20.074779Z K 7 svn:log V 1567 vimage(8) is a legacy CLI interface for managing jails associated with network stack instances, which is provided for compatibility with older applications. This change brings it back to life in a followup to the initial conversion of vimage to use the new jail(4) userland-kernel API: - when creating vimages via "vimage -c", by default turn on a few options expected by legacy applications, such as allow operations on raw sockets, FS mounts etc, and allow jail-related parameters to be optionally configured. - introduce the "-m" modifier which allows for configuring jail parameters of existing vimages / vnet-jails. - make "vimage name command ..." actually work. - when reassigning ifnets to vnets using "vimage -i", attempt to rename the ifnet as "ethXXX" on arrival in the target vnet. Several legacy applications are known to depend heavily on such behavior. - vimage -l lists only jails associated with vnets. The output is sorted using vimage / jail names as keys. - vimage -l by default searches only the current level in the jail hierarchy. Recursive listing can be requested via -r switch. - vimage -l by default prints only jail names on each line, making such output suitable for pipelining to other commands. More verbose output can be obtained via -v switch, and even more jail specific information will be displayed if -j switch is turned on. - there's no need to build vimage as statically linked, so update the Makefile accordingly. - update the vimage.8 man page. Approved by: re (rwatson), julian (mentor) MFC after: immediately END K 10 svn:author V 5 peter K 8 svn:date V 27 2009-08-20T22:53:28.731981Z K 7 svn:log V 191 Fix signed comparison bug when ticks goes negative after 24 days of uptime. This causes the tcp time_wait state code to fail to expire sockets in timewait state. Approved by: re (kensmith) END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-20T22:56:29.097258Z K 7 svn:log V 1640 MFC r196409: vimage(8) is a legacy CLI interface for managing jails associated with network stack instances, which is provided for compatibility with older applications. This change brings it back to life in a followup to the initial conversion of vimage to use the new jail(4) userland-kernel API: - when creating vimages via "vimage -c", by default turn on a few options expected by legacy applications, such as allow operations on raw sockets, FS mounts etc, and allow jail-related parameters to be optionally configured. - introduce the "-m" modifier which allows for configuring jail parameters of existing vimages / vnet-jails. - make "vimage name command ..." actually work. - when reassigning ifnets to vnets using "vimage -i", attempt to rename the ifnet as "ethXXX" on arrival in the target vnet. Several legacy applications are known to depend heavily on such behavior. - vimage -l lists only jails associated with vnets. The output is sorted using vimage / jail names as keys. - vimage -l by default searches only the current level in the jail hierarchy. Recursive listing can be requested via -r switch. - vimage -l by default prints only jail names on each line, making such output suitable for pipelining to other commands. More verbose output can be obtained via -v switch, and even more jail specific information will be displayed if -j switch is turned on. - there's no need to build vimage as statically linked, so update the Makefile accordingly. - update the vimage.8 man page. Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) END K 10 svn:author V 4 jkim K 8 svn:date V 27 2009-08-20T22:58:05.820466Z K 7 svn:log V 320 Check whether the SMBIOS reports reasonable amount of memory. If it is less than "avail memory", fall back to Maxmem to avoid user confusion. We use SMBIOS information to display "real memory" since r190599 but some broken SMBIOS implementation reported only half of actual memory. Tested by: bz Approved by: re (kib) END K 10 svn:author V 4 jkim K 8 svn:date V 27 2009-08-20T23:04:21.352487Z K 7 svn:log V 334 MFC: r196412 Check whether the SMBIOS reports reasonable amount of memory. If it is less than "avail memory", fall back to Maxmem to avoid user confusion. We use SMBIOS information to display "real memory" since r190599 but some broken SMBIOS implementation reported only half of actual memory. Tested by: bz Approved by: re (kib) END K 10 svn:author V 5 peter K 8 svn:date V 27 2009-08-20T23:07:53.820735Z K 7 svn:log V 168 MFC rev 196410 - deal with 'ticks' going negative after 24 days of uptime with the default 1000hz clock in the timewait expiration code. Approved by: re (kensmith) END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2009-08-21T01:00:15.904854Z K 7 svn:log V 295 Fix a boot hang for hptrr(4) caused by changes introduced in r195534. It is necessary to make sure cpi->transport is set for xpt_scan_bus() to work properly. Submitted by: Bernhard Schmidt (scb+freebsd-current techwires net) Reviewed by: scottl Approved by: re (kib) END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2009-08-21T01:12:06.095227Z K 7 svn:log V 308 MFC r196415: Fix a boot hang for hptrr(4) caused by changes introduced in r195534. It is necessary to make sure cpi->transport is set for xpt_scan_bus() to work properly. Submitted by: Bernhard Schmidt (scb+freebsd-current techwires net) Reviewed by: scottl Approved by: re (kib) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-21T02:59:07.199189Z K 7 svn:log V 661 This patch fixes two bugs in sglist(9) and improves robustness of the API via better semantics if a request to append an address range to an existing list fails. - When cloning an sglist, properly set the length in the new sglist instead of leaving the new list empty. - Properly compute the amount of data added to an sglist via _sglist_append_buf(). This allows sglist_consume_uio() to properly update uio_resid. - When a request to append an address range to a scatter/gather list fails, restore the sglist to the state it had at the start of the function call instead of resetting it to an empty list. Requested by: np (3) Approved by: re (kib) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2009-08-21T03:14:39.847304Z K 7 svn:log V 652 MFC 196417: This patch fixes two bugs in sglist(9) and improves robustness of the API via better semantics if a request to append an address range to an existing list fails. - When cloning an sglist, properly set the length in the new sglist instead of leaving the new list empty. - Properly compute the amount of data added to an sglist via _sglist_append_buf(). This allows sglist_consume_uio() to properly update uio_resid. - When a request to append an address range to a scatter/gather list fails, restore the sglist to the state it had at the start of the function call instead of resetting it to an empty list. Approved by: re (kib) END K 10 svn:author V 6 julian K 8 svn:date V 27 2009-08-21T09:22:32.243104Z K 7 svn:log V 224 Don't allow access to the internals until it has all been set up. Specifically, not until the per-vnet parts have been set up. Submitted by: kmacy@ Reviewed by: julian@, zec@ Approved by: re(rwatson) MFC after: immediately END K 10 svn:author V 6 julian K 8 svn:date V 27 2009-08-21T10:05:26.992606Z K 7 svn:log V 218 MFC r196419: Don't allow access to the internals until it has all been set up. Specifically, not until the per-vnet parts have been set up. Submitted by: kmacy@ Reviewed by: julian@, zec@ Approved by: re(rwatson) END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-21T11:13:56.748103Z K 7 svn:log V 407 Bugfix: all requests for creating vnets via vimage -c were always reported as failures, even if the actual library / system call would succeed, because error message would be reported if the return value from jail_setv() call was >= 0, and if not, then if that same value was < 0, i.e. always. The correct behavior is to abort (only) if jail_setv() returns < 0. Approved by: re (rwatson), julian (mentor) END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-21T11:17:25.519085Z K 7 svn:log V 463 MFC r196421: Bugfix: all requests for creating vnets via vimage -c were always reported as failures, even if the actual library / system call would succeed, because error message would be reported if the return value from jail_setv() call was >= 0, and if not, then if that same value was < 0, i.e. always. The correct behavior is to abort (only) if jail_setv() returns < 0. Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) END K 10 svn:author V 6 julian K 8 svn:date V 27 2009-08-21T11:20:10.262277Z K 7 svn:log V 635 Fix ipfw's initialization functions to get the correct order of evaluation to allow vnet and non vnet operation. Move some functions from ip_fw_pfil.c to ip_fw2.c and mode to mostly using the SYSINIT and VNET_SYSINIT handlers instead of the modevent handler. Correct some spelling errors in comments in the affected code. Note this bug fixes a crash in NON VIMAGE kernels when ipfw is unloaded. This patch is a minimal patch for 8.0 I have a much larger patch that actually fixes the underlying problems that will be applied after 8.0 Reviewed by: zec@, rwatson@, bz@(earlier version) Approved by: re (rwatson) MFC after: Immediatly END K 10 svn:author V 6 julian K 8 svn:date V 27 2009-08-21T11:23:29.120929Z K 7 svn:log V 643 MFC r196423 Fix ipfw's initialization functions to get the correct order of evaluation to allow vnet and non vnet operation. Move some functions from ip_fw_pfil.c to ip_fw2.c and mode to mostly using the SYSINIT and VNET_SYSINIT handlers instead of the modevent handler. Correct some spelling errors in comments in the affected code. Note this bug fixes a crash in NON VIMAGE kernels when ipfw is unloaded. This patch is a minimal patch for 8.0 I have a much larger patch that actually fixes the underlying problems that will be applied after 8.0 Reviewed by: zec@, rwatson@, bz@(earlier version) Approved by: re (rwatson) END K 10 svn:author V 6 julian K 8 svn:date V 27 2009-08-21T11:34:01.573675Z K 7 svn:log V 65 It's been long enough. I hereby let Zec off the leash. Look out! END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2009-08-21T17:40:24.811209Z K 7 svn:log V 56 Ready for 8.0-BETA3 builds. Approved by: re (implicit) END K 10 svn:author V 5 kmacy K 8 svn:date V 27 2009-08-21T20:06:33.481807Z K 7 svn:log V 64 revert change that causes huge slowdown on loopback connections END K 10 svn:author V 5 kmacy K 8 svn:date V 27 2009-08-22T00:56:17.424454Z K 7 svn:log V 18 revert the revert END K 10 svn:author V 5 kmacy K 8 svn:date V 27 2009-08-22T00:56:47.944822Z K 7 svn:log V 30 don't delay acks on localhost END K 10 svn:author V 4 stas K 8 svn:date V 27 2009-08-22T09:09:44.491998Z K 7 svn:log V 340 - MFC r196244: - Avoid overflowing the swap size counters in human-readable mode by introducing the new CONVERT_BLOCKS macro which operates on sizes already converted to number of blocks. With this macro it is not longer needed to perform needless multiplication by blocksize just to divide on it later in CONVERT macro. END K 10 svn:author V 4 stas K 8 svn:date V 27 2009-08-22T09:17:49.772880Z K 7 svn:log V 280 - MFC r196246: - Proprely intialize UART parameters at probe stage, so uart(4) will initialize the FIFO memory correctly on attach. Before that this values was intialized in only in at91_usart_bus_attach which is called after the uart(4) memory allocation happens. END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2009-08-22T23:44:37.357106Z K 7 svn:log V 90 Make head 9.0-CURRENT in preparation for lifting code freeze. Approved by: re (implicit) END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2009-08-23T03:15:04.080640Z K 7 svn:log V 112 Open head for "normal" (conservative until 8.0 gets out please!) commit activity. Approved by: core (implicit) END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-23T05:42:50.599926Z K 7 svn:log V 179 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-23T05:45:38.300383Z K 7 svn:log V 255 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-23T05:47:19.419638Z K 7 svn:log V 370 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. END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2009-08-23T05:47:33.868053Z K 7 svn:log V 67 Fix typos. Reported by: Harald Servat END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2009-08-23T05:49:12.096194Z K 7 svn:log V 68 Fix a typo. Reported by: John McCullough END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-23T05:56:54.236970Z K 7 svn:log V 150 Fix the typo mentioned in the PR, and one additional. Fix caps while I'm here. PR: conf/138087 Submitted by: Chris Petrik END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2009-08-23T06:19:02.138418Z K 7 svn:log V 17 Correct grammar. END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2009-08-23T06:22:31.565231Z K 7 svn:log V 15 Correct typos. END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2009-08-23T06:30:14.561835Z K 7 svn:log V 60 Update name of INDEX file as part of 8.0 -> 9.0 transition. END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2009-08-23T06:33:42.179271Z K 7 svn:log V 68 Update for RELENG_8. Reminded by: dougb Approved by: re (implicit) END K 10 svn:author V 2 jb K 8 svn:date V 27 2009-08-23T06:53:58.967676Z K 7 svn:log V 4 MFC END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2009-08-23T07:24:39.090192Z K 7 svn:log V 11 Fix typos. END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2009-08-23T07:29:34.808854Z K 7 svn:log V 43 Fix typos, use American English spellings. END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2009-08-23T07:30:12.484513Z K 7 svn:log V 12 Fix a typo. END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2009-08-23T07:31:10.460042Z K 7 svn:log V 11 Fix typos. END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2009-08-23T07:32:30.500594Z K 7 svn:log V 29 Use US spellings, fix typos. END K 10 svn:author V 6 julian K 8 svn:date V 27 2009-08-23T07:48:11.582591Z K 7 svn:log V 217 Add claraifications to the kproc and kthread manpages and link the kthread_create(9) man page to the kproc(9) page as it had migrated and people looking for it may need a hand to find its new name. MFC after: 1 week END K 10 svn:author V 6 julian K 8 svn:date V 27 2009-08-23T07:59:28.831973Z K 7 svn:log V 74 Fix typo in comment that has been bugging me for days. MFC after: 1 week END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-23T08:04:40.139497Z K 7 svn:log V 369 Add ttydisc_rint_simple(). I noticed several drivers in our tree don't actually care about parity and framing, such as pts(4), snp(4) (and my partially finished console driver). Instead of duplicating a lot of code, I think we'd better add a utility function for those drivers to quickly process a buffer of input. Also change pts(4) and snp(4) to use this function. END K 10 svn:author V 6 julian K 8 svn:date V 27 2009-08-23T08:49:32.356523Z K 7 svn:log V 107 Fix another typo right next to the previous one, that amazingly, I did not see before. MFC after: 1 week END K 10 svn:author V 6 rpaulo K 8 svn:date V 27 2009-08-23T09:55:06.505601Z K 7 svn:log V 24 Constify prime numbers. END K 10 svn:author V 6 rpaulo K 8 svn:date V 27 2009-08-23T09:58:06.770424Z K 7 svn:log V 131 Make dev.asmc.N.light.control writable by everyone. Submitted by: Patrick Lamaiziere MFC after: 1 week END K 10 svn:author V 3 pjd K 8 svn:date V 27 2009-08-23T11:22:46.713075Z K 7 svn:log V 116 - Give minclsyspri and maxclsyspri real values (consulted with kmacy). - Honour 'pri' argument for thread_create(). END K 10 svn:author V 3 pjd K 8 svn:date V 27 2009-08-23T11:27:08.283658Z K 7 svn:log V 62 Set priority of vdev_geom threads and zvol threads to PRIBIO. END K 10 svn:author V 3 pjd K 8 svn:date V 27 2009-08-23T11:33:46.838188Z K 7 svn:log V 172 - Hide ZFS kernel threads under zfskern process. - Use better (shorter) threads names: 'zvol:worker zvol/tank/vol00' -> 'zvol tank/vol00' 'vdev:worker da0' -> 'vdev da0' END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-23T12:23:24.913573Z K 7 svn:log V 138 Add support for diffs generated by Perforce. It basically picks the filenames from the "====" line and strips off the # revision number. END K 10 svn:author V 3 kib K 8 svn:date V 27 2009-08-23T12:44:15.622688Z K 7 svn:log V 401 Fix the conformance of poll(2) for sockets after r195423 by returning POLLHUP instead of POLLIN for several cases. Now, the tools/regression/poll results for FreeBSD are closer to that of the Solaris and Linux. Also, improve the POSIX conformance by explicitely clearing POLLOUT when POLLHUP is reported in pollscan(), making the fix global. Submitted by: bde Reviewed by: rwatson MFC after: 1 week END K 10 svn:author V 5 simon K 8 svn:date V 27 2009-08-23T13:58:25.408600Z K 7 svn:log V 300 Import DTLS fix from upstream OpenSSL 0.9.8 branch: Fix memory consumption bug with "future epoch" DTLS records. Note that this will not get FreeBSD Security Advisory as DTLS is experimental in OpenSSL. Security: CVE-2009-1377 Obtained from: OpenSSL CVS http://cvs.openssl.org/chngview?cn=18187 END K 10 svn:author V 5 simon K 8 svn:date V 27 2009-08-23T14:12:01.194186Z K 7 svn:log V 313 Import DTLS fix from upstream OpenSSL 0.9.8 branch: Fix fragment handling memory leak. Note that this will not get FreeBSD Security Advisory as DTLS is experimental in OpenSSL. Security: CVE-2009-1378 Obtained from: OpenSSL CVS http://cvs.openssl.org/filediff?f=openssl/ssl/d1_both.c&v1=1.4.2.13&v2=1.4.2.15 END K 10 svn:author V 5 simon K 8 svn:date V 27 2009-08-23T14:15:28.675581Z K 7 svn:log V 275 Import DTLS fix from upstream OpenSSL 0.9.8 branch: Do not access freed data structure. Note that this will not get FreeBSD Security Advisory as DTLS is experimental in OpenSSL. Security: CVE-2009-1379 Obtained from: OpenSSL CVS http://cvs.openssl.org/chngview?cn=18156 END K 10 svn:author V 7 rnoland K 8 svn:date V 27 2009-08-23T14:27:46.658538Z K 7 svn:log V 65 Clean up the locking in drm_alloc_resource() MFC after: 2 weeks END K 10 svn:author V 7 rnoland K 8 svn:date V 27 2009-08-23T14:31:20.350454Z K 7 svn:log V 76 Clean up the handling of device minors Submitted by: Ed MFC after: 2 weeks END K 10 svn:author V 7 rnoland K 8 svn:date V 27 2009-08-23T14:33:12.890093Z K 7 svn:log V 76 Add a read only sysctl tracking the hw.drm.msi tunable. MFC after: 2 weeks END K 10 svn:author V 5 simon K 8 svn:date V 27 2009-08-23T14:39:15.908298Z K 7 svn:log V 382 Import DTLS fix from upstream OpenSSL 0.9.8 branch: 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-1387 Obtained from: OpenSSL CVS http://cvs.openssl.org/chngview?cn=17958 END K 10 svn:author V 5 simon K 8 svn:date V 27 2009-08-23T14:44:51.977299Z K 7 svn:log V 28 Tag 0.9.8k wtih dtls-fixes. END K 10 svn:author V 6 jkoshy K 8 svn:date V 27 2009-08-23T14:48:25.293283Z K 7 svn:log V 61 Use a more appropriate choice of words. Submitted by: danfe END K 10 svn:author V 7 rnoland K 8 svn:date V 27 2009-08-23T14:55:57.804753Z K 7 svn:log V 169 Add kernel support for Radeon R6/7xx 3D. You will still need Mesa from git and possibly an updated DDX driver, but this is working fairly well now. MFC after: 2 weeks END K 10 svn:author V 7 rnoland K 8 svn:date V 27 2009-08-23T15:02:58.289680Z K 7 svn:log V 109 Add GET_PARAM support for Z pipes. This is needed for occulsion queries on rv530 chips. MFC after: 2 weeks END K 10 svn:author V 3 sam K 8 svn:date V 27 2009-08-23T16:04:10.438495Z K 7 svn:log V 268 Enable _DIRENT_HAVE_D_TYPE so wpa_cli scans directories properly for it's unix domain socket. Before this change wpa_cli would take the first file in the directory that was not "." or "..". Submitted by: Brandon Gooch MFC after: 3 days END K 10 svn:author V 3 sam K 8 svn:date V 27 2009-08-23T16:21:49.970423Z K 7 svn:log V 237 MFC r196472: Enable _DIRENT_HAVE_D_TYPE so wpa_cli scans directories properly for it's unix domain socket. Before this change wpa_cli would take the first file in the directory that was not "." or "..". Approved by: re (rwatson) END K 10 svn:author V 5 simon K 8 svn:date V 27 2009-08-23T16:29:47.882728Z K 7 svn:log V 514 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. MFC after: 1 week Security: CVE-2009-1377 CVE-2009-1378 CVE-2009-1379 CVE-2009-1387 END K 10 svn:author V 3 ume K 8 svn:date V 27 2009-08-23T17:00:16.175209Z K 7 svn:log V 236 - Add AS lookup functionality to traceroute6(8) as well. - Support for IPv6 transport for AS lookup. - Introduce $RA_SERVER to set whois server. - Support for 4 byte ASN. - ANSIfy function declaration in as.c. Tested by: IHANet folks. END K 10 svn:author V 6 ivoras K 8 svn:date V 27 2009-08-23T18:15:13.553653Z K 7 svn:log V 81 Remove (c) line. Requested by: pjd Approved by: gnn (mentor) MFC after: 1 month END K 10 svn:author V 7 antoine K 8 svn:date V 27 2009-08-23T18:28:58.636259Z K 7 svn:log V 78 ObsoleteFiles.inc: kthread_create(9) was resurrected as a mlink to kproc(9) END K 10 svn:author V 5 dougb K 8 svn:date V 27 2009-08-23T19:52:47.496665Z K 7 svn:log V 229 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. END K 10 svn:author V 6 cognet K 8 svn:date V 27 2009-08-23T19:54:36.845940Z K 7 svn:log V 48 No need to remove the same flag multiple times. END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-23T20:26:09.950469Z K 7 svn:log V 296 Allow pty(4) to be loaded as a kld. Unfortunately, the wrappers that are present in pts(4) don't have the mechanics to allow pty(4) to be unloaded safely, so I'm forcing this kld to return EBUSY. This also means we have to enable some extra code in pts(4) unconditionally. Proposed by: rwatson END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-23T20:40:19.421342Z K 7 svn:log V 600 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 MFC after: 3 days END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-23T21:00:21.333968Z K 7 svn:log V 489 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 MFC after: 3 days END K 10 svn:author V 6 jilles K 8 svn:date V 27 2009-08-23T21:09:46.626473Z K 7 svn:log V 259 sh: Fix crash when undefining or redefining a currently executing function. Add a reference count to function definitions. Memory may leak if multiple SIGINTs arrive in interactive mode, this will be fixed later by changing SIGINT handling. PR: bin/137640 END K 10 svn:author V 6 cognet K 8 svn:date V 27 2009-08-23T23:37:53.761480Z K 7 svn:log V 129 KDB needs , so move it under #ifdef KDB. While I'm there, remove dead code, we will never support acorn26. END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2009-08-24T03:04:13.637713Z K 7 svn:log V 180 Oops. Needed to adjust a little bit more of the line for packages-8-stable now that we're prepping for 8.0's release. Submitted by: pluknet at gmail dot com Pointy hat: kensmith END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2009-08-24T03:49:37.752983Z K 7 svn:log V 121 Update the comment for RELENG_8 too. Submitted by: Dmitry Morozovsky Approved by: re (implicit) END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T04:57:48.959715Z K 7 svn:log V 150 Remove redundant Giant reference. Giant will be dropped automatically when the mutex argument is NULL. Reported by: Various people Submitted by: hps END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T04:58:11.763888Z K 7 svn:log V 162 - allow disabling "root_mount_hold()" by setting a sysctl/tunable at boot - remove some redundant initial explore code Submitted by: hps END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T04:58:42.101970Z K 7 svn:log V 367 - patch for cordump slowdown. Avoid using DELAY(1000) when no keys are pressed. - Reported by: Various people - add sysctl to disable keyboard led control request - Reported by: Yoshihiro Ota - Save system CPU usage: Patch to stop keyboard timer when no keys are pressed. Submitted by: hps MFC after: 3 days END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T04:59:09.237671Z K 7 svn:log V 253 - FIFO's are always opened separately in read and write direction even if the actual device is opened for read and write. Fix fflags check so that the UFM and URIO drivers work. Reported by: Krassimir Slavchev Submitted by: hps END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T05:00:07.480321Z K 7 svn:log V 272 We used force all of the GPIO pins low first and then enable the ones we want. This has been changed to better match the ADMtek's reference design to avoid setting the power-down configuration line of the PHY at the same time it is reset. Submitted by: John Hood via hps END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T05:00:33.326077Z K 7 svn:log V 126 - fix CDC ethernet matching order so that the match flags get correct. Reported by: Juergen Lock Submitted by: hps END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T05:01:06.032615Z K 7 svn:log V 109 - Fix false positive uipaq probe Reported by: Alexander Motin Submitted by: hps END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T05:01:40.538639Z K 7 svn:log V 168 - fix uvisor support, mostly correct buffer sizes used. - correct device info flag for SONY Cli NR70V Reported by: Marc Fonvieille Submitted by: hps END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T05:02:36.564576Z K 7 svn:log V 105 Add mass storage quirks. PR: usb/137138,usb/137226,usb/137789,usb/135372 Submitted by: hps END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T05:03:30.922195Z K 7 svn:log V 77 Add a reminder comment to optimize bus_dmamap_sync calls. Submitted by: hps END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T05:03:59.392673Z K 7 svn:log V 45 Remove redundant locking. Submitted by: hps END K 10 svn:author V 6 alfred K 8 svn:date V 27 2009-08-24T05:05:38.310051Z K 7 svn:log V 794 - Patch to allow USB controller to resume operation after being polled. - Remove the need for Giant from the USB HUB driver. - Leave device unconfigured instead of disabling the USB port when Huawei Autoinstall disk detection triggers. This should fix problems that the Huawei device is not detected after Autoinstall eject is issued. - Reported by: Nikolay Antsiferov - Fix memory use after free race for USB character devices. - Reported by: Lucius Windschuh - Factor out the enumeration lock into three functions to make the coming newbus lock conversion more easy. - usbd_enum_lock - usbd_enum_unlock - usbd_enum_is_locked Submitted by: hps END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-24T08:27:42.464710Z K 7 svn:log V 473 Cleanups to the Xen console driver: - Use CONSOLE_DRIVER() instead of the deprecated CONS_DRIVER() declaration. - This means we cannot use cn_checkc anymore, which is supposed to do the same as cn_getc nowadays. Remove the cn_getc implementation (that was never being called) and rename cn_checkc to cn_getc. - Don't run-time patch cn_putc, but add the logic to xc_cnputc(). This means I could do some cleanups to our console code... Tested by: nobody on hackers@ END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-24T09:17:01.775247Z K 7 svn:log V 454 Unhardcode 0x100 inside kbdcontrol. In preparation for Unicode support for the keyboard layer, we'd better get rid of all the hardcoded 0x100/0xff constants in kbdcontrol. Instead, add a flag called SPECIAL stored in the top bit of the integer. Adding Unicode support is very simple now; just change u_char map[] to u_int map[] in keyent_t, change the bounds checking in kbdcontrol to 0x1FFFFF and modify the ioctls to allow loading these new keymaps. END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-24T10:03:41.404414Z K 7 svn:log V 441 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) MFC after: 3 days END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-24T10:06:02.649022Z K 7 svn:log V 1030 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) MFC after: 3 days END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-24T10:09:30.164578Z K 7 svn:log V 349 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) MFC after: 3 days END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-24T10:14:09.725910Z K 7 svn:log V 372 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) END K 10 svn:author V 3 zec K 8 svn:date V 27 2009-08-24T10:16:19.011535Z K 7 svn:log V 306 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) MFC after: 3 days END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-24T10:53:30.472189Z K 7 svn:log V 1639 Allow multiple console devices per driver without insane code duplication. Say, a driver wants to have multiple console devices to pick from, you would normally write down something like this: CONSOLE_DRIVER(dev1); CONSOLE_DRIVER(dev2); Unfortunately, this means that you have to declare 10 cn routines, instead of 5. It also isn't possible to initialize cn_arg on beforehand. I noticed this restriction when I was implementing some of the console bits for my vt(4) driver in my newcons branch. I have a single set of cn routines (termcn_*) which are shared by all vt(4) console devices. In order to solve this, I'm adding a separate consdev_ops structure, which contains all the function pointers. This structure is referenced through consdev's cn_ops field. While there, I'm removing CONS_DRIVER() and cn_checkc, which have been deprecated for years. They weren't used throughout the source, until the Xen console driver showed up. CONSOLE_DRIVER() has been changed to do the right thing. It now declares both the consdev and consdev_ops structure and ties them together. In other words: this change doesn't change the KPI for drivers that used the regular way of declaring console devices. If drivers want to use multiple console devices, they can do this as follows: static const struct consdev_ops mydriver_cnops = { .cn_probe = mydriver_cnprobe, ... }; static struct mydriver_softc cons0_softc = { ... }; CONSOLE_DEVICE(cons0, mydriver_cnops, &cons0_softc); static struct mydriver_softc cons1_softc = { ... }; CONSOLE_DEVICE(cons1, mydriver_cnops, &cons1_softc); Obtained from: //depot/user/ed/newcons/... END K 10 svn:author V 3 rrs K 8 svn:date V 27 2009-08-24T11:13:32.966012Z K 7 svn:log V 517 This fixes two bugs in the NR-Sack code: 1) When calculating the table offset for sliding the sack array, the two byte values must be "ored" together in order for us to do the correct sliding of the arrays. 2) We were NOT properly doing CC and other changes to things only NR-Sacked. The solution here is to make a separate function that will actually do both CC/updates and free things if its NR sack'd. This actually shrinks out common code from three places (much better). MFC after: 3 days END K 10 svn:author V 2 ed K 8 svn:date V 27 2009-08-24T11:16:44.784862Z K 7 svn:log V 958 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) MFC after: 3 days END K 10 svn:author V 6 tuexen K 8 svn:date V 27 2009-08-24T11:46:40.517691Z K 7 svn:log V 185 This fixes a bug where the value set by SCTP_PARTIAL_DELIVERY_POINT was not honored, if the socket buffer size was not 4 times that large. Approved by: rrs (mentor) MFC after: 3 days. END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-08-24T12:52:05.898679Z K 7 svn:log V 152 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. MFC after: 3 days END