Compare commits

...
1284 Commits
Author SHA1 Message Date
Dimitry Andric 67c55ed439 MFC r362623:
Fix copy/paste mistake in kvm_getswapinfo(3)

It seems this manpage was copied from kvm_getloadavg(3), but the
DIAGNOSTICS section was not updated completely. Update the section with
correct information about a return value of -1.
2020-06-30 15:53:52 +00:00
Tai-hwa Liang 16b4f86a4b MFC r338038: Extending the delay cycles to give the codec more time to pump ADC data across the AC-link.
Without this patch, some CS4614 cards will need users to reload the driver manually or
the hardware won't be initialised properly. Something like:

	# kldload snd_csa
	# kldunload snd_csa
	# kldload snd_csa

Tested with:	Terratec SiXPack 5.1+
2018-08-26 13:08:50 +00:00
David C Somayajulu e4a7e73ca5 MFC r336438
Fixes for  the following issues:
1. Fix taskqueues drain/free to fix panic seen when interface is being
   bought down and in parallel asynchronous link events happening.

2. Fix bxe_ifmedia_status()

Submitted by:[email protected] and [email protected]
2018-08-09 00:59:57 +00:00
David C Somayajulu f8c0c096a4 MFC r333004
Fix Issue with adding MultiCast Addresses. When multicast addresses are
added/deleted, the delete the multicast addresses previously programmed
in HW and reprogram the new set of multicast addresses.

Submitted by:[email protected]
2018-05-09 21:50:20 +00:00
David C Somayajulu 5a2057c18d MFC r314365
1. state checks in bxe_tx_mq_start_locked() and bxe_tx_mq_start() to
           sync threads during interface down or detach.
        2. add sysctl to set pause frame parameters
        3. increase max segs for TSO packets to BXE_TSO_MAX_SEGMENTS (32)
        4. add debug messages for PHY
        5. HW LRO support restricted to FreeBSD versions 8.x and above.

Submitted by:	[email protected]
2017-03-24 03:37:58 +00:00
David C Somayajulu 454be0d5c2 MFC r298591
1. Removed -Wno-shift-negative-value from Makefile
2. Fixed warning its absence caused in bxe_elink.c
2016-05-10 03:22:31 +00:00
David C Somayajulu b9b880a1f9 MFC r298496
Remove Unused/Dead Code
2016-05-10 03:19:09 +00:00
David C Somayajulu cd7455f553 MFC r298294
1. modify fwdump (a.k.a grcdump) so that grcdump memory is allocated
     and freed on as needed basis.
2. grcdump can be taken at failure points by invoking bxe_grc_dump()
     when trigger_grcdump sysctl flag is set. When grcdump is taken
     grcdump_done sysctl flag is set.
3. grcdump_done can be monitored by the user to retrieve the grcdump
2016-05-10 03:17:04 +00:00
David C Somayajulu 0b74afb5d4 MFC r297884
Add support for Flash Update

Submitted by:[email protected];[email protected];[email protected]
2016-04-19 19:22:07 +00:00
David C Somayajulu 5ccfc53931 MFC r297873
1. Process tx completions in bxe_periodic_callout_func() and
   restart transmissions if possible.
2. For SIOCSIFFLAGS call bxe_init_locked() only if !BXE_STATE_DISABLED
3. remove code not needed in bxe_init_internal_common()

Submitted by:[email protected];[email protected]
2016-04-19 19:18:59 +00:00
David C Somayajulu cbf671fd69 MFC r297155
Modifications to achieve a common source base from FreeBSD7.x thru 10.x
2016-04-06 21:59:52 +00:00
David C Somayajulu 951d7ff99b MFC r296579
Fix code so that buf_ring allocation for Tx Queues and their mutexes
is done during during bxe_attach() and freed during bxe_detach()
2016-03-14 23:49:16 +00:00
David C Somayajulu a97f2cb70c MFC r296071
Upgrade the firmware carried in driver and loaded during hardware
initialization (a.k.a STORM firmware) to version 7.13.1 (latest version)
2016-03-09 21:50:39 +00:00
David C Somayajulu 7863881888 MFC r295830
Remove dead code. Code Cleanup. Improve clarity in debug messages
2016-02-25 18:12:09 +00:00
David C Somayajulu 4589d2a8da MFC r295823
Modified the use of bxe_grc_dump() function so that it can be invoked directly at any potential error path, where a fwdump is needed. The fwdump (a.k.a grcdump) is stored in a driver buffer. The sysctl grcdump_done indicates if a fwdump was taken and waiting to be retrieved.
The sysctl trigger_grcdump can be used to manually trigger a fwdump.
2016-02-25 18:08:10 +00:00
John Baldwin 546d648266 Return the timestamps from the corresponding namecache entry on a negative
namecache hit.  This was ommitted due to a merging error in r238913.  The
effect was to usually break caching of negative name lookups in the NFS
client.

Submitted by:	bde
2016-02-02 19:29:29 +00:00
David C Somayajulu 3db57f7204 MFC r292639
Add support for firmware dump (a.k.a grcdump)
2016-01-13 01:16:10 +00:00
David C Somayajulu f343af6689 MFC r292638
Check for packet_length is greater than 60 bytes as well as packet_length is
      greater than len_on_bd, before invoking the routine to handle jumbo over SGL
      (bxe_service_rxsgl()).
      Add counters for number of jumbo_over_SGL packets (rx_bxe_service_rxsgl) and
      erroneous jumbo_over_SGL packets (rx_erroneous_jumbo_sge_pkts)

      Fix formatting in bxe_sysctl_state()
2016-01-13 01:11:32 +00:00
David C Somayajulu 363e8594e2 MFC r289199
Add support for reading device temperature
2016-01-13 01:09:32 +00:00
Edwin Groothuis 0899e9134b MFC of 290697,tzdata7:
Update to tzdata2015g:

Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25.

Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time.

Fiji's 2016 fall-back transition is scheduled for January 17, not 24.

Fort Nelson, British Columbia will not fall back on 2015-11-01.  It has
effectively been on MST (-0700) since it advanced its clocks on 2015-03-08.
New zone America/Fort_Nelson.
2015-11-12 03:30:04 +00:00
Tai-hwa Liang dc76a52be4 MFC r287698: Fixing a memory leak on module unloading. 2015-10-26 03:48:38 +00:00
Tai-hwa Liang 323699b1bf MFC r238980:
Just like the other file systems found in /sys/fs, g_vfs_open()
should be paried with g_vfs_close().  Though g_vfs_close() is a wrapper
around g_wither_geom_close(), r206130 added the following test in
g_vfs_open():

	if (bo->bo_private != vp)
		return (EBUSY);

  Which will cause a 'Device busy' error inside reiserfs_mountfs() if
the same file system is re-mounted again after umount or mounting failure:

	(case 1, /dev/ad4s3 is not a valid REISERFS partition)
	# mount -t reiserfs -o ro /dev/ad4s3 /mnt
	mount: /dev/ad4s3: Invalid argument
	# mount -t msdosfs -o ro /dev/ad4s3 /mnt
	mount: /dev/ad4s3: Device busy

	(case 2, /dev/ad4s3 is a valid REISERFS partition)
	# mount -t reiserfs -o ro /dev/ad4s3 /mnt
	# umount /mnt
	# mount -t reiserfs -o ro /dev/ad4s3 /mnt
	mount: /dev/ad4s3: Device busy

  On the other hand, g_vfs_close() 'fixed' the above cases by doing an
extra step to keep 'sc->sc_bo->bo_private' and 'cp->private' pointers
synchronised.

Reviewed by:	kib
2015-10-24 19:40:27 +00:00
Tai-hwa Liang 0f57b94412 MFC r286888: Using consistent coding style to deal with error inside the loop. 2015-10-07 09:41:17 +00:00
Tai-hwa Liang 378b24a8dd MFC r286887: Using the error return code documented in the comment.
Though there is no direct midi_uninit() caller amongst existing drivers
at this moment, a quick experiment indicates that EBUSY gives users more
precise error message once drivers start to honour this result.  For example,
emu_midi_detach() should check the result of mpu401_uninit() and block
module unloading if there is any MIDI I/O in progress.
2015-09-17 00:19:27 +00:00
Tai-hwa Liang ff8ca6716e MFC r286886: Fixing typo as well as improving readability of a few comments. 2015-09-16 11:32:28 +00:00
Edwin Groothuis 74283b4763 MFC of 286750,tzdata7:
Update to tzdata2015f:

Changes affecting future time stamps

    North Korea switches to +0830 on 2015-08-15.  (Thanks to Steffen Thorsen.)
    The abbreviation remains "KST".  (Thanks to Robert Elz.)
    Uruguay no longer observes DST.  (Thanks to Steffen Thorsen and Pablo Camargo.)
    Changes affecting past and future time stamps
    Moldova starts and ends DST at 00:00 UTC, not at 01:00 UTC. (Thanks to Roman Tudos.)
2015-08-14 00:01:45 +00:00
Dimitry Andric 506eb9ca99 MFC r286519:
In GNU as, avoid left-shifting negative integers, which is undefined.
2015-08-12 19:18:54 +00:00
David C Somayajulu 648dcf329c MFC r285973
- Avoid lock contention in the if_transmit callback by using trylock and
       enqueueing the frames when it fails. This way there is some latency
       removed from the transmitting path.
      - If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
       enqueue the desired frames and return successful transmit. This way we
       avoid to return errors on transmit side and resulting in
       possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
       everytime we get the threshold ring hit, so this can be happening quite
       often.

Submitted by:	[email protected]
2015-08-05 02:16:11 +00:00
Dimitry Andric cb1fe3ec8f MFC r285340:
Fix swapped copyin(9) arguments in cxgb's iwch_arm_cq() function.
Detected by clang 3.7.0 with the warning:

sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c:309:18: error: variable
'rptr' is uninitialized when used here [-Werror,-Wuninitialized]
		chp->cq.rptr = rptr;
			       ^~~~
2015-07-28 09:19:04 +00:00
David C Somayajulu 56d31093c6 MFC r284739
tx_mtx should be grabbed before calling buf_ring_dequeue_sc()

Submitted by: [email protected]
2015-06-30 20:45:41 +00:00
David C Somayajulu b9672ecc6c MFC r284470
In bxe_set_mc_list(): added missing BXE_MCAST_UNLOCK()
In __ecore_vlan_mac_h_exec_pending(): need to check for ECORE_PENDING

Submitted by:[email protected]
2015-06-30 20:40:38 +00:00
David C Somayajulu 190c8e68c1 MFC r284335
PHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases it via bxe_release_phy_lock(). It was simply acquiring a mutex earlier which can cause the PHY to use bogus values. Fixes intermittent link failures.

bxe_ioctl() completes all functions within its context as opposed to a taskqueue earlier.

bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the functionality within its context

Submitted by:[email protected]
2015-06-30 20:37:04 +00:00
Dimitry Andric bd464ed955 MFC r284346:
Fix the following clang 3.7.0 warnings in lib/libfetch/http.c:

    lib/libfetch/http.c:1628:26: error: address of array 'purl->user'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.user = purl->user ?
                                                   ~~~~~~^~~~ ~
    lib/libfetch/http.c:1630:30: error: address of array 'purl->pwd'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.password = purl->pwd?
                                                       ~~~~~~^~~~
    lib/libfetch/http.c:1657:25: error: address of array 'url->user'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.user = url->user ?
                                                   ~~~~~^~~~ ~
    lib/libfetch/http.c:1659:29: error: address of array 'url->pwd'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.password = url->pwd ?
                                                       ~~~~~^~~ ~
    lib/libfetch/http.c:1669:25: error: address of array 'url->user'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.user = url->user ?
                                                   ~~~~~^~~~ ~
    lib/libfetch/http.c:1671:29: error: address of array 'url->pwd'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.password = url->pwd ?
                                                       ~~~~~^~~ ~

Since url->user and url->pwd are arrays, they can never be NULL, so the
checks can be removed.

Reviewed by:	bapt
Differential Revision: https://reviews.freebsd.org/D2673
2015-06-20 13:30:09 +00:00
Edwin Groothuis 813625317c MFC of 284397,tzdata7:
Update to tzdata2015e:

  Changes affecting future time stamps

    Morocco will suspend DST from 2015-06-14 03:00 through 2015-07-19 02:00,
    not 06-13 and 07-18 as we had guessed.  (Thanks to Milamber.)

    Assume Cayman Islands will observe DST starting next year, using US rules.
    Although it isn't guaranteed, it is the most likely.
2015-06-15 01:03:40 +00:00
John Baldwin 6b0aeadfac MFC 281887:
Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.
2015-06-02 19:20:39 +00:00
David C Somayajulu a1620da41b MFC r283274
Add stat counters for Jumbo Frames using SGE ring.
Also remove the checks for IFCAP_LRO in bxe_alloc_fp_buffers() and bxe_pf_rx_q_prep() since both TPA and Jumbo can use SGE ring.

Submitted by:[email protected]
2015-05-30 04:49:19 +00:00
David C Somayajulu 3fe84cece5 MFC r283269
Submitted by:	[email protected]
2015-05-29 23:37:27 +00:00
Dimitry Andric 644c272b14 MFC r283254:
Ensure that the static structs emitted by the MODULE_DEPEND() and
MODULE_VERSION() macros don't end up as .comm symbols, when all the
version fields are zero.

Normally, such symbols will end up in .bss, but for kernel module
version objects, this can lead to "garbage" version numbers.

Fix this by instructing the compiler to always put these structs in the
.data segment instead.

Reported by:	delphij, ae
2015-05-28 06:45:13 +00:00
Edwin Groothuis 9f629bf059 MFC of 283079,tzdata7:
Update to tzdata2015d:

Release 2015d - 2015-04-24 08:09:46 -0700

  Changes affecting future time stamps

    Egypt will not observe DST in 2015 and will consider canceling it
    permanently.  For now, assume no DST indefinitely.
    (Thanks to Ahmed Nazmy and Tim Parenti.)

  Change affecting past and future time zone abbreviations

    The abbreviations for Hawaii-Aleutian standard and daylight times
    have been changed from HAST/HADT to HST/HDT, as per US Government
    Printing Office style.  This affects only America/Adak since 1983,
    as America/Honolulu was already using the new style.
2015-05-18 22:12:50 +00:00
Edwin Groothuis d8930c0c1b MFC of 283042,tzdata7:
Update to tzdata2015c:

    Release 2015c - 2015-04-11 08:55:55 -0700

    Changes affecting future time stamps

    Egypt's spring-forward transition is at 24:00 on April's last Thursday,
    not 00:00 on April's last Friday.  2015's transition will therefore be on
    Thursday, April 30 at 24:00, not Friday, April 24 at 00:00.  Similar fixes
    apply to 2026, 2037, 2043, etc.  (Thanks to Steffen Thorsen.)
2015-05-18 02:10:45 +00:00
David C Somayajulu b32cc26aec MFC r281006
When an mbuf allocation fails in the receive path, the mbuf containing the received packet is not sent to the host network stack and is reused again on the receive ring.  Remaining received packets in the ring are not processed in that invocation of bxe_rxeof() and defered to the task thread
2015-04-07 18:14:01 +00:00
Edwin Groothuis 018b3e0647 MFC of 280413,tzdata7:
Release 2015b - 2015-03-19 23:28:11 -0700

  Changes affecting future time stamps

    Mongolia will start observing DST again this year, from the last
    Saturday in March at 02:00 to the last Saturday in September at 00:00.
    (Thanks to Ganbold Tsagaankhuu.)

    Palestine will start DST on March 28, not March 27.  Also,
    correct the fall 2014 transition from September 26 to October 24.
    Adjust future predictions accordingly.  (Thanks to Steffen Thorsen.)

  Changes affecting past time stamps

    The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a
    regression.  (Thanks to Stuart Bishop for reporting the problem.)

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: America/Antigua, America/Cayman,
    Pacific/Midway, and Pacific/Saipan.

  Changes affecting time zone abbreviations

    Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD".
    (Thanks to Hank W.)
2015-03-24 06:12:59 +00:00
Edwin Groothuis 81dedb949e MFC of 279706,tzdata7:
Release 2015a - 2015-01-29

Changes affecting future time stamps

    The Mexican state of Quintana Roo, represented by America/Cancun,
    will shift from Central Time with DST to Eastern Time without DST
    on 2015-02-01 at 02:00.  (Thanks to Steffen Thorsen and Gwillim Law.)

    Chile will not change clocks in April or thereafter; its new standard time
    will be its old daylight saving time.  This affects America/Santiago,
    Pacific/Easter, and Antarctica/Palmer.  (Thanks to Juan Correa.)

    New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
    (Thanks to Tim Parenti.)

  Changes affecting past time stamps

    Iceland observed DST in 1919 and 1921, and its 1939 fallback
    transition was Oct. 29, not Nov. 29.  Remove incorrect data from
    Shanks about time in Iceland between 1837 and 1908.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
    and Asia/Muscat.
2015-03-06 22:10:13 +00:00
Dimitry Andric dfa40d69d9 MFC r276346:
In contrib/binutils/gas/config/tc-ppc.c, fix a few -Wformat-security
warnings.
2014-12-31 16:28:16 +00:00
Dimitry Andric c34f2c3d02 MFC r275477:
Pull in r174303 from upstream gcc trunk (by Jason Merrill):

  PR c++/48211
  * name-lookup.h (cp_class_binding): Make base a pointer.
  * name-lookup.c (new_class_binding): Adjust.
  (poplevel_class): Adjust.

This fixes a potential segfault when compiling gold, a part of the
devel/binutils port, with gcc.  See also the upstream bug report:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48211

Thanks to Jason Merrill, Tom Callaway and Red Hat legal for approving
the use of this patch under the GNU GPL, version 2 or later.
2014-12-11 08:05:59 +00:00
Dimitry Andric d10f9994bf MFC r274900:
Fix the following -Werror warnings from clang 3.5.0, while building
bsnmpd's snmp_hostres module:

usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: note: use function 'labs' instead
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^~~
                          labs
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: note: use function 'labs' instead
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^~~
                            labs

Since tm::tm_gmtoff is a long, use labs(3) instead.
2014-11-25 13:29:13 +00:00
Dimitry Andric 16840ea80c MFC r274847:
Fix the following -Werror warnings from clang 3.5.0, while building
usr.bin/locate:

usr.bin/locate/locate/util.c:249:29: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^
usr.bin/locate/locate/util.c:249:29: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^~~
usr.bin/locate/locate/util.c:274:32: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^
usr.bin/locate/locate/util.c:274:32: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^~~

The problem is that ntohl() always returns an unsigned quantity.  In
this case, it's expected to be cast back to a signed integer, but to
stop complaints about abs() we just store it into an integer, and don't
call ntohl() again.

Reviewed by:	ngie
Differential Revision: https://reviews.freebsd.org/D1196
2014-11-25 12:45:31 +00:00
Edwin Groothuis 3eb76b32e2 MFC of 274559,tzdata7:
Release 2014j - 2014-11-10 17:37:11 -0800

  Changes affecting current and future time stamps

    Turks & Caicos' switch from US eastern time to UTC-4 year-round
    did not occur on 2014-11-02 at 02:00.  It's currently scheduled
    for 2015-11-01 at 02:00.  (Thanks to Chris Walton.)

  Changes affecting past time stamps

    Many pre-1989 time stamps have been corrected for Asia/Seoul and
    Asia/Pyongyang, based on sources for the Korean-language Wikipedia
    entry for time in Korea.  (Thanks to Sanghyuk Jung.)  Also, no
    longer guess that Pyongyang mimicked Seoul time after World War II,
    as this is politically implausible.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Africa/Addis_Ababa, Africa/Asmara,
    Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala,
    Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and
    Indian/Mayotte.

  Changes affecting commentary

    The commentary is less enthusiastic about Shanks as a source,
    and is more careful to distinguish UT from UTC.
2014-11-16 04:13:09 +00:00
Dimitry Andric 7c015fba24 MFC r273837:
Fix a clang 3.5 warning about abs(3) being given an argument of type
quad_t in setusercontext().  While here, sanitize the clamping of the
priority value, and use the correct type for the return value of
login_getcapnum().

Reviewed by:	kib
2014-11-01 13:45:01 +00:00
Edwin Groothuis f1fd6badce MFC of 273718, tzdata2014i
Upgrade to 2014i

Lots of historical data

Pacific/Fiji will go into DST from 2014-11-02 to 2015-01-18
Pacific/Bougainville will go from UTC+10 to UTC+11.
Europe/Minsk will go from FET to MSK.
2014-10-27 06:13:22 +00:00
David C Somayajulu e037e9201c MFC r271728
For ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() check bxe_debug flag before printing error message.
2014-09-22 18:36:37 +00:00
David C Somayajulu 2c5bfcb9be MFC r271727
Remove clean option form Makefile
2014-09-22 18:31:40 +00:00
David C Somayajulu 52162fa10e MFC r271726
Remove clean option in Makefile
2014-09-22 18:29:14 +00:00
Dimitry Andric ace3f7ae8a MFC r257658 (modified to apply to stable/7):
For C++ programs, don't emit any explicit dependency to libstdc++.a or
libc++.a during the early build stages (bootstrap-tools, build-tools,
cross-tools), since it is not possible to know in advance which C++
library is available on the host system.

Instead, just use the bootstrap compiler's built-in default.  This
should eventually make it possible to build stable/9 on head, or on
stable/10, which ship without libstdc++ by default.

[Note: this should get the stable/7 tinderbox at least a bit further in
buildworld.]
2014-09-18 06:47:48 +00:00
David C Somayajulu 7c4be4135d MFC r268854
Initiate error recovery stats fail to update after 3 retries.
      Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to
      panic only if ECORE_STOP_ON_ERROR is defined.
2014-09-12 18:31:44 +00:00
Sergey Kandaurov 8b62ba0609 MFC r270728, tzdata2014f
- Parts of Russia will change times on 2014-10-26.
- Time zone name changes for Asia/Novokuznetsk and Xinjiang and Samoa
  and America/Metlakatla, new zones Asia/Chita and Asia/Srednekolymsk.
- Australia will now use Axxx.
- New zone tab data format.

And lots of historical changes (See
http://mm.icann.org/pipermail/tz-announce/2014-August/000023.html
for the full details.)
2014-08-29 13:24:49 +00:00
Edwin Groothuis c8a477689d MFC of i267473,tzdata2013b
Fix historical data for Egypt.
Better prediction for future Egypt / Morocco changes.
Update to Cocos / Cook islands.
Fix historical data for Russia.
2014-06-14 11:37:01 +00:00
Alexander Motin 3e3a45aede MFC r237398:
In camisr() clear CAM_SIM_ON_DONEQ flag after camisr_runqueue() purged SIM
done queue. Clearing it before caused extra SIM queueing in some cases.
It was invisible during normal operation, but during USB device unplug and
respective SIM destruction it could keep pointer on SIM without having
counted reference and as result crash the system by use afer free.

PR:		usb/168743
2014-06-04 12:24:53 +00:00
Gregory Neil Shapiro b2581eb644 Note merge for sendmail 8.14.9. 2014-05-26 16:01:45 +00:00
Gregory Neil Shapiro bfd2dfa583 MFC: Minor changes to force commit these files so new freebsd*.cf files are
built to use the new sendmail-8.14.9/cf tree.
2014-05-26 15:47:26 +00:00
Gregory Neil Shapiro 11076f6c2b MFC: Update for sendmail 8.14.9 import 2014-05-26 15:36:57 +00:00
Gregory Neil Shapiro f5342d84e6 MFC: Merge sendmail 8.14.9 to HEAD 2014-05-26 15:31:26 +00:00
Edwin Groothuis ec01651ed3 MFC of 265978, tzdata2014c
- Egypt will go into DST on 15 May 2014.
2014-05-13 21:29:19 +00:00
David C Somayajulu 42638a6ba6 MFC r265703
Modify Copyright information and other strings to reflect
Qlogic Corporation's purchase of Broadcom's NetXtreme business.
Added clean option to Makefile

Submitted by:	David C Somayajulu ([email protected]) QLogic Corporation
2014-05-12 16:10:14 +00:00
David C Somayajulu 0640fa8ac4 MFC r265411
Modify Copyright information to reflect Qlogic Corporation's purchase
of Broadcom's NetXtreme business

Submitted by:David C Somayajulu ([email protected]) QLogic Corporation
2014-05-10 02:06:46 +00:00
Edwin Groothuis 92244f12d1 MFC of 263901, tzdata2014b
- Update antartica.
 - Comments about historical data for Hawaii.
 - Update details for Crimea on 30 March
 - Move location data Simferopol.
2014-03-29 04:19:48 +00:00
Dimitry Andric 2400551229 Turn off warnings for building aicasm. Various versions of yacc exist,
which can result in different warnings-as-errors in this tool, but these
are all completely harmless.

This is a direct commit to stable/7, stable/8, stable/9 and stable/10,
since this kernel build tool has already been removed in head.
2014-03-23 14:18:40 +00:00
Eric Davis 31004c9841 MFC 262999
Fixed MSI interrupt allocation and handling.
Fixed a DMA mapping leak that occurs when defragmenting packet chains.

Approved by:	davidch (mentor)
2014-03-21 23:56:38 +00:00
Edwin Groothuis f9705f5519 MFC of 263041, tzdata2014a:
- Fix historical info about asia/Zion, Ukraine
- Fiji starts DST at 02:00 instead of 03:00
- Turkey will move to DST at 31 March this year.
2014-03-11 20:36:22 +00:00
Xin LI b9cd5722d0 MFC r261618:
In g_eli_crypto_hmac_init(), zero out after using the ipad buffer,
k_ipad.

Note that the two consumers in geli(4) are not affected by this
issue because the way the code is constructed and as such, we
believe there is no security impact with or without this change
with geli(4)'s usage.

Reported by:	Serge van den Boom <serge vdboom.org>
Reviewed by:	pjd
2014-02-22 00:41:03 +00:00
Peter Wemm e7dbc6c14a MFC r256557 - kernel and userland osreldate helpers. 2014-02-11 17:07:45 +00:00
Gregory Neil Shapiro f84675f613 MFC: Note merge of sendmail 8.14.8. 2014-02-02 00:30:29 +00:00
Gregory Neil Shapiro 7e3cdb942d MFC: Minor changes to force commit these files so new freebsd*.cf files are
built to use the new sendmail-8.14.8/cf tree.
2014-02-02 00:29:48 +00:00
Gregory Neil Shapiro 36c7fd893c MFC: Add missing svn:keywords property to new files 2014-02-02 00:29:04 +00:00
Gregory Neil Shapiro 12f0e7e02f MFC: Update for sendmail 8.14.8 import 2014-02-02 00:28:39 +00:00
Gregory Neil Shapiro 592d968f6e MFC: Remove local FreeBSD workaround now that upstream project has a better fix. 2014-02-02 00:28:12 +00:00
Gregory Neil Shapiro 0581c75fd3 MFC: Add new sendmail 8.14.8 file 2014-02-02 00:27:38 +00:00
Gregory Neil Shapiro e826924463 MFC: Merge sendmail 8.14.8 2014-02-02 00:26:48 +00:00
Gregory Neil Shapiro fa5a86621f MFC: Update link to vendor import instructions 2014-02-01 22:06:39 +00:00
Peter Wemm 768e111b5b Revert MFC of r258821 - it was already handled by MFC of r239672.
Pointy hat to: peter
2014-01-08 03:17:11 +00:00
Eric Davis 047a6d1d5b Merged r260415 from head.
Approved by:	davidch
2014-01-07 23:50:15 +00:00
Peter Wemm dcd3798d9c MFC r258821 - fix tcp simultaneous close
PR:             kern/99188
2014-01-07 23:02:50 +00:00
Eric Davis 965240c874 MFC Broadcom 10Gb bxe driver
Merged r255736, r255861, r256299, r256341, r258187, r259928, r260113

Approved by:  davidch (mentor)
2014-01-05 23:13:18 +00:00
Dimitry Andric 817bcc38be MFC r260112:
In sys/dev/sound/pci/maestro.c, #if 0 two unused static functions.
2014-01-04 23:12:01 +00:00
Dimitry Andric d0d5d934af MFC r260095:
For sys/boot/i386 and sys/boot/pc98, separate flags to be passed
directly to the linker (LD_FLAGS) from flags passed indirectly, via the
compiler driver (LDFLAGS).

This is because several Makefiles under sys/boot/i386 and sys/boot/pc98
use ${LD} directly to link, and the normal LDFLAGS value should not be
used in these cases.
2014-01-04 22:00:07 +00:00
Dimitry Andric 6a4ec2cff0 MFC r260103:
In sys/amd64/amd64/pmap.c, remove static function pmap_is_current(),
which has been unused since r189415.

Reviewed by:	alc
2014-01-04 21:45:52 +00:00
Dimitry Andric c9fecfe0c9 MFC r260057:
In sys/dev/scc, remove unused static function scc_setmreg().  While
here, invoke scc_getmreg() in two more places where it can be used.

Reviewed by:	marcel
2014-01-04 21:32:53 +00:00
Dimitry Andric e8f4f8ba7b MFC r260048:
In sys/netgraph/netflow, use __FBSDID() instead of old-style rcs_id[].
2014-01-04 19:04:53 +00:00
Dimitry Andric cccf7a9bbd MFC r260042:
Remove superfluous old-style rcsid[] from if_my.c.  There is already an
__FBSDID() at the top of the file.
2014-01-04 18:58:18 +00:00
Dimitry Andric ee77308b50 MFC r260040:
In sys/dev/mcd/mcd.c, mark the static const COPYRIGHT string as __used,
so it ends up in the object file, and no warnings are emitted about it
being actually unused.
2014-01-04 18:53:31 +00:00
Dimitry Andric e39b92f7e1 MFC r260038:
In sys/dev/en/midway.c, #if 0 an unused static function.
2014-01-04 18:48:29 +00:00
Dimitry Andric bc53795df5 MFC r260016:
Remove superfluous old-style rcsid[] from if_sk.c.  There is already an
__FBSDID() at the top of the file.
2014-01-04 17:33:05 +00:00
Edwin Groothuis ffd7b3bae3 MFC of 259626, tzdata2013i:
Removed support for solar-time-based time zones
Jordan stays at summer time this year.
Fix historical data for Cuba
2013-12-19 20:25:55 +00:00
Edwin Groothuis e9c8b4caf7 MFC of 257681
tzdata2013f
- Jordan goes to winter time on the last Friday in October.
- Tocantins in Brazil will not go into summer time in October.
- Indonesian time zones renames.
- Lots of cleanups in with regarding to links and historical data.

tzdata2013h
- Libya didn't go back to DST.
- Fix Morocco 2038 issue.
- Brazil/Acre and ?Western Amazonas are chaning timezones.
2013-11-05 06:40:35 +00:00
Dimitry Andric 8284fddb61 MFC r255931:
Fix a bug in ld, where indirect symbols are not handled properly during
linking of a shared library, leading to corrupt indexes in the dynamic
symbol table.  This should fix the multimedia/ffmpegthumbnailer port.

Reported by:	swills
2013-10-12 16:11:57 +00:00
Gregory Neil Shapiro 869263712f MFC: Temporarily revert sendmail 8.14.7 change to getipnodebyname() flags
to prevent problems between the resolver and Microsoft DNS servers with
     AAAA lookups.  The upstream open source project will work on a more
     permanent fix for the next release.  Issue noted by Pavel Timofeev.
2013-08-15 01:42:46 +00:00
Edwin Groothuis 6989de007b MFC of tzdata2013d, 253009
- Morocco:
  announced that the year's Ramadan daylight-savings transitions
  would be 2013-07-07 and 2013-08-10.

- Israel:
  As of 2013, DST starts at 02:00 on the Friday before the last
  Sunday in March.  DST ends at 02:00 on the first Sunday after
  October 1, unless it occurs on the second day of the Jewish Rosh
  Hashana holiday, in which case DST ends a day later (i.e. at 02:00
  the first Monday after October 2).  [Rosh Hashana holidays are
  factored in until 2100.]
2013-07-07 22:27:58 +00:00
Dimitry Andric 87614dae73 MFC r252387:
Make libsupc++'s __cxa_call_terminate() prototype consistent with the
definition.

Submitted by:	[email protected]
2013-07-04 22:09:14 +00:00
Jim Harris a560b12bed MFC r252262:
For ATA_PASSTHROUGH commands, pretend isci(4) supports multiword DMA
  by treating it as UDMA.

  This fixes a problem introduced in r249933/r249939, where CAM sends
  ATA_DSM_TRIM to SATA devices using ATA_PASSTHROUGH_16.  scsi_ata_trim()
  sets protocol as DMA (not UDMA) which is for multi-word DMA, even
  though no such mode is selected for the device.  isci(4) would fail
  these commands which is the correct behavior but not consistent with
  other HBAs, namely LSI's.

  smh@ did some further testing on an LSI controller, which rejected
  ATA_PASSTHROUGH_16 commands with mode=UDMA_OUT, even though only
  a UDMA mode was selected on the device.  So this precludes adding
  any kind of mode detection in CAM to determine which mode to use on
  a per-device basis.

Note: The reasons behind this change do not apply to stable/7.  This MFC
is to keep the driver consistent across stable branches and current.

Sponsored by: Intel
2013-07-03 23:24:53 +00:00
David E. O'Brien 0974633a12 MF8: r252639
MF9: r252635, r252638:
     MFC: r252348, r252363: sysconf(3) returns a long, not an int.
2013-07-03 23:03:28 +00:00
Dimitry Andric 91fd779f75 MFC r250393:
When gcc 4.2.0 was imported, the 3DNow intrinsics header <mm3dnow.h> was
not added to the list of intrinsics headers to install, so belatedly (5
years :) add it.
2013-05-15 20:59:00 +00:00
Dimitry Andric 271c9a0ce7 MFC r250392:
For some reason, the gcc intrinsics header tmmintrin.h was imported with
two copies of itself pasted together.  Remove the extraneous copy.
2013-05-11 16:47:42 +00:00
Sean Bruno 7f96a32e26 MFC r249815
Return a lun count of 1 and a lun id of 0 when CAM attempts a REPORT_LUNS
command on a disk device.  This quieseces some noise on the console that
recently appeared.
2013-05-08 15:50:24 +00:00
Dimitry Andric 6b7b099896 MFC r249846:
When rebooting (exiting) from the BTX loader, make sure to restore the
GDT from the correct segment, otherwise a triple fault would be caused.
In some virtual environments (VMware, VirtualBox, etc) this could lead
to a unhandled error or hang in the guest emulation software.

Thanks to avg and jhb for a few hints in the right direction.

Noticed by:	Jeremy Chadwick <[email protected]> (and many others)
2013-05-01 18:06:53 +00:00
Sergey Kandaurov 608f7cadd0 MFC r248253:
Add missed `_load' to the `if_foo_load="YES"' line.

PR:		docs/176915
Submitted by:	Dmitry Afanasiev <[email protected]>
2013-04-29 20:32:09 +00:00
Sergey Kandaurov cf997d3316 Fix build.
- pass a format string to printf
- catch up with constifying uz_name
2013-04-29 11:36:59 +00:00
Sean Bruno 5c6e5e0ffe MFC r249349
Repair camcontrol output and use CAM defined values for string sizes
2013-04-25 17:06:07 +00:00
Gregory Neil Shapiro d1a7a39447 Record sendmail 8.14.7 upgrade 2013-04-25 02:27:13 +00:00
Gregory Neil Shapiro 97f0fde1e6 MFC: Minor changes to force commit these files so new freebsd*.cf files are
built to use the new sendmail-8.14.7/cf tree.
2013-04-25 02:19:46 +00:00
Gregory Neil Shapiro fdc36c48cb MFC: Update for sendmail 8.14.7 2013-04-25 02:18:50 +00:00
Gregory Neil Shapiro dc54faabf8 MFC: Merge sendmail 8.14.7 2013-04-25 02:18:15 +00:00
Edwin Groothuis a1ae545b4c Merge of current from 249692, tzdata2013c:
- antarctica: AusAQ and ATAQ have been removed.
- Antarctica/Macquarie has been moved to australasia file and AU.
- Asia/Hebron, Palestine updated for 2013.
- Paraguay stays with DST for the whole year.
2013-04-20 11:45:08 +00:00
Sean Bruno ca21a7bcdd MFC r249170
Notify CAM on state* change to a logical volume not status.  This resolves
the issues reported regarding camcontrol devlist not showing the rebuild
states of volumes unless an explicit camcontrol rescan was executed.
2013-04-19 18:39:17 +00:00
Dimitry Andric 3f4d8128f1 MFC r249316:
Ensure make -j N universe works correctly, by checking for an up-to-date
make before starting the universe targets themselves.  Otherwise, all of
the targets would attempt to build make simultaneously, overwriting each
other's copies of the make object files and executable.  This could lead
to strange errors, for example when partially-written make executables
are invoked.

Also amend r216620, to make the rest of universe wait properly until the
upgrade_checks target is finished, by adding universe_${target}_prologue
to the .ORDER target.  Otherwise, make will be too smart for its own
good, and start building the universe targets simultaneously with the
prologues anyway.
2013-04-16 06:53:20 +00:00
Sergey Kandaurov 6051e1478e MFC r222854: Added FreeBSD 8.3.
Several manual pages reference it in stable/7.
2013-04-10 10:22:45 +00:00
Sean Bruno 34745f7324 Resolve kernel panic that occurs on callback from sysctl when setting
hw.ciss.expose_hidden_physical=1 on a HP ProLiant DL360 G6 (and possibly
others) due to mishandling of error value in acpica on stable/7

Note that this is a direct commit as this code has been fixed in stable/8
(8.4 included) and higher release for quite some time.

PR:	kern/152250
Submitted by:	Loic Pefferkorn <[email protected]>
Reviewed by:	avg@
2013-04-03 23:11:15 +00:00
Dimitry Andric d1c4293bc9 MFC r248802:
Similar to r239870 and r239872, teach the other binutils tools about the
DW_FORM_flag_present dwarf attribute, so they do not print errors or
warnings on files that contain it.  (This attribute can be emitted by
newer versions of clang and gcc.)
2013-04-03 16:31:30 +00:00
Edwin Groothuis 574c86435a Merge of current of tzdata2013b
Lots of historical data added.

Morocco: add DST rules for the coming years
Cuba: Doing DST in 2013.
Chili: Will do DST in 2013 as it seems
2013-03-15 01:01:14 +00:00
Lawrence Stewart 083a7ad761 MFC r247906:
The hashmask returned by hashinit() is a valid index in the returned hash array.
Fix a siftr(4) potential memory leak and INVARIANTS triggered kernel panic in
hashdestroy() by ensuring the last array index in the flow counter hash table is
flushed of entries.
2013-03-11 06:17:46 +00:00
Marius Strobl d90288dbd3 MFC: r247632
- Complete r231621 (MFC'ed to stable/7 in r232094) by also blacklisting the
  bridge used by VMware for PCIe devices. While at it, update the comment
  now that we know that MSI-X doesn't work with ESXi 5.1 for Intel 82576
  either and the underlying issue is a bug in the MSI-X allocation code of
  the hypervisor.
  Reported by: Harald Schmalzbauer
- Make the nomatch table const.
2013-03-08 12:59:06 +00:00
Xin LI 09805e3614 MFC r247334:
Correct a typo introduced in r153575, which gives inverted logic when
handling blocking semantics when seeding.

PR:		kern/143298
Submitted by:	James Juran <james juran baesystems com>
Reviewed by:	markm
2013-03-01 00:46:41 +00:00
Giorgos Keramidas 29ee6d90cb MFH r247014, r247050 and r247051.
Add a sample program that shows how a custom comparison function and
qsort(3) can work together to sort an array of integers.

PR:             docs/176197
Submitted by:   Fernando, fapesteguia at opensistemas.com
		Christoph Mallon, christoph.mallon at gmx.de
Approved by:    gjb (mentor), remko (mentor)
2013-02-25 19:09:41 +00:00
Gregory Neil Shapiro 1b062a300e MFC: Merge sendmail 8.14.6 errata issue 2013-02-21 22:48:25 +00:00
Mark Johnston 72f8897082 MFC r239672 (by rrs):
This small change takes care of a race condition
  that can occur when both sides close at the same time.
  If that occurs, without this fix the connection enters
  FIN1 on both sides and they will forever send FIN|ACK at
  each other until the connection times out. This is because
  we stopped processing the FIN|ACK and thus did not advance
  the sequence and so never ACK'd each others FIN. This
  fix adjusts it so we *do* process the FIN properly and
  the race goes away ;-)

Approved by:	rrs
Approved by:	emaste (co-mentor)
2013-02-19 16:40:38 +00:00
Dimitry Andric 6ae39da3ac MFC r246875:
Import change 40eebf235370b6fe6353784ccf01ab92eed062a5 from upstream wpa:

  From: Jouni Malinen <[email protected]>
  Date: Fri, 15 Jul 2011 13:42:06 +0300
  Subject: [PATCH] MD5: Fix clearing of temporary stack memory to use correct length

  sizeof of the structure instead of the pointer was supposed to be used
  here. Fix this to clear the full structure at the end of MD5Final().

Found by:	clang ToT
Reviewed by:	rpaulo
2013-02-19 08:07:11 +00:00
Dimitry Andric 55acd28844 MFC r246874:
Fix two instances of undefined behaviour in contrib/nvi.

Found by:	clang ToT
Obtained from:	NetBSD
Reviewed by:	jh
2013-02-19 07:55:53 +00:00
Dimitry Andric 16616fa0dd MFC r246873:
In contrib/opie/opiekey.c, use the correct length to zero the secret.

Found by:	clang ToT
Reviewed by:	delphij
2013-02-19 07:50:10 +00:00
Dimitry Andric 25d2268acb MFC r246860:
Fix undefined behaviour in usr.bin/mail/util.c.

Reported by:	[email protected]
2013-02-18 22:03:04 +00:00
Dag-Erling Smørgrav d4cee66c1a MFH r246362: remove political propaganda 2013-02-05 14:55:33 +00:00
Xin LI 6e53d57ac5 MFC r243779 (marcel):
Protect against DoS attacks, such as being described in CVE-2010-2632.
The changes were derived from what has been committed to NetBSD, with
modifications. These are:

1.  Preserve the existsing GLOB_LIMIT behaviour by including the number
    of matches to the set of parameters to limit.
2.  Change some of the limits to avoid impacting normal use cases:
    GLOB_LIMIT_STRING - change from 65536 to ARG_MAX so that glob(3)
        can still provide a full command line of expanded names.
    GLOB_LIMIT_STAT - change from 128 to 1024 for no other reason than
        that 128 feels too low (it's not a limit that impacts the
        behaviour of the test program listed in CVE-2010-2632).
    GLOB_LIMIT_PATH - change from 1024 to 65536 so that glob(3) can
        still provide a fill command line of expanded names.
3.  Protect against buffer overruns when we hit the GLOB_LIMIT_STAT or
    GLOB_LIMIT_READDIR limits. We append SEP and EOS to pathend in
    those cases. Return GLOB_ABORTED instead of GLOB_NOSPACE when we
    would otherwise overrun the buffer.

This change also modifies the existing behaviour of glob(3) in case
GLOB_LIMIT is specifies by limiting the *new* matches and not all
matches. This is an important distinction when GLOB_APPEND is set or
when the caller uses a non-zero gl_offs. Previously pre-existing
matches or the value of gl_offs would be counted in the number of
matches even though the man page states that glob(3) would return
GLOB_NOSPACE when gl_matchc or more matches were found.

The limits that cannot be circumvented are GLOB_LIMIT_STRING and
GLOB_LIMIT_PATH all others can be crossed by simply calling glob(3)
again and with GLOB_APPEND set.

The entire description above applies only when GLOB_LIMIT has been
specified of course. No limits apply when this flag isn't set!

Obtained from: Juniper Networks, Inc
2013-02-05 09:53:32 +00:00
Xin LI dcbb770ce9 MFC r243758 (marcel):
In globextend() when the pathv vector cannot be (re-)allocated, don't
free and clear the gl_pathv pointer in the glob_t structure. Such
breaks the invariant of the glob_t structure, as stated in the comment
right in front of the globextend() function. If gl_pathv was non-NULL,
then gl_pathc was > 0. Making gl_pathv a NULL pointer without also
setting gl_pathc to 0 is wrong.

Since we otherwise don't free the memory associated with a glob_t in
error cases, it's unlikely that this change will cause a memory leak
that wasn't already there to begin with. Callers of glob(3) must
call globfree(3) irrespective of whether glob(3) returned an error
or not.

MFC r243759 (marcel):

In globextend(), take advantage of the fact that realloc(NULL, size) is
equivalent to malloc(size). This eliminates the conditional expression
used for calling either realloc() or malloc() when realloc() will do
all the time.
2013-02-05 09:50:33 +00:00
Eitan Adler 2010b09c09 MFC r243930:
Constify where possible

Approved by:	cperciva (mentor, implicit)
2013-02-04 00:34:35 +00:00
Eitan Adler 4881953735 MFC r243931:
Avoid the creation of a temporary object by using the prefix operator
	for non-primitive types.

Approved by:	cperciva (mentor, implicit)
2013-02-02 23:31:10 +00:00
Eitan Adler 8b120df8b9 MFC r244122:
Remove 'dangerous' instructions from the example make.conf.
	Clarify when and why these might be used and that this isn't a supported
	configuration.

PR:		docs/144488
Approved by:	cperciva (mentor, implicit)
2013-02-02 23:22:31 +00:00
Sean Bruno 763c703a80 MFC r245459
Satisfy the intent of kern/151564: [ciss] ciss(4) should increase
  CISS_MAX_LOGICAL to 107

  Submitter wanted to increase the number of logical disks supported by ciss(4)
  by simply raising the CISS_MAX_LOGICAL value even higher.  Instead, consult
  the documentation for the raid controller (OPENCISS) and poke the controller
  bits to ask it for how many logical/physical disks it can handle.

  Revert svn R242089 that raised CISS_MAX_LOGICAL to 64 for all controllers.

  For older controllers that don't support this mechanism, fallback to the old
  value of 16 logical disks.  Tested on P420, P410, P400 and 6i model ciss(4)
  controllers.

  This should will be MFC'd back to stable/9 stable/8 and stable/7 after the MFC
  period.
2013-01-31 21:53:55 +00:00
Marius Strobl a86649867c MFC: r241875
Remove support for using Giant for locking within mpt(4). Finer grained
locking has been working fine for ~5.5 years by now.
2013-01-27 17:24:50 +00:00
Marius Strobl 1ac81e501e MFC: r241875
Remove support for using Giant for locking within mpt(4). Finer grained
locking has been working fine for ~5.5 years by now.
2013-01-27 17:16:07 +00:00
Marius Strobl 7630d7def8 MFC: r241874
After r241858 (MFC'ed to stable/7 in r242287), remove the remainder of
FreeBSD ~4 support from mpt(4).
2013-01-27 17:13:21 +00:00
Hajimu UMEMOTO f5e980f22e MFC r245225, r245256: Restrict use of source address selection
of getipnodebyname(1) only to IPv6 address.
2013-01-17 17:08:10 +00:00
Erwin Lansing c3b5593a7c MFC r245034
Update with new IPv4 address for D root.

        Approved by:    delphij (mentor)
2013-01-08 08:59:39 +00:00
Peter Wemm d56a801f62 MFC 245107: use full domain name 2013-01-06 19:27:07 +00:00
Mark Johnston a9e01b30f8 - Add IFT_L2VLAN (vlan(4)) support.
- Add a -P option to support PID files. When -a is specified
  /var/run/rarpd.pid is used by default, and when an interface is
  specified /var/run/rarpd.<ifname>.pid is used by default.

Approved by:	hrs, emaste (co-mentor)
2013-01-05 22:56:16 +00:00
Warren Block 20ab0322cb MFC r242697,r242704:
r242697:
Add devd.conf(5) and devd(8) to SEE ALSO xrefs.  Give users a pointer to
seemingly mysterious actions that are not done by ifconfig itself, but
by devd triggering on events caused by ifconfig.

r242704:
Remove fifteen-year-old notes on media selection (suggested by simon@).
Add commas after "e.g." and "i.e.".

PR:		docs/173405
2013-01-03 21:37:17 +00:00
Gregory Neil Shapiro 3cf0a65a36 MFC: Minor changes to force commit these files so new freebsd*.cf files are
built to use the new sendmail-8.14.6/cf tree.

     While here, update DNSBL link once again.
2013-01-01 18:55:49 +00:00
Gregory Neil Shapiro e922c985ae MFC: Update import info based on recent experiences and sendmail 8.14.6 import. 2013-01-01 18:48:32 +00:00
Gregory Neil Shapiro a94fbdb482 MFC: Merge sendmail 8.14.6 2013-01-01 18:30:57 +00:00
Dimitry Andric 9c4cb9047d MFC r244600:
Fix a bug in ld --gc-sections: it strips out .note sections, while it
should never do so.  This can cause global constructors and destructors
to not be executed at run-time, resulting in crashes and other strange
behaviour.

Reported by:	rene
2012-12-31 14:21:51 +00:00
Bjoern A. Zeeb d7b742f48f MFC 244900:
Happy New Year 2013!
2012-12-31 12:11:14 +00:00
Mark Johnston 8b021e3f9e MFC 244523:
- Make sure that errno isn't modified before calling logerror() in error
  conditions.
- Don't check for AF_INET6 when compiled without INET6 support.

Approved by:	emaste (co-mentor)
2012-12-31 03:35:09 +00:00
Mark Johnston ccc5462304 MFC r244522: Don't reload syslogd after rotating sendmail.st.
Approved by:	emaste (co-mentor)
2012-12-31 03:34:30 +00:00
Gregory Neil Shapiro a722d6da7b MFC: Add missing closing quote on commented out example 2012-12-30 15:38:06 +00:00
Gregory Neil Shapiro da83a5305e MFC: Properly define true/false when defining __bool_true_false_are_defined
for filters which pull in mfapi.h before stdbool.h.  Issue reported by
     Petr Rehor, maintainer of amavisd-milter port.
2012-12-29 19:13:16 +00:00
Eitan Adler 35c6b5d5db MFC r244037:
Add check for failure of mkstemp and setenv.

Approved by:	cperciva (implicit)
2012-12-20 18:13:04 +00:00
Eitan Adler ff2e6c79d8 MFC r242996:
Add support for CIR1000 - Cirrus Logic V34 to the sio driver

PR:		kern/44267
Approved by:	cperciva (implicit)
2012-12-20 04:16:25 +00:00
Eitan Adler 15b98f9bee MFC r244318:
Minor wording improvments to some manual pages

Approved by:	cperciva (implicit)
2012-12-20 00:32:43 +00:00
Eitan Adler 4f9db546a0 MFC r243891:
Add ability to mergemaster to permit the user to type
	the absolute path to PAGER if mergemaster can not find
	the one already set.

Approved by:	cperciva (implicit)
2012-12-20 00:30:48 +00:00
Eitan Adler f401c05986 MFC r243894:
Remove useless check for NULL prior to free.

Approved by:	cperciva (implicit)
2012-12-20 00:28:51 +00:00
Eitan Adler f60b4e7de9 MFC r243892:
Remove pointless check for the existence of /usr/bin/less which exists
	in all configurations.

Approved by:	cperciva (implicit)
2012-12-20 00:26:47 +00:00
Dimitry Andric b2cef0ca0a MFC r243907:
Fix an old bug in devd, where it uses std::sort() to sort the various
lists it reads from its configuration files on the priority field.

Because some items in the lists have the same priority, and std::sort()
is not stable, the exact order in which the items are enumerated does
not have to correspond to the order they appear in the configuration
files.

Apparently this was never noticed with libstdc++, but with libc++ it
could cause the "uhid" entry from /etc/devd/usb.conf to be used instead
of the "ums" entry (which is earlier in the file).  This caused the
problem described in the PR: the USB mouse module was never loaded, and
the other actions (such as starting moused) were not executed.

To fix the problem, make devd use std:stable_sort() instead.

Reported by:	Jan Beich <[email protected]>
PR:		bin/172958
2012-12-19 12:20:04 +00:00
Eitan Adler 152d3bbb23 MFC r243320,r243474:
Add 'w' flag to:

	Use whitespace (spaces and tabs) as the delimiter.
	Consecutive spaces and tabs count as one single field
	separator.
Approved by:	cperciva (implicit)
2012-12-16 17:01:23 +00:00
Eitan Adler 034670dfdb MFC r227162:
Add missing static keywords to cut(1)

Approved by:	ed
Approved by:	cperciva (implicit)
2012-12-16 16:59:44 +00:00
Eitan Adler 47f46307b1 MFC r236866,r236867:
- Consistenly mention columns and fields
	- Add -b to short error messages

Approved by:	kevlo
Approved by:	cperciva (implicit)
2012-12-16 16:55:59 +00:00
Eitan Adler 2bf2cc9d6f MFC r244017:
Sync with Library of Congress list.

Approved by:	cperciva (implicit)
2012-12-15 14:36:41 +00:00
Eitan Adler 01af33fe73 MFC r243899:
Use Bernard Baruch's full name.

	The words "old than" seem to be quoted as "older than" by some sources,
	so use the more likely and grammatically correct text.

PR:		docs/173868
Approved by:	cperciva (implicit)
2012-12-15 14:34:33 +00:00
Baptiste Daroussin dc86b17ab8 MFC r243021:
return ERANGE if the buffer is too small to contain the login as documented in
the manpage

Reviewed by:	cognet, kib
2012-12-14 08:54:52 +00:00
Remko Lodder d3f2817d10 MFC r232639
Original commit:
  Add support for the MosChip MCS9904 four serial ports
  controller.

  PR:	 165804
  Submitted by:	Eugene Grosbein
  MFC after:	1 week
2012-12-12 07:24:37 +00:00
Jim Harris f513291307 MFC r243904:
Don't call bus_dmamap_load in CAM_DIR_NONE case, since there is nothing
to map, and technically this isn't allowed.

Functionally, it works OK (at least on x86) to call bus_dmamap_load with
a NULL data pointer and zero length, so this is primarily for correctness
and consistency with other drivers.

While here, remove check in isci_io_request_construct for nseg==0.
Previously, bus_dmamap_load would pass nseg==1, even for case where
buffer is NULL and length = 0, which allowed CAM_DIR_NONE CCBs
to get processed.  This check is not correct though, and needed to be
removed both for the changes elsewhere in this patch, as well as jeff's
preliminary bus_dmamap_load_ccb patch (which uncovered all of this in
the first place).
2012-12-12 00:39:54 +00:00
Eitan Adler fdc7c5f020 MFC r243238:
Standardize EXIT STATUS instructions in man pages when possible.

Approved by:	cperciva (implicit)
2012-12-10 02:44:46 +00:00
Eitan Adler cfdd07b081 MFC r243077:
Fix error code if file isn't readable.

Approved by:	cperciva (implicit)
2012-12-10 02:35:20 +00:00
Eitan Adler 9eebebadf0 MFC r243084:
Add support for a -q flag.  While here make the custom argument parsing
	use getopt instead of hacking on it more.  This change also fixes the
	method of silencing the compiler warning about gfn being used
	uninitialized.

Approved by:	cperciva (implicit)
2012-12-10 02:33:16 +00:00
Eitan Adler 8bf9aba9c3 MFC r243893:
Remove hack to emulate effective uid and just use the EUID's name in the
	first place.  I was unaware of this option when originally committing
	this change.

	I accidently merged this to only one directory last time :(

Approved by:	cperciva (implicit)
2012-12-08 00:28:16 +00:00
Eitan Adler 3287edec11 MFC r243893:
Remove hack to emulate effective uid and just use the EUID's name in the
	first place.  I was unaware of this option when originally committing
	this change.

Approved by:	cperciva (implicit)
2012-12-08 00:25:51 +00:00
Xin LI 0c8e67f54a MFC r242519:
Replace log(3) with flsll(3) for watchdogd(8) and drop libm dependency.
2012-12-03 18:31:33 +00:00
Xin LI 5cb9be7e85 MFC r242728:
ICMPV6_FILTER should read ICMP6_FILTER.

Submitted by:	Frédéric Perrin <frederic.perrin resel.fr>
2012-12-03 18:21:29 +00:00
Eitan Adler 23610ac83f MFC r243155:
Correct spelling of "lily" [0]
	Correct spelling of Camellia

PR:		misc/173655 [0]
Approved by:	cperciva (implicit)
2012-12-03 01:02:45 +00:00
Chris Rees d617f1213c MFC r242183:
Allow spaces in _chroot

Approved by:	hrs
2012-12-01 15:54:54 +00:00
Hajimu UMEMOTO c4224cbe08 MFC r243649: cyrus-sasl 2.1.26 was released. In this version, the type
of callback functions was changed from "unsigned long" to "size_t".
2012-12-01 11:12:04 +00:00
Eitan Adler 983f44b391 MFC r243078:
Add deviceid to the disk output on boot to help debugging.

PR:		kern/173290
Approved by:	cperciva (implicit)
2012-11-30 03:38:01 +00:00
Peter Jeremy d435e1e243 MFC r241708: Explicitly specify 'np' so that getty(8) does not
simulate even parity on local.9600.

PR:		76226
Approved by:	jhb (mentor)
2012-11-27 19:35:21 +00:00
Eitan Adler 4218099a67 MFC r243072:
Follow the behavior as specified in POSIX:

	if (exists AND (NOT f_option) AND
		((not_writable AND input_is_terminal) OR i_option))
			prompt

	in particular, add the test for input_is_terminal

PR:		bin/173039
Approved by:	cperciva (implicit)
2012-11-26 05:13:57 +00:00
Jaakko Heinonen bab0c3cc76 MFC r235143 by kib:
Plug a leak.

PR:		167068
Tested by:	Oliver Pinter
2012-11-24 08:33:27 +00:00
Remko Lodder 39b29a319b MFC r232486
Add an ifconfig carp option that enables users to set
the state of the carp cluster.

This is a direct commit to stable/9 because -HEAD's
code is very different. I discussed this with Gleb
and the reason for this is that since we do not
touch the kernel itself and are not adding very
weird or confusing things, we can commit this to the
stable branch directly.

The options 'master' and 'backup' are now available,
which enables the administrator to force a node into
the backup or master state on the cluster. Ofcourse
preempt has to be disabled otherwise the master node
will become master again.

One can do that with:

sysctl net.inet.carp.preempt=0

After that one can schedule maintenance on the node
normally running as the master and such.

PR:	 100956
Discussed with:	glebius
2012-11-23 21:29:08 +00:00
Simon L. B. Nielsen 0bc54cefa0 Fix multiple Denial of Service vulnerabilities with named(8).
Fix insufficient message length validation for EAP-TLS messages.

Fix Linux compatibility layer input validation error.

This commit includes stable/7 which was missed in r243417.

Security:	FreeBSD-SA-12:06.bind
Security:	FreeBSD-SA-12:07.hostapd
Security:	FreeBSD-SA-12:08.linux
Security:	CVE-2012-4244, CVE-2012-5166, CVE-2012-4445, CVE-2012-4576
Approved by:	re
Approved by:	security-officer
2012-11-22 23:15:38 +00:00
Eitan Adler 23b7675898 MFC r243000:
Add support for CIR1000 - Cirrus Logic V34 to the uart driver

Approved by:	cperciva (implicit)
2012-11-21 01:01:19 +00:00
Eitan Adler 1fff27426e MFC r243241:
Modernize parts of the ports.7 manual page.

Approved by:	cperciva (implicit)
2012-11-21 00:40:26 +00:00
Eitan Adler d35638c14b MFC r243240:
Use the macro for standard error return values.

	.Dd not bumped because there is no important content change.

Obtained from:	DragonflyBSD
Approved by:	cperciva (implicit)
2012-11-21 00:31:57 +00:00
Eitan Adler 97bfdef1b0 MFC r243081:
Avoid possible null deref if ypclnt_new returns null

PR:		bin/172979
Approved by:	cperciva (implicit)
2012-11-19 04:08:20 +00:00
Dimitry Andric 715459b3ff MFC r243037:
Fix a bug in aicasm_gram.y, noted by a newer clang 3.2 snapshot: it
compared an enum scope_type against a yacc-generated define, so the
condition would always be false.
2012-11-17 23:44:01 +00:00
Baptiste Daroussin 45af412bba MFC r243022:
small style fix
2012-11-15 18:05:38 +00:00
Eitan Adler 2e9c5640ac MFC r242814:
Add support for Advantech PCI-1602 RS-485/RS-422 serial card

PR:		kern/169726
Approved by:	cperciva (implicit)
2012-11-14 00:34:10 +00:00
Edwin Groothuis 20ba338a6f Merge of current of tzdata2012j
- Libya went to Standard Time on 10 November 2012
2012-11-13 21:15:11 +00:00
Edwin Groothuis ef4f7dc8ca Merge of current of 242925, tzdata2012i
- Cuba is changing back to Standard Time on 4 November 2012.
2012-11-12 20:47:35 +00:00
Baptiste Daroussin 5795aa2c9b MFC: r241107, r241108
Remove useless atoi(3), previous strspn(3) makes sure that a_name->val is a
number.
This also allow pw user show to work as expected.

PR:		bin/172112
Submitted by:	Ilya A. Arkhipov <[email protected]>
2012-11-12 14:19:05 +00:00
Eitan Adler 9d1e9940ac MFC r242583:
Add support for a few more devices:

	PNP0510 and FUJ02E5 for a  "Wacom Tablet at FuS Lifebook T"
	PNP0502 and PNP0511 for some other generic devices.

PR:		kern/173357
Approved by:	cperciva (implicit)
2012-11-11 04:07:10 +00:00
Eitan Adler 978c21c1ac MFC r242462:
10 years too late add support for "2.88MB 3.5in Extra High Density"
	floppies.

	Its unlikely that anyone actually uses these or cares about these
	anymore, since we support other floppy types and this change doesn't
	hurt - just add it.

PR:		conf/40777
Arrival-Date:	Fri Jul 19 08:50:02 PDT 2002
Approved by:	cperciva (implicit)
2012-11-09 00:35:55 +00:00
Eitan Adler 7a3f86bba4 MFC r242514,r242541:
Revert the change that makes less default.

	Since I've committed this I've receieved roughly an equal
	amount of email thanking me for making this change
	and asking me to revert it.

	I've resisted making this change because
	new users tend to prefer less over more
	and these users are the least likely to know
	how to change the PAGER on their own.

Requested by:	many
Objected to:	just as many
Decision made by:	core

====
	Change default prompt to show ~ again for the home directory

Approved by:	cperciva (implicit)
2012-11-06 00:55:43 +00:00
Dag-Erling Smørgrav f0b1d3961e MFH r225599: fix resume logic 2012-11-05 13:02:34 +00:00
Dag-Erling Smørgrav b5bfb64f8a MFH r225815 (partial): adjust copyright statement 2012-11-05 12:58:44 +00:00
Dag-Erling Smørgrav 6b01f56572 MFH r240496: use libmd if and only if OpenSSL is not available 2012-11-05 12:42:24 +00:00
Dag-Erling Smørgrav d1d00dd579 MFH r221820, r221821, r221822: increase WARNS
MFH r221830: mark all descriptors close-on-exec
MFH r225813: man page fixes
MFH r225814: adjust copyright statement
MFH r226537: latin1 -> utf8
MFH r230307, r230478: fix SIGINFO infinite loop and data loss
MFH r233648: man page fixes
MFH r234138: support percent-encoded user and password
MFH r234837: avoid busy-loop on slow connections
MFH r234838: don't reuse credentials when redirected to another host
MFH r236193: avoid SIGPIPE on network connections
MFH r240496: use libmd if and only if OpenSSL is not available
2012-11-05 10:54:14 +00:00
Eitan Adler af7a9fb032 MFC r241844:
remove duplicate semicolons where possible.

Approved by:	cperciva (implicit)
2012-11-04 01:20:00 +00:00
Eitan Adler 33dff2c336 MFC r242452:
The test fails with "exit 1" if /usr/games/fortune doesn't actually
	exist.  Fix that.

PR:		conf/71994
Approved by:	cperciva (implicit)
2012-11-04 00:30:42 +00:00
Navdeep Parhar 082af1f797 MFC r242087:
Initialize the response queue mutex a bit earlier to avoid a panic that
occurs if t3_sge_alloc_qset fails and then t3_free_qset attempts to
destroy an uninitialized mutex.
2012-10-30 19:34:45 +00:00
Matthew D Fleming c1a1e3d655 MFC r242152:
Const-ify the zone name argument to uma_zcreate(9).
2012-10-30 17:05:47 +00:00
Eitan Adler df95fbea95 MFC r241857:
Add support for the "&" character in usernames.

	Charlie & finally has his last name.

PR:		gnu/37910
Approved by:	cperciva (implicit)
2012-10-30 03:21:31 +00:00
Eitan Adler f565eec409 MFC r241855:
Update the kill(2) and killpg(2) man pages to the modern permission
	checks. Also indicate killpg(2) is POSIX compliant.

Approved by:	cperciva (implicit)
2012-10-29 04:51:51 +00:00
Eitan Adler c8b6dde4ef MFC r242136:
Prefer an example users born after myself might use.

Approved by:	cperciva (implicit)
2012-10-29 04:21:17 +00:00
Eitan Adler 184190f858 MFC r241841:
Implement HTTP 305 redirect handling.

PR:		172452
Approved by:	cperciva (implicit)
2012-10-29 04:18:34 +00:00
Eitan Adler 8e61483447 MFC r241840:
Don't deny non-temporary redirects if the -A option is set (per
	the man page) [0]

	While here add support for draft-reschke-http-status-308-07

PR:		172451 [0]
Approved by:	cperciva (implicit)
2012-10-29 04:16:52 +00:00
Eitan Adler 8f9a440270 MFC r241858:
Remove unused code since the 5.x days

Approved by:	cperciva (implicit)
2012-10-29 04:09:21 +00:00
Eitan Adler b0d6456689 MFC r241855,r241859:
Update the kill(2) and killpg(2) man pages to the modern permission
	checks. Also indicate killpg(2) is POSIX compliant.

	Correct the killpg(2) return values:

	Return EPERM if processes were found but they
	were unable to be signaled.

	Return the first error from p_cansignal if no signal was successful.

Discussed with:	jilles
Approved by:	cperciva (implicit)
2012-10-29 03:52:19 +00:00
Gavin Atkinson 8a605e8458 Merge r240680 from head:
Align the PCI Express #defines with the style used for the PCI-X
  #defines.  This has the advantage that it makes the names more
  compact, and also allows us to correct the non-uniform naming of
  the PCIM_LINK_* defines, making them all consistent amongst themselves.

  This is a mostly mechanical rename:
    s/PCIR_EXPRESS_/PCIER_/g
    s/PCIM_EXP_/PCIEM_/g
    s/PCIM_LINK_/PCIEM_LINK_/g

  In this MFC, #defines have been added for the old names to assist
  merges and out-of-tree drivers.
2012-10-28 13:21:35 +00:00
Edwin Groothuis 3ee0defb87 Merge of current of tzdata2012h, r242208
- Bahia no longer has DST.
- Tocantins has DST.
- Israel has new DST rules next year.
- Jordan stays on DST this winter.
2012-10-28 09:16:55 +00:00
Eitan Adler cf72bce83f MFC r241848:
Check the return error of set[e][ug]id. While this can never fail in the
	current version of FreeBSD, this isn't guarenteed by the API.
	Custom security modules, or future implementations of the setuid and
	setgid may fail.

Approved by:	cperciva (implicit)
2012-10-27 01:20:48 +00:00
Eitan Adler 67bdb34b41 MFC r241845,r241934:
Sysinstall has been removed from base.

MFC farther back to maintain consistency

Approved by:	cperciva (implicit)
2012-10-26 00:35:30 +00:00
Xin LI 595d24ac68 MFC r240210:
It seems that what the code really meant is that when a write is completed,
do a BUS_DMASYNC_POSTWRITE over the DMA map.  The way it currently is would
only do POSTREAD for read transactions.

Submitted by:	Sascha Wildner
2012-10-26 00:32:28 +00:00
Eitan Adler b314f7b0b2 MFC r241847:
Free buf when its no longer used. This helps eliminate a static analysis
	warning.

PR:		ports/172566
Approved by:	cperciva (implicit)
2012-10-25 03:27:53 +00:00
Eitan Adler d05a7fc6d8 MFC r241846:
bcd isn't installed setuid.
	caesar isn't installed setuid.

For the archaeologists:
	it seems this call originally came from NetBSD PR 5970 and 5945

PR:		172566
Approved by:	cperciva (implicit)
2012-10-25 03:20:01 +00:00
Eitan Adler 0c412fcb36 MFC r241893:
Update re members to reality

Approved by:	cperciva (implicit)
2012-10-25 03:17:03 +00:00
Eitan Adler 14314b232a MFC r241849:
Fix typo in error when unable to create TCP socket

PR:		bin/172490
Approved by:	cperciva (implicit)
2012-10-25 03:14:17 +00:00
Eitan Adler 5690bf59e7 MFC r241834:
Make do_uniq work with python3

Approved by:	cperciva (implicit)
2012-10-25 03:12:34 +00:00
Eitan Adler 00cbfc7689 MFC r241839:
Be a bit more lenient in the maximum number of redirects allowed.
	Chrome and Firefox have a limit of 20. IE has a limit of 8.

Approved by:	cperciva (implicit)
2012-10-25 03:11:18 +00:00
Eitan Adler 6bb2371b52 MFC r241838:
Remove unused variable. Newer versions of gcc care.

Approved by:	cperciva (implicit)
2012-10-25 01:23:42 +00:00
Eitan Adler 8eec1e8c43 MFC r241829:
Fix conditional expression: previously a bit vector was being operated
	on by a logical not instead of the entire expression.

Approved by:	cperciva (implicit)
2012-10-25 01:20:20 +00:00
Edwin Groothuis 4b7ce96f70 Merge of 241869
Import of tzdata2012g

 - Fix end of DST in Gaza and Hebron
 - Western Samoa: DST start at 30 Septembet 2012 and finished at 7 April 2013.
2012-10-22 10:30:04 +00:00
Eitan Adler 16f6015880 MFC r241613:
Add support for samsung HM250JI

PR:		usb/121474
Approved by:	cperciva (implicit)
2012-10-19 00:32:18 +00:00
Eitan Adler 2c6c75ef79 MFC r241602:
Add a bunch more example completions.
Approved by:	cperciva (implicit)
2012-10-19 00:26:22 +00:00
Eitan Adler 4387a07e91 MFC r241581:
Fix minor nits:
	use a comma after "i.e."
	sentences begin on new lines.

	No .Dd bump for trivial modification.

Approved by:	cperciva (implicit)
2012-10-18 01:14:22 +00:00
Eitan Adler 3b84d5747f MFC r241580:
Add support for the USB DISK Pro PMAP.

	This patch has sit for 6 years in the PR database.

PR:		usb/96381
Approved by:	cperciva (implicit)
2012-10-18 01:12:15 +00:00
Peter Wemm 9680f91e7e mx1 -> smarthost.ysv 2012-10-15 14:16:01 +00:00
Eitan Adler 097913de1d MFC r241373:
Remove undefined behavior from sranddev() and
	srandomdev(). This doesn't actually work
	with any modern C compiler:

	In particular, both clang and modern gcc
	verisons silently elide any xor operation
	with 'junk'.

Approved by:	cperciva (implicit)
2012-10-12 02:12:53 +00:00
Eitan Adler 4695cf6032 MFC r240389,r240409:
- 	Add support for ipv6 addresses as destination
- 	Add documentation for IPv6 support

PR:		docs/171580
Approved by:	cperciva (implicit)
2012-10-12 02:10:27 +00:00
Peter Wemm 449c6036ee Switch freebsd.org nullhost cluster machines from hub to mx1 2012-10-11 20:52:23 +00:00
Eitan Adler c994b93ce9 MFC r241118:
Implement the Sun/GNU extension of using a default
	prefix when no arguments are supplied.

Approved by:	cperciva (implicit)
2012-10-10 21:21:54 +00:00
Eitan Adler b3e2afbd24 MFC r241117:
add SG state type

PR:		bin/171664
Approved by:	cperciva (implicit)
2012-10-10 21:20:34 +00:00
Jim Harris 1fca0ce862 MFC r240695:
Add constants for programming interfaces for NVM/solid state storage
controller sub-class code.

Reference:  PCI Code and ID Assignment Specification Rev 1.2
2012-10-09 20:07:24 +00:00
Sean Bruno 8243e64200 MFC r240879
This patch fixes a nit in the em, lem, and igb driver statistics.  Increment
adapter->dropped_pkts instead of if_ierrors because if_ierrors is
overwritten by hw stats collection.

Submitted by: Andrew Boyer <[email protected]>
Reviewed by:  Jack F Vogel <[email protected]>
2012-10-09 18:02:09 +00:00
David E. O'Brien f1a6788089 MF8: r241368:
MF9: r237100: MFC r236338, r236339, r236346, r236347, r236365, & r236977
    * Deprecate the FreeBSD 10's make's ":U" (to-upper case) and ":L"
      (to-lower case) modifiers for ":tu" and ":tl".
    * make it easier to test newly-built make.
    * Add "-V '${VAR}'" variable expansion from Portable Berkeley Make.
    * regression test for '-V' command line option and the :t[lu] modifiers.
  MF9: r241364: Update MAKE_VERSION for r237100.
  MFC: r201225: add missing `void' keyword.
2012-10-09 13:21:08 +00:00
Doug Barton 0f17a85a77 MFC r241218:
Remove references to CVS so that people will stop bringing it up

For -p:
	The localtime update should have been excluded in the first place

	The make.conf comparison has been OBE for some time now, and there
	is no src.conf equivalent to share/examples/make.conf, so remove
	the whole thing.

Update copyright
2012-10-08 05:51:47 +00:00
Eitan Adler 2eca737df7 MFC r241116:
Correct the tip about finding all the directories on the system
	Add a tip about clearing the screen.
	Make things more consistent by removing quotes around 'make search'

Approved by:	cperciva (implicit)
2012-10-05 22:42:57 +00:00
Doug Barton d09766261f MFC r229822:
There is no longer a need to abstract ${rcvar_manpage} as we are not
attempting to maintain compatibility with NetBSD for some years now.
2012-10-04 22:32:27 +00:00
Doug Barton 2725e0deaf MFC r240090:
Improve file rotation
2012-10-04 22:24:14 +00:00
Doug Barton de9ffcf7e0 MFC r238879:
Add a couple of nice quotes from Edward Everett Hale
2012-10-04 22:16:58 +00:00
Eitan Adler 8bff3236e4 MFC r241115:
Indicate (loudly) that ports csup is going away.

	While here clarify some other portions.

Approved by:	cperciva (implicit)
2012-10-04 01:37:12 +00:00
Eitan Adler abdf44179d MFC r241062:
clarify the wording for 'first' and 'last'

Approved by:	cperciva (implicit)
2012-10-04 01:33:49 +00:00
Gavin Atkinson 6b4dff6ec7 Merge the following from head:
r240694
    Add PCI subclass for NVM Express devices.

  r240699, r240739
    Recognise NVM devices and pretty-print their name.
2012-10-01 15:47:35 +00:00
Eitan Adler 749aea8bb8 MFC r240495:
Adding missing return statements during error conditions.

PR:		kern/171187
Approved by:	cperciva (implicit)
2012-09-28 01:04:10 +00:00
Mikolaj Golub 4f0e143403 MFC r240595:
In snmp_hostres, device_map table is used for consistent device table
indexing. When a device has gone it is not removed from device_map
table but just its entry_p field is set to NULL.

So when traversing device_map in disk_OS_get_ATA_disks() and
disk_OS_get_MD_disks() check for entry_p being NULL, otherwise the
bsnmpd crash is possible when a removed map entry is dereferenced.

Before the fix, for disk_OS_get_ATA_disks() the crash could be easily
reproduced running:

  atacontrol detach ata1

The crash was not observed in disk_OS_get_MD_disks() because currently
snmp_hostres does no see md(4) disks: to get the device list it uses
devinfo(3), which does not return md devices.

Reported by:  Miroslav Lachman 000.fbsd quip.cz
2012-09-27 18:53:59 +00:00
Eitan Adler 7622a8c9ab MFC r240470:
Remove scripts and tools which only functioned when src was using CVS

Approved by:	cperciva (implicit)
2012-09-25 01:31:30 +00:00
Eitan Adler 60dda1c147 MFC r240466:
Define missing DEBUGOUT# macros. DEBUGOUT[45] are not yet used but are
	being defined pre-emptively to avoid future build breakage

PR:		kern/168967
Approved by:	cperciva (implicit)
2012-09-25 01:28:15 +00:00
Sean Bruno 5a767851b9 MFC r238601
On BIO_ERROR, set bio_resid to stop losing data in the error case.

Submitted by: Mark Johnston <[email protected]>
2012-09-23 20:31:52 +00:00
Sean Bruno 1acae81a7b MFC r238371
When an MFI command fails, the driver needs to set bio->bio_resid so that
the upper levels notice.  Otherwise we see commands silently failing leading
to data corruption.  This mirrors dadone()

Submitted by: Andrew Boyer [email protected]
2012-09-23 20:24:24 +00:00
Sean Bruno 75b651bbe6 MFC r238373
sys/dev/mfivar.h contains references to MFI_DEBUG, but it never gets turned on
unless the file also includes opt_mfi.h.

Submitted by: Andrew Boyer [email protected]
2012-09-23 20:16:45 +00:00
Jim Harris 5236e9174d MFC r240514:
isci(4): Fix SCSI/ATA translation for SCSI_WRITE_BUFFER w/ mode==0x7
(download microcode with offsets, save, and activate).

SATI translation layer was incorrectly using allocation length instead
of blocks, and was constructing the ATA command incorrectly.

Also change #define to specify that the 512 block size here is
specific for DOWNLOAD_MICROCODE, and does not relate to the device's
logical block size.
2012-09-17 16:12:53 +00:00
Eitan Adler 4f9d8d9880 MFC r240328:
Follow up to doc r39516:

		Update the Vendor Relations Team information to reflect that
		incoming email is now handled by core@ and the Foundation.

Approved by:	cperciva (implicit)
2012-09-14 00:37:12 +00:00
Edwin Groothuis 5d3c7a701c iMFC of 240457, tzdata2012f
- Pacific/Fiji will go into DST from 21 October 2012 till 20 January 2013.
 - Fix offset for Pacific/Tokelau.
 - Gaza and West Bank had DST from 29 March to 28 September 2012.
 - Syria has DST from April till October
 - Morocco had DST from April to September 2012 except for 20 July to 20 August.
 - Cuba changed to DST from 1 April 2012 only.
 - Haiti has DST between 8 March and 1 November in 2012.

Obtained from:  ftp://ftp.iana.org/tz/releases/
2012-09-13 10:25:18 +00:00
Eitan Adler 862086296f MFC r240293:
Sync access file date recommendation
	Change from CVS to svn for canconical source of information

Approved by:	cperciva (implicit)
2012-09-13 01:05:30 +00:00
Eitan Adler e8bef81b9a MFC r237676,r237677,r237680,r240294,r240318,r240324:
Update organization.dot to reflect reality

Approved by:	cperciva (implicit)
2012-09-13 01:02:56 +00:00
Eitan Adler 0a245e0903 MFC r240316:
We moved to subversion ages ago.

Approved by:	cperciva (implicit)
2012-09-13 00:54:24 +00:00
Dimitry Andric 76102ac2d9 MFC r239872:
Teach libdwarf about the DW_FORM_flag_present dwarf attribute, so
programs using libdwarf (such as ctfconvert) don't error out on files
containing the attribute.
2012-09-12 18:18:14 +00:00
Dimitry Andric b482cfa439 MFC r239870:
Teach gdb about the DW_FORM_flag_present dwarf attribute, so it doesn't
error out on files that contain it.  (This attribute can be emitted by
newer versions of clang.)
2012-09-12 18:02:35 +00:00
Martin Matuska 1ff8d298b5 MFC r240162:
Make r230454 more readable and vendor-like.

PR:	kern/171380
2012-09-09 07:47:02 +00:00
Eitan Adler c58140b832 MFC r238202:
Remove ancient vnconfig symlink

Approved by:	cperciva (implicit)
2012-09-08 03:10:56 +00:00
Dimitry Andric f7c5db07eb MFC r239962:
Fix a twelve year old bug in readelf: when process_dynamic_segment()
encounters a DT_RUNPATH entry, the global dynamic_info[] array is
overrun, causing some other global variable to be overwritten.

In my testcase, this was the section_headers variable, leading to
segfaults or jemalloc assertions when it was freed later on.

Thanks to Koop Mast for providing samples of a few "bad" .so files.
2012-09-07 18:03:29 +00:00
Jim Harris 2491765dc5 MFC r239571:
Add -m option (for printing sampled PCs to a file) to pmcstat usage
message.
2012-09-04 17:29:35 +00:00
Jim Harris f0294f40b8 MFC r239889:
Do not call sati_check_data_io() for SATI_UNMAP sequences.

This routine is intended only for commands such as INQUIRY where
the controller may fill out a smaller amount of data than allocated
by the host.

The end result of this bug was that isci(4) would report non-zero
resid for successful SCSI_UNMAP commands.

Sponsored by:   Intel
2012-09-04 17:15:19 +00:00
Eitan Adler cab51f4c32 MFC r236596:
Fix style nit: don't use leading zero for dates in .Dd

Approved by:	cperciva (implicit)
2012-09-02 18:54:31 +00:00
Eitan Adler b356c873b3 MFC r237178,r237180:
Fix mdoc style nits

PR:		kern/168910
Approved by:	cperciva (implicit)
2012-09-02 18:44:40 +00:00
Eitan Adler 8c1965ee61 MFC r235251,r238205:
Add Spanish Dvorak keyboard model to syscons.

	(not verified to be accurate)

PR:		conf/160235
Approved by:	cperciva (implicit)
2012-09-02 18:40:11 +00:00
Eitan Adler ef549ef723 MFC r238199:
Remove variables which are initialized but never used thereafter
	reported by gcc46 warning

Approved by:	cperciva (implicit)
2012-09-02 18:33:43 +00:00
Eitan Adler 208769bcab MFC r238201:
Remove variables which are initialized but never used thereafter
	reported by gcc46 warning

Approved by:	cperciva (implicit)
2012-09-02 18:17:12 +00:00
Eitan Adler ead1e95d4a MFC r238221:
Fix always 0 tautologly revealed by gcc46

Approved by:	cperciva (implicit)
2012-09-02 18:10:31 +00:00
Eitan Adler eb1d29ca8b MFC r239076:
Add support for SIIG Cyber Serial Dual PCI 16C850

Approved by:	cperciva (implicit)
2012-09-02 18:04:06 +00:00
Eitan Adler 880206938e MFC r239047:
Remove variables which are initialized but never used thereafter
	reported by gcc46 warning

Approved by:	cperciva (implicit)
2012-09-02 18:01:16 +00:00
Bjoern A. Zeeb 062cea90ee MFC r238878:
For consistency put the IPsec comment iside the #fidef section.
2012-08-29 12:44:17 +00:00
Bjoern A. Zeeb 74044f7ed4 MFC r238877:
Fix a comment that we do not have an SA yet but need to acquire one.
2012-08-28 12:56:35 +00:00
Jim Harris 163a0fb28b MFC r239545, r239665:
Fix/add support for SCSI UNMAP to ATA DSM translation.

(Note: scsi_da does not support BIO_DELETE->SCSI_UNMAP on this
stable branch, but I am MFC'ing the changes to keep a
consistent driver across all stable releases.)

This addresses kernel panic observed when sending SCSI UNMAP
commands to SATA disks attached to isci(4).

1) Flesh out callback routines to allocate/free buffers needed for
translating SCSI UNMAP data to ATA DSM data.
2) Add controller-level pool for storing buffers previously allocated
for UNMAP translation, to lessen chance of no buffer available
under memory pressure.
3) Ensure driver properly handles case where buffer pool is empty
and contigmalloc returns NULL.
4) Clear freeze bit in isci_remote_device_release_lun_queue() before
calling xpt_release_devq to ensure that any ccbs which immediately
start during the call to xpt_release_devq() see an accurate picture
of the frozen_lun_mask.  This code path is extensively exercised
when tagged read/write commands mix with non-tagged DSM commands.

Sponsored by: Intel
2012-08-27 15:54:51 +00:00
Ed Maste 3ac15a2360 MFC r232844: Remove extraneous log message
When ntp switched between PLL and FLL mode it produced a log message
"kernel time sync status change %04x".  This issue is reported in ntp
bug 452[1] which claims that this behaviour is normal and the log
message isn't necessary.  I'm not sure exactly when it was removed, but
it's gone in the latest ntp release (4.2.6p5).

[1] http://bugs.ntp.org/show_bug.cgi?id=452
2012-08-20 19:23:32 +00:00
Xin LI 717f2453a5 MFC r238631:
Import an updated version of moduli(5) manual page from OpenBSD.
2012-08-20 18:33:23 +00:00
Xin LI 8a726d226f MFC r239169:
RFC 2289 requires all hashes be stored in little endian format before
folding to 64 bits, while SHA1 code is big endian.  Therefore, a bswap32
is required before using the value.

Without this change, the implementation does not conform to test vector
found in RFC 2289.

PR:		bin/170519
Submitted by:	Arthur Mesh <arthurmesh gmail com> (with changes)
2012-08-20 18:26:16 +00:00
Warren Block 8e038febe5 MFC r239233:
Correct description of minfree to kilobytes rather than blocks.

PR:		125921
Submitted by:	Andre Albsmeier <[email protected]>
2012-08-20 16:40:15 +00:00
John Baldwin 2dab0434c7 MFC 230547:
Add a timeout on positive name cache entries in the NFS client.  That is,
we will only trust a positive name cache entry for a specified amount of
time before falling back to a LOOKUP RPC, even if the ctime for the file
handle matches the cached copy in the name cache entry.  The timeout is
configured via a global 'vfs.nfs.name_timeout' sysctl and defaults to 60
seconds.  It may be set to zero to disable positive name caching entirely.

Note that this can result in increased NFS traffic under certain workloads.
Increasing the threshold can mitigate this somewhat.  Also, to match the
existing 'vfs.nfs.negative_name_timeout' sysctl in 7, this version uses a
sysctl rather than a mount option as in 8.x and later.

Tested by:	Mark Saad
2012-08-17 14:22:56 +00:00
Simon L. B. Nielsen 5038f5e8fe Fix named(8) DNSSEC validation Denial of Service.
Security:	FreeBSD-SA-12:05.bind
Security:	CVE-2012-3817
Obtained from:	ISC
Approved by:	so (simon)
2012-08-06 21:33:11 +00:00
John Baldwin 2e89c94eaa MFC 194358,230394,230441,230489,230552,232116,232420:
- For dotdot lookup in nfs_lookup, inline the vn_vget_ino() to prevent
  operating on the unmounted mount point and freed mount data in case of
  forced unmount performed while dvp is unlocked to nget the target vnode.
- Close a race in NFS lookup processing that could result in stale name cache
  entries on one client when a directory was renamed on another client.  The
  root cause for the stale entry being trusted is that each per-vnode nfsnode
  structure has a single 'n_ctime' timestamp used to validate positive name
  cache entries.  However, if there are multiple entries for a single vnode,
  they all share a single timestamp.  To fix this, extend the name cache
  to allow filesystems to optionally store a timestamp value in each name
  cache entry.  The NFS clients now fetch the timestamp associated with
  each name cache entry and use that to validate cache hits instead of the
  timestamps previously stored in the nfsnode.  Another part of the fix is
  that the NFS clients now use timestamps from the post-op attributes of
  RPCs when adding name cache entries rather than pulling the timestamps out
  of the file's attribute cache.  The latter is subject to races with other
  lookups updating the attribute cache concurrently.
- Adjust the nfs_skip_wcc_data_onerr setting so that it does not block
  post-op attributes for ENOENT errors now that the name caching logic
  depends on working post-op attributes.

Tested by:	Mark Saad  nonesuch longcount org
2012-07-30 19:05:41 +00:00
Eitan Adler cd508339a7 MFC r230454:
Use provided name when allocating ksid domain. It isn't really used on FreeBSD, but should fix a panic when pool is imported from another OS that is using this.

Requested by:	nox
No objections:	pjd
Approved by:	cperciva (implicit)
2012-07-24 03:46:58 +00:00
Bjoern A. Zeeb e2b8d884e1 MFC r238248:
Implement handling of "atomic fragements" as outlined in
 draft-gont-6man-ipv6-atomic-fragments to mitigate one class of
 possible fragmentation-based attacks.
2012-07-16 07:22:22 +00:00
Jaakko Heinonen c8153368b9 MFC r230642: Remove trailing whitespace. 2012-07-15 19:05:58 +00:00
Mikolaj Golub 2beca786d1 MFC r238083:
Fix RTTVAR scale in net.inet.tcp.hostcache.list sysctl.

Reviewed by:	andre
2012-07-08 19:33:20 +00:00
Benjamin Kaduk 1865d33219 MFC r237581:
Explicitly mention that setting the change and expiry times to zero is
  equivalent to leaving the time unset. [1]

  Wordsmith in the compat support section.

  Use a full path to nologin(8) in the context of setting it as a user's shell,
  keeping a separate cross-reference.

PR:		docs/169354 [1]
Approved by:	hrs (mentor)
2012-07-06 03:43:33 +00:00
Warren Block b4f43c14ab MFC r238008:
Add reference to portsnap(8).

Submitted by:	Tim Kientzle
2012-07-03 15:54:20 +00:00
Doug Barton c8a244ac7d MFC r238038:
Unfortunately the change in r237958 resulted in s/install/instclean/ due to
the aggressive pattern matching of the :C modifier. I tested build and
install in 2 phases, however with different solutions, resulting in the
breakage. Mea culpa.

The solution is to break out the all: target. This causes a few lines of
code duplication, but now the all: target works as it should, and the
other targets continue to work as they did before.

While I'm here, add a ===> header line to the start of each port build
to make it easier to find/more clear in the logs.
2012-07-02 22:19:02 +00:00
Christian Brueffer 8f654825b4 MFC: r217140
Use ether_ntoa instead of home-grown version.

PR:		169075
Submitted by:	Alexandr <[email protected]>
2012-07-02 17:48:19 +00:00
Jung-uk Kim 3757e6e071 MFC: r237657, r237658, r237666
Merge OpenSSL 0.9.8x and regen manual pages.
2012-07-02 16:24:43 +00:00
Doug Barton f3ae344512 MFC r237958:
For the ports modules building code, clean WRKDIR before building. This is
important for those that use -DNO_CLEAN routinely, since it will prevent
installing stale stuff, and even more important when the port is upgraded
to a newer version. When the user doesn't use -DNO_CLEAN, this will create
an infinitesimal amount of extra work, but won't hurt anything.

This is necessary because the ports tree has flags that prevent the ususal
'update the build if newer source files exist' logic from doing what it
would do in the base.
2012-07-02 06:52:25 +00:00
Eitan Adler a594cd1f2d MFC r237178:
attach_generic causes missing devices in /dev when the driver interacts with some non-highpoint controollers. Change attach_generic to be off by default.

PR:		kern/168910
Approved by:	cperciva (implicit)
2012-07-01 00:40:56 +00:00
Gavin Atkinson 2b12963a86 Merge r237645 from head:
The -S option, to specify the sector size, has been usable on all types
  of memory disks since r135340.  Update the man page to reflect this.

Noticed by:	avg
2012-06-30 20:23:59 +00:00
Warren Block d0141bb973 MFC r237655:
Point out that /usr/src, /usr/doc, and /usr/ports may be empty or not
exist until populated with csup(1) or svn(1).

PR:		169487
Submitted by:	Moritz Wilhelmy
2012-06-28 13:12:34 +00:00
Eitan Adler b1221df50f MFC r237286, r237523:
Don't close an uninitialized descriptor.

PR:		bin/167302
Approved by:	cperciva (implicit)
2012-06-27 06:41:10 +00:00
Xin LI d909fe3097 MFC r237339:
Polish previous revision: if the fts_* routines have lstat()'ed the
directory entry then use the struct stat from that instead of doing
it again, and skip the rm_overwrite() call if fts_read() indicated
that the entry couldn't be a regular file.

Obtained from:	OpenBSD

MFC r237284 (kevlo):

Fix potential symlink race condition in "rm -P" by adding a check
that the file we have opened is the one we expected.  Also open in
non-blocking mode to avoid a potential hang with FIFOs.

Obtained from:	NetBSD via OpenBSD
2012-06-27 00:37:22 +00:00
Warren Block 75d7cd49e8 MFC r225808:
Fix grammar.

PR:		140457
Submitted by:	jeremyhu AT apple.com
Approved by:	gjb (mentor)
2012-06-25 23:40:58 +00:00
Christian Brueffer 5ed4d347b9 MFC: r211353
Tie up some loose ends r88509 left behind:

- chooseproc() is long gone, MLINK choosethread instead
- Update NAME section for choosethread
- Mark chooseproc.9 for removal
2012-06-24 18:38:16 +00:00
Xin LI f07e5d9e43 MFC r237348:
Currently the code uses gzFile * for a zlib file descriptor, which
is not correct.  The code works by accident because gzFile is
currently defined as void *, and internally it would be casted from
or to its real type.

A newer version of zlib will instead define it as a pointer to a
specific type pointer (namely, struct gzFile_s *).  This therefore
would cause stricter checks and compiler would catch this type
mismatch.

This change does not cause any changes to the resulting binary,
as validated with md5(1).
2012-06-23 00:37:32 +00:00
Eitan Adler 12b9ff1047 MFC r237257:
Remove variables which are initialized but never used thereafter reported by gcc46 warning

PR:		bin/163847
Approved by:	cperciva (implicit)
2012-06-22 05:40:15 +00:00
Eitan Adler bc2ea1719a MFC r236376:
Add characters mapping for codepages used in Germany.

PR:		bin/163847
Approved by:	cperciva (implicit)
2012-06-22 05:36:37 +00:00
Eitan Adler da1d9797bd MFC r237258:
Remove variables which are initialized but never used thereafter reported by gcc46 warning

Approved by:	cperciva (implicit)
2012-06-22 05:23:49 +00:00
Warren Block 6d68cc220e MFC r235873:
Fixes to man8 groff mandoc style, usage mistakes, or typos.

PR:		168016
Submitted by:	Nobuyuki Koganemaru
Approved by:	gjb (mentor)
2012-06-21 02:48:49 +00:00
Eitan Adler 89414a2ad7 MFC r236999:
Include a warning when using the example code as it may not
	work in unusual situations.
	Also slightly optimize the command.

Approved by:	cperciva (implicit)
2012-06-20 06:58:56 +00:00
Doug Barton 0a8c4bf8e6 Improve the functionality of the PORTS_MODULES knob by adding
LOCALBASE/bin and sbin to PATH, which allows dependencies to be found;
adding SRC_BASE and OSVERSION to match the new kernel, and putting the
related builds under MAKEOBJDIRPREFIX so that they only need to be built
once per kernel.

In addition to the PR this includes ideas/contributions from crees
and matthew.

PR:		ports/161452
Submitted by:	Garrett Cooper <[email protected]>
2012-06-17 21:07:27 +00:00
Konstantin Belousov 2488476f4c Move misplaced comment.
Discussed with:	bz
2012-06-16 18:37:54 +00:00
Dag-Erling Smørgrav b735a5ae8b Backport sha512 support. 2012-06-16 09:17:21 +00:00
Sergey Kandaurov 1eea9d01a2 MFC r234188, r234463, r234465 (partially, except softclock_ih):
- Update the swi_add prototype after struct ithd was split up into
  struct intr_event and struct intr_thread. [1]
- Update the rest of struct ithd references.
- net_ih cookie has gone away.
- Document swi_remove(9).

PR:		docs/166864 [1]
2012-06-14 11:39:43 +00:00
Eitan Adler 6f9c459231 MFC r236287:
add missing variable declaration when DEBUG is defined forgotten in r215046

PR:		bin/166404
Approved by:	cperciva (implicit)
2012-06-14 06:55:40 +00:00
Eitan Adler ef54389346 MFC r236286:
Fix likely race condition if wait_child() is interrupted by sigchild()

PR:		bin/102834
Approved by:	cperciva (implicit)
2012-06-13 03:41:42 +00:00
Eitan Adler 1b12e3d327 MFC r236288:
Only set _w to 0 when the file stream is not currently reading. Without this fflush may fail to write data in the buffer.

PR:		kern/137819
Approved by:	cperciva (implicit)
2012-06-13 03:29:57 +00:00
Bjoern A. Zeeb 58aded078e Fix a problem where zero-length RDATA fields can cause named(8) to crash.
[12:03]

Correct a privilege escalation when returning from kernel if
running FreeBSD/amd64 on non-AMD processors. [12:04]

Fix reference count errors in IPv6 code. [EN-12:02]

Security:	CVE-2012-1667
Security:	FreeBSD-SA-12:03.bind
Security:	CVE-2012-0217
Security:	FreeBSD-SA-12:04.sysret
Security:	FreeBSD-EN-12:02.ipv6refcount
Approved by:	so (simon, bz)
2012-06-12 12:10:10 +00:00
Isabell Long 6d6fe888bb Partial merge of r213507 from head:
In r178993, the ability to view a man page by giving a path to the
man page itself was added, but never documented.  Subsequently, the
GNU-licensed man(1) and its man page were replaced by BSD licensed
implementations, and later on this undocumented functionality was
also added to the new BSD-licensed man(1), together with
documentation.

This is a merge of the documentation part of that commit (r213507)
into the GNU-licensed man(1) man page in stable/7, in order to
document the available functionality.

PR:		docs/158973
Merge help:	bz
Approved by:	gabor (mentor)
2012-06-11 19:05:10 +00:00
Xin LI 261c22b3db MFC r236572:
Replace the use of wall clock time with monotonically increasing
clock.  In general, gettimeofday() is not appropriate interface
when accounting for elasped time because it can go backward, in
which case the policy code could errornously consider the limit
as exceeded.

Reported by:	Mahesh Arumugam
Submitted by:	Dorr H. Clark via gnn
Sponsored by:	Citrix / NetScaler
2012-06-11 07:11:34 +00:00
Warren Block c534b2045b MFC r236122,r236595:
Wording corrections and simplifications.

Approved by:	gjb (mentor)
2012-06-09 01:42:55 +00:00
Andrew Gallatin 0bfca41577 MFC 236212:
Update mxge(4) firmware to the latest version available from
  Myricom (1.4.55).

  Sponored by: Myricom, Inc.
2012-06-07 14:03:20 +00:00
Eitan Adler 379cc4b2b2 MFC r236289:
Relax security permissions on '.seq' file creation - the strict,
	but odd permissions resulted in a security alert from 110.neggrpperm

PR:		bin/165533
Approved by:	cperciva (implicit)
2012-06-06 06:39:34 +00:00
Eitan Adler eae8f58702 MFC r236285:
Add missing flag enable when certain arguments are parsed

PR:		bin/163053
Approved by:	cperciva (implicit)
2012-06-06 06:35:47 +00:00
Eitan Adler 7e2fd22dcd MFC r236379:
Adding missing dependancies for loading hptiop(4), hptmv(4) and isp(4) as modules.

PR:		kern/166239
Approved by:	cperciva (implicit)
2012-06-06 04:39:05 +00:00
Eitan Adler 24cfa6c09a MFC r236282:
Add support for Sun 1040 PCI Quad Serial

PR:		kern/163450
Approved by:	cperciva (implicit)
2012-06-06 04:18:22 +00:00
Marius Strobl 3471557f13 MFC: r236486
Add nitems(), a macro for determining the number of elements in a
statically-allocated array.

Obtained from:	OpenBSD (in principle)
2012-06-05 19:59:09 +00:00
Marius Strobl f8ec15eb3f MFC: r236328
Try to finally get the point in time at which bge_add_sysctls() is called
right; it needs to be called before bge_can_use_msi() but in turn requires
bge_flags to be properly set.

Submitted by:	yongari
2012-06-02 19:15:22 +00:00
Baptiste Daroussin 24018ef846 RFC: 235276
- Print package name in case an empty pkgdep line is found.

PR:		bin/164378
Submitted by:	Yuri <yuri AT tsoft.com> and many others
Approved by:	des (mentor)
2012-06-02 16:17:25 +00:00
Glen Barber 74d3f03060 MFC r236274, r236278, r236279:
r236274:
 - Fix an mdoc(7) formatting nit.

r236278:
 - Fix mdoc(7) style nits.

r236279:
 - Add '-width Pa' to src.conf.5 for mdoc(7) style consistency.
2012-06-02 02:27:01 +00:00
Eitan Adler ff570e3a43 MFC r235481:
Rework sample code which sets SSH_AUTH_SOCK to the user's ssh-agent
	socket path if running

PR:		167932
Approved by:	cperciva (implicit)
2012-06-01 06:40:48 +00:00
Warren Block 6653749a48 MFC r235842
Mention the upper hard limit for -n option.  Patch slightly modified
from PR version.

PR:		168255
Submitted by:	Andy Kosela
Approved by:	gjb (mentor)
2012-05-31 02:53:28 +00:00
Bjoern A. Zeeb f298b88543 Update the previous openssl fix. [12:01]
Fix a bug in crypt(3) ignoring characters of a passphrase. [12:02]

Security:	FreeBSD-SA-12:01.openssl (revised)
Security:	FreeBSD-SA-12:02.crypt
Approved by:	so (bz, simon)
2012-05-30 12:01:28 +00:00
Jim Harris 7a83e5fe6e MFC r234106, r235751:
Queue CCBs internally instead of using CAM_REQUEUE_REQ status.  This fixes
problem where userspace apps such as smartctl fail due to CAM_REQUEUE_REQ
status getting returned when tagged commands are outstanding when smartctl
sends its I/O using the pass(4) interface.

Sponsored by: Intel
2012-05-29 23:17:15 +00:00
Dag-Erling Smørgrav 1df87348da MFH r230622: use build tools, not host tools, to build aicasm. 2012-05-28 22:09:50 +00:00
Dag-Erling Smørgrav 0408808984 Make yacc a bootstrap tool if building on head, since the new yacc is
not 100% backward compatible.
2012-05-28 15:34:55 +00:00
Sean Bruno 4ec138c6ae MFC r235635
Decode new battery status indications.
2012-05-27 19:10:29 +00:00
Andrey V. Elsukov 9f575bea40 MFC r235599:
Introduce new device flag G_MIRROR_DEVICE_FLAG_TASTING. It should
  protect geom from destroying while it is tasting.

MFC r235600:
  Prevent removing of the last active component from a mirror.

PR:		kern/154860
Reviewed by:	pjd
Tested by:	Eugene Grosbein
2012-05-25 04:27:08 +00:00
Baptiste Daroussin 4176916cb9 MFC: r201226, r202844, r206043, r206132, r206133, r212029, r225610, r226708,
r228670

- Add support for UPDATING remote fetching.
- Reorganize EXAMPLES section in pkg_updating(1).
- Style fixes.
- Replace hardcoded INDEX version. [1]
- Fix a buffer overlap. [2]
- Remove empty package when fetching fails and -K is used. [3]
- Remove useless chmod2() after mkdtemp(3). [4]
- Replace mkdir(1) call with mkdir(2). [5]
- Get rid of some vsystem() calls.
- Switch from lstat(2) to open(2) in fexists().
- Try rename(2) in move_file() first.
- Fix pkg_delete, check if the file we're trying to delete is a
symlink before complaining that it doesn't exist. Typical case
would be a leftover library symlink that's left over after the
actual library has been removed.
- Print the package name on deletion errors.
- Staticify elide_root()
- In usr.sbin/pkg_install/updating/main.c, use the size of the destination
buffer as size argument to strlcpy(), not the length of the source

PR:		bin/145101 [1], bin/139492 [2], bin/144919 [3]
		bin/144920 [4], bin/144921 [5]
Submitted by:	gcooper [1,2,3,4,5]
Approved by:	des (mentor)
2012-05-21 13:07:12 +00:00
Glen Barber 546569dd4b MFC r235597:
Fix a typo that crept in.
2012-05-21 00:15:58 +00:00
Glen Barber d09f3c4907 MFC r235567:
mdoc(7) style/formatting fixes.

While here, fix a few nits igor(1) does not like.
2012-05-20 01:40:35 +00:00
Bjoern A. Zeeb 37fe100384 MFC r234643:
Do not toggle IFCAP_TSO4 if we would also do TSO6.  Given the driver does
 not currently announce/support TSO6 that cannot happen. Clean it up anyway
 for consistency.
2012-05-19 22:50:38 +00:00
Bjoern A. Zeeb 072adc7041 MFC r234620:
If we pass down 64k - L2 hdr size + 1 to 64K L3+ data adding an ether
 header will make the data go over the 64k limits announced to busdma as
 maxsize and the transaction will fail.

 With TSO this can result in a TCP regression due to the lost packet.

 According to the data sheets ixgbe(4) 82598 and 82599 can handle up to
 256k so increase the maximum.

 Reported by:	Jon Kåre Hellan, UNINETT (jon.kare.hellan uninett.no)
 Tested by:	Jon Kåre Hellan, UNINETT (jon.kare.hellan uninett.no)
2012-05-19 22:17:34 +00:00
Bjoern A. Zeeb 3ec42c79e2 MFC r231767:
Fix PAWS (Protect Against Wrapped Sequence numbers) in cases when
 hz >> 1000 and thus getting outside the timestamp clock frequenceny of
 1ms < x < 1s per tick as mandated by RFC1323, leading to connection
 resets on idle connections.

 Always use a granularity of 1ms using getmicrouptime() making all but
 relevant callouts independent of hz.

 Use getmicrouptime(), not getmicrotime() as the latter may make a jump
 possibly breaking TCP nfsroot mounts having our timestamps move forward
 for more than 24.8 days in a second without having been idle for that
 long.

PR:		kern/61404
2012-05-19 18:33:28 +00:00
Bjoern A. Zeeb 00bef68024 MFC r231505,231520:
Introduce a new NET_RT_IFLISTL API to query the address list.  It works
 on extended and extensible structs if_msghdrl and ifa_msghdrl.  This
 will allow us to extend both the msghdrl structs and eventually if_data
 in the future without breaking the ABI.

 The MFC is just to provide the new API to old stable branches to make
 updating and if needed downgrading a lot easier for updates to 10.
2012-05-19 14:38:14 +00:00
Bjoern A. Zeeb ddf45758d3 MFC r222589:
There are a couple of structs in mfireg.h with members named 'class'.
  These cause problems when trying to include the header in a C++ project.
  Rename them to 'evt_class', and track the change in mfi and mfiutil.

  Submitted by:	Mark Johnston
  Sponsored by:	Sandvine Incorporated

Missed with:	r235636
Submitted by:	Oliver Pinter (oliver.pntr gmail.com) to unbreak the build
2012-05-19 14:13:16 +00:00
Sean Bruno 94896fdf48 MFC of head thunderbolt support for mfi(4)
r233711 -- IFV head_mfi into head for initial thunderbolt support
r233768 -- atomic_t --> mfi_atomic
r233805 -- fix tinderbuild, move megasas_sge to mfivar.h
r233877 -- remove atomic.h from includes
r235014 -- fix reading of sector >= 2^32 or 2^21, repair RAID handling
r235016 -- style(9)
r235040 -- fix returns from mfi_tbolt_sync_map_info()
r235318 -- repair panic on PAE i386
r235321 -- repair the repair of panics on PAE i386
2012-05-18 23:29:30 +00:00
Sean Bruno 73179c53b4 MFC 232854,232874,232882,232883,232886 for bus_get_dma_tag() 2012-05-18 21:40:17 +00:00
Glen Barber 265dbd8d00 MFC r235319:
Remove duplicate words in mdoc(7) pages.

PR:		167810
2012-05-18 01:13:18 +00:00
Glen Barber 3dd560e12b MFC r235211:
General mdoc(7) and typo fixes.

PR:		167696
2012-05-18 00:03:13 +00:00
Eitan Adler 90490db17c MFC r235201 r235419:
Add missing period at the end of the error message

Approved by:	cperciva (implicit)
2012-05-16 00:36:51 +00:00
Jim Harris 43152fdcee MFC r235043:
Fix off-by-one error in sati_inquiry_block_device_translate_data().  Bug would
result in INQUIRY VPD 0x81 to SATA devices to return only 63 bytes of data
instead of 64 during SCSI/ATA translation.

Sponsored by: Intel
2012-05-16 00:01:39 +00:00
Eitan Adler c02f54401a MFC r235209 r235227:
Add a few new tips and update some old ones to more modern commands

Approved by:	cperciva (implicit)
2012-05-13 01:30:27 +00:00
Eitan Adler 9b1445034e MFC r232496:
Fix a variety of grammar nits and errors

Approved by:	cperciva (implicit)
2012-05-12 00:55:49 +00:00
Eitan Adler af739ad128 MFC r235208:
make it easier for users used to a VCS that allows up to be a shortcut
	for update.

Approved by:	cperciva (implicit)
2012-05-12 00:51:54 +00:00
Eitan Adler e6d6039de7 MFC r235205:
Document the -c option in --help output

Approved by:	cperciva (implicit)
2012-05-12 00:46:39 +00:00
Eitan Adler 97fec303d5 MFC r235203:
fix spacing in mtree file

Approved by:	cperciva (implicit)
2012-05-12 00:44:18 +00:00
Eitan Adler 21210c245a Partial MFC r234935:
Prefer the use of csup to cvsup when talking about the binary.

PR:		docs/167459
Approved by:	cperciva (implicit)
2012-05-09 00:56:08 +00:00
Eitan Adler a874df232f Undo MFC r234131:
The kernel change can't be MFCed so undo the documentation MFC.

PR:		kern/164970
Approved by:	cperciva (implicit)
2012-05-07 12:33:17 +00:00
Sergey Kandaurov 997a71ed2b Fix r234821 mis-merge. 2012-05-06 19:01:18 +00:00
Eitan Adler 6e22bcd3d8 MFC r234820:
pread(2) might fail with EBUSY, so document it

PR:		docs/167201
Approved by:	cperciva (implicit)
2012-05-06 14:23:19 +00:00
Eitan Adler 6917cf50ec MFC r234821:
Add support for:
		Olympus FE-210 camera
		LG UP3S MP3 player
		Laser MP3-2GA13 MP3

PR:		usb/119201
Approved by:	cperciva (implicit)
2012-05-06 14:16:18 +00:00
Eitan Adler a0e4401780 MFC r234819:
Allow users of gprof to get per run output files (using the pid)

PR:		bin/99800
Approved by:	cperciva (implicit)
2012-05-06 14:11:25 +00:00
Glen Barber 9387b5f21c MFC r234775:
As cron(8) is started with '-s' by default, timezones that observe
DST should not need to worry about scheduling jobs when the DST time
changes.

Rather than removing the BUGS section in crontab(5) regarding this,
note that disabling '-s' may still cause jobs to be executed twice or
not at all.

PR:		166318
2012-05-05 02:53:19 +00:00
Eitan Adler f484b2e995 MFC r233429,r233435,r233437,r234077,r234133,r234135,r234159,r234823:
A variety of changes that make the default shell easier to use.

Approved by:	cperciva (implicit)
2012-05-03 19:56:50 +00:00
Eitan Adler 2425e53ea9 MFC r234131:
Return EBADF instead of EMFILE from dup2 when the second argument is
	outside the range of valid file descriptors

PR:		kern/164970
Approved by:	cperciva (implicit)
2012-05-03 16:32:09 +00:00
Eitan Adler aaa9f00e7b MFC r234714, r234700:
Document the standardization status of err* and warn*

PR:		docs/164939
Approved by:	cperciva (implicit)
2012-05-03 16:21:26 +00:00
Bjoern A. Zeeb 2ba2050289 Fix multiple OpenSSL vulnerabilities.
Security:	CVE-2011-4576, CVE-2011-4619, CVE-2011-4109
Security:	CVE-2012-0884, CVE-2012-2110
Security:	FreeBSD-SA-12:01.openssl
Approved by:	so (bz,simon)
2012-05-03 15:25:11 +00:00
Andrey V. Elsukov ce66d7f1f1 MFC r234574 (by melifaro):
Fix panic in ng_patch(4) caused by checksum flags being added to mbuf flags.

  Tested by:        Maxim Ignatenko <[email protected]>
2012-04-25 12:02:06 +00:00
David Schultz 3545380e2a MFC r234529:
Ensure that the {,v}swprintf functions always null-terminate the
  output string, even if an encoding error or malloc failure occurs.
2012-04-24 03:59:13 +00:00
Benjamin Kaduk 3eb1daf691 MFC r233160:
Expound a bit more about the system maximum number of FIBs,
    how it may be set, and current limitations on the value.

PR:		docs/157453
Approved by:	hrs (mentor)
2012-04-24 03:30:26 +00:00
Pyun YongHyeon 717d619d24 MFC r234121:
Back out r228476.
  r228476 fixed superfluous link UP/DOWN messages but broke IPMI
  access during boot.  It's not clear why r228476 breaks IPMI and
  should be revisited.

  Reported by:	Paul Guyot <paulguyot <> ieee dot org >
2012-04-23 03:42:23 +00:00
David Schultz d204c6392c MFC r233973 (partial):
Fix bugs in remquo{,f}.
2012-04-21 06:59:48 +00:00
Marius Strobl 170fde4c54 MFC: r189727
read_ivar takes a uintptr_t * not a u_char *.
2012-04-21 00:28:29 +00:00
Marius Strobl 7c5c86faf0 MFC: r222475
Fix read_ivar implementation for MMC and SD.

1. Both mmc_read_ivar() and sdhci_read_ivar() use the expression
'*(int *)result = val' to assign to result which is uintptr_t *.
This does not work on big-endian 64 bit systems.

2. The media_size ivar is declared as 'off_t' which does not fit
into uintptr_t in 32bit systems, change this to long.

Submitted by:	kanthms at netlogicmicro com (initial version)

PR:		134745
2012-04-20 15:56:51 +00:00
David E. O'Brien 70c56a08d0 MFC r215821:
Add a missing CTL description from CVS revision 1.147.
2012-04-19 02:55:13 +00:00
Eitan Adler d0c10712cd MFC r231813:
Add err(3) to strerror(3) SEE ALSO section

Approved by:	cperciva (implicit)
2012-04-14 02:49:01 +00:00
Eitan Adler 678c2b74f2 MFC r230347:
Fix warning when compiling with gcc46:
		error: variable 'addrs' set but not used

Approved by:	cperciva (implicit)
2012-04-14 02:11:26 +00:00
Eitan Adler d2a124ad50 MFC r234134:
s/Free Memory Pages/Free Memory/ to avoid confusion, since we're
	reporting a number of bytes rather than a number of pages

Approved by:	cperciva (implicit)
2012-04-14 02:07:37 +00:00
Andriy Gapon c17c589385 MFC r231558: newvers.sh: unbreak git/git-svn support 2012-04-13 11:12:18 +00:00
Pyun YongHyeon f3592c1539 MFC r233688-233689:
r233688:
  Remove task queue based link state change handler. Driver no longer
  needs to defer link state handling.
  While I'm here, mark IFF_DRV_RUNNING before changing media.  If
  link is established without any delay, that link state change
  handling could be lost.

r233689:
  Do not report current link status if driver is not running.
  This change also workarounds dhclient's link state handling bug by
  not giving current link status.

  Unlike other controllers, ale(4)'s PHY hibernation perfectly works
  such that driver does not see a valid link if the controller is not
  brought up.  If dhclient(8) runs on ale(4) it will blindly waits
  until link UP and then gives up after 10 seconds.  Because
  dhclient(8) still thinks interface got a valid link when IFM_AVALID
  is not set for selected media,  this change makes dhclient initiate
  DHCP without waiting for link UP.
2012-04-11 07:21:51 +00:00
Pyun YongHyeon 89de0a1dd5 MFC r233585-233587:
r233585:
  Partially revert r223608 and selectively allow microcode loading
  for 82550C.  For 82550 controllers this change restores CPUSaver
  microcode loading.  Due to silicon bug on 82550 and 82550C with
  server extension, these controllers seem to require CPUSaver
  microcode to receive fragmented UDP datagrams.  However the
  microcode shouldn't be used on client featured 82550C as it locks
  up the controller.  In addition, client featured 82550C does not
  have the silicon bug.  Also clear temporary memory used for
  microcode loading since the same memory area is used for other
  commands.
  While I'm here use 82550C in probe message instead of generic
  82550.

  Reported by:	Andreas Longwitz <longwitz <> incore de>
  Tested by:	Andreas Longwitz <longwitz <> incore de>

r233586:
  Load entire EEPROM contents in device attach time and verify
  whether the checksum of EEPROM is valid or not.  Because driver
  heavily relies on EEPROM information when it selectively enables
  features/workarounds, it would be helpful to know whether driver
  sees valid EEPROM.
  While I'm here remove all other EEPROM accesses since the entire
  EEPROM is loaded at device attach time.

r233587:
  Remove unnecessary #if as the software workaround for PCI protocol
  violation should be activated unless the system is cold-booted
  after updating EEPROM.
  The PCI protocol violation happens only when established link is
  10Mbps so the workaround should be updated whenever link state
  change is detected.  Previously the workaround was activated only
  when user checks current media status with ifconfig(8).
2012-04-11 07:12:20 +00:00
Marius Strobl aa341e9b86 MFC: r233827
Fix probing of SAS1068E with a device ID of 0x0059 after r232411 (MFC'ed
to stable/7 in r232610).
Reported by: infofarmer

MFC: r233886

Refine r233827; as it turns out, controllers with a device ID of 0x0059
can be upgraded to MegaRAID mode, in which case mfi(4) should attach to
these based on the sub-vendor and -device ID instead (not currently done).
Therefore, let mpt_pci_probe() return BUS_PROBE_LOW_PRIORITY.
While it, let mpt_pci_probe() return BUS_PROBE_DEFAULT instead of 0 in
the default case.
2012-04-07 12:47:12 +00:00
Doug Barton 879db240ba Add Bv9ARM.pdf to the list of docs to install.
(Direct commit because this file varies widely between BIND versions)
2012-04-05 00:08:16 +00:00
Marius Strobl 3c8bbe4151 MFC: r233747, r233748
- Fix panic on kernel traps having a mapping in trap_sig b0rked in r206086
  (MFC'ed to stable/7 in r206197).
  Reported by: David E. Cross
- Remove checks that are redundant due to tf_type being unsigned.
2012-04-04 21:19:27 +00:00
Marius Strobl 4ede5e313c MFC: r233701
- Remove erroneous trailing semicolon. [1]
- Correctly determine the maximum payload size for setting the TX link
  frequent NACK latency and replay timer thresholds.

Submitted by:	stefanf [1]
2012-04-02 20:14:51 +00:00
Jung-uk Kim 10396b3048 MFC: r233702
Work around Erratum 721 for AMD Family 10h and 12h processors.
2012-04-02 18:31:01 +00:00
Jung-uk Kim 8f8370c97f MFC: r233619
Add a PNP ID for Japanese 106-key keyboard.
2012-04-02 17:35:26 +00:00
Jim Harris d9c15b180e MFC r233663:
Fix bug where isci(4) would report only 15 bytes of returned data on a
READ_CAP_16 command to a SATA target.

Sponsored by: Intel
Approved by: sbruno
2012-04-02 16:37:46 +00:00
Jim Harris add21e5589 MFC r233622:
Ensure consistent target IDs for direct-attached devices.

Sponsored by: Intel
Reported by: sbruno, Ravi Pokala <rpokala at panasas dot com>
Tested by: Ravi Pokala <rpokala at panasas dot com>
Approved by: sbruno
2012-04-02 16:33:07 +00:00
John Baldwin 9c1ea7ca53 MFC 233256:
Eliminate vm.pmap.shpgperproc and vm.pmap.pv_entry_max because they no
longer serve any purpose.
2012-04-02 14:52:28 +00:00
Marius Strobl 01a2fdfe08 MFC: r233425
Consistently update to the MPI header set version 01.05.20 after r224761
(MFC'ed to stable/2 in r224821).
Requested by:	mjacob
2012-03-31 10:29:20 +00:00
Marius Strobl 090e017518 MFC: r233403, r233404
- Use the PCI ID macros from mpi_cnfg.h rather than duplicating them here.
  Note that this driver additionally probes some device IDs for the most
  part not know to other MPT drivers, if at all. So rename the macros not
  present in mpi_cnfg.h to match the naming scheme in the latter and but
  suffix them with a _FB in order to not cause conflicts.
- Like mpt_set_config_regs(), comment out mpt_read_config_regs() as the
  content of the registers read isn't actually used and both functions
  aren't exactly up to date regarding the possible layouts of the BARs
  (these function might be helpful for debugging though, so don't remove
  them completely).
- Use DEVMETHOD_END.
- Use NULL rather than 0 for pointers.
- Remove an unusual check for the softc being NULL.
- Remove redundant zeroing of the softc.
- Remove an overly banal and actually partly incorrect as well as partly
  outdated comment regarding the allocation of the memory resource.
2012-03-31 10:25:16 +00:00
Marius Strobl ffdbe53b28 MFC: r233423
Initialize the mutexes used for the NVM and the swflag as MTX_DUPOK in
order to avoid otherwise harmless witness warnings when these are acquired
at the same time and due to both using MTX_NETWORK_LOCK as their type.
The right fix actually would be to use different, descriptive types for
these. However, the latter would require undesirable changes to the shared
code base. Another approach would be to just supply NULL as the type, which
was deemed as less desirable though as it would cause the unique but cryptic
name also to be used for the type and to diverge from the type used by other
network device drivers.
2012-03-31 01:21:54 +00:00
Eitan Adler 02cffbf707 MFC r231300, r231328:
Permit the use of relative paths for the prefix argument.
	Remove an unnecessary cwd from created plists when -p is specified

Approved by:	cperciva (implicit)
2012-03-29 23:59:02 +00:00
Eitan Adler b6d0b2391b MFC r227489:
- fix duplicate "a a" in some comments

Approved by:	cperciva (implicit)
2012-03-29 02:47:01 +00:00
Eitan Adler cafd9133ab MFC r233136, r233432:
Restore the ability to use a non-standard LOCALBASE to sshd
	Add the ability to use a non-standard LOCALBASE to ssh

Approved by:	cperciva (implicit)
2012-03-29 01:46:56 +00:00
Eitan Adler 47ca06502e MFC r230348:
- Fix warning when compiling with gcc46:
	        error: variable 'extra_async_bytes' set but not used

Approved by:	cperciva (implicit)
2012-03-28 02:35:28 +00:00
Eitan Adler 217e74b3ca MFC r233428:
- Direct users to csup instead of cvsup in the csup-file boilerplate text.

Approved by:	cperciva (implicit)
2012-03-27 00:52:30 +00:00
Pyun YongHyeon 0b75b2e39e MFC r232951,232953,233158:
r232951:
  fxp(4) does not handle deferred dma map loading.  Tell
  bus_dmamap_load(9) that it should return immediately with error
  when there are insufficient mapping resources.

r232953:
  Fix white space nits.

r233158:
  Do not change current media when driver is already running.  If
  driver is running driver would have already completed flow control
  configuration.  This change removes unnecessary media changes in
  controller reconfiguration cases such that it does not trigger link
  reestablishment for configuration change requests like promiscuous
  mode change.

  Reported by:	Many
  Tested by:	Mike Tancsa <mike <> sentex dot net>
2012-03-26 05:17:59 +00:00
Pyun YongHyeon 6d36dd7b01 MFC r232849-232850:
r232849:
  Show PCI bus speed and width as well as running mode of PCI-X
  device in device attach.  This would help to narrow down issue to a
  specific controller and operating mode of the controller.
  While I'm here rename BGE_MISCCFG_BOARD_ID with
  BGE_MISCCFG_BOARD_ID_MASK.

r232850:
  Make if_ierrors updated whenever any of the following counters are
  updated.
   o Number of times NIC ran out of RX buffer descriptors
   o Number of inbound packet errors
   o Number of inbound packets that were chosen to be discarded
  Previously only the discarded packet counter was used to update
  if_ierrors.  This change fixes wrong if_ierrors counter on
  BCM570[0-4] controllers.  For BCM5705 and later controllers bge(4)
  already correctly counted it.

  Reported by:	Eugene Grosbein <egrosbein <> rdtc dot ru>
2012-03-26 04:51:04 +00:00
Pyun YongHyeon b1f26ed76c MFC r232848:
Add workaround for PCI-X BCM5704 controller that live behind
  AMD-8131 PCI-X bridge.  The bridge seems to reorder write access to
  mailbox registers such that it caused watchdog timeouts by
  out-of-order TX completions.

  Tested by:	Michael L. Squires <mikes <> siralan dot org >
2012-03-26 04:39:10 +00:00
Pyun YongHyeon ebc3da1856 MFC r232246:
Prefer RL_GMEDIASTAT register to RGEPHY_MII_SSR register to
  extract a link status of PHY when parent driver is re(4).
  RGEPHY_MII_SSR register does not seem to report correct PHY status
  on some integrated PHYs used with re(4).
  Unfortunately, RealTek PHYs have no additional information to
  differentiate integrated PHYs from external ones so relying on PHY
  model number is not enough to know that.  However, it seems
  RGEPHY_MII_SSR register exists for external RealTek PHYs so
  checking parent driver would be good indication to know which PHY
  was used. In other words, for non-re(4) controllers, the PHY is
  external one and its revision number is greater than or equal to 2.
  This change fixes intermittent link UP/DOWN messages reported on
  RTL8169 controller.

  Also, mii_attach(9) is tried after setting interface name since
  rgephy(4) have to know parent driver name.

  PR:	kern/165509
2012-03-26 04:30:46 +00:00
Pyun YongHyeon 18915fcec8 MFC r232145:
Use correct Config registers for RTL8139 family. Unlike RTL8168 and
  RTL810x family , RTL8139 has different register map for Config
  registers.

  While here, follow the lead of re(4) in WOL configuration.
   - Disable WOL_UCAST and WOL_MCAST capabilities by default.
   - Config5 register write does not need to unlock EEPROM access
     on RTL8139 family but unlocking EEPROM access does not affect
     its operation and make it consistent with re(4).

  Reported by:	Matt Renzelmann  mjr <> cs dot wisc dot edu
2012-03-26 03:56:52 +00:00
Pyun YongHyeon e1dc1c185e MFC r232019,232021,232025,232027,232029,232040:
r232019:
  Give hardware chance to drain active DMA cycles.

r232021:
  If there are not enough RX buffers, release partially allocated RX
  buffers.

r232025:
  Introduce sf_ifmedia_upd_locked() and have driver reset PHY before
  switching to selected media.  While here, set if_drv_flags before
  switching to selected media.

r232027:
  No need to reprogram hardware RX filter when driver is not running.

r232029:
  Remove taskqueue based MII stat change handler.
  Driver does not need deferred link state change processing.
  While I'm here, do not report current link status if interface is
  not UP.

r232040:
  Add check for IFF_DRV_RUNNING flag after serving an interrupt and
  don't give RX path more priority than TX path.
  Also remove infinite loop in interrupt handler and limit number of
  iteration to 32. This change addresses system load fluctuations
  under high network load.
2012-03-26 03:49:46 +00:00
Eitan Adler 806ffcaa83 MFC r233138:
draft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007

PR:		phk
Approved by:	cperciva (implicit)
2012-03-26 01:16:56 +00:00
Marius Strobl 86bf4084b6 MFC: r233105
Declare some variables static in order to reduce the object size and
redo r232822 (MFC'ed to stable/7 in r232966) in a less hackish way.
2012-03-25 16:25:18 +00:00
Edwin Groothuis 8b97006ed0 MFC of r233445, tzdata2012a
- Updates to various locations in Antarctica.
- Armenia will abolish DST this year.
- Not only Samoa has moved to UTC+14, also Fakaofo did.
- There will be a leap second in 30 June 2012.
- Historical updates of 1918 to Canada, Winn, Regina, Edm, Vanc, Creston.
- Chili stays on DST until 28 April 2012
- The Falkland islands will stay on DST this year.
2012-03-25 02:19:39 +00:00
Jim Harris 42cb060ca5 MFC r233371:
Call xpt_bus_register during attach context, then freeze and do not release
until domain discovery is complete.  This fixes an isci(4) bug on FreeBSD 7.x
where devices weren't always appearing after boot without an explicit rescan.

Sponsored by: Intel
Reported and tested by: <rpokala at panasas dot com>
Reviewed by: scottl
Approved by: scottl
2012-03-23 17:23:40 +00:00
Sergey Kandaurov ec792c4690 MFC r210525:
Missing IFCAP_* macro descriptions in ifnet(9).

PR:		docs/148952
Submitted by:	Lars Hartmann <[email protected]>
2012-03-22 11:47:06 +00:00
Eitan Adler 29d7df0807 MFC r232505:
Remove outdated comment of seven years

PR:		docs/116116
Approved by:	cperciva
2012-03-19 01:57:14 +00:00
Eitan Adler 96195361a2 MFC r231306:
Fix NULL ptr dereference in setusercontext if pwd is null,
	LOGIN_SETPRIORITY is set, and setting the priority (rtprio or
	setpriority) fails.

PR:		kern/164238
Approved by:	cperciva
2012-03-19 01:52:09 +00:00
Eitan Adler 22b188e25f MFC r232504:
Remove reference to gcc's non-standard -fwritable-strings, which
	doesn't exist in recent releases (and is bad advice anyway)

PR:		docs/163119
Approved by:	cperciva
2012-03-19 01:33:24 +00:00
Eitan Adler 6ef81461ee MFC r232503:
POSIX mandates that swab do nothing when len < 0

PR:		140690
Approved by:	cperciva
2012-03-19 01:28:11 +00:00
Eitan Adler 54cd47ff8c MFC r232506:
Explicitly list dependency

PR:		misc/160463
Approved by:	cperciva
2012-03-19 01:19:04 +00:00
Christian Brueffer 3ca739c818 MFC: r232316
Update bridge(4) default values.
2012-03-17 12:36:45 +00:00
Christian Brueffer 101f5c93b4 MFC: r232315
Use a more appropriate default for the maximum number of addresses in the
bridge forwarding table.
2012-03-17 12:24:17 +00:00
Sean Bruno b90fadbf4e MFC r226702
Author: 	obrien
Date: 	Mon Oct 24 20:52:41 2011 UTC (4 months, 3 weeks ago)
Changed paths: 	3
Log Message:

* Don't give the impression that this compiler is GPLv3.
  (It is "well known" that GCC 4.2.2 is GPLv3.)
* Don't give the impression that this compiler isn't "trustable".
* Fix dependency nit.
2012-03-17 00:10:21 +00:00
Sean Bruno cb426ab517 MFC r232986
Update man page to present -T argument in synopsis
2012-03-15 16:47:45 +00:00
Sean Bruno 6d4baf1a02 MFC r183347
Add a flag, -T, that tells syslogd to always replace the timestamp on
messages from the network. We already replace malformatted timestamps
and this option lets us replace timestamps that are correctly formatted
but wrong.

PR:		120891
Submitted by:	Thomas Vogt <[email protected]>
MFC after:	1 week

MFC r186263
Fixing !INET6 builds after bumping WARNS to 3.

MFC r186331
Constify 'name' field in struct funix.  This commit makes syslogd(8)
WARNS?=6 on amd64 but I have not tested under universe so keep WARNS?=
level as-is for now.

MFC r186234
Rather than hardcode the 'struct iovec iov' array size, use a #define.
While I'm here bump WARNS to 3.

Obtained from:	Juniper Networks

MFC r186236
Use passed parameter rather than the #define.
(more accurate extraction of Juniper Networks change)

MFC r224002
Add a new option, -N to disable the default and recommended syslogd(8)
behavior, which binds to the well known UDP port.

This option implies -s.

Obtained from:	delphij@ obrien@ avatar@ trhodes@ dwmalone@
2012-03-14 21:45:45 +00:00
Marius Strobl 2674dfe896 MFC: r232822
Fix a bug introduced in r223938 (MFC'ed to stable/7 in r224410); on
big-endian machines coping a 32-bit quantum bytewise to the address of
a 64-bit variable results in writing to the "wrong" 32-bit half so adjust
the address accordingly. This fix is implemented in a hackish way for
two reasons:
o in order to be able to get it into 8.3 with zero impact on the little-
  endian architectures where this bug has no effect and
o to avoid blowing the x86 boot2 out of the water again when compiling
  it with clang, which all sane versions of this fix tested do.
This change fixes booting from UFS1 file systems on big-endian machines.
2012-03-14 13:09:41 +00:00
Eitan Adler 9b3170d03f MFC r232471:
Document the [n]eei and [n]bacc options

PR:		docs/165009
Approved by:	bcr
2012-03-10 18:37:01 +00:00
Andrey V. Elsukov 2942ccb76a MFC r232339:
Note that memory should be freed after uuid_to_string(3) call.

PR:		docs/161808
2012-03-08 09:56:07 +00:00
Mark Peek 829648eba4 MFC r231990
Update to tcsh 6.18.01
2012-03-07 22:19:43 +00:00
Sergey Kandaurov 9c9de84712 MFC r231821:
delete-old does not have delete-old-libs dependency.
 Reflect this in the comment.

PR:		conf/163993
Submitted by:	Eugen Konkov <kes-kes at yandex ru>
2012-03-07 08:21:25 +00:00
Sean Bruno 85619fba6b MFC r232411
Fix a problem that was causing the mpt(4) driver to attach to MegaRAID
cards that should be handled by the mfi(4) driver.

The root of the problem is that the mpt(4) driver was masking off the
bottom bit of the PCI device ID when deciding which cards to attach to.

It appears that a number of the mpt(4) Fibre Channel cards had a LAN
variant whose PCI device ID was just one bit off from the FC card's device
ID.  The FC cards were even and the LAN cards were odd.

The problem was that this pattern wasn't carried over on the SAS and
parallel SCSI mpt(4) cards.  Luckily the SAS and parallel SCSI PCI device
IDs were either even numbers, or they would get masked to a supported
adjacent PCI device ID, and everything worked well.

Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb
SAS device IDs for their new MegaRAID cards.  This is causing the mpt(4)
driver to attach to the RAID cards instead of the mfi(4) driver.

The solution is to stop masking off the bottom bit of the device ID, and
explicitly list the PCI device IDs of all supported cards.

This change should be a no-op for mpt(4) hardware.  The only intended
functional change is that for the 929X, the is_fc variable gets set.  It
wasn't being set previously, but needs to be because the 929X is a Fibre
Channel card.

Reported by:  Kashyap Desai <[email protected]>
2012-03-06 15:02:18 +00:00
Remko Lodder da7083b7c5 Merge r238821
Add sticky.8 to the obsolete files since it had been
moved to sticky.7

Submitted by:	maxim and pluknet

With help from:	dim (because of awkward merge conflicts)
2012-03-06 14:13:23 +00:00
Xin LI d9a348231c Merge all revisions except r199804 back to stable/7. 2012-03-05 19:32:44 +00:00
Eitan Adler 8041e50b54 MFC r227626, r227642:
- be more precise about the unit of measurement

Approved by:	cperciva
2012-03-04 16:24:58 +00:00
Jung-uk Kim c7520bcc5a MFC: r232309
Fix a long standing bug.  The caller expects a non-zero value for success.
Luckily keyboard probing was turned off by default from the first revision.
2012-03-03 00:37:03 +00:00
Sean Bruno eb5a666a9a MFC r232267 via stable/8 MFC r232354
Workaround for PCIe 4GB boundary issue

Enforce a boundary of no more than 4GB - transfers crossing a 4GB
boundary can lead to data corruption due to PCIe limitations.  This
change is a less-intrusive workaround that can be quickly merged back
to older branches; a cleaner implementation will arrive in HEAD later
but may require KPI changes.

This change is based on a suggestion by jhb@.
2012-03-02 16:38:54 +00:00
Sean Bruno cdbc172bd0 MFC r232225
Update PCI-IDs with devices found on Intel SDP

Return  BUS_PROBE_DEFAULT so that non-default drivers may be loaded
2012-03-01 22:36:42 +00:00
Remko Lodder 356ddbb996 MFC r124468
Move the sticky manual from section 8 to section
7 like NetBSD has, since this is not a command
on itself.

PR:		124468
2012-02-29 15:10:34 +00:00
Marius Strobl 21f15b79ba MFC: r231914
Probe the National DP83849, which is a dual-port version of the PHYTER.

Obtained from:	NetBSD
2012-02-25 00:41:38 +00:00
Marius Strobl 3c926ea86b MFC: r231913
- Probe BCM57780.
- In case the parent is bge(4), don't set the Jumbo frame settings unless
  the MAC actually is Jumbo capable as otherwise the PHY might not have the
  corresponding registers implemented. This is also in line with what the
  Linux tg3 driver does.

PR:		165032
Submitted by:	Alexander Milanov
Obtained from:	OpenBSD
2012-02-25 00:35:32 +00:00
Marius Strobl 56d7bd4381 MFC: r231621
- As it turns out, MSI-X is broken for at least LSI SAS1068E when passed
  through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here.
  Note that besides currently there not being a quirk type that disables
  MSI-X only and there's no evidence that MSI doesn't work with the VMware
  pass-through, it's really questionable whether MSI generally works in
  that setup as VMware only mention three know working devices [1, p. 4].
  Also not that this quirk entry currently doesn't affect the devices
  emulated by VMware in any way as these don't claim support MSI/MSI-X to
  begin with. [2]
  While at it, make the PCI quirk table const and static.
- Remove some duplicated empty lines.
- Use DEVMETHOD_END.

PR:		163812, http://forums.freebsd.org/showthread.php?t=27899 [2]
Reviewed by:	jhb

[1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf
2012-02-24 00:49:18 +00:00
Pyun YongHyeon 378633f046 MFC r231622:
For RTL8168/8111D controller, make sure to wake PHY from power down
  mode.  Otherwise, PHY access times out under certain conditions.

  Approved by:	re (kib)
2012-02-23 11:28:19 +00:00
Doug Barton dfea403349 MFC r231862:
Increase the default shutdown timer to 90 seconds. This will allow
certain systems that take a long time to shut down, without adversely
affecting things that shut down quickly. It's also 30 seconds less than
the default hard limit of 120 seconds in kern.init_shutdown_timeout.

PR:		conf/109272
Submitted by:	Radim Kolar SF.NET <[email protected]>
2012-02-20 10:15:20 +00:00
Sean Bruno d45e8a1a00 MFC isci(4) SAS driver
r230843, 231134, 231136, 231296, 231615, 231693, 231860

Obtained from:	Intel (Jim Harris jimharris@)
2012-02-17 06:58:40 +00:00
Eitan Adler a1d811e5e5 MFC r231299:
- More accurately document what happens on error.

PR:		docs/127908
Approved by:	cperciva
2012-02-17 00:56:17 +00:00
Eitan Adler c8a1a48cf8 MFC r228274:
- Fix some uninitialized variables in pipe regression tests that result in failure.

PR:		misc/161175
Approved by:	cperciva
2012-02-16 19:40:17 +00:00
Eitan Adler 01bf36137c MFC r22990[45] and r229907-r229919:
- fix a variety of warnings produced by gcc46 when compiling world

Approved by (cperciva)
2012-02-16 05:00:41 +00:00
Bjoern A. Zeeb 169ab8526f MFC r231515:
Use the correct constant (with same value) for comparying the SA type.

PR:		kern/142741
Submitted by:	Matthijs Kooiman (matthijs stdin.nl)
2012-02-15 09:32:51 +00:00
Pyun YongHyeon fe50483638 MFC r230288,230339:
r230288:
  Document dev.bge.%d.msi_disable tunable.

r230339:
  Reflect tunable name change made in r230337.
2012-02-15 04:09:43 +00:00
Pyun YongHyeon ff6d023789 MFC r230286,230337-230338,231159:
r230286:
  Introduce a tunable that disables use of MSI.
  Non-zero value will use INTx.

r230337-230338:
  Rename dev.bge.%d.msi_disable to dev.bge.%d.msi which matches
  enable/disable and default it to on.

r231159:
  Call bge_add_sysctls() early and especially before bge_can_use_msi() so
  r230337 actually has a chance of working and doesn't always unconditionally
  disable the use of MSIs.
2012-02-15 04:04:36 +00:00
Pyun YongHyeon 68e53499c4 MFC r230336:
Fix a logic error which resulted in putting PHY into sleep when WOL
  is active.  If WOL is active driver should not put PHY into sleep.
  This change makes WOL work on RTL8168E.
2012-02-15 03:51:09 +00:00
Pyun YongHyeon 394ef83a65 MFC r230575-230576:
r230275:
  Use a RX DMA tag to free loaded RX DMA maps.
  Previously it used a TX DMA tag.

r230276:
  Free allocated jumbo buffers when controller is stopped.
2012-02-15 03:43:46 +00:00
Pyun YongHyeon 76757a04fc MFC r229940:
style. No functional changes.
2012-02-15 03:35:39 +00:00
Glen Barber 5381eb02a2 MFC r231244:
- Fix some Xr references:

- - lmc(4): Netgraph(4) -> netgraph(4)
- - security(7): rc.conf(8) -> rc.conf(5)
- - sbp(4): sysctl(1) -> sysctl(8)
- - portindex(5): build(1) -> build(7)
2012-02-15 01:41:00 +00:00
Dimitry Andric 6a1df0d9af MFC r231118:
Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.
2012-02-14 19:49:36 +00:00
Bjoern A. Zeeb b796e8afd5 MFC 229547:
Mark a couple of file local functions static and stop exporting them.

Discussed with:	rwatson
2012-02-14 15:18:08 +00:00
Doug Barton 9653e243c8 MFC r231507:
Move addswap to run right after kld (aka early in the second stage),
as it did previously.
2012-02-14 10:34:27 +00:00
Doug Barton 57dd1552b6 MFC r231194:
Add a knob to always load the default rulesets. While I'm here document
the other devfs_ knobs in rc.conf.5.
2012-02-14 10:30:12 +00:00
Doug Barton 451db53130 MFC r230374:
If we're booting there is no need to waste time determining if the service
is running or not.
2012-02-14 10:19:58 +00:00
Doug Barton 6f3b26c671 MFC r230099:
Change rcvar= assignments to the literal values set_rcvar
would have returned. This will slightly reduce boot time,
and help in diff reduction to HEAD.
2012-02-14 10:17:30 +00:00
Marius Strobl b071e6c715 MFC: r231228
Remove extra newlines from panic messages.
2012-02-14 01:15:46 +00:00
Marius Strobl c7cb135383 Forced commit to denote that the commit message of r231625 actually
should have read:
MFC: r231518

Flesh out support for SAS1078 and SAS1078DE (which are said to actually
be the same chip):
- The I/O port resource may not be available with these. However, given
  that we actually only need this resource for some controllers that
  require their firmware to be up- and downloaded (which excludes the
  SAS1078{,DE}) just handle failure to allocate this resource gracefully
  when possible. While at it, generally put non-fatal resource allocation
  failures under bootverbose.
- SAS1078{,DE} use a different hard reset protocol.
- Add workarounds for the 36GB physical address limitation of scatter/
  gather elements of these controllers.

Tested by:	Slawa Olhovchenkov

PR:	149220 (remaining part)
2012-02-14 01:09:10 +00:00
Marius Strobl bb295be145 MFC: r231518
Remove extra newlines from panic messages.
2012-02-14 00:56:01 +00:00
Dimitry Andric 7375274b3f MFC r231079:
Let rpcgen(1) support an environment variable RPCGEN_CPP to find the C
  preprocessor to run.  Previously, it always ran /usr/bin/cpp, unless you
  used the -Y option, and even then you could not set the basename.  It
  also attempted to run /usr/ccs/lib/cpp for SVR4 compatibility, but this
  is obsolete, and has been removed.

  Note that setting RPCGEN_CPP to a command with arguments is supported,
  though the command line parsing is simplistic.  However, setting it to
  e.g. "gcc46 -E" or "clang -E" will lead to problems, because both gcc
  and clang in -E mode will consider files with unknown extensions (such
  as .x) as object files, and attempt to link them.

  This could be worked around by also adding "-x c", but it is much safer
  to set RPCGEN_CPP to e.g. "cpp46" or "clang-cpp" instead.

MFC r231080:

  Amend r231079 by properly shifting up the existing arguments in
  rpc_main.c's insarg() function.  I had forgotten to put this in my patch
  queue, sorry.

  Pointy hat to:	me

MFC r231101:

  In usr.bin/rpcgen/rpc_main.c, use execvp(3) instead of execv(3), so
  rpcgen will search the current PATH for the preprocessor.  This makes it
  possible to run a preprocessor built during the cross-tools stage of
  buildworld.
2012-02-13 21:07:48 +00:00
Dimitry Andric 72f08711d3 MFC r231054:
In usr.bin/rpcgen/rpc_main.c, properly check the return value of
strlcpy(), in addition to checking that of strlcat().
2012-02-12 14:56:50 +00:00
Mikolaj Golub 2f1a635f45 MFC r230874:
Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check sockstat gets stuck in loop leaking the
memory if the returned ENOMEM was due the exceeded memorylocked
limit. This is easily can be observed running `limits -l 1k sockstat'.

Submitted by:	Andrey Zonov <andrey zonov org>
2012-02-12 07:56:46 +00:00
Mikolaj Golub efae070b83 MFC r230873:
Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check kvm_getprocs() gets stuck in loop if the
returned ENOMEM was due the exceeded memorylocked limit. This is
easily can be observed running `limits -l 1k top'.

Submitted by:	Andrey Zonov <andrey zonov org>
2012-02-12 07:53:37 +00:00
Craig Rodrigues a7b1e06663 MFC 183243-231540. This records mergeinfo for already merged
changesets, but brings in the following changes:

MFC 222326
    - Fix tftp_log() usage

MFC 223137
    - Man page updates

MFC 223487
    - Bring back syncnet() implementation from older tftp implementation.

MFC 229780
    - Spelling fixes for libexec/

MFC 229904
    - Fix warning when compiling with gcc46:
          error: variable 'bp' set but not used
2012-02-12 01:07:15 +00:00
Craig Rodrigues be69743be2 MFC 170382 through 231539
- this records svn:mergeinfo for previously merged changesets

This pulls in changes such as:

MFC 216370
  - Remove adertising clause from UCB copyrighted files in usr.bin

MFC 222534
  - Fix a couple of spelling errors.

MFC 223493
  - Remove duplicated header files

MFC 223135 - 223491
  - man page updates

MFC 229403
  - Replace index() and rindex() calls with strchr() and strrchr().

MFC 230044
  - fgets(3) returns a pointer, so compare against NULL, not integer 0.
2012-02-11 23:58:07 +00:00
Bjoern A. Zeeb fc89f7e7ec MFC r223741:
Tag mbufs of all incoming frames or packets with the interface's FIB
 setting (either default or if supported as set by SIOCSIFFIB, e.g.
 from ifconfig).

 Submitted by:	Alexander V. Chernikov (melifaro ipfw.ru)
 Reviewed by:	julian
2012-02-10 16:05:33 +00:00
Doug Barton 659accc77f MFC r228191:
Ensure kldxref is run first.
2012-02-10 10:23:55 +00:00
Bjoern A. Zeeb 912a5f4115 MFC r223735:
Add infrastructure to allow all frames/packets received on an interface
 to be assigned to a non-default FIB instance.

 Submitted by:  cjsp
 Submitted by:  Alexander V. Chernikov (melifaro ipfw.ru)
                (original versions)
 Reviewed by:   julian
 Reviewed by:   Alexander V. Chernikov (melifaro ipfw.ru)

Reviewed by:	melifaro
2012-02-10 06:43:16 +00:00
Bjoern A. Zeeb 9147ffaedb MFC r223259:
Correct a typo in the function name.
2012-02-10 06:06:30 +00:00
Eitan Adler 906d205eda MFC r231111, r231331:
ports(7) currently makes no mention of LOCALBASE: fix that

PR:		159551
Approved by:	gjb
2012-02-10 04:11:04 +00:00
Eitan Adler b5fc068a12 MFC r228344:
- Add support for Support SEAGATE DAT Scopion 130

PR:		kern/141934
Approved by:	cperciva
2012-02-10 00:10:13 +00:00
Bjoern A. Zeeb ba66d2bfbc Fix no-IPv6 kernels after r231207.
Reported by:	someone via luigi
2012-02-09 22:13:20 +00:00
Bjoern A. Zeeb f02d7d5a9e MFC r229546:
Convert an #ifdef DIAGNOSTIC if/panic to a KASSERT.
2012-02-09 21:33:44 +00:00
Bjoern A. Zeeb c07abfa9b0 MFC r229276:
Remove an uneeded inpcb forward declaration and align the function
 declaration following to match the style in the rest of the file.
2012-02-09 20:54:25 +00:00
Bjoern A. Zeeb 96482c7814 MFC r229127:
Remove a declaration to a non-existent function.
2012-02-09 16:12:25 +00:00
Bjoern A. Zeeb 1b514315f6 MF8 r224326:
Flush output buffers before closing TCP session.  Fixes the case where
 the proxy would eat the 221 response coming from the server towards the
 client.

 Obtained from:	OpenBSD r1.18
PR:		bin/154469
2012-02-09 09:01:03 +00:00
Bjoern A. Zeeb f732be0e00 MFC r223667:
In case ntp cannot resolve a hostname on startup it will queue the entry
 for resolving by a child process that, upon success, will add the entry
 to the config of the running running parent process.

 Unfortunately there are a couple of bugs with this, fixed in various
 later versions of upstream in potentially different ways due to other
 code changes:

 1) Upon server [-46] <FQDN> the [-46] are used as FQDN for later resolving
    which does not work.  Make sure we always pass the name (or IP there).

 2) The intermediate file to carry the information to the child process
    does not know about -4/-6 restrictions, so that a dual-stacked host
    could resolve to an IPv6 address but that might be unreachable (see
    r223626) leading to no working synchronization ignoring a IPv4 record.
    Thus alter the intermediate format to also pass the address family
    (AF_UNSPEC (default), AF_INET or AF_INET6) to the child process
    depending on -4 or -6.

 3) Make the child process to parse the new intermediate file format and
    save the address family for getaddrinfo() hints flags.

 4) Change child to always reload resolv.conf calling res_init() before
    trying to resolve names.  This will pick up resolv.conf changes or
    new resolv.confs should they have not existed or been empty or
    unusable on ntp startup.  This fix is more conditional in upstream
    versions but given FreeBSD has res_init there is no need for the
    configure logic as well.

 Approved by:	roberto
 Sponsored by:	Sandvine Incorporated
2012-02-09 07:52:44 +00:00
Bjoern A. Zeeb e2f25f58ec MFC r223626:
Compare port numbers correctly.  They are stored by SRCPORT()
 in host byte order, so we need to compare them as such.
 Properly compare IPv6 addresses as well.

 This allows the, by default, 8 badaddrs slots per address
 family to work correctly and only print sendto() errors once.

 The change is no longer applicable to any latest upstream versions.

 Approved by:   roberto
 Sponsored by:  Sandvine Incorporated
2012-02-09 07:28:17 +00:00
Sean Farley 90ccb6ff3e Merge from head to stable/7:
r230656:
msdos was renamed to msdosfs in 2001 by r77577.
2012-02-09 01:18:09 +00:00
Sean Farley cf3290fc2c Merge from head to stable/7:
r230655:
Since April 2, 2006, Indiana has observed DST.
2012-02-08 23:12:05 +00:00
Bjoern A. Zeeb ed74e6a58d MFC r223359:
Garbage collect never used global, sysctl, externs.
2012-02-08 19:20:11 +00:00
Bjoern A. Zeeb b4ef8c3d13 MFC r228641:
Allow toggling of IFCAP_VLAN_HWCSUM for hardware that supports checksum
 offloading on vlans and document the new option.
2012-02-08 18:51:25 +00:00
Bjoern A. Zeeb e0a9a1a85d Remove sun4v from universe targets.
Approved by:	re
2012-02-08 18:22:10 +00:00
Bjoern A. Zeeb 86a8840f3b MFC r222845:
Correct comments and debug logging in ipsec to better match reality.
2012-02-08 17:54:11 +00:00
Bjoern A. Zeeb e27d866234 MFC r225428:
Shorten a variable access some using a cached value rather than
 casting the input argument again, making the code more readable.

 Reviewed by:	jhb
2012-02-08 17:03:30 +00:00
Bjoern A. Zeeb 55f27647c9 MFC r225036:
Hide IPv6 next header parsing warnings under the verbose sysctl
 so people can possibly disable it when their consoles are flooded,
 or enabled it for debugging.
2012-02-08 16:45:20 +00:00
Bjoern A. Zeeb 701f3edbb8 MFC r225033:
If we detect an IPv6 fragment header and it is not the first fragment,
 then terminate the loop as we will not find any further headers and
 for short fragments this could otherwise lead to a pullup error
 discarding the fragment.

 Submitted by:	Matthew Luckie (mjl luckie.org.nz)
PR:		kern/145733
2012-02-08 16:26:01 +00:00
Bjoern A. Zeeb 190f6552c6 MFC r225032,225034:
ipfw internally checks for offset == 0 to determine whether the
 packet is a/the first fragment or not.  For IPv6 we have added the
 "more fragments" flag as well to be able to determine on whether
 there will be more as we do not have the fragment header avaialble
 for logging, while for IPv4 this information can be derived directly
 from the IPv4 header.  This allowed fragmented packets to bypass
 normal rules as proper masking was not done when checking offset.
 Split variables to not need masking for IPv6 to avoid further errors.

 After r225032 fix logging in a similar way masking the the IPv6
 more fragments flag off so that offset == 0 checks work properly.

 Submitted by:	Matthew Luckie (mjl luckie.org.nz)
PR:		kern/145733
2012-02-08 16:07:07 +00:00
Bjoern A. Zeeb 613a70fa19 MFC r225030:
While not explicitly allowed by RFC 2460, in case there is no
 translation technology involved (and that section is suggested to
 be removed by Errata 2843), single packet fragments do not harm.

 There is another errata and further drafts under discussion to clarify
 on these kinds of packets.
 Meanwhile add a sysctl to allow disabling this behaviour again.
 We will treat single packet fragment (a fragment header added
 when not needed) as if there was no fragment header.

 Submitted by:	Matthew Luckie (mjl luckie.org.nz) (original version)
PR:		kern/145733
2012-02-08 15:38:36 +00:00
Alexander Motin 85a2a6c587 MFC 230877:
Fix NULL dereference panic on attempt to turn off (on system shutdown)
disconnected swap device.

This is quick and imperfect solution, as swap device will still be opened
and GEOM will not be able to destroy it. Proper solution would be to
automatically turn off and close disconnected swap device, but with existing
code it will cause panic if there is at least one page on device, even if
it is unimportant page of the user-level process. It needs some work.
2012-02-08 07:34:03 +00:00
Jaakko Heinonen 2fbbb89ec7 MFC r229692:
Check the return value of sbuf_finish() in pfs_readlink() and return
ENAMETOOLONG if the buffer overflowed.
2012-02-06 17:31:13 +00:00
Sean Bruno a63f28a626 MFC r230313, r230316, r230323, r230588
Support new raid controllers
2012-02-05 19:22:20 +00:00
Dimitry Andric 13bbaf99c2 MFC r229753:
In sys/contrib/rdma/ib_addr.h, bump MAX_ADDR_LEN to 20 bytes (the same
value used in sys/ofed/include/linux/netdevice.h), so there will be no
buffer overruns in the rest of the inline functions in this file.

Reviewed by:	kmacy
2012-02-03 23:27:07 +00:00
Jaakko Heinonen 9ba822ae37 MFC r228359:
sbuf_data() hasn't returned NULL for overflowed buffers since r71721.
2012-02-01 17:07:29 +00:00
Jaakko Heinonen 5594a62e52 Partially MFC r228358: Fix markup. 2012-02-01 17:04:14 +00:00
Marius Strobl 02f118d2ae Add more sparc64 compatibility macros for the shared loader.
This is a direct commit to stable/7 in order to unbreak the build with
224371 in place.
2012-01-31 23:20:17 +00:00
Sergey Kandaurov 475e8295c4 MFC r230531: Remove unused variable. 2012-01-31 10:46:51 +00:00
Doug Barton 10cfee1e4e MFC r217071 and r217213:
Make the setting of the BIND CFLAG -DWORDS_BIGENDIAN conditional on the
TARGET_ENDIANNESS knob from bsd.endian.mk so that we can avoid having to
special-case each arch.

MFC r224093 (in part):

Stop claiming that we support atomic ops except on arches where we know
that they work. Many users have reported problems on the other arches,
so until they can get fixed we'll take the safe route.
2012-01-31 00:49:34 +00:00
Sergey Kandaurov b8be116c36 MFC r230613:
Remove a left-over reference to make.conf(5) for now-defunct -DVM_STACK
2012-01-30 12:32:22 +00:00
Eitan Adler 0bd69f37ac MFC r230327:
Add support for Sony Ericsson GC89 EDGE/Wirelles LAN PC Card

PR:		kern/131933
Approved by:	cperciva
2012-01-28 21:45:40 +00:00
Eitan Adler 5aef557784 MFC r230109:
- Document TheDraw splash screens in the default loader.conf

Approved by:	cperciva
2012-01-28 19:33:32 +00:00
Andre Oppermann 70dacd1476 MFC r226113 and r228016:
Prevent TCP sessions from stalling indefinitely in reassembly
 when reaching the zone limit of reassembly queue entries.

Reviewed by:	lstewart
2012-01-25 11:16:31 +00:00
Alan Cox 08f1f9aeb9 MFC r226163, r228317, and r228324
Fix the handling of an empty kmem map by sysctl_kmem_map_free().

  Eliminate the possibility of 32-bit arithmetic overflow in the
  calculation of vm_kmem_size that may occur if the system
  administrator has specified a vm.vm_kmem_size tunable value that
  exceeds the hard cap.

  Eliminate stale numbers from a comment.

PR:		162741
2012-01-21 07:57:27 +00:00
Lawrence Stewart 9c85055748 MFC r229898:
Consumers of bpfdetach() expect it to remove all bpf_if structs from the
bpf_iflist list which reference the specified ifnet. The existing implementation
only removes the first matching bpf_if found in the list, effectively leaking
list entries if an ifnet has been bpfattach()ed multiple times with different
DLTs.

Fix the leak by performing the detach logic in a loop, stopping when all bpf_if
structs referencing the specified ifnet have been detached and removed from the
bpf_iflist list.

Whilst here, also:

- Remove the unnecessary "bp->bif_ifp == NULL" check, as a bpf_if should never
  exist in the list with a NULL ifnet pointer.

- Except when INVARIANTS is in the kernel config, silently ignore the case where
  no bpf_if referencing the specified ifnet is found, as it is harmless and does
  not require user attention.

Reviewed by:	csjp
2012-01-21 04:24:19 +00:00
Jilles Tjoelker 59f0348973 MFC r227124: fifo_misc test: Fix swapped lseek arguments.
It worked regardless because SEEK_CUR happens to be 1.

PR:		misc/160866
2012-01-20 16:34:14 +00:00
Jilles Tjoelker b9cd8f4fef MFC r227123: lint: Fix lseek() argument order.
Because SEEK_SET is 0, this seems to have no effect on the generated code.

PR:		bin/160806
Submitted by:	Henning Petersen <henning dot petersen at t-online dot de>
Obtained from:	NetBSD
2012-01-20 15:46:46 +00:00
Don Lewis 85cf257a62 MFC: r229984
Pass the arguments to mtx_init() in the correct order.  There should be
no change to the binary because the value of MTX_DEF is zero and there
is a visible function prototype.
2012-01-18 21:51:56 +00:00
Bjoern A. Zeeb 04dca90fd2 MFC r225048:
In this branch when doing no further checkes there is no reason use
 the temporary variable and check with if as TUNABLE_*_FETCH do not
 alter values unless successfully found the tunable.
2012-01-17 22:09:33 +00:00
Bjoern A. Zeeb ebd17d62dc MFC r224516:
Introduce a tunable to disable the time consuming parts of bootup
 memtesting, which can easily save seconds to minutes of boot time.
 The tunable name is kept general to allow reusing the code in
 alternate frameworks.
2012-01-17 22:02:30 +00:00
Eitan Adler b436217e21 MFC r228343:
- Fix ktrace leakage if error is set

PR:		kern/163098
Approved by:	sbruno
2012-01-15 20:52:01 +00:00
Christian Brueffer 71c19a1d1c MFC: r229585
Fix typo.
2012-01-12 20:51:01 +00:00
Eitan Adler 3a0db83eb6 MFC r228445:
- Add support for ASCII art splash screens in TheDraw format

PR:		kern/143370
Approved by:	ed
2012-01-12 00:05:35 +00:00
Warren Block 34d2a6d9d3 MFC r227981:
Point out that @reboot runs at every cron startup, not just system
startup.

Approved by:	gjb (mentor)
2012-01-11 23:11:48 +00:00
Sergey Kandaurov ee26f1cb85 MFC r211801: fix typo.
Spotted by:	Ildar Hizbulin <hizel vyborg ru> (stable/7)
2012-01-11 17:21:22 +00:00
Yoshihiro Takahashi f37d7df378 MFC: revision 229462
Fix 230MB MO support.

  Submitted by:	Kaho Toshikazu
2012-01-11 13:59:49 +00:00
Eitan Adler 091a56ac85 - Remove extraneous null ptr deref checks
- Fix memory leak

Approved by:	jhb
2012-01-10 01:02:40 +00:00
Eitan Adler e10d1d5ea8 MFC r227535:
- add support for Titan VScom PCIex-800H

PR:		kern/124128
Approved by:	jhb
2012-01-10 00:35:25 +00:00
Eitan Adler ce875fe3e9 MFC r227532:
- add support for Broadcom 802.11bg/EDGE/GPRS CardBus (Serial)
	- correct mislabeling of 0x432214e4 device

PR:		kern/119606
Approved by:	jhb
2012-01-10 00:27:37 +00:00
Eitan Adler 3977786641 MFC 226404:
- add support for I-O DATA RSA-PCI2/R

PR:		kern/142999
Approved by:	jhb
2012-01-10 00:20:28 +00:00
Pyun YongHyeon ddfbbed55f MFC r198999:
Take a step towards removing if_watchdog/if_timer.  Don't explicitly set
  if_watchdog/if_timer to NULL/0 when initializing an ifnet.  if_alloc()
  sets those members to NULL/0 already.
2012-01-09 20:16:06 +00:00
Pyun YongHyeon 5cb6a91e9e MFC r212378:
Catch up to rename of the constant for the Master Data Parity Error bit in
  the PCI status register.
2012-01-09 20:08:57 +00:00
Pyun YongHyeon 1f3f313618 MFC r228717:
Increase wait time for OP_TCPSTART command processing.  It seems
  100us is not enough to ensure prefetch unit work.
2012-01-09 19:59:53 +00:00
Pyun YongHyeon 378c7cfa76 MFC r228716:
TCP header size is represented by number of 32bits words.
  Fix the TCP header size calculation such that makes TSO engine
  cache all header(ethernet/IP/TCP) bytes to its internal buffer.
  While here, remove extra pull up for TCP payload.  Unlike some
  em(4) controllers, fxp(4) does not require such work around for
  TSO.
  The two limitations are ethernet/IP/TCP header size should be less
  than or equal to the size of controller's internal buffer(80 bytes)
  and these header information should be found in the first fragment
  of a TSO frame.
2012-01-09 19:31:35 +00:00
Pyun YongHyeon 05c82251c9 MFC r228479-228480:
r228479:
  BCM5720 performance tweak from Broadcom.
   o Allow multiple outstanding read requests from non-LSO read DMA engine.
   o Allow 4KB burst length reads for non-LSO frames.
   o Enable 512B burst length reads for buffer descriptors.

r228480:
  Destroy DMA tag for jumbo RX buffer in device detach.
2012-01-09 19:23:29 +00:00
Pyun YongHyeon 225a464894 MFC r228476:
Rework link state tracking and remove superfluous link UP/DOWN
  messages.
   o Add check for actually resolved speed in miibus_statchg callback
     instead of blindly reprogramming BCE_EMAC_MODE register.  The
     callback may be called multiple times(e.g. link UP, link
     transition, auto-negotiate complete etc) while auto-negotiation
     is in progress.  All unresolved link state changes are ignored
     now and setting BCE_EMAC_MODE after link establishment is done
     once.
   o bce(4) is careful enough not to drive MII_TICK if driver got a
     valid link.  To detect lost link, bce(4) relied on link state
     change interrupt and if driver see the interrupt, it forced to
     drive MII_TICK by calling bce_tick() in interrupt handler.
     Because bce(4) generates multiple link state change interrupts
     while auto-negotiation is in progress, bce_tick() would be
     called multiple times and this resulted in generating multiple
     link UP/DOWN messages.
     With this change, bce_tick() is not called in interrupt handler
     anymore such that miibus_statchg callback handles link state
     changes with consistent manner.
2012-01-09 19:10:11 +00:00
Pyun YongHyeon 012b3d4444 MFC r218529:
- Updated firmware which improves small packet performance.
2012-01-09 18:55:28 +00:00
Pyun YongHyeon 491d6ffe11 MFC r210522,213489,218423,218527:
r210522:
  Fix an apparent typo.

r213489:
  Add the capability to read the complete contents of the NVRAM via sysctl
        dev.bce.<unit>.nvram_dump
  Add the capability to write the complete contents of the NVRAM via sysctl
        dev.bce.<unit>.nvram_write
  These are only available if the kernel option BCE_DEBUG is enabled.
  The nvram_write sysctl also requires the kernel option
  BCE_NVRAM_WRITE_SUPPORT to be enabled.  These are to be used at your
  own caution.  Since the MAC addresses are stored in the NVRAM, if you
  dump one NIC and restore it on another NIC the destination NIC's
  MAC addresses will not be preserved.  A tool can be made using these
  sysctl's to manage the on-chip firmware.

r218423:
  - Added systcls for header splitting, RX/TX buffer count, interrupt
    coalescing, strict RX MTU, verbose output, and shared memory debug.
  - Added additional debug counters (VLAN tags and split header frames).
  - Updated debug counters to 64 bit definitions.
  - Updated l2fhdr bit definitions.
  - Combined RX buffer sizing into a single function.
  - Added buffer size and interrupt coalescing settings to adapter info
    printout.

r218527:
  - Added error checking to nvram read functions.
  - Minor style updates.
2012-01-09 18:33:54 +00:00
Eitan Adler 783c6507e9 MFC r228233:
- Fix typos s/(more|less) then|\1 than/

Approved by:	brucec
2012-01-09 03:03:43 +00:00
Glen Barber 5bab6b189f MFC r229353:
- Trivial standardization to a few comments in kern.pre.mk.
2012-01-09 02:00:31 +00:00
Eitan Adler a70450626a MFC r228754:
- Add restrict keyword to glob(3)

PR:		kern/161958
Approved by:	jilles
2012-01-08 21:01:51 +00:00
Kevin Lo 2c74f290ef MFC r227871:
Remove unused variable mii.
This variable is initialized but not used.

Reviewed by:	yongari
2012-01-07 16:14:53 +00:00
Eitan Adler 4ebba4b2c4 MFC r227491:
-  new sentence should start on new line.

Approved by:	gjb
2012-01-07 03:31:40 +00:00
Glen Barber fb46cf8ac0 MFC r209362, r210933, r228356:
r209362 (brian) [1]:
- Add a -t switch for masking output that's above or below certain
  thresholds.  This switch makes it a lot easier to locate problem
  areas when a process is threatening to consume all of your disk
  space.

r210933 (joel):
- Fix typos and spelling mistakes.

r228356 [2]:
- Update du(1):

  - Sort arguments alphabetically where appropriate
  - '-B blocksize' is not mutually exclusive of '-h|-k|-m'
  - Mention '-t' in synopsis
  - Other wording improvements
  - Update usage() output to reflect the new synopsis
  - Other miscellaneous improvements

Approved by:	brian [1]
PR:		162438 [2]
2012-01-07 01:39:38 +00:00
Pyun YongHyeon ef1bca715f MFC r207761:
Add a fastpath to allocate from packet zone when using m_getjcl.
  This will add support for packet zone for at least igb and ixgbe
  and will avoid to check for that in bce and mxge.
2012-01-07 01:12:21 +00:00
Pyun YongHyeon 4bb4f6a47a MFC r180509,181362,215835,228370:
Belatedly add man page for et(4) and catch up with all changes.

r180509:
  Manpage for the et(4) driver.

r181362:
  Comment out information about Jumbo Frame support, it's not
  implemented yet.  While here, fix a whitespace nit.

r215835:
  Add a HARDWARE section.

r228370:
  After r228293, et(4) supports altq(4).
2012-01-07 00:05:20 +00:00
Pyun YongHyeon d7819f7cb6 MFC r228333,228335-228336,228362,228368-228369,228381:
r228333:
  Protect SIOCSIFMTU ioctl handler with driver lock.
  Don't blindly re-initialize controller whenever MTU is changed.
  Now, reinitializing is done only when driver is running.

  While here, remove unnecessary assignment of error value since it
  was already initialized to 0.

r228335:
  Consistently use a tab character instead of using either a space or
  tab after #define.
  While I'm here consistently use capital letters when it uses
  hexadecimal notation.

  No functional changes.

r228336:
  Disable all clocks and put PHY into COMA before entering into
  suspend state.  This will save more power.
  On resume, make sure to enable all clocks.  While I'm here, if
  controller is not fast ethernet, enable gigabit PHY.

r228362:
  Do not disable interrupt without knowing whether the raised
  interrupt is ours.  Note, interrupts are automatically ACKed when
  the status register is read.
  Add RX/TX DMA error to interrupt handler and do full controller
  reset if driver happen to encounter these errors.  There is no way
  to recover from these DMA errors without controller reset.
  Rename local variable name intrs with status to enhance
  readability.

  While I'm here, rename ET_INTR_TXEOF and ET_INTR_RXEOF to
  ET_INTR_TXDMA and ET_INTR_RXDMA respectively.  These interrupts
  indicate that a frame is successfully DMAed to controller's
  internal FIFO and they have nothing to do with EOF(end of frame).
  Driver does not need to wait actual end of TX/RX of a frame(e.g.
  no need to wait the end signal of TX which is generated when a
  frame in TX FIFO is emptied by MAC).  Previous names were somewhat
  confusing.

r228368:
  Remove unnecessary definition of ET_PCIR_BAR.  Controller support
  I/O memory only.
  While here, use pci_set_max_read_req(9) rather than directly
  manipulating PCIe device control register.

r228369:
  Announce flow control ability to PHY driver and enable RX flow
  control.  Controller does not automatically generate pause frames
  based on number of available RX buffers so it's very hard to
  know when driver should generate XON frame in time.  The only
  mechanism driver can detect low number of RX buffer condition is
  ET_INTR_RXRING0_LOW or ET_INTR_RXRING1_LOW interrupt.  This
  interrupt is generated whenever controller notices the number of
  available RX buffers are lower than pre-programmed value(
  ET_RX_RING0_MINCNT and ET_RX_RING1_MINCNT register).  This scheme
  does not provide a way to detect when controller sees enough number
  of RX buffers again such that efficient generation of XON/XOFF
  frame is not easy.

  While here, add more flow control related register definition.

r228381:
  FreeBSD driver does not require arpcom structure in softc.
2012-01-06 21:46:35 +00:00
Pyun YongHyeon 69a2f96b0e MFC r228326-228327,228331-228332:
r228326:
  Controller does not require TX start command for every frame.  So
  send a single TX command after setting up all TX frames.  This
  removes unnecessary register accesses and bus_dmamap_sync(9) calls.
  et(4) uses TX interrupt moderation so it's possible to have TX
  buffers that were already transmitted but waiting for TX completion
  interrupt.  If the number of available TX descriptor is less then
  1/3 of total TX descriptor, try reclaiming first to get enough free
  TX descriptors before setting up TX descriptors.
  After r228325, et_txeof() no longer tries to send frames after
  reclaiming TX buffers.  That change was made to give more chance
  to transmit frames in main interrupt handler since we can still
  send frames in interrupt handler with RX interrupt.  So right
  before exiting interrupt hander, after enabling interrupt, try to
  send more frames.  This gives slightly better performance numbers.

  While I'm here reduce number of spare TX descriptors from 8 to 4.
  Controller does not require reserved TX descriptors, it was just to
  reduce TX overhead.  After r228325, driver has much lower TX
  overhead so it does not make sense to reserve 8 TX descriptors.

r228327:
  Remove et_enable_intrs(), et_disable_intrs() functions and
  manipulation of interrupt register access is done through
  CSR_WRITE_4 macro.  Also add disabling interrupt into et_reset()
  because we want interrupt disabled state after controller reset.
  While I'm here slightly change interrupt handler to be more
  readable one.

r228331:
  Rework link state tracking and TX/RX MAC configuration.
   o Do not report link status if driver is not running.
   o TX/RX MAC configuration should be done with resolved speed,
     duplex and flow control after establishing a link so it can't
     be done in driver initialization routine.
     Move the configuration to miibus_statchg callback which will be
     called whenever any link state change is detected.
     At this moment, flow-control is not enabled yet mainly because
     I was not able to set correct flow control parameters to
     generate TX pause frames.
   o Now TX/RX MAC is enabled only when a valid link is detected.
     Rearragnge hardware initialization routine a bit to leave
     enabling MAC to miibus_statchg callback.  In order to that,
     TX/RX DMA engine is enabled in et_init_locked().
   o Introduce ET_FLAG_LINK flag to track current link state.
   o Introduce ET_FLAG_FASTETHER flag to mark whether controller is
     fast ethernet.  This flag is checked in miibus_statchg callback
     to know whether PHY established a valid link.
   o In et_stop(), TX/RX MAC is explicitly disabled instead of
     relying on et_reset().  And move et_reset() from et_stop() to
     controller initialization.  Controler reset is not required here
     and it would also clear critial registers(i.e station address,
     RX filter configuration, WOL etc) that are required to make WOL
     work.
   o Switching to current media is done in et_init_locked() after
     setting IFF_DRV_RUNNING flag.  This should ensure reliable
     auto-negotiation/manual link establishment.
   o In et_start_locked(), check whether driver got a valid link
     before trying to send frames.
   o Remove checking a link in et_tick() as this is done by
     miibus_statchg callback.

r228332:
  Implement hardware MAC statistics counter.  Counters could be
  queried with dev.et.%d.stats sysctl node where %d is an instance of
  device.
2012-01-06 19:27:51 +00:00
Pyun YongHyeon 3ad9090b81 MFC r228325:
Overhaul bus_dma(9) usage in et(4) and clean up TX/RX path.  This
  change should make et(4) work on any architectures.
   o Remove m_getl inline function and replace it with stanard mbuf
     interfaces.  Previous code tried to minimize code duplication
     but this came from incorrect use of common DMA tag.
     Driver may be still use a common RX allocation handler with
     additional structure changes but I don't see much point to do
     that it would make it hard to understand the code.
   o Remove DragonflyBSD specific constant EVL_ENCAPLEN, use
     ETHER_VLAN_ENCAP_LEN instead.
   o Add bunch of new RX status definition.  It seems controller
     supports RX checksum offloading but I was not able to make the
     feature work yet.  Currently driver checks whether recevied
     frame is good one or not.
   o Avoid a typedef ending in '_t' as style(9) says.
   o Controller has no restriction on DMA address space, so there
     is no reason to limit the DMA address to 32bit.  Descriptor
     rings,  status blocks and TX/RX buffers now use full 64bit DMA
     addressing.
   o Allocate DMA memory shared between host and controller as
     coherent.
   o Create 3 separate DMA tags to be used as TX, mini RX ring and
     stanard RX ring.  Previously it created a single DMA tag and it
     was used to all three rings.
   o et(4) does not support jumbo frame at this moment and I still
     don't quite understand how jumbo frame works on this controller
     so use two RX rings to handle small sized frame and normal sized
     frame respectively.  The mini RX ring will be used to receive
     frames that are less than or equal to 127 bytes.  The second RX
     ring is used to receive frames that are not handled by the first
     RX ring.
     If jumbo frame support is implemented, driver may have to choose
     better RX scheme by letting the second RX ring handle jumbo
     frames.  This scheme will mimic Broadcom's efficient jumbo frame
     handling feature.  However RAM buffer size(16KB) of the
     controller is too small to hold 2 jumbo frames, if 9KB
     jumbo frame is used, I'm not sure how good performance would it
     have.
   o In et_rxeof(), make sure to check whether controller received
     good frame or not.  Passing corrupted frame to upper layer is
     bad idea.
   o If driver receives a bad frame or driver fails to allocate RX
     buffer due to resource shortage condition, reuse previously
     loaded DMA map for RX buffer instead of unloading/loading RX
     buffer again.
   o et_init_tx_ring() never fails so change return type to void.
   o In watchdog handler, show TX DMA write back status of errored
     frame which could be used as a clue to debug watchdog timeout.
   o Add missing bus_dmamap_sync() in various places such that et(4)
     should work with bounce buffers(e.g. PAE).
   o TX side bus_dmamap_load_mbuf_sg(9) support.
   o RX side bus_dmamap_load_mbuf_sg(9) support.
   o Controller has no DMA alignment limit in RX buffer so use
     m_adj(9) in RX buffer allocation to make IP header align on 2
     bytes boundary.  Otherwise it would trigger unaligned access
     error in upper layer on strict alignment architectures.
     One of down side of controller is it provides limited set of RX
     buffer length like most Intel controllers.  This is not problem
     at this moment because driver does not support jumbo frame yet
     but it may require alignment fixup code to support jumbo frame
     on strict alignment architectures.
   o In et_txeof(), don't zero TX descriptors for transmitted frames.
     TX descriptors don't need write access after transmission.
     Driver sets IFF_DRV_OACTIVE when the number of available TX
     descriptors are less than or equal to ET_NSEG_SPARE.  Make sure
     to clear IFF_DRV_OACTIVE only when the number of available TX
     descriptor is greater than ET_NSEG_SPARE.
2012-01-06 19:12:47 +00:00
Pyun YongHyeon 570a58be9f MFC r228291-228293,228297-228298:
r228291:
  Remove NetBSD license. r199548 removed all bit macros that were
  derived from NetBSD.

r228292:
  Implement suspend/resume methods.  Driver has no issue with
  suspend/resume.

r228293:
  Fix alt(4) support.  Also add check for number of available TX
  descriptors before trying to send frames.  If we're not able to
  send a frame, make sure to prepend it to if_snd queue such that
  alt(4) should work.

  While I'm here prefer ETHER_BPF_MTAP to BPF_MTAP.  ETHER_BPF_MTAP
  should be used for controllers that support VLAN hardware tag
  insertion.  The controller supports VLAN tag insertion but lacks
  VLAN tag stripping in RX path though.

r228297:
  et(4) supports VLAN oversized frame so correctly set header length.
  While I'm here remove initializing if_mtu, it is set by
  ether_ifattach(9).  Also move callout_init_mtx(9) to the right below
  driver lock initialization.

r228298:
  Make et_probe() return BUS_PROBE_DEFAULT such that allow other
  driver that has high precedence for the controller override et(4).
  Add missing callout_drain(9) in device detach and rework detach
  routine.  While I'm here use rman_get_rid(9) instead of using
  cached resource id because bus methods are free to change the
  id.
2012-01-06 18:18:25 +00:00
Eitan Adler b9014d7368 MFC r227488:
- add "check" option to MD5 and friends to compare files against known hash.

Approved by: cperciva
2012-01-06 02:28:21 +00:00
Pyun YongHyeon 424217d861 MFC r228286:
Fix off by one error in mbuf access.  Previously it caused panic.
  While I'm here use NULL to compare mbuf pointer and add additional
  check for zero length mbuf before accessing the mbuf.

  PR:	kern/162932
2012-01-05 21:18:34 +00:00
Pyun YongHyeon ffccf262a8 MFC r228205:
Add more controllers that support jumbo frame.
2012-01-05 20:37:42 +00:00
Pyun YongHyeon 16f56932f0 MFC r228086:
Announce flow control capability to PHY drivers and enable flow
  control for all vr(4) controllers that support it.  It's known that
  old vr(4) controllers(Rhine II) does not support TX pause but Rhine
  III supports both TX and RX pause.
  Make TX pause really work on Rhine III by letting controller know
  available RX buffers.
  While here, adjust XON/XOFF parameters to get better performance
  with flow control.
2012-01-05 20:33:20 +00:00
Pyun YongHyeon 05984c246b MFC r228084:
Reuse flag variable to represent driver internal states rather than
  using member variables in softc.
  While I'm here change media after setting IFF_DRV_RUNNING. This
  will remove unnecessary link state handling in vr_tick() if
  controller established a link immediately.
2012-01-05 18:24:02 +00:00
Eitan Adler e5bf147121 MFC r227458, r226436:
- change "is is" to "is" or "it is"
- change "the the" to "the"
- other typo fixes

Approved by:	lstewart
2012-01-05 04:50:10 +00:00
Pyun YongHyeon c08688cdff MFC r227842:
For IP1001 PHY, do not set multi-port device(MASTER).  Ideally this
  bit should not affect link establishment process of auto-negotiation
  if manual configuration is not used, which is true in auto-negotiation.
  However it seems setting this bit interfere with IP1001 PHY's
  down-shifting feature such that establishing a 10/100Mbps link failed
  when 1000baseT link is not available during auto-negotiation process.
2012-01-05 00:11:04 +00:00
Pyun YongHyeon ef767bf7e0 MFC r227828,227835,227837:
r227828:
  Always start MII auto polling before accessing any MII registers.

r227835:
  Rework link establishment and link state detection logic.
   - Remove MIIBUS statchg callback and program VGE_DIAGCTL before
     initiating link establishment.  Previously driver used to
     program VGE_DIAGCTL after getting a link in statchg callback.
     It seems the VGE_DIAGCTL register works like a kind of MII
     register such that it requires setting a 'to be' mode in advance
     rather than relying on resolved speed/duplex of established link.
     This means the statchg callback is not needed in driver.  In
     addition, if there was no link at the time of media change, this
     was not called at all.
   - Introduce vge_ifmedia_upd_locked() to change current media to
     configured one.  Actual media change is performed only after PHY
     reset and VGE_DIAGCTL setup.
   - In WOL configuration, make sure to clear forced mode such that
     controller can rely on auto-negotiation.
   - Unlike most other drivers that use miibus(4), vge(4) used
     controller's auto-polling feature for link state tracking via
     interrupt.  This came from controller's inefficient mechanism to
     access MII registers.  On link state change interrupt, vge(4)
     used to get current link state with series of MII register
     accesses.  Because vge(4) already enabled auto polling, read PHY
     status register to resolved speed/duplex/flow control parameters.

  vge(4) still does not drive MII_TICK to reduce number of MII
  register accesses which in turn means the driver does not know the
  status of auto-negotiation.  This was a one of long standing
  issue of vge(4).  Probably driver may be able to implement a timer
  that keeps track of auto-negotiation state and restart
  auto-negotiation when driver couldn't establish a link within a
  specified period.  However the controller does not provide a
  reliable way to detect auto-negotiation failure so I'm not sure
  whether it's worth to implement it in driver.

  Alternatively driver can completely disable MII auto-polling and
  let miibus(4) poll link state by driving MII_TICK.  This may reduce
  unnecessary overhead of stopping/restarting MII auto-polling of
  controller.  Unfortunately it was known that some variants of
  controller does not work correctly if MII auto-polling is disabled.

r227837:
  Announce flow control capability to underlying PHY driver.
  Pause timer value is initialized to 0xFFFF. Controller allows just
  4 different TX pause thresholds. The lowest possible threshold
  value looks too aggressive so use next available threshold value.
2012-01-05 00:01:49 +00:00
Pyun YongHyeon e721d7a774 MFC r227850-227851,227854,227914,227916:
r227850:
  Writing access to RL_CFG5 register also requires EEPROM write
  access.
  While I'm here, enable WOL through magic packet but disable waking
  up system via unicast, multicast and broadcast frames.  Otherwise,
  multicast or unicast frame(e.g. ICMP echo request) can wake up
  system which is not probably wanted behavior on most environments.
  This was not known as problem because RL_CFG5 register access had
  not effect until this change.
  The capability to wake up system with unicast/multicast frames
  are still set in driver, default off, so users who need that
  feature can still activate it with ifconfig(8).

r227851:
  Perform media change after setting IFF_DRV_RUNNING flag. Without it,
  driver would ignore the first link state update if controller
  already established a link such that it would have to take
  additional link state handling in re_tick().

r227854:
  Disable accepting frames in re_stop() to put RX MAC into idle state.
  Because there is no reliable way to know whether RX MAC is in
  stopped state, rejecting all frames would be the only way to
  minimize possible races.
  Otherwise it's possible to receive frames while stop command
  execution is in progress and controller can DMA the frame to freed
  RX buffer during that period.
  This was observed on recent PCIe controllers(i.e. RTL8111F).

  While this change may not be required on old controllers it
  wouldn't make negative effects on old controllers.  One side effect
  of this change is disabling receive so driver reprograms RL_RXCFG
  to receive WOL frames when it is put into suspend or shutdown.

  This should address occasional 'memory modified free' errors seen
  on recent RealTek controllers.

r227914:
  Make sure to stop TX MAC before freeing queued TX frames.
  For RTL8111DP, check if the TX MAC is active by reading RL_GTXSTART
  register.  For RTL8402/8168E-VL/8168F/8411, wait until TX queue is
  empty.

r227916:
  To save more power, switch to 10/100Mbps link when controller is
  put into suspend/shutdown.  Old PCI controllers performed that
  operation in firmware but for RTL8111C or newer controllers, it's
  responsibility of driver.  It's not clear whether the firmware of
  RTL8111B still downgrades its speed to 10/100Mbps so leave it as it
  was.
2012-01-04 23:32:50 +00:00
Pyun YongHyeon d52f3fb62a MFC r227587,227590-227591,227593,227638-227639:
r227587:
  Add preliminary support for RTL8402 PCIe FastEthernet with
  integrated card reader.

r227590:
  Add preliminary support for RTL8411 PCIe Gigabit ethernet with
  integrated card reader.

r227591:
  Add missing driver lock in SIOCSIFCAP handler.

r227593:
  Disable PCIe ASPM (Active State Power Management) for all
  controllers.
  More and more RealTek controllers started to implement EEE feature.
  Vendor driver seems to load a kind of firmware for EEE with
  additional PHY fixups.  It is known that the EEE feature may need
  ASPM support.  Unfortunately there is no documentation for EEE of
  the controller so enabling ASPM may cause more problems.

r227638:
  Add preliminary support for second generation RTL8105E PCIe
  FastEthernet.

r227639:
  Add preliminary support for RTL8168/8111F PCIe Gigabit ethernet.
2012-01-04 22:57:04 +00:00
Pyun YongHyeon ddaedd4cde MFC r227582:
Enable 64bit DMA addressing support for all msk(4) controllers.
  Unnecessarily complex LE format used on Marvell controller was
  main reason not to enable 64bit DMA addressing in driver.  If high
  32bit address of DMA address of TX/RX buffer is changed, driver has
  to generate a new LE.  In TX path, driver will keep track of lastly
  used high 32bit address of DMA address and generate a new LE
  whenever it sees high address change in the DMA address. In RX path,
  driver will always use two LEs to specify 64bit DMA address of RX
  buffer.  If the high 32bit address of DMA address of RX buffer is
  the same as previous DMA address of RX buffer, driver does not have
  to use two LEs but driver will use two LEs for simplicity in RX
  ring management.

  One of draw back for switching to 64bit DMA addressing is that the
  large amount of LEs are used to specify 64bit DMA address such that
  number of available LEs for TX/RX buffers are considerably reduced.
  To mitigate the issue, increase number of available LEs from 256 to
  384 for TX and from 256 to 512 for RX. For 32bit architectures,
  msk(4) does not use 64bit DMA addressing to save resources.
2012-01-04 21:54:20 +00:00
Pyun YongHyeon 8d980ddf5d MFC r227452:
To send a frame, controller requires a prepended TX header and
  the length of frame should be treated as multiple of 4. Actual
  frame length is set in the TX header. The TX header position
  should be aligned on 4 byte boundary and actual frame start
  position should be aligned on 4 byte boundary as well. This means
  we need 4(TX header length) + 3(frame length fixup) additional free
  space in TX buffer in addition to actual frame length.
  Make sure TX handler check these additional bytes.
  ae_tx_avail_size() returns actual free space in TX buffer to ease
  the calculation of available TX buffer space in caller. While I'm
  here, replace magic number to appropriate sizeof operator to
  enhance readability.

  This change should fix controller lockup issue happened under
  certain conditions but it still does not fix watchdog timeout. It
  seems the watchdog timeout is side-effect of TxS and TxD
  mismatches. The root cause of TxD/TxD mismatch is not known yet but
  it looks like silicon bug. I guess driver may have to reinitialize
  controller whenever it sees TxS and TxD mismatches but leave it as
  it was at this moment.

  PR:	kern/145918
2012-01-04 21:28:49 +00:00
Sergey Kandaurov 004c780b74 MFC r227792:
Add history for setsockopt(2).

PR:		docs/162719
Submitted by:	Niclas Zeising <niclas at zeising gmail>
2012-01-04 14:55:24 +00:00
Sergey Kandaurov 1a9782429a MFC r227055:
Remove a couple of write-only variables.
2012-01-04 14:06:17 +00:00
Eitan Adler e573e6823f MFC r226482
- remove device keyword from makefs manpage

Approved by: gjb
2012-01-04 02:03:15 +00:00
Pyun YongHyeon 3767299e6d MFC r227675:
Partially revert r218788. r218788 removed calling dc_setcfg() for
  !DC_IS_ADMTEK in dc_miibus_statchg(). This change broke link
  establishment of Intel 21143 with dcphy(4) where it stuck in
  "ability detect" state without completing auto-negotiation.
  Also nuke dc_if_media as it's not actually used.
2012-01-04 01:53:53 +00:00
Rick Macklem 0438c40380 MFC: r227690
The old NFS client will crash due to the reply being m_freem()'d
twice if the server bogusly returns an error with the NFSERR_RETERR
bit (bit 31) set. No actual NFS error has this bit set, but it seems
that amd will sometimes do this. This patch makes sure the NFSERR_RETERR
bit is cleared to avoid a crash.
This is not exactly a merge, since the code is in sys/nfsclient/nfs_socket.c,
which does not exist in head.

Tested by:	martin at lispworks.com
PR:		kern/153847
2012-01-04 00:51:05 +00:00
Pyun YongHyeon d413d3375d MFC r227349,227513-227514:
r227349:
  Document TI_SF_BUF_JUMBO and Xr altq.

r227513:
  Document newly introduced a loader tunable and sysctl variables.

r227514:
  Clarify hw.ti.%d.dac tunable.
2012-01-04 00:04:01 +00:00
Pyun YongHyeon 4edb8f831c MFC r227348:
ti(4) supports altq(4).
2012-01-03 23:58:02 +00:00
Pyun YongHyeon 81b086da70 MFC r227512:
Overhaul bus_dma(9) usage in driver:
   - Don't use a single big DMA block for all rings. Create separate
     DMA area for each ring instead.  Currently the following DMA
     areas are created:
        Event ring, standard RX ring, jumbo RX ring, RX return ring,
        hardware MAC statistics and producer/consumer status area.
     For Tigon II, mini RX ring and TX ring are additionally created.
   - Added missing bus_dmamap_sync(9) in various TX/RX paths.
   - TX ring is no longer created for Tigon 1 such that it saves more
     resources on Tigon 1.
   - Data sheet is not clear about alignment requirement of each ring
     so use 32 bytes alignment for normal DMA area but use 64 bytes
     alignment for jumbo RX ring where the extended RX descriptor
     size is 64 bytes.
   - For each TX/RX buffers use separate DMA tag(e.g. the size of a
     DMA segment, total size of DMA segments etc).
   - Tigon allows separate DMA area for event producer, RX return
     producer and TX consumer which is really cool feature.  This
     means TX and RX path could be independently run in parallel.
     However ti(4) uses a single driver lock so it's meaningless
     to have separate DMA area for these producer/consumer such that
     this change creates a single status DMA area.
   - It seems Tigon has no limits on DMA address space and I also
     don't see any problem with that but old comments in driver
     indicates there could be issues on descriptors being located in
     64bit region.  Introduce a tunable, dev.ti.%d.dac, to disable
     using 64bit DMA in driver. The default is 0 which means it would
     use full 64bit DMA.  If there are DMA issues, users can disable
     it by setting the tunable to 0.
   - Do not increase watchdog timer in ti_txeof(). Previously driver
     increased the watchdog timer whenever there are queued TX frames.
   - When stat ticks is set to 0, skip processing ti_stats_update(),
     avoiding bus_dmamap_sync(9) and updating if_collisions counter.
   - MTU does not include FCS bytes, replace it with
     ETHER_VLAN_ENCAP_LEN.

  With these changes, ti(4) should work on PAE environments.
  Many thanks to Jay Borkenhagen for remote hardware access.
2012-01-03 23:46:45 +00:00
Pyun YongHyeon 5c36f47912 MFC r227431-227432,227505,227509:
r227431:
  style.
  No functional changes.

r227432:
  Remove dead ifdef.  Driver should always check raised interrupt is
  for the device.

r227505:
  It's bad idea to allocate large memory, 4KB, from stack.
  Pre-allocate the memory in device attach time. While I'm here
  remove unnecessary reassignment of error variable as it was already
  initialized. Also added a missing driver lock in TIIOCSETTRACE
  handler.

r227509:
  Export sysctl node for various interrupt moderation parameters and
  have administrators control them.  ti(4) provides a character
  device to control various other features of driver via ioctls but
  users had to write their own code to manipulate these parameters.
  It seems some default values for these parameters are not optimal
  on today's system but leave it as it was and let administrators
  change them.  The following parameters could be changed:

  dev.ti.%d.rx_coal_ticks
  dev.ti.%d.rx_max_coal_bds
  dev.ti.%d.tx_coal_ticks
  dev.ti.%d.tx_max_coal_bds
  dev.ti.%d.tx_buf_ratio
  dev.ti.%d.stat_ticks

  The interface has to be brought down and up again before a change
  takes effect.

  ti(4) controller supports hardware MAC counters with additional
  DMA statistics.  So it's doable to export these counters via
  sysctl interface.  Unfortunately, these counters are cumulative
  such that driver have to either send an explicit clear command to
  controller after extracting them or have to maintain internal
  counters to get actual changes.  Neither look good to me so
  counters were not exported via sysctl.
2012-01-03 23:39:30 +00:00
Pyun YongHyeon 39904059f8 MFC r227347,227367:
r227347:
  Retire 'options TI_PRIVATE_JUMBOS' and replace local jumbo
  allocator with UMA backed jumbo allocator by default. Previously
  ti(4) used sf_buf(9) interface for jumbo buffers but it was broken
  at this moment such that enabling jumbo frame caused instant panic.
  Due to the nature of sf_buf(9) it heavily relies on VM changes but
  it seems ti(4) was not received much blessing from VM gurus.  I
  don't understand VM magic and implications used in driver either.
  Switching to UMA backed jumbo allocator like other network drivers
  will make jumbo frame work on ti(4).
  While I'm here, fully allocate all RX buffers. This means ti(4) now
  uses 512 RX buffer and 1024 mini RX buffers.

  To use sf_buf(9) interface for jumbo buffers, introduce a new
  'options TI_SF_BUF_JUMBO'. If it is proven that sf_buf(9) is better
  for jumbo buffers, interesting developers can fix the issue in
  future.

  ti(4) still needs more bus_dma(9) cleanups and should use separate
  DMA tag/map for each ring(standard, jumbo, mini, command, event
  etc) but it should work on all platforms except PAE.

  Special thanks to Jay[1] who provided complete remote debugging
  access.

r227367:
  Comment out TI_JUMBO_HDRSPLIT. TI_JUMBO_HDRSPLIT requires TI_SF_BUF_JUMBO.
2012-01-03 21:21:25 +00:00
Pyun YongHyeon b4d1f7ecce MFC r227311-227312,227318-227319,227322-227324:
r227311:
  Remove ti_unit member variable in softc.
  While I'm here use PCIR_BAR macro.

r227312:
   o Remove unnecessary controller reinitialization.
   o Do not blindly UP controller when MTU is changed. Reinitialize
     controller only if driver is running.
   o Remove useless ti_stop() in ti_watchdog() since ti_init_locked()
     always invokes ti_stop().

r227318:
  Track which ring was updated in RX handler and update only modified
  ring. This should reduce unnecessary register accesses.

r227319:
  Mini ring is not available on Tigon 1 so do not create DMA maps for
  mini ring on Tigon 1 to save resources.

r227322:
  Show RX buffer allocation failure and do not blindly send alive
  message to firmware. Probably the correct way for this error is to
  send a TI_CMD_CODE_STACK_DOWN message to firmware and let firmware
  handle the rest.

r227323:
  If ti_chipinit() fails in ti_stop(), ignore the error and release
  all allocated TX/RX buffer resources. If the interface is brought
  to up again after the error, we will leak allocated TX/RX buffers.

r227324:
  Do not allow changing MTU to be less than the minimum.
2012-01-03 20:52:05 +00:00
Pyun YongHyeon 143264b254 MFC r227091-227095,227098-227099:
r227091:
  Make sure to unload loaded DMA area(descriptor, command, event ring).

r227092:
  Paritial merge since IFCAP_LINKSTATE capability is not available
  on stable/7.
  Hide superfluous link up/down message under bootverbose since
  if_link_state_change(9) shows that information.
  While I'm here, change baudrate with the resolved speed of the
  established link instead of blindly setting it 1G. Unfortunately,
  it seems there is no way to differentiate 10/100Mbps from
  non-gigabit link so just assume we established a 100Mbps link if
  current link is not a gigabit link.

r227093:
  Introduce ti_ifmedia_upd_locked() to use in driver initialization
  and add missing driver lock for both ti_ifmedia_upd() and
  ti_ifmedia_sts().

r227094:
  Don't clear upper 4bits from VLAN tag information.  It's
  responsibility of vlan(4) to extract VLAN id from the tag
  information and vlan(4) correctly handles it.

r227095:
  Don't abuse if_hwassist and make sure enabling corresponding TX/RX
  checksum offloading and VLAN hardware tag insertion/stripping from
  the currently enabled hardware offloading capabilities.
  Previously if_hwassist, which was initialized to TX/RX checksum
  offloading, was blindly used to enable both TX and RX checksum
  offloading such that disabling either TX or RX checksum offloading
  was not possible.

  ti(4) controllers support TX/RX checksum offloading with VLAN
  tagging so announce TX/RX checksum offloading capability over VLAN
  to vlan(4).

  Make VLAN hardware tag insertion/stripping honors currently enabled
  interface capability instead of blindly enabling VLAN hardware
  tagging. This change allows disabling hardware support of VLAN tag.

  Because ti(4) supports VLAN oversized frames, make network stack
  know the capability by setting if_hdrlen.

  While I'm here, rewrite SIOCSIFCAP handler and make sure to
  reinitialize controller whenever TX/RX checksum offloading and VLAN
  hardware tagging option is changed.  The requirement of controller
  reinitialization comes from the limitation of Tigon I/II firmware.
  Tigon I/II firmware requires all related RCBs should be
  reinitialized whenever any of its hardware offloading capabilities
  change.

  vlan(4) is also notified whenever the parent interface's capability
  changes such that it can correctly handle TX/RX checksum offloading
  based on parent interface's enabled offloading capabilities.

  RX checksum offloading handler was changed to make upper stack use
  controller computed partial checksum value.  Previously, ti(4) just
  set the computed value for any frames(IPv4, IPv6) and the value was
  not used in upper stack because driver didn't set CSUM_DATA_VALID
  such that upper network stack had to recompute checksum of TCP/UDP
  packets. I have no idea how this was not noticed for a long time.
  With this change, upper network stack does not have to fully
  recompute the checksum such that calculating pseudo checksum based
  on partial checksum is sufficient to know whether received packet's
  checksum is correct or not. However, I don't know why ti(4) does
  not have controller compute pseudo checksum as controller has
  ability to do it. I'm just guessing enabling that feature could
  trigger a firmware bug or could be slower than computing it on host
  side so just leave it as it was.

  In order not to produce false positives, ti(4) now checks whether
  controller actually computed IP or TCP/UDP checksum by checking
  ti_flags field.

r227098:
  Because ti(4) drops a driver lock in RX handler, check whether
  driver is still running before re-enabling interrupts.

r227099:
  Implement altq(4) support.
  While I'm here fix a logic error in r227098 where it didn't
  re-enable interrupts when TX queue is empty.
2012-01-03 20:28:17 +00:00
Pyun YongHyeon 0c7c9615ed MFC r219547:
- Allocate the DMA memory shared between the host and the controller as
    coherent.
  - Constify the ti_devs table.
  - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
2012-01-03 19:22:28 +00:00
Pyun YongHyeon 3512f7c893 MFC r227086-227089:
r227086:
  Use ANSI function definations.

r227087:
  No functional changes.

r227088:
  Make ti(4) build with 'options TI_PRIVATE_JUMBOS'.
  This was broken in r175872.

  We have a UMA backed jumbo allocator and that is much better
  implementation than having a local jumbo buffer allocator in
  driver. This local allocator would be removed in near future but
  fixing build before removal wouldn't be a bad idea.

r227089:
  s/u_intXX_t/uintXX_t/g
2012-01-03 19:01:54 +00:00
Fabien Thomas 27998d850a MFC r228438:
There's a small set of events on Nehalem, that are not supported in
processors with CPUID signature 06_1AH, 06_1EH, and 06_1FH.
2012-01-03 17:19:57 +00:00
Fabien Thomas e1630047b8 MFC r228198:
Update Westmere uncore event exception list.
2012-01-03 17:07:11 +00:00
Pyun YongHyeon 4cd0f8c1e6 MFC r226871-226872:
r226871:
  Add initial BCM5720 support.
  Many thanks to Broadcom for continuing support of FreeBSD.

  Submitted by:		Geans Pin at Broadcom (initial version)
  H/W donated by:	Broadcom

r226872:
  Disable updating InputDiscards counter for BCM5717, BCM5718,
  BCM5719 A0 and BCM5720 A0 and add comment why driver does not try
  to read it.
2012-01-03 01:07:02 +00:00
Pyun YongHyeon 6c68076ebc Recognize BCM5720C PHY.
This is a direct commit to stable/7.
2012-01-03 00:49:12 +00:00
Pyun YongHyeon 5f2e63aa93 MFC r226814-226815,226820-226821,226864,226866-226867:
r226814:
  Rename definition of BGE_SOFTWARE_GENCOMM_* to more readable ones.
  The origin of GENCOMM seems to come from Alteon Tigon Host/NIC
  interface definition where it defines general communications region
  which is active when firmware is loaded and running.  This region
  was used in communication between the host and processor internal
  to the Tigon chip.
  Broadcom data sheet also defines the region as 'Software Gencomm'
  in NetXtreme memory map but lacks detailed description of its
  interface so it was hard to know which ones are used for which
  interface.
  This change shall slightly enhance readability.

  No functional changes.

r226815:
  Define MAC address mail box and use it instead of using
  hard-coded value.

r226820:
  Offset 0x6810 is RX-RISC event register. Rename BGE_CPU_EVENT with
  BGE_RX_CPU_EVENT for readability.
  Additionally define BGE_TX_CPU_EVENT for TX-RSIC event register(BCM570[0-4] only).

r226821:
  SRAM offset 0x0C04 is used by driver to inform the IPMI/ASF firmware
  about the various driver events like load, unload, reset, suspend,
  restart, and ioctl operations.
  Define driver's event rather than using hard-coded values.  We don't
  still send suspend/resume event to firmware.

  Previously bge(4) used BGE_SDI_STATUS to send events. Because driver
  has to access firmware mail box to inform current state, using
  BGE_SDI_STATUS register was wrong. The end result was the same as
  BGE_SDI_STATUS is 0x0C04.

  No functional changes.

r226864:
  Rename BGE_FW_DRV_ALIVE/BGE_FW_PAUSE to BGE_FW_CMD_DRV_ALIVE/BGE_FW_CMD_PAUSE.
  Also add more firmware commands(not used yet).
  No functional changes.

r226866:
  Rename hard-coded value 1 << 14 with BGE_RX_CPU_DRV_EVENT.
  This bit(SW event 7 in publicly available data sheet) is used to
  make RX CPU handle a firmware command and the bit is automatically
  cleared after RX CPU completed the command.
  Generally firmware command takes the following steps.
   1. Write BGE_SRAM_FW_CMD_MB with a command.
   2. Write BGE_SRAM_FW_CMD_LEN_MB with the length of the command in bytes.
   3. Write BGE_SRAM_FW_CMD_DATA_MB with actual command data.
   4. Generate BGE_RX_CPU_EVENT and let firmware handle the command.
   5. Wait for the ACK of the firmware command.

  No functional changes.

r226867:
  Define BGE_FW_HB_TIMEOUT_SEC and remove one more magic value.
  bge(4) sends BGE_FW_CMD_DRV_ALIVE command to firmware every 2
  seconds.  BGE_FW_CMD_DRV_ALIVE command requires 4 bytes data.  This
  data contains timeout value in seconds until the next
  BGE_FW_CMD_DRV_ALIVE command.
  Broadcom recommends driver set the value 3 times longer than the
  interval that it sends BGE_FW_CMD_DRV_ALIVE.  Currently bge(4) uses
  3 seconds so probably we have to increase it in future and use
  different ALIVE command(e.g. BGE_FW_CMD_DRV_ALIVE3).

  No functional changes.
2012-01-03 00:26:11 +00:00
Pyun YongHyeon 61f88a6d00 MFC r226749,226770,226804-226807:
r226749:
  Whitespace nits.

r226770:
  Fix long standing bge_sysctl_debug_info() issues.
   o Protect bge(4) status block access and register dump with driver lock.
   o Add missing bus_dmamap_sync() before dumping status block.
   o Use minimum status block size, 32 bytes, for status block dump on most
     controllers except BCM5700 AX/BX.
  While I'm here, make the handler show 5717 Plus in hardware flags.

r226804:
  Make CPMU handle GPHY power down control on controllers that have
  CPMU capability.

r226805:
  It is known that all Broadcom controllers have 4GB boundary DMA
  bug.  Apply workaround to all controllers.

r226806:
  Broadcom says BCM5755 or higher and BCM5906 have short DMA bug.
  Apply workaround to these controllers.

r226807:
  BCM5719 cannot handle DMA requests for DMA segments that have
  larger than 4KB in size.  However the maximum DMA segment size
  created in DMA tag is 4KB, so we wouldn't encounter the issue here.
  Just record this issue such that let developers not to create a DMA
  segment that is larger than 4KB for BCM5719. It's possible to split
  a DMA segment into multiple smaller ones in run time but I believe
  it's not worth to implement that.
2012-01-03 00:12:06 +00:00
Pyun YongHyeon ecc1ec6683 MFC 226703-226704:
r226703:
  Add ALi/ULi M5261/M5263 to supported hardware chipets.

r226704:
  All dc(4) controllers support VLAN over-sized frame.
  Xr vlan
2012-01-02 23:43:45 +00:00
Pyun YongHyeon 88d43bdbd1 MFC r226701:
Add support for ALi/ULi, now NVIDIA, M5261/M5263 PCI FastEthernet
  controller which is found on ULi M1563 South Bridge & M1689 Bridge.
  These controllers look like a tulip clone.
  M5263 controller does not support MII bitbang so use DC_ROM
  register to access MII registers.  Like other tulip variants, ULi
  controller uses a setup frame to configure RX filter and uses new
  setup frame format.  It's not clear to me whether the controller
  supports a hash based multicast filtering so this patch uses 14
  perfect multicast filter to filter multicast frames.  If number of
  multicast addresses is greater than 14, controller is put into a
  mode that receives all multicast frames.
  Due to lack of access to M5261, this change was not tested with
  M5261 but it probably works.  Many thanks to Marco who provided
  remote access to M5263.

  Tested by:	Marco Steinbach <coco <> executive-computing dot de>,
		Martin MATO <martin.mato <> orange dot fr>
2012-01-02 23:40:09 +00:00
Pyun YongHyeon 4dd6dade51 MFC r226699:
When driver is run for the first time there would be no established
  link such that calling dc_setcfg() right after media change would
  be meaningless unless controller in question is not Davicom DM9102.
  Ideally dc_setcfg() should be called when speed/duplex is resolved
  otherwise it would reprogram controller with wrong speed/duplex
  information.  Because MII status change callback already calls
  dc_setcfg() I think calling dc_setcfg() in dc_init_locked() is
  wrong.  For instance, it would take some time to establish a link
  after mii_mediachg(), so blindly calling dc_setcfg() right after
  mii_mediachg() will always yield wrong media configuration.

  Extend dc_ifmedia_upd() to handle media change and still allow
  21143 and Davidcom controllers program speed/duplex regardless of
  current resolved speed/duplex of link. In theory 21143 may not need
  to call dc_setcfg() right after media change, but leave it as it is
  because there are too many variants to test that change.  Probably
  dc(4) shall need a PHY reset in dc_ifmedia_upd() but it's hard to
  verify correctness of the change.

  This change reliably makes ULi M5263 establish a link.

  While I'm here correctly report media change result. Previously it
  always reported a success.
2012-01-02 23:22:11 +00:00
Glen Barber 20d05783c8 MFC r228885:
r228885:
 - Add missing opening and closing brackets in getopt_long.3 and
   getsubopt.3 to make the examples reflect reality more closely.
2012-01-02 22:26:26 +00:00
Glen Barber c89ec15cf6 MFC r209035, r228823:
r209035 (uqs):
 - Use same table markup as in hexdump.1

r228823:
 - Enclose tabbed content in quotes
2012-01-02 22:19:55 +00:00
Glen Barber 4cdc0aa739 MFC r228419:
r228419:
 - Minor whitespace cleanup to make.conf(5)
2012-01-02 22:12:36 +00:00
Doug Barton 54f58b1164 MFC r228909:
1. Remove a bunch of duplicates. Usually this means removing them from
   fortunes, but occasionally remove them from the other 2 files when
   they are not offensive, or not murphy'ish enough.

   Where the version in fortunes had better attribution and/or formatting,
   copy it over.

2. Fix a few typos

3. Use the full name of François De La Rochefoucauld, fix one of his
   quotes, and remove the duplicate of it.

MFC r228934:

Prefer ASCII apostrophes over Unicode ones like the rest of the file.

MFC r228938:

1. Correct capitalization of the nobility particle for
   Francois de La Rochefoucauld introduced in r228909

2. Change c-cedilla introduced in the same commit to ASCII c since
   non-UTF-8 terminals will choke on the non-ASCII text.
2012-01-01 22:33:55 +00:00
Matthew D Fleming e536c2d962 MFC r228440:
Consistently use types in ixgbe driver code:

 - ixgbe_tso_setup() returns a bool, so declare it bool, not boolean_t.
 - ixgbe_txeof() returns a bool, so declare it bool, not boolean_t.
 - Do not re-define bool if the symbol already exists.

Note this is a partial MFC since ixgbe_tx_ctx_setup() returns more than
TRUE/FALSE on stable/7 and ixgbe_header_split tunable does not exist.
2011-12-31 20:26:05 +00:00
Matthew D Fleming f8cfa4fb55 MFC r228441:
Consistently use types in e1000 driver code:

 - Two struct members eee_disable are used in a function that expects
   an int *, so declare them int, not bool.
 - igb_tx_ctx_setup() returns a boolean value, so declare it bool, not int.
 - igb_header_split is passed to TUNABLE_INT, so delcare it int, not bool.
 - igb_tso_setup() returns a bool, so declare it bool, not boolean_t.
 - Do not re-define bool/true/false if the symbols already exist.
2011-12-31 20:01:09 +00:00
Matthew D Fleming fd7cde1937 MFC r228442:
Do not use the sometimes-reserved word 'bool' for a variable name.
This is a direct commit since the file name has changed.
2011-12-31 18:41:29 +00:00
Bjoern A. Zeeb aa9b786123 MFC r229067 (by obrien):
Happy 2012 to FreeBSD users in Samoa.
2011-12-31 11:43:35 +00:00
Pyun YongHyeon 6b687baf10 MFC r226480-226481:
r226480:
  Add missing driver lock in media status handler.

r226481:
  Make sure to report media change status to caller. Previously it
  always reported success.
2011-12-31 01:33:25 +00:00
Pyun YongHyeon b1edb1d47a MFC r226478:
Close a race where SIOCGIFMEDIA ioctl get inconsistent link status.
  Because driver is accessing a common MII structure in
  mii_pollstat(), updating user supplied structure should be done
  before dropping a driver lock.

  Reported by:	Karim (fodillemlinkarimi <> gmail dot com)
2011-12-31 01:10:29 +00:00
Pyun YongHyeon adec19a208 MFC r226123:
BCE_MISC_ID register of BCM5716 returns the same id of BCM5709 so
  remove explicit checks for BCM5716.
  The BCM5709 and BCM5716 chips are virtually indistinguishable by
  software except for the PCI device ID.  The two chips differ in
  that BCM5709 supports TCP/IP and iSCSI offload in Windows while
  the BCM5716 doesn't.
  While I'm here remove now unused definition of BCE_CHIP_NUM_5716
  and BCE_CHIP_ID_5716_C0.
2011-12-31 00:47:54 +00:00
Jilles Tjoelker 955c8f0295 MFC r227121: make(1): obj dirs are physical paths so write pwd -P
rather than `pwd`.

Regular pwd may return a pathname containing symlinks, but make does not use
such pathnames.
2011-12-30 21:46:30 +00:00
Colin Percival bf5eebf687 Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]
Add an API for alerting internal libc routines to the presence of
"unsafe" paths post-chroot, and use it in ftpd. [11:07]

Fix a buffer overflow in telnetd. [11:08]

Make pam_ssh ignore unpassphrased keys unless the "nullok" option is
specified. [11:09]

Add sanity checking of service names in pam_start. [11:10]

Approved by:    so (cperciva)
Approved by:    re (bz)
Security:       FreeBSD-SA-11:06.bind
Security:       FreeBSD-SA-11:07.chroot
Security:       FreeBSD-SA-11:08.telnetd
Security:       FreeBSD-SA-11:09.pam_ssh
Security:       FreeBSD-SA-11:10.pam
2011-12-23 15:00:37 +00:00
Doug Barton 57cec9dc68 MFC: r179530
- Replace rcsid with __FBSDID.
- Remove paths.h and embed it in the source.
- Remove stale alpha support.
- Clean up compiler warnings and fix style(9) bugs.

Not MFC'ed by:	jkim

MFC: r195339

Add a new options (-s) that, when specified, skips the question about
adjusting the clock to UTC.
That avoids to write on /etc/wall_cmos_clock which is useful in some
cases (example: host user in a jail).

Not MFC'ed by:	attilio

MFC: r198254

When tzsetup is run as non-root and the "CMOS clock question on
UTC" is answered as No, it would abort without properly ending the
dialog session.

Not MFC'ed by:	edwin

MFC: r198267

Instead of having to know which timezone was picked last time, you
now can run "tzsetup -r" which will reinstall the last choice. This
data is recorded in /var/db/zoneinfo.

Not MFC'ed by:	edwin

MFC: r198350

- Add support for chrooted installs.
- Add examples to the man-page.

Not MFC'ed by:	edwin

MFC: r208830

When there is a problem with writing, also bail out.

Not MFC'ed by:	edwin

MFC: r208831

Add comment that this value is unused.
It is obvious that it isn't used, but both clang and Coverity talk about it.

Not MFC'ed by:	edwin

MFC: r209190

Use literal format strings.  Found by clang.

Not MFC'ed by:	emaste

MFC: r210243

Fix support for chrooted installs.

Not MFC'ed by:		nork
While mentored by:	imp

MFC: r220172

Add a menu entry for UTC in the main menu.

Not MFC'ed by:	edwin

MFC: r222139

- add missing options and arguments to program's usage()
  and sync it with manpage's SYNOPSIS

- generally clean up a manpage's formatting

Not MFC'ed by:	ru

MFC: r227011

If the user is moving from any other time zone to UTC we need
to delete any old /var/db/zoneinfo file that may exist so that
tzsetup -r does the right thing.
2011-12-16 23:44:16 +00:00
Dag-Erling Smørgrav bc9d2b5a49 MFH r228384: validate the service name
Security:	some poorly thought out programs allow the user to specify
		the service name; this patch makes it harder to trick these
		programs into loading and executing arbitrary code.
2011-12-13 13:03:11 +00:00
Dag-Erling Smørgrav 30b4e39da0 MFH r227757: check for null passphrases, since openssl doesn't
Security:	prevents users with unencrypted ssh keys (prohibited
		unless the nullok option is specified) from logging in
		by providing a bogus non-null passphrase.
2011-12-11 20:40:23 +00:00
Alan Cox 88f7f00500 MFC r224689
Fix an error in kmem_alloc_attr().  Unless "tries" is updated,
  kmem_alloc_attr() could get stuck in a loop.
2011-12-04 02:13:54 +00:00
Alan Cox e71eab122c MFC r218863
tmpfs_remove() isn't modifying the file's data, so it shouldn't set
  TMPFS_NODE_MODIFIED on the node.

PR:		152488
2011-12-04 01:22:22 +00:00
Alan Cox e40bb73dc0 MFC r226740
Speed up vm_page_cache() and vm_page_remove() by checking for a few
  common cases that can be handled in constant time.
2011-12-03 17:29:38 +00:00
Doug Barton 7e0d5bcd4a MFC r228122:
If using DESTDIR we need to be sure to create a
${DESTDIR}/var/db/zoneinfo
2011-12-01 05:54:22 +00:00
Doug Barton aaa4fa679e MFC r227482:
The default setting, daily_accounting_compress="NO", was causing
only 1 old file to be saved, so fix this.

While I'm here, fix a very old off-by-one error causing 1 more
file than specified in daily_accounting_save to be saved because
acct.0 was not taken into account (pun intended). Change that, and
use a more thorough method of finding old files to delete. Partly
just because this is the right thing to do, but also to silently
fix the extra log that would have been left behind forever with the
previous method.
2011-12-01 05:49:37 +00:00
Marius Strobl b63c1d3d88 MFC: r227960
Increase the CDMA sync timeout for Schizo bridges to 15 seconds as used by
OpenSolaris. One second turned out to be not enough for certain loads while
10 seconds were sufficient.
Reported by: Peter Jeremy
2011-11-29 19:49:11 +00:00
Warren Block 79621b2e41 MFC r225861:
Fix a confusing sentence.
Other wording tweaks.

Approved by:	gjb (mentor)
2011-11-26 16:38:49 +00:00
Marius Strobl ba184e2c41 MFC: r227829, r227844
- Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t'
  and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from
  device drivers.
- Update the device driver examples to use DEVMETHOD_END.

Submitted by:	jhb
2011-11-25 17:08:39 +00:00
Marius Strobl 06ae371e2c MFC: r204602, r204650
- Add missing includes to make example "compilable".
- Use NULL for pointer arguments instead of 0.
2011-11-25 16:54:18 +00:00
Glen Barber 024bd9e85e MFC r227769, 227770, 227771:
- Add a note to src/Makefile that explains that 'rm' runs twice because
  thesecond invocation only needs to operate on files with the immutable
  flag set.

- Fix the note in r227769 to be less specific to the immutable flag.

- Replace 'chflags' with 'file flags' in a comment, since 'chflags'is a
  command, not a flag itself.
2011-11-23 12:24:48 +00:00
Rick Macklem e16cb5b009 MFC: r227059
Both a crash reported on freebsd-current on Oct. 18 under the
subject heading "mtx_lock() of destroyed mutex on NFS" and
PR# 156168 appear to be caused by clnt_dg_destroy() closing
down the socket prematurely. When to close down the socket
is controlled by a reference count (cs_refs), but clnt_dg_create()
checks for sb_upcall being non-NULL to decide if a new socket
is needed. I believe the crashes were caused by the following race:
  clnt_dg_destroy() finds cs_refs == 0 and decides to delete socket
  clnt_dg_destroy() then loses race with clnt_dg_create() for
    acquisition of the SOCKBUF_LOCK()
  clnt_dg_create() finds sb_upcall != NULL and increments cs_refs to 1
  clnt_dg_destroy() then acquires SOCKBUF_LOCK(), sets sb_upcall to
    NULL and destroys socket

This patch fixes the above race by changing clnt_dg_destroy() so
that it acquires SOCKBUF_LOCK() before testing cs_refs.
This is a slightly modified patch for stable/7. It fixes the
above race, although others still exist, since some patches
such as r193272 cannot be MFC'd.

Tested by:	nonesuch at longcount.org (Mark Saad)
PR:		kern/156168
2011-11-22 01:32:57 +00:00
Marius Strobl af76531f46 MFC: r227578
Fix compilation with DEBUG defined.
2011-11-19 13:33:30 +00:00
Marius Strobl 3b6ded4a90 MFC: r227539
Define curthread as an inline function that loads the thread pointer
directly from g7, the pcpu pointer. This guarantees correct behavior
when the thread migrates to a different CPU.
Commit message stolen from r205431. Additional testing by Peter Jeremy.
2011-11-19 13:30:12 +00:00
Doug Barton fb19c7647a MFC r227416:
Document that flock can return ENOLCK
2011-11-18 21:13:43 +00:00
Doug Barton e2ca24de37 MFC r213077:
Simplify how we find the kernel source.

MFC r222218:
expr -> sh arithmetic expansion

MFC r226863:
Fix svnversion for svn 1.7.x by not looking for .svn in ${SYSDIR}
(since it no longer exists). Instead, run svnversion if we can find
the binary and test that the output looks like a version string.
2011-11-18 21:09:03 +00:00
Xin LI bf61e0d6e5 MFC r227409:
Do a dummy read to flush the interrupt ACK that we just performed,
ensuring that everything is really, truly consistent.

This fixes certain cases where one will see various:
  mfi0: COMMAND 0xffffffXXXXXXXXXX TIMEOUT AFTER XX SECONDS

Requested by:	Vincent Hoffman <vince unsane co uk>
2011-11-17 11:16:56 +00:00
Doug Barton 3241bf2140 Upgrade to BIND 9.4-ESV-R5-P1 to address the following DDOS bug:
Recursive name servers are failing with an assertion:
INSIST(! dns_rdataset_isassociated(sigrdataset))

At this time it is not thought that authoritative-only servers
are affected, but information about this bug is evolving rapidly.

Because it may be possible to trigger this bug even on networks
that do not allow untrusted users to access the recursive name
servers (perhaps via specially crafted e-mail messages, and/or
malicious web sites) it is recommended that ALL operators of
recursive name servers upgrade immediately.

For more information see:
https://www.isc.org/software/bind/advisories/cve-2011-tbd
which will be updated as more information becomes available.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4313
2011-11-17 01:10:16 +00:00
Fabien Thomas 83bdb91741 MFC r226514,r226526,r226986:
Add a flush of the current PMC log buffer before displaying the next top.

As the underlying block is 4KB if the PMC throughput is low the measurement
will be reported on the next tick. pmcstat(8) use the modified flush API to
reclaim current buffer before displaying next top.
2011-11-16 16:15:31 +00:00
Fabien Thomas 43ec7b561b MFC r227391:
Import gcc fix for -fstack-protector that produces segfaulting
binaries on arm/armel.

Related gcc bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35965

Author kindly accepted that all of his patches can be use as GPLv2.

PR:	161128
2011-11-16 14:37:47 +00:00
Rick Macklem 42d063cde4 MFC: r224604
Fix a LOR in the NFS client which could cause a deadlock.
This was reported to the mailing list [email protected]
on July 21, 2011 under the subject "LOR with nfsclient sillyrename".
The LOR occurred when nfs_inactive() called vrele(sp->s_dvp)
while holding the vnode lock on the file in s_dvp. This patch
modifies the client so that it performs the vrele(sp->s_dvp)
as a separate task to avoid the LOR. This fix was discussed
with jhb@ and kib@, who both proposed variations of it.
2011-11-16 05:05:13 +00:00
Marius Strobl f47badfb37 Partially disable r227304 as stable/7 doesn't support reporting the maximum
supported transfer size, yet. Reported by: Scott Allendorf
This is a direct commit to stable/7.
2011-11-07 22:34:07 +00:00
Marius Strobl 95d978e102 MFC: r227006, r227281, r227282
Add a PCI front-end to esp(4) allowing it to support AMD Am53C974 and
replace amd(4) with the former in the amd64, i386 and pc98 GENERIC kernel
configuration files. Besides duplicating functionality, amd(4), which
previously also supported the AMD Am53C974, unlike esp(4) is no longer
maintained and has accumulated enough bit rot over time to always cause
a panic during boot as long as at least one target is attached to it
(see PR 124667).

PR:		124667
Obtained from:	NetBSD (based on)
2011-11-07 13:46:16 +00:00
Marius Strobl d08c02eb23 MFC: r226947, r226949, r227284
- Use device_t rather than the NetBSDish struct device.
- Move esp_devclass to ncr53c9x.c in order to allow different bus front-ends
  to use it.
- Use KOBJMETHOD_END.
- Remove the gl_clear_latched_intr hook as it's not needed for any of the
  chips nor the front-ends supported in FreeBSD and likely never will be.
- Correct the DMA constraints and only limit the tag used for the transfer
  buffers to 32-bit DMA as that address is written into a 32-bit register.
- The ESP200 also only supports up to 64k transfers.
- Don't let the DMA and SBus front-end supply a maximum transfer size larger
  than MAXPHYS as that's the maximum the upper layers use and we otherwise
  just waste resources unnecessarily.
- Initialize the ECB callout and don't zero the handle when returning ECBs
  to the free list so that ncr53c9x_callout() actually is called with the
  driver lock held.
- On detach the driver lock should be held across cam_sim_free() according
  to isp(4) and a panic received.
- Check the return value of NCRDMA_SETUP(), i.e. bus_dmamap_load(9), and try
  to handle failures gracefully.
- In ncr53c9x_action() replace N calls to xpt_done() in a switch with just
  one at the end.
- On XPT_PATH_INQ report "NCR" rather than "Sun" as the vendor as the former
  is somewhat more correct as well as the maximum supported transfer size via
  maxio in order to take advantage of controllers that that can handle more
  than DFLTPHYS.
- Freeze the device queue if a request didn't complete without error and
  isn't already frozen.
- Print the number of MESSAGE (EXTENDED) rejected.
- Fix the path encoded in the multiple inclusion protection of ncr53c9xvar.h.
- Correct the DMA constraints used in the LSI64854 core to not exceed the
  maximum supported transfer size and include the boundary so we don't need
  to check on every setup of a DMA transfer.
- Let the bus DMA map callbacks do nothing in case of an error.
- Correctly handle > 64k transfers for FAS366 in the LSI64854. A new feature
  flag NCR_F_LARGEXFER was introduced so we just need to check for this one
  and not for individual controllers supporting large transfers in several
  places.
- Let the LSI64854 core load transfer buffers using BUS_DMA_NOWAIT as the
  NCR53C9x core can't handle EINPROGRESS. Due to lack of bounce buffers
  support, sparc64 doesn't actually use EINPROGRESS and likely never will,
  as an example for writing additional front-ends for the NCR53C9x core it
  makes sense to set BUS_DMA_NOWAIT anyway though.
- Some minor cleanup.
2011-11-07 13:18:09 +00:00
Marius Strobl e64fdac2b3 Automatically compile in mii_bitbang.c if one of the drivers depending on
it since r227279 is compiled into the kernel. This restores POLA for people
that don't use "options miibus" but "options mii" and individual PHY drivers
instead.
This is a direct commit to stable/7.
2011-11-07 11:31:37 +00:00
Marius Strobl d3ecab167c MFC: r226995 (partially), r227042
- Import the common MII bitbang'ing code from NetBSD and convert drivers to
  take advantage of it instead of duplicating it. This reduces the size of
  the i386 GENERIC kernel by about 8k. The only potential in-tree users left
  unconverted are ed(4) and xe(4). Xe(4) generally should be changed to use
  miibus(4) instead of implementing PHY handling on its own, as otherwise it
  makes not much sense to add a dependency on miibus(4)/mii_bitbang(4) to it
  just for the MII bitbang'ing code. Ed(4) has some chip specific things
  interwinded with the MII bitbang'ing code and it's unclear whether it can
  be converted to common code, at least not without thorough testing of all
  the various chips supported by ed(4).
  The common MII bitbang'ing code also is useful in the embedded space for
  using GPIO pins to implement MII access.
- Based on lessons learnt with dc(4) (see r185750), add bus barriers to the
  MII bitbang read and write functions of the other drivers converted in
  order to ensure the intended ordering. Given that register access via an
  index register as well as register bank/window switching is subject to the
  same problem, also add bus barriers to the respective functions of smc(4),
  tl(4) and xl(4).
- Sprinkle some const.

Thanks to the following testers:
Andrew Bliznak (nge(4)), nwhitehorn@ (bm(4)), yongari@ (sis(4) and ste(4))
Thanks to Hans-Joerg Sirtl for supplying hardware to test stge(4).

Reviewed by:	yongari (subset of drivers)
Obtained from:	NetBSD (partially)
2011-11-06 21:11:22 +00:00
Marius Strobl eaf2df1c8e MFC: r227001
Increase the IOC port initialization timeouts by ten times to what the
corresponding Linux driver uses. This allows mpt(4) to still recognize
all good SATA devices in presence of a defective one, which takes about
45 seconds.
In the long term we probably should implement the logic used by mpt2sas(4)
allowing IOC port initialization to complete at a later time.

Submitted by:	Andrew Boyer
2011-11-06 19:57:17 +00:00
Konstantin Belousov a3fccd55ba MFC r227062:
Fix kernel panic when d_fdopen csw method is called for NULL fp.
This may happen when kernel consumer calls VOP_OPEN().
2011-11-06 13:35:55 +00:00
Christian Brueffer 1826a6f56f MFC: r226937
Fix a misplaced parenthesis.
2011-11-06 13:03:59 +00:00
Doug Barton 2fbd7fc2ba MFC r227013:
1. Add a new option, --run-updates, to always or never run the newalises,
   pwd_mkdb, etc. updates at the end of the comparison.

2. Add an update to the end to handle /etc/localtime, if it exists.
   If /var/db/zoneinfo exists, automatically update /etc/localtime,
   which should (hopefully) be safe to do. If not, prompt the user
   to run tzsetup.

3. Update run_it_now(), the function that handles input for the updates,
   to make sure that we got a valid answer, and to handle the --run-updates
   option if supplied.
2011-11-06 08:03:33 +00:00
Doug Barton 0e58ad2e7c MFC r213573:
mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd
2011-11-06 08:01:17 +00:00
Doug Barton 6ab9f89e34 MFC r226927:
Add birth date for Ken Thompson
Add birth and death dates for Steve Jobs
Update birth and add death date for Dennis Ritchie

MFC r226942:
Fix typo from r226927
2011-11-06 07:33:17 +00:00
Doug Barton c36de80618 MFC r226909:
Add a reminder about quarterly status report due dates
2011-11-06 07:26:31 +00:00
Doug Barton 57d21f19ca MFC r226898:
Fix the text and attribution of the poem "Youth" by Samuel Ullman.

Our copy was a bastardization of the "older" (probably original?) and
shorter version of the poem; and the "newer" version that is better
known, and arguably more popular. Standardize on the latter.

Cf. http://www.bartleby.com/73/2099.html
2011-11-06 07:11:27 +00:00
Andriy Gapon 03bb4465eb MFC r225505: dsp_ioctl: fix type of variable used to store ioctl request
PR:		kern/156433
2011-11-05 11:18:46 +00:00
Alexander V. Chernikov 18b8eca692 MFC 213440 (by ru)
Show hostcache statistics in netstat(1).

Submitted by:   Maxim Dounin
Approved by:    ae
Approved by:    ru
2011-11-02 11:05:11 +00:00
Sergey Kandaurov 73564ffa6b MFC r226790:
Fix typo in timer_getoverrun cross-reference.
2011-11-01 16:56:42 +00:00
Edwin Groothuis ab415231db MFC of 226976, tzdata2011n
- Fiji will end DST on 22 January 2012.
- Moldova split into two timezones has been cancelled.
- Cuba will end DST on 13 November 2011

Obtained from:	 ftp://ftp.iana.org/tz/releases/
2011-11-01 02:04:02 +00:00
Marius Strobl b19865eb3b MFC: r226522
Allow to dump on Solaris swap partitions.

PR:		161764
Submitted by:	Peter Jeremy
2011-10-30 12:23:06 +00:00
Marius Strobl e4110378f6 MFC: r199560
- Hook into the existing stat timer to drive the transmit watchdog instead
  of using if_watchdog and if_timer.
- Reorder detach to call ether_ifdetach() before anything else in tl(4)
  and wb(4).
2011-10-30 01:24:56 +00:00
Marius Strobl 7f0b2b04a7 MFC: r199559
- Add a private timer to drive the transmit watchdog instead of using
  if_watchdog and if_timer.
- Fix some issues in detach for sn(4), ste(4), and ti(4).  Primarily this
  means calling ether_ifdetach() before anything else.
2011-10-30 01:13:49 +00:00
Marius Strobl 548c77c36a MFC: r226381
Merge from NetBSD:
- Remove clause 3 and 4 from TNF licenses.
- Fix memset usage.
- Various cleanup.
- Kill caddr_t.
2011-10-29 23:53:58 +00:00
Marius Strobl 769a141157 MFC: r226350
Merge from r225950:

Set the sense residual properly.

Reviewed by:	ken
2011-10-29 23:51:23 +00:00
Marius Strobl c06632c538 MFC: r206534
Whitespace cleanup, in advance of next sync with Adaptec's driver.  No
functional change.
2011-10-29 23:44:30 +00:00
Marius Strobl af4cb0dc0b MFC: r226095
Merge from r225950:

Set the sense residual properly.

Reviewed by:	ken
2011-10-29 23:27:36 +00:00
Pyun YongHyeon 6f326da565 MFC r226695-226696:
r226695:
  Fix a regression introduced in r218832. For TX status check, driver
  should use a TX list DMA tag.

r226696:
  Add missing bus_dmamap_sync() in setup frame transmit.
2011-10-27 16:48:19 +00:00
Colin Percival cd8fd26bc6 MFC r226650: Make freebsd-update work with FreeBSD 9.0. (In the unlikely
event that a 7.5-RELEASE happens, this should simplify upgrading from that
to 9.x.)
2011-10-26 20:07:58 +00:00
Edwin Groothuis f40c7ff3f7 MFC of r226771
Fix breakage in tzsetup:
MD      +4700+02850     Europe/Chisinau most locations
2011-10-26 01:58:13 +00:00
Edwin Groothuis ed313fa48f MFC of 226752, tzdata2011m
Europe:
- Pridnestrovian Moldavian Republic (PMR, also known as
  "Pridnestrovie") has abolished seasonal clock change (no transition
  to the Winter Time).
- The recent change to the Ukranian time zone (Europe/Kiev) to
  introduce permanent daylight saving time (similar to Russia) was
  reverted.

South America:
- Bahia: The President signed a decree that includes Bahia in summer
  time.

zone.tab:
- Add Europe/Tiraspol Pridnestrovie

Obtained from:  ftp://ftp.iana.org/tz/releases/
2011-10-25 21:59:24 +00:00
Christian Brueffer def92c9ffa MFC: r226398, r226442
Move the allocation of usrbufs down a few lines to avoid leaking it
in case of an error.
2011-10-23 18:27:53 +00:00
Mikolaj Golub 32819fbf77 MFC r226403:
In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
keept sending VEOF.

Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:

  echo 1 |script /tmp/script.out cat

PR:		bin/161526
Reported by:	Adrian Wontroba <[email protected]>, Stefan Bethke <[email protected]>
Tested by:	Stefan Bethke <[email protected]>
2011-10-21 05:41:20 +00:00
Sean Bruno 0f392d34bf MFC r224536:
Confirmed behavior of a Cisco 6509 in production.

In the old TFTP server, there was an undocumented behavior where
the block counter would rollover to 0 if a file larger
than 65535 blocks was transferred.  With the default block size
of 512 octets per block, this is a file size of approximately 32 megabytes.

The new TFTP server code would report an error and stop transferring
the file if a file was larger than 65535 blocks.

This patch restores the old TFTP server's behavior to the new
TFTP server code.  If a TFTP client transfers a file larger
than 65535 blocks, and does *not* specify the "rollover" option,
then automatically rollover the block counter to 0 every time
we reach 65535 blocks.

This restores interoperability with the FreeBSD 6 TFTP client.
Without this change, if a FreeBSD 6 TFTP client tried to
retrieve a file larger than 65535 blocks from a FreeBSD 9 TFTP server
, the transfer would fail.
The same file could be retrieved successfully if the same FreeBSD 6
TFTP client was used against a FreeBSD 6 TFTP server.

Approved by:  re (kib)
Tested by: Pawan Gupta <pawang at juniper dot net>,
Obtained from:  Juniper Networks
FreeBSD7 Reviewed by: Yahoo Inc.
2011-10-20 19:23:21 +00:00
David Schultz 1f223b91f7 Belated MFC of log2 and log2f to 7-STABLE by popular demand, along with
other log* improvements.

r175461 - log(3) manpage (partial MFC)
r216210 - add k_log (used by log*)
r216211 - add log2 and log2f
r216247 - log2f style
r216248 - log2f insignificant bug
r219360 - log10 converted to use k_log
r219361 - log10f converted to use k_log
r226375 - log2/log10 style
r226376 - log2/log10 bde's improvements; fix log(1) with FE_DOWNWARD rounding
2011-10-17 05:38:22 +00:00
Christian Brueffer cba5a2bccc MFC: r226117
Add missing va_end() in an error case to clean up after va_start()
(already done in the non-error case).
2011-10-15 13:05:31 +00:00
Christian Brueffer f3f732cf65 MFC: r226116
Add missing va_end() to clean up after va_start().
2011-10-15 12:59:30 +00:00
Xin LI 195d455354 MFC r226082:
Return proper errno when we hit error when doing sanity check.
This fixes dtrace crashes when module is not compiled with CTF
data.

Submitted by:	Paul Ambrose ambrosehua at gmail.com
2011-10-14 22:52:46 +00:00
Gavin Atkinson 8d3abd6855 Merge r222754 from head:
Add another example to mount(8) on using the "-o" argument.

PR:		docs/157389
Submitted by:	Warren Block <wblock wonkity.com>
2011-10-12 20:40:25 +00:00
Edwin Groothuis fbe1895bd5 MFC of tzdata2011l, 226289
Changes in 2011i:

    Africa
    - Added South Sudan: Africa/Juba

    Australasia:
    - Samoa will go forward 24 hours at 30 December 2011 to better match
      the day of the week with its neighbours.

    Europe:
    - Europe/Kaliningrad will have the timezone KALT.

    North America:
    - Updates to Metlakatla historical data
    - Newfoundland, Labrador and Resolute will do something which I
      can't figure out.

    iso3166tab;
    - Add SS for South Sudan.

Changes in 2011j:

    - Samoa will go from 29 December 23:59:59 to 31 December 00:00:00.
    - Samoa DST will end on 1 April 2012

Changes in 2011k:

    - Gaza / West Bank goes back to standard time on 02 August 2011.
    - West Bank went bac kto DST on 30 August 2011.
    - Lots of changes in Minsk (GMT+3 without DST) and other Russian
      regions. A new timezone has been created for them, FET: Further-eastern
      European Time aka GMT+3.
    - Add Asian/Hebron to the zone.tab file.

Changes in 2011l:

    - West Bank came out of DST on 30 September 2011.
    - Fiji will g oin DST on 23 October and out of it on 26 Februari
    - State Bahia might go back to DST in 16 October 2011

    Due to legal problems, ado and Paul Eggert have to temporary suspend
    their work on the timezone database
    (http://thread.gmane.org/gmane.comp.time.tz/4133). Their work has
    been continued by volunteers on the tz community and the hosting
    of the data files is done by Robert Elz at ftp://munnari.oz.au/pub/.

Obtained from:	ftp://munnari.oz.au/pub, ftp://elsie.nci.nih.gov/pub/
2011-10-12 09:17:53 +00:00
Edwin Groothuis 947450e249 MFC of r226283
Updates from Newsletter VI-9 and VI-10:

    Newsletter VI-9 2011-06-12
    Name changes for Fiji and Myanmar as well as other minor corrections

    Newsletter VI-10 2011-08-09
    Code elements for South Sudan.

Obtained from:	http://www.iso.org/iso/country_codes.html
2011-10-12 07:14:52 +00:00
Konstantin Belousov 8d851ea3f2 MFC r226022:
Move parts of the commit log for r166167, where Tor explained the
interaction between vnode locks and vfs_busy(), into comment.
Comment is slightly edited to better fit into RELENG_7 reality.
2011-10-11 14:05:39 +00:00
Christian Brueffer 9c4301e541 MFC: r198357
Check pointer for NULL before dereferencing it, not after.
2011-10-10 18:20:36 +00:00
Christian Brueffer be1b277a01 MFC: r198329
Check pointer for NULL before dereferencing it, not after.
2011-10-10 17:39:58 +00:00
Christian Brueffer 75cb404e01 MFC: r225560
Minor spelling, wording and punctuation fixes in comments.
2011-10-10 12:15:10 +00:00
Glen Barber 60d4e536ed Pull mergeinfo up to the directory. 2011-10-10 11:23:48 +00:00
Glen Barber 36ebb67bca MFC r225858, 225859, 226172:
225858:
 - Document and provide an example for PORTS_MODULES [1]

225859:
 - Whitespace cleanup

226172:
 - Bump date

PR:		161017 [1]
2011-10-10 11:15:57 +00:00
Glen Barber 3996de5db2 MFC 225908, 225912, 225927:
225908:
- Reorder default ps(1) output according to reality.

225912:
- there's no reason the semantics of the -x flag are being explained in
  the -a flag description
- be more precise regarding the relation between the -a flag and the
  security.bsd.see_other_uids sysctl
- describe the format of the -t flag's argument
- 'con' no longer is a possible entry in the 'TT' column
- explain that the 'TT' column refers to pseudo-terminals
  via mere numbers
- add a hint in the 'tt' keyword description that a
  keyword 'tty' exists, which will give the full terminal pathname

225859:
- Correct a typo that was introduced in 225912
2011-10-10 11:12:40 +00:00
Glen Barber fc1aa921a7 MFC r225857:
- Fix a few grammar and mdoc nits in script.1

PR:		161088
2011-10-10 11:07:36 +00:00
Jaakko Heinonen ecb4416185 MFC r219038: Document the input line length limit. 2011-10-07 14:30:45 +00:00
Jaakko Heinonen 814576457b MFC r218411:
- Use LINE_MAX from limits.h as the maximum line length instead of
  BUFSIZ. Use LINE_MAX * 2 as the buffer size (BSIZE).
- Error out if we encounter a line longer than LINE_MAX. The previous
  behavior was to silently split long lines and produce corrupted
  output.

PR:		bin/151384
2011-10-07 14:29:15 +00:00
Jaakko Heinonen 16e8746513 MFC r218410: Handle EOF when skipping lines. 2011-10-07 14:27:20 +00:00
Jung-uk Kim 34c573df2e MFC: r225801
Avoid accidental conflicts with C++ operator keywords.
2011-10-05 15:52:40 +00:00
Colin Percival ae9bcae743 Fix a bug in UNIX socket handling in the linux emulator which was
exposed by the security fix in FreeBSD-SA-11:05.unix.

Approved by:	so (cperciva)
Approved by:	re (kib)
Security:	Related to FreeBSD-SA-11:05.unix, but not actually
		a security fix.
2011-10-04 19:07:38 +00:00
Bjoern A. Zeeb de655c07df MFC r225837:
Pass the fibnum where we need filtering of the message on the
 rtsock allowing routing daemons to filter routing updates on an
 rtsock per FIB.

 Adjust raw_input() and split it into wrapper and a new function
 taking an optional callback argument even though we only have one
 consumer [1] to keep the hackish flags local to rtsock.c.

 PR:            kern/134931
 Submitted by:  multiple (see PR)
 Suggested by:  rwatson [1]
 Reviewed by:   rwatson
2011-10-04 13:19:21 +00:00
Mikolaj Golub 2c003f3fd7 MFC r225809:
When script(1) reads EOF from input it starts spinning on zero-byte
reads eating 100% CPU. Fix this by skipping select on STDIN after
reading EOF -- permanently if STDIN is not terminal and for one second
if it is.

Also after reading EOF from STDIN we have to pass it to the program
being scripted. The previous approach was to write zero bytes into the
pseudo-terminal. This does not work because zero-byte write does not
have any effect on read. Fix this by sending VEOF instead.

Reported by:	Ronald Klop <[email protected]>
Discussed with:	kib, Chris Torek <[email protected]>
2011-10-04 11:10:11 +00:00
Alexander Motin 19212c3b73 MFC r196879:
Add support for changing providers priority.

PR:		kern/160811
2011-09-29 18:42:44 +00:00
Bjoern A. Zeeb 78be76b35b Fix handling of corrupt compress(1)ed data. [11:04]
Add missing length checks on unix socket addresses. [11:05]

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-11:04.compress
Security:	CVE-2011-2895 [11:04]
Security:	FreeBSD-SA-11:05.unix
2011-09-28 08:47:17 +00:00
Jaakko Heinonen 090c0494b7 MFC r225587:
Expose "log" in the default devfs rules. /etc/rc.d/jail creates /dev/log
as a symbolic link.

PR:		conf/160711
2011-09-22 18:21:15 +00:00
Xin LI e128420365 MFC r225452:
Sync pf.os with OpenBSD:

 - Update OpenBSD fingerprints through OpenBSD 4.9
 - Fix typos.

Obtained from:	OpenBSD
2011-09-22 01:13:40 +00:00
Christian Brueffer fb36e0dcf8 MFC: r225533
Improve the sleep_delay sysctl description by specifying which unit
the number is in.
2011-09-20 05:02:48 +00:00
Xin LI 9c162af2a6 MFC r225340:
Fix a bug in ichwd(4) which prevents it from being enabled if the new
timeout is the same timeout.

Submitted by:	Dmitrij Tejblum <tejblum yandex-team.ru>
PR:		kern/139604
2011-09-16 05:57:01 +00:00
Xin LI 851651a017 MFC r225338:
Fix the check in dircheck() on namlen.

The value of namlen is copied from on-disk d_namlen, which is a 8-bit
unsigned integer which can never exceed MAXNAMLEN (255) so the test is
always true.  Moreover, UFS does not allow d_namelen being zero.

Change namlen from u_int to u_int8_t, and replace the unneeded test
with a useful test.

PR:		bin/160339
Submitted by:	Eugene Grosbein <eugen grosbein.pp.ru>
2011-09-16 05:45:13 +00:00
Pyun YongHyeon 653cabf5e4 MFC r225440:
vge(4) hardwares poll media status and generates an interrupt
  whenever the link state is changed.  Using software based polling
  for media status tracking is known to cause MII access failure
  under certain conditions once link is established so vge(4) used to
  rely on link status change interrupt.
  However DEVICE_POLLING completely disables generation of all kind
  of interrupts on vge(4) such that this resulted in not detecting
  link state change event.  This means vge(4) does not correctly
  detect established/lost link with DEVICE_POLLING.  Losing the
  interrupt made vge(4) not to send any packets to peer since vge(4)
  does not try to send any packets when there is no established link.

  Work around the issue by generating link state change interrupt
  with DEVICE_POLLING.

  PR:		kern/160442
2011-09-15 17:22:38 +00:00
Andriy Gapon e09446a00f MFC r209030,209305,209358: In dtrace lexer, do not unput token if it is EOF.
PR:		kern/159064
On behalf of:	kan, marcel
2011-09-15 10:42:55 +00:00
Marius Strobl 99e4ce3e7b MFC: r221407 (partial)
- Let mii_phy_add_media() also announce the support of IFM_NONE.
- Add a PHY-specific reset routine is for lxtphy(4) which disables MII
  interrupts.
- Remove redundant checks in NIC drivers for mii->mii_instance not being
  zero before calling the reset routines because as soon as one PHY driver
  attaches mii->mii_instance is incremented and we hardly can end up in
  their media change callbacks etc if no PHY driver has attached as
  mii_attach() would have failed in that case and not attach a miibus(4)
  instance.
- Convert the mebers of the MII data structure to unsigned where
  appropriate. This is partly inspired by NetBSD/OpenBSD.
- Add MIIF_NOMANPAUSE and mii_phy_flowstatus() calls to drivers that
  weren't explicitly converted to support flow control before. It's
  unclear whether flow control actually works with these but typically
  it should and their net behavior should be more correct with these
  changes in place than without if the MAC driver sets MIIF_DOPAUSE.

Obtained from:	NetBSD (partially)
2011-09-11 20:25:57 +00:00
Xin LI 67d344f18a MFC r225446:
Fix SSL memory handlig for (EC)DH cipher suites, in particular for
multi-threaded use of ECDH.

Security:	CVE-2011-3210
Reviewed by:	stas
Obtained from:	OpenSSL CVS
2011-09-08 16:22:58 +00:00
Marius Strobl 98474722a5 MFC: r225334
Fix alignment assumptions.

PR:		160289
2011-09-05 17:45:24 +00:00
Marius Strobl 02e9122c5a MFC: r198136
Support the specification of a range of destination ports e.g.

	netsend 127.0.0.1 6666-7777 [payloadsize] [packet_rate] [duration]
2011-09-05 12:39:15 +00:00
Marius Strobl 18d75efc56 MFC: r198132
A small change to avoid calling gettimeofday() too often (hardwired to once
every 20us at most).
2011-09-05 12:36:11 +00:00
Sergey Kandaurov 6dc53f8ebe MFC r225330:
Cosmetic cleanup: remove unused #define LIBMEMSTAT
2011-09-05 07:59:23 +00:00
Christian Brueffer f2508e64e3 MFC: r225228
Remove broken link to supported wifi cards. There doesn't appear to
be an equivalent list anywhere else.
2011-09-04 14:30:22 +00:00
Christian Brueffer 578e4298e3 MFC: r225215
Fix memory leak in error cases.
2011-09-03 21:28:26 +00:00
Marius Strobl 9168c5427c MFC: r225229
Since r221218 rman_manage_region(9) actually honors rm_start and rm_end
which may cause problems when these contain garbage so zero the range
descriptors embedding the rmans when allocating them.
2011-09-02 16:18:06 +00:00
Dag-Erling Smørgrav 64e566ea99 I have a box running 702103 that needed a new btxld. 2011-08-31 16:54:05 +00:00
Andrey V. Elsukov 57a8804e1c MFC r225104:
Fix lock leak.

  Reported by:	Alex Lyashkov
2011-08-31 06:48:00 +00:00
Glen Barber 17e53cff23 MFC 225142:
Reword sentence noting UPDATING entries prior to October 2007[1] are
only available in older FreeBSD releases.

PR:		159220

[1] - October 2007 is specific to HEAD.  In stable/8 and stable/7,
the correct year is 2004, so that change is reflected here as well.
2011-08-31 01:18:23 +00:00
Pyun YongHyeon d5ce8e705b MFC r225088:
Disable PHY hibernation until I get more detailed hibernation
  programming secret.  The PHY would go into sleep state when it
  detects no established link and it will re-establish link when the
  cable is plugged in.  Previously it failed to re-establish link
  when the cable is plugged in such that it required to manually down
  and up the interface again to make it work.  This came from
  incorrectly programmed hibernation parameters.  According to
  Atheros, each PHY chip requires different configuration for
  hibernation and different vendor has different settings for the
  same chip.
  Disabling hibernation may consume more power but establishing link
  looks more important than saving power.
  Special thanks to Atheros for giving me instructions that disable
  hibernation.

  PR:	kern/148772
2011-08-30 17:21:55 +00:00
Dmitry Morozovsky 6fd70c3f9c MFC r225122:
Add kern.cam.boot_delay description (with reasonable default) to
 default/loader.conf

 This should help people installing ${OS} to USB devices, where there are
 frequently cases where kernel tries to mount root before actual umass sensing
 is finished.

Reviewed by:	mav
Approved by:	kib
2011-08-30 11:49:22 +00:00
Martin Matuska 37ff343c96 Fix buffer overflow and possible ISO image corruption in wrong
handling of "." character case in makefs ISO level 1 and 2 filename
conversion.

Filed as NetBSD PR #45285
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45285

Reviewed by:	Christos Zoulas <[email protected]>
2011-08-29 20:00:57 +00:00
Marius Strobl 9a9a737ddd MFC: r225015
Revert r224157 (MFC'ed to stable/7 in r224402), re-enabling r222135 (MFC'ed
to stable/7 in r222372). The underlying problem keeping the latter from
working as expected was fixed in r225014 (MFC'ed to stable/7 in r225117).
2011-08-23 14:37:42 +00:00
Marius Strobl 8b0f0b8982 MFC: r225014
r221812 (MFC'ed to stable/7 in r222160) reveals that at least some Broadcom
PHYs default to being not only isolated but also powered down after a reset
and while they just work fine [sic] when both is the case they don't if they
are only deisolate but still powered down. So in order to put PHYs in an
overall normal operation mode for the common case, ensure in mii_phy_reset()
that they are not powered down after a reset. Unfortunately, this only helps
in case of BCM5421, while BCM5709S apparently only work when they remain
isolated and powered down after a reset. So don't call mii_phy_reset() in
brgphy_reset() and implement the reset locally leaving the problematic bits
alone. Effectively this bypasses r221812 for brgphy(4).
Thanks to Justin Hibbits for doing a binary search in order to identify
the problematic commit.

PR:		157405, 158156
Reviewed by:	yongari (mii_phy_reset() part)
2011-08-23 14:32:59 +00:00
Marius Strobl aff0c65ce4 MFC: r223688
Add detection for the Marvel 88E1149R and treat it just like the
88E1149.
2011-08-23 14:01:04 +00:00
John Baldwin e7513ad50b MFC 224495:
Properly initialize an error variable to avoid returning uninitialized
data when 'show drives' succeeds, often resulting in a failing exit code
even though the command worked fine.
2011-08-22 18:58:08 +00:00
John Baldwin c9af54e83e MFC 224898: Add device id for the Moxa CP-112UL dual-port serial adapters. 2011-08-22 18:46:23 +00:00
John Baldwin 29b8064057 MFC 224986:
One of the general principles of the sysctl(3) API is that a user can
query the needed size for a sysctl result by passing in a NULL old
pointer and a valid oldsize.  The kern.proc.args sysctl handler broke
this assumption by not calling SYSCTL_OUT() if the old pointer was NULL.
2011-08-22 18:41:55 +00:00
Jilles Tjoelker 556960ad8d MFC r224865: tail: Fix crash if -F'ed file's filesystem disappears.
If tail notices that a file it is following no longer exists (because stat()
fails), it will output any final lines and then close the file. If the read
operation also causes an error, such as when the filesystem is forcefully
unmounted, it closes the file as well, leading to fclose(NULL) and a
segmentation fault.

PR:		bin/159750
2011-08-21 22:09:30 +00:00
Jaakko Heinonen 6a32c4bddc MFC r208717:
Don't try to call cdevsw d_close() method when devfs_close() is called
because of insmntque1() failure.
2011-08-20 15:21:02 +00:00
Andriy Gapon 930c0f296a MFC r224527: smp_rendezvous: master cpu should wait until all slaves are
fully done
2011-08-20 12:08:53 +00:00
Yoshihiro Takahashi 7e1535271f MFC: revision 224780
Allow to build a release for stable/[78] on a current box and vise versa.
2011-08-19 12:08:54 +00:00
Daniel Eischen 50841d6411 MFC r218627
Allow SO_SETFIB to select/set the default routing table.

Requested by: Andrew Boyer aboyer at averesystems dot com.
2011-08-17 14:29:33 +00:00
Konstantin Belousov c90b38602a MFC r224743:
Do not update mountpoint generation counter to the value which was not
yet acted upon by devfs_populate().
2011-08-16 09:06:44 +00:00
Pyun YongHyeon 260b890b38 MFC r224506:
Add new device id of D-Link DGE-530T Rev. C controller.  DGE-503T
  Rev A1 and B1 is supported by sk(4) but the DGE-530T Rev. C
  controller is re-branded RealTek 8169 controller.

  PR:	kern/159116
2011-08-15 17:10:23 +00:00
Marius Strobl e8135aab42 MFC: r221466, r221494 (partial), r224652
Change several archs to use makefs (from base) instead of mkisofs (from
ports) which makes release CD generation both faster and self-hosting.
2011-08-13 13:18:54 +00:00
Marius Strobl 90904ac1fd MFC: r224762
Sync makefs(8) ISO 9660 support with NetBSD:
o cd9960 -> cd9660
o Move inclusion of sys/endian.h from cd9660_eltorito.c to cd9660.h
  since actual user is not cd9660_eltorito.c but iso.h and
  cd9660_eltorito.h.

  Actually, include order/place of sys/endian.h doesn't matter on
  netbsd since it is always included by sys/types.h but it's not
  true on other system.  This should fix cross build breakage on
  freebsd introduced by rev. 1.16 of cd9660_eltorito.c.
  Problem reported and fix suggested on twitter.
o Fix fd leaks in error cases. Found by cppcheck.
o RRIP RE length should be 4, not 0
o Apply fixes for PR bin/44114 (makefs(8) -t cd9660 -o rockridge creates
  corrupted cd9660fs), iso9660_rrip.c part:
  - cd9660_rrip_finalize_node() should check rr_real_parent in node->parent,
    not in node itself in RRIP_PL case
  - cd9660_rrip_initialize_node() should update only node passed as arg
    so handle RRIP_PL in DOTDOT case

  Fixes malformed dotdot entries in deep (more than 8 level) directories
  moved into .rr_moved dir.

  Should be pulled up to netbsd-5.
  (no official ISO has such deep dirs, but cobalt restorecd is affected)

Reviewed by:	mm
Obtained from:	NetBSD
2011-08-13 13:15:38 +00:00
Marius Strobl ddc86ecacb MFC: r224687
Compile fbsd-threads.c. Amongst others this is necessary for a working
kgdb(1).

PR:		158719
Reviewed by:	marcel
2011-08-13 13:09:46 +00:00
Marius Strobl 17e1ba5325 MFC: r224686
Implement functions necessary for compiling fbsd-threads.c.

Reviewed by:	marcel
2011-08-13 12:57:51 +00:00
Marius Strobl f2755d7541 MFC: r224685
Implement

Reviewed by:	marcel
2011-08-13 12:50:39 +00:00
Marius Strobl d21a00593c MFC: r224684
Use the size of struct fpreg rather than of the pointer to it when copying
the FPU state.

Reviewed by:	marcel
2011-08-13 12:49:02 +00:00
Marius Strobl 76dbf98168 MFC: r224683, r224693
The tid member of struct pthread actually is long so read it as such.
Accessing it as an int causes failure on big-endian LP64, i.e. mips64be,
powerpc64 and sparc64.

Reviewed by:	marcel
2011-08-13 12:47:10 +00:00
Marius Strobl d2eeac91e6 MFC: r224682 (partial)
- Merge from r147740:
  When the last, possibly partially filled buffer is flushed, we didn't
  reset fragsz to 0 and as such would stop reflecting reality.
- Use __FBSDID.
2011-08-13 12:43:35 +00:00
Marius Strobl 74b206f255 MFC: r224494, r224761
- Send the RELSIM_ADJUST_OPENINGS in response to a MPI_EVENT_QUEUE_FULL using
  the right SIM in case the HBA is RAID-capable but the target in question is
  not a hot spare or member of a RAID volume.
- Report the loss and addition of SAS and SATA targets detected via PHY link
  status changes and signalled by MPI_EVENT_SAS_DEVICE_STATUS_CHANGE to cam(4)
  as lost devices and trigger rescans as appropriate. Without this it can take
  quite some time until a lost device actually is no longer tried to be used,
  if it ever stops. [1]
- Handle MPI_EVENT_IR2, MPI_EVENT_LOG_ENTRY_ADDED, MPI_EVENT_SAS_DISCOVERY
  and MPI_EVENT_SAS_PHY_LINK_STATUS silently as these serve no additional
  purpose beyond adding cryptic entries to logs.
- Add a warning for MPI_EVENT_SAS_DISCOVERY_ERROR events, which can help
  identifying broken disks. [2]

Thanks to Hans-Joerg Sirtl for providing one of the HBAs these changes were
developed with and RIP to the mainboard that didn't survive testing them.

PR:		157534 [1]
Submitted by:	Andrew Boyer [2]
2011-08-13 12:37:23 +00:00
Marius Strobl a4454621ec MFC: r224493
- Staticize functions as appropriate and comment out unused ones.
- Sprinkle some const where appropriate.
- Consistently use target_id_t for the target parameter of mpt_map_physdisk()
  and mpt_is_raid_volume().
- Fix some whitespace bugs.
2011-08-13 12:33:41 +00:00
Marius Strobl 60558e8681 MFC: r223985
- For SAS but neither FC nor SPI controllers default to using MSI/MSI-X
  (still allowing their use to be disabled via device hints though). This
  matches what the corresponding Linux driver provided by LSI does. Tested
  with SAS1064.
- There's no need to keep track of the RIDs used.
- Don't allocate MSI/MSI-X as RF_SHAREABLE.
- Remove a comment which no longer applies since r209599 (MFC'ed to stable/7
  in r224332).
- Assign NULL rather than 0 to pointers.
2011-08-13 12:29:50 +00:00
Doug Barton cb11ccd4be MFC r224726:
Make clear that the -U option can be dangerous.

In -p mode install the group file with the same permissions as normally
done in etc/Makefile.

Update the copyright.
2011-08-12 21:41:20 +00:00
Jaakko Heinonen 44dc234f21 MFC r216047 by kevlo:
Fix fd leak in get_font

MFC r222568:

Don't try to close the stream if fopen(3) fails.

PR:		bin/155349
2011-08-11 15:22:46 +00:00
Martin Matuska 49ae4ce01a Remove svn:mergeinfo from files under usr.sbin/makefs
This is a direct commit to stable/7
2011-08-10 08:34:00 +00:00
Martin Matuska 8acc0ae07d MFC r224690:
Fix NetBSD PR bin/44114:
makefs with -t cd9660 -o rockridge against directories with
deep structure creates a corrupted cd9660 image.

http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44114

Fix NetBSD PR bin/45217:
makefs creates ISO9660 images that violate the ECMA-119 (ISO9660)
specification. This is caused by erroneously writing 32 bytes
with value 0x20 to the volume_set_id field and 128 bytes with value 0x20
to the the following 37-byte fields in the PVD:
copyright_file_id, abstract_file_id, bibliographic_file_id

This causes, among other unwanted results the reserved4 field to be
overwritten with the value 0x20. To comply with the specification,
this field muse be zero. As a result, all FreeBSD distribution
ISO images created with makefs have not been 100% valid ISO9660 files.

http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45217

Reviewed by:	kientzle
Obtained from:	NetBSD
2011-08-10 08:28:37 +00:00
Doug Barton 36b232bc47 MFC r224673:
Put information about supported-but-deprecated headers in comments
2011-08-09 20:54:00 +00:00
Doug Barton 30744b1dd6 MFC r208027:
mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.
2011-08-09 20:52:12 +00:00
Doug Barton 9b903a3bc7 MFC r224672:
Fix a silly typo on my part.
2011-08-09 20:07:16 +00:00
Doug Barton d9e17b171c MFC r209031:
mdoc nitpicking: the title argument shall be uppercase
2011-08-09 20:02:43 +00:00
Ed Maste be397c1c80 MFC r224047:
Remove note that claims pthread_set_name_np is for debugging only.

  As Garrett points out,
    It is no more a debugging interface than setproctitle(3), and has not
    been since the name started getting stuffed into the kernel. This
    statement may have made sense when the name was only visible in thread
    state dumps and the debugger.

PR: threads/158815
2011-08-08 13:58:39 +00:00
Sergey Kandaurov b8e623af04 MFC r224571:
Add missing MODULE_VERSION() definition.

PR:		kern/159345
2011-08-08 12:19:20 +00:00
Martin Matuska 62d749b3df MFC r224523, r224524:
MFC r224523:
Fix invalid assertion of C++ external static data member declarations
as anonymous namespaces are local to the current translation.

MFC r224524:
Fix accidential dos-style endings to unix-style line endings
from last commit (r224523) to match the version approved by re@

GCC PR:		c++/33094

Reviewed by:	uqs
Obtained from:	gcc (branches/redhat/gcc-4_1-branch, rev. 129554, GPLv2)
2011-08-06 07:01:16 +00:00
Glen Barber f4ff7858e1 Provide a more user friendly URL to the IETF site 2011-08-06 00:45:33 +00:00
Glen Barber cedc99e8c8 Provide a more user friendly URL to the IETF site 2011-08-06 00:44:29 +00:00
Andrey V. Elsukov 001eff7e0f MFC r223753:
ARP code reuses mbuf from ARP request to make a reply, but it does not
  reset rcvif to NULL. Since rcvif is not NULL, ipfw(4) supposes that ARP
  replies were received on specified interface.
  Reset rcvif to NULL for ARP replies to fix this issue.

  PR:           kern/131817
2011-08-03 04:28:16 +00:00
Doug Barton 6228ebcce7 Update for version 9.4-ESV-R5 2011-08-02 09:43:27 +00:00
Doug Barton 29306aed90 Update to version 9.4-ESV-R5 which contains various bug fixes
and improvements

See RELEASE-NOTES-BIND-9.4-ESV.* for details

This is expected to be the final release of the BIND 9.4 branch
2011-08-02 09:42:58 +00:00
Doug Barton 613b2dd8f2 Non-functional changes related to version 9.4-ESV-R5
(format of time stamp in CVS $Id, copyright updates)
2011-08-02 07:55:50 +00:00
Dmitry Morozovsky 977339dd61 MFC r224140:
Correct small typo in a do{}while(0)

Approved by:    kib
2011-07-31 08:53:59 +00:00
Andriy Gapon 8afe602fa3 MFC r223663: add SNDCTL_DSP_HALT specified by OSS
PR:		kern/156874
2011-07-29 22:11:05 +00:00
Alexander Motin ee07d3a920 MFC r224250:
Fix `diskinfo -t` operation for disks smaller then 8GB or bigger then 2TB.
Tested to work with 1.44MB floppy, 4GB USB stick and 4TB disk array.
2011-07-29 10:51:56 +00:00
Marius Strobl 96db30dff0 MFC: r223228
Merge from r161730:
o  Set TP using inline assembly to avoid dead code elimination.
o  Eliminate _tcb.

Merge from r161840:
Stylize: avoid using a global register variable.

Merge from r157461:
Simplify _get_curthread() and _tcb_ctor because libc and rtld now
already allocate thread pointer space in tls block for initial thread.

Merge from r177853:
Replace function _umtx_op with _umtx_op_err, the later function directly
returns errno, because errno can be mucked by user's signal handler and
most of pthread api heavily depends on errno to be correct, this change
should improve stability of the thread library.
2011-07-27 11:21:50 +00:00
Glen Barber e132039525 MFC 224286:
Document the potential for jail escape.

PR:		142341
2011-07-27 01:57:24 +00:00
Glen Barber 989d98aa9f MFC 223773:
- General grammar and mdoc(7) fixes.
- While here, remove a paragraph about userspace operation
  that has been outdated for some time.

PR:		158623
2011-07-26 19:05:59 +00:00
Jaakko Heinonen bb27ec2ade MFC r222216:
In init_dynamic_kenv(), ignore environment strings exceeding the
KENV_MNAMELEN + 1 + KENV_MVALLEN + 1 length limit to avoid buffer
overflow in getenv(). Currenly loader(8) doesn't limit the length of
environment strings.

PR:		kern/132104
2011-07-26 18:59:38 +00:00
Glen Barber fb00e5ce9e MFC 202386, 224284:
202386 (by ru):
Use the newly brought %U macro.

224284:
Fix various broken links in manual pages.

PR:		159130 159131 159132 159133
PR:		159134 159135 159144
2011-07-26 17:39:40 +00:00
Glen Barber 04a1656b39 MFC 224284:
Fix various broken links in manual pages.

PR:		159136
2011-07-26 17:16:55 +00:00
Glen Barber ffe6a6015c MFC 224284:
Fix various broken links in manual pages.

PR:		159137
2011-07-26 17:10:25 +00:00
Glen Barber ace2ec79e8 MFC 202386, 224284:
202386 (by ru):
Use the newly brought %U macro.

224284:
Fix various broken links in manual pages.

PR:		159138
2011-07-26 17:02:53 +00:00
Jaakko Heinonen 0221b5b1be MFC r219925:
Recognize "ro", "rdonly", "norw", "rw" and "noro" as equal options in
vfs_equalopts(). This allows vfs_sanitizeopts() to filter redundant
occurrences of these options. It was possible that for example both "ro"
and "rw" options became active concurrently.

PR:		kern/133614

MFC r220040:

Fix some style issues in r219925.
2011-07-26 16:14:57 +00:00
Marius Strobl 75973de725 MFC: r214921, r219954, r219956, r221387, r221470, r221536, r222191
- Sync with the latest version from NetBSD. It notably addds ISO9660 support.
- Add support for synthesizing an APM partition map to map Mac PowerPC
  bootstrap partitions from the ISO9660 boot catalog. This preserves OS X's
  ability to mount the CD, while allowing us a way to provide HFS-ified
  bootstrap code for Open Firmware.
- Add analogs to the -chrp-boot and -prep-boot options to mkisofs.
2011-07-26 14:41:54 +00:00
Marius Strobl 40284bb3b9 MFC: r210933 (partial)
Fix typos and spelling mistakes.
2011-07-26 14:03:52 +00:00
Marius Strobl 5713a7bd8e MFC: r203059
Correct copy-paste typo from previous option description.
2011-07-26 13:58:09 +00:00
Marius Strobl 132224c578 MFC: r220389, r220392
- Mark getc() as inline, this has no effect on gcc but helps clang.
- Move getc() body before xgetc() so gcc does not emit a warning about function
  having no body.

Approved by:    jhb
2011-07-26 13:29:11 +00:00
Marius Strobl 6263fae071 MFC: r219452
Some more shrinking.

   o    bunch of variables are turned into uint8_t

   o    initial setting of namep[] in lookup() is removed
        as it's only overwritten a few lines down

   o    kname is explicitly initialized in main() as BSS
        in boot2 is not zeroed

   o    the setting and reading of "fmt" in load() is removed

   o    buf in printf() is made static to save space

Reviewed by:    jhb
Tested by:      me and Fabian Keil <freebsd-listen fabiankeil de>
2011-07-26 13:26:51 +00:00
Marius Strobl d25f2783c8 MFC: r219186
This patch shrinks boot2 a little.

o    It switches kname to be just a pointer instead of an array
     thus avoiding a couple of memcpy()s.

o    It changes ioctl to unsigned from uint8_t.

o    It changes the second keyhit limit to 3 seconds from 5
     so that constant propagation can take place.

o    It changes the ticks overflow computation as suggested by bde@.

o    It removes bi_basemem/bi_extmem/bi_memsizes_valid setting from
     bootinfo as it is unused.

Reviewed by: jhb
2011-07-26 13:24:52 +00:00
Marius Strobl acf06d239a MFC: r218926
In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable
from uint16_t back to uint32_t.  The actual option bitmasks (RB_* and
RBX_*) assume at least a 32 bit variable.

Submitted by:	rdivacky
2011-07-26 13:23:26 +00:00
Marius Strobl 2eac6819a8 MFC: r218745
Remove reading of symbols from a.out loaded files.  Since we are tight
on space for clang and a.out support is only needed for /boot/loader,
they are excess bytes that serve no useful purpose other than to
support really old kernels (FreeBSD < 3.2 or so).  Prefer clang
support over support for these old kernels and remove this code.  We
gain about 100 bytes of space this way.

Reviewed by:	rdivacky@
2011-07-26 13:22:13 +00:00
Marius Strobl 6c7d91bfa1 MFC: r214210
Avoid using memcpy() for copying 32bit chunks. This shrinks
the resulting code a little.

Approved by:    rpaulo (mentor)
Reviewed by:    jhb
2011-07-26 13:19:57 +00:00
Marius Strobl e6b27077c9 MFC: r220685
MFi386: revisions 220389 and 220392

  - Mark getc() as inline, this has no effect on gcc but helps clang.
  - Move getc() body before xgetc() so gcc does not emit a warning about
    function having no body.
2011-07-26 13:13:31 +00:00
Marius Strobl 576154c4d2 MFC: r219960
MFi386: the part of 219452

  - bunch of variables are turned into uint8_t.
  - the setting and reading of "fmt" in load() is removed.
  - buf in printf() is made static to save space.
2011-07-26 13:12:08 +00:00
Marius Strobl a9a88df095 MFC: r219225
MFi386: revision 219186

  This patch shrinks boot2 a little.

  o    It switches kname to be just a pointer instead of an array.
  o    It changes ioctl to unsigned from uint8_t.
  o    It changes the second keyhit limit to 3 seconds from 5.
  o    It removes bi_basemem/bi_extmem/bi_memsizes_valid setting.
2011-07-26 13:06:20 +00:00
Marius Strobl 0dab6568ee MFC: r218842
MFi386: revision 218745

  Remove reading of symbols from a.out loaded files.
2011-07-26 13:04:48 +00:00
Marius Strobl 139493306d MFC: r218737, r218946
MFi386: revision 218713

  Apply a few small optimizations to boot2's code, to make it shrink a
  little further.
2011-07-26 13:01:14 +00:00
Marius Strobl dde283c279 MFC: r214257
MFi386: revision 214210

  Avoid using memcpy() for copying 32bit chunks. This shrinks
  the resulting code a little.
2011-07-26 12:58:29 +00:00
Marius Strobl 7ca2bb0a14 MFC: r212064, r212098
Use a cleaner expression to retrieve the memory size in pc98's boot2.c,
which also avoids NULL pointer arithmetic, as suggested by jhb.  The
available space goes from 11 bytes to 7.

Reviewed by:	nyan
Approved by:	rpaulo (mentor)
2011-07-26 12:57:22 +00:00
Marius Strobl d92984e276 MFC: r223938
Since r219452 the alignment of __dmadat has changed, revealing that fsread()
bogusly casts its contents around causing alignment faults on sparc64 and
most likely also on at least powerpc. Fix this by copying the contents
bytewise instead as partly already done here. Solving this the right way
costs some space, i.e. 148 bytes with GCC and 16 bytes with clang on x86
there are still some bytes left there though, and an acceptable hack which
tricks the compiler into only using a 2-byte alignment instead of the native
one when accessing the contents turned out to even take up more space that.
2011-07-25 23:01:08 +00:00
Marius Strobl 0d4ea792db MFC: r218713, r218716
Apply a few small optimizations to boot2's code, to make it shrink a
little further.  This gets us further on the way to be able to build it
successfully with clang.  Using in-tree gcc, this shrinks boot2.bin with
60 bytes, the in-tree clang shaves off 72 bytes, and ToT clang 84 bytes.

Submitted by:	rdivacky
Reviewed by:	imp
2011-07-25 21:41:46 +00:00
Marius Strobl 77eebe2393 MFC: r211747
Replace structure assignments with explicity memcpy calls. This allows
Clang to compile this file: it was using the builtin memcpy and we want
to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet).

Submitted by:	Dimitry Andric <dimitry at andric.com>
Reviewed by:	jhb
2011-07-25 21:39:09 +00:00
Marius Strobl f3b74a5a92 MFC: r192972 (partial)
Some of the boot loader code only works on a ufs file system, but it
uses the generic struct dirent, which happens to look identical to UFS's
struct direct.  If BSD ever changes dirent then this will be a problem.

Submitted by:	matthew dot fleming at isilon dot com
2011-07-25 21:37:52 +00:00
Pyun YongHyeon 036ebdfa49 MFC r224157:
Revert r222135 by allowing controller reinitialization.  Due to
  unknown reason Apple UniNorth2 gem(4) device required manual
  interface down/up operation after r222135.  Even though this is not
  correct thing and I don't like to revert it but it would be better
  than breaking gem(4) on PPC.  This should be revisited.

  PR:	kern/157405
2011-07-25 20:13:35 +00:00
Marius Strobl 4c601d3f61 MFC: r223986
- Expand the scope of the lock in the interrupt routine to close races with
  checking IFF_DRV_RUNNING and simplify the code. This also involves holding
  the driver lock in the rx_ch callout.
- Just use ifp instead of sc->sc_ifp.

Submitted by:	jhb (mostly)
2011-07-25 19:13:51 +00:00
Marius Strobl e1dd6318c7 MFC: r223984
PCIB_ALLOC_MSIX() may already fail on the first pass, f.e. when the PCI-PCI
bridge is blacklisted. In that case just return from pci_alloc_msix_method(),
otherwise we continue without a single MSI-X resource, causing subsequent
attempts to use the seemingly available resource to fail or when booting
verbose to NULL-dereference rle->start when trying to print the IRQ in
pci_alloc_msix_method().

Reviewed by:	jhb
2011-07-25 19:11:29 +00:00
Marius Strobl b6dba2dfc9 MFC: r223981
Remove extra empty lines.
2011-07-25 19:06:30 +00:00
Marius Strobl b6b571c8b8 MFC: r223962
Remove NULL assignments which are redundant for static timecounters.

Submitted by:	jkim
2011-07-25 19:04:57 +00:00
Marius Strobl bcda6653e3 MFC: r223961
- Remove redundant timecounter masking from counter_get_timecount().
- Zero the timecounter when allocation so we don't need to initialize unused
  members and remove a now redundant NULL assignment.

Submitted by:	jkim
2011-07-25 19:03:50 +00:00
Marius Strobl 3f514683d1 MFC: r223960
- Current testing shows that (ab)using the JBC performance counter in bus
  cycle mode as timecounter just works fine. My best guess is that a firmware
  update has fixed this, so check at run-time whether it advances and use a
  positive quality if it does. The latter will cause this timecounter to be
  used instead of the tick counter based one, which just sucks for SMP.
- Remove a redundant NULL assignment from the timecounter initialization.
2011-07-25 19:01:35 +00:00
Marius Strobl a432f50d86 MFC: r223959
- Add a missing shift in schizo_get_timecount(). This happened to be non-fatal
  as STX_CTRL_PERF_CNT_CNT0_SHIFT actually is zero, if we were using the
  second counter in the upper 32 bits this would be required though as the MI
  timecounter code doesn't support 64-bit counters/counter registers.
- Remove a redundant NULL assignment from the timecounter initialization.
2011-07-25 18:59:43 +00:00
Marius Strobl e6d29d126c MFC: r223944
According to the OpenSolaris source the PCI latency and the cache line size
should be set for Sun ERI.
Tested by:	yongari
2011-07-25 18:57:50 +00:00
Marius Strobl 77b8ad4bc4 MFC: r223801
It can be useful to know which page still has mappings.
2011-07-25 18:54:29 +00:00
Marius Strobl d13d85e395 MFC: r223800
- pmap_cache_remove() and pmap_protect_tte() are only used within pmap.c
  so static'ize them.
- Correct a typo.
2011-07-25 18:53:23 +00:00
Marius Strobl 7126f52bf8 MFC: r223795
Call pmap_qremove() before freeing or unwiring the pages, otherwise
there's a window during which a page can be re-used before its previous
mapping is removed.

Reviewed by:	alc
2011-07-25 18:46:56 +00:00
Marius Strobl 076bfa3895 MFC: r223721
UltraSPARC-IV CPUs seem to be affected by a not publicly documented
erratum causing them to trigger stray vector interrupts accompanied by a
state in which they even fault on locked TLB entries. Just retrying the
instruction in that case gets the CPU back on track though. OpenSolaris
also just ignores a certain number of stray vector interrupts.
While at it, implement the stray vector interrupt handling for SPARC64-VI
which use these for indicating uncorrectable errors in interrupt packets.
2011-07-25 18:44:46 +00:00
Marius Strobl 3dbf5441c6 MFC: r223720
Don't waste a delay slot.
2011-07-25 18:43:24 +00:00
Marius Strobl 2fd718a191 MFC: r223719
- For Cheetah- and Zeus-class CPUs don't flush all unlocked entries from
  the TLBs in order to get rid of the user mappings but instead traverse
  them an flush only the latter like we also do for the Spitfire-class.
  Also flushing the unlocked kernel entries can cause instant faults which
  when called from within cpu_switch() are handled with the scheduler lock
  held which in turn can cause timeouts on the acquisition of the lock by
  other CPUs. This was easily seen with a 16-core V890 but occasionally
  also happened with 2-way machines.
  While at it, move the SPARC64-V support code entirely to zeus.c. This
  causes a little bit of duplication but is less confusing than partially
  using Cheetah-class bits for these.
- For SPARC64-V ensure that 4-Mbyte page entries are stored in the 1024-
  entry, 2-way set associative TLB.
- In {d,i}tlb_get_data_sun4u() turn off the interrupts in order to ensure
  that ASI_{D,I}TLB_DATA_ACCESS_REG actually are read twice back-to-back.

Tested by:      Peter Jeremy (16-core US-IV), Michael Moll (2-way SPARC64-V)
2011-07-25 18:42:45 +00:00
Marius Strobl 70576b1da2 MFC: r223718
Using .comm to declare intrnames and eintrnames causes binutils 2.17.50 to
merge the two.
2011-07-25 18:34:42 +00:00
Marius Strobl 712175d688 MFC: r223648, r223949
- In gem_reset_rx() also reset the RX MAC which is necessary in order to
  get it out of a stuck condition that can be caused by GEM_MAC_RX_OVERFLOW.
- In gem_reset_rxdma() call gem_setladrf() in order to reprogram the RX
  filter and restore the previous content of GEM_MAC_RX_CONFIG. While at it
  consistently use the newly introduced sc_mac_rxcfg throughout the driver
  instead of reading the its old content.
- Increment if_iqdrops instead of if_ierrors in case of RX buffer allocation
  failure.
- According to the GEM datasheet the RX MAC should also be disabled in
  gem_setladrf() before changing its configuration.
- Add error messages to gem_disable_{r,t}x() and take advantage of these
  throughout the driver instead of duplicating their functionality all over
  the place.

In joint forces with:	yongari
2011-07-25 18:32:54 +00:00
Marius Strobl b1220958bb MFC: r223379
Fix whitespace
2011-07-25 18:29:35 +00:00
Marius Strobl 8aba800b76 MFC: r223347
As astopgap minimize the sched_lock coverage in pmap_activate() in order
to reduce lock contention.
2011-07-25 18:25:30 +00:00
Marius Strobl c8272d2ecf MFC: r223235
- As with stray vector interrupts limit the reporting of stray level
  interrupts. Bringup on additional machine models repeatedly reveals
  firmware that enables interrupts behind our back, causing the console
  to be flooded otherwise.
- As with the regular interrupt counters using uint16_t instead of
  u_long for counting the stray vector interrupts should be more than
  sufficient.
- Cache the interrupt vector in intr_stray_vector().
2011-07-25 18:24:17 +00:00
Marius Strobl f69ac634d3 MFC: r223126 (partial)
Don't include curcpu in the mask which is used as the IPI cookie as we
have to ignore it when sending the IPI anyway. Actually I can't think of
a good reason why this ever was done that way in the first place as it's
not even usefull for debugging.
2011-07-25 18:17:12 +00:00
Marius Strobl 82bcd448ff MFC: r222840
- For the case when tl1_align(_trap) is used to call rsf_fatal via
  RSF_FATAL we need to switch to alternate globals for KSTACK_CHECK just
  like tl1_data_excptn(_trap) does. This is more or less cosmetic because
  in case RSF_FATAL is called we're already heading south.
- Correct an END().
- Read the window state from the correct register for a CATR().
2011-07-25 17:56:06 +00:00
Marius Strobl aa39159e0b MFC: r222828 (partial)
- Test KTR_CPUMASK against pc_cpuid rather than pc_mid to match what the C
  version does.
- Initialize global registers early in the MP startup code so PCPU can be
  used.
2011-07-25 17:54:05 +00:00
Marius Strobl 83a8702f66 MFC: r221960
Recognize the SAB 82532 found in Fujitsu PRIMEPOWER650 and 900.
2011-07-25 17:37:54 +00:00
Marius Strobl dc462803e0 MFC: r221958
Recognize the eeprom device found in Fujitsu PRIMEPOWER650 and 900.
2011-07-25 17:32:22 +00:00
Marius Strobl 0e9f6a15fe MFC: r221957
Add support for MK48T37.
2011-07-25 17:31:09 +00:00
Marius Strobl 53678b00e2 MFC: r221955
- Add 10baseT as an alias for 10baseT/UTP.
- Add shorthand aliases for common media+option combinations as announced
  by miibus(4) so that one can actually supply the media strings found in
  the dmesg output to ifconfig(8).

Obtained from:	NetBSD (in principle)
2011-07-25 17:20:33 +00:00
Marius Strobl 10b6f044e1 MFC: r221954
When setting media always and not just in case of switching to IFM_AUTO
clear the options of the current media, i.e. only inherit the instance,
which matches what NetBSD does. Without this it's really non-intuitive
that the following sequence:
	ifconfig bge0 media 1000baseT mediaopt full-duplex
	ifconfig bge0 media 100baseTX
results in 100baseTX full-duplex to be set or that:
	ifconfig bge0 media autoselect mediaopt flowcontrol
	ifconfig bge0 media 1000baseT mediaopt full-duplex
tries to set 1000baseT full-duplex with flowcontrol, which isn't suported
und thus fails while the following:
	ifconfig re0 media 1000baseT mediaopt flowcontrol,full-duplex
	ifconfig re0 media autoselect
just switches to autoselection without flowcontrol.
2011-07-25 17:18:47 +00:00
Marius Strobl e8c8a6e392 MFC: r221344
Correct spelling in comments.

Submitted by:	brucec
2011-07-25 17:14:55 +00:00
Marius Strobl 8ef395f7e9 MFC: r220951
Correct spelling in comments.

Submitted by:	brucec
2011-07-25 17:12:55 +00:00
Marius Strobl e44405a693 MFC: r220945
Correct spelling.

Submitted by:	brucec
2011-07-25 17:01:14 +00:00
Marius Strobl 79483b2714 MFC: r219335
- Allocate the DMA memory shared between the host and the controller as
  coherent.
- Add some missing bus_dmamap_sync() calls. This includes putting such
  calls before calling reply handlers instead of calling bus_dmamap_sync()
  for the request queue from individual reply handlers as these handlers
  generally read back updates by the controller.

Tested on amd64 and sparc64.
2011-07-25 16:59:41 +00:00
Marius Strobl 946736f02e MFC: r195274
Change explicit maximium numbers to the defined macro MPT_MAX_LUNS.
2011-07-25 16:54:31 +00:00
Marius Strobl 8c8db7d9e1 MFC: r209599 (partial), r209960:
r209960 | marius

  - Make the maxsize parameter of the data buffer DMA tag match maxio, which
    was missed in r209599.
    Reported and tested by: Michael Moll
  - Declare mpt_dma_buf_alloc() static just like mpt_dma_buf_free(), both are
    used in mpt.c only.

  Reviewed by:    ken
  MFC after:      r209599

r209599 | ken

  Change the mpt driver to allow larger I/O sizes.

  The mpt driver previously didn't report a 'maxio' size to CAM, and so the
  da(4) driver limited I/O sizes to DFLTPHYS (64K) by default.  The number
  of scatter gather segments allowed, as reported to busdma, was
  (128K / PAGE_SIZE) + 1, or 33 on architectures with 4K pages.

  Change things around so that we wait until we've determined how many
  segments the adapter can support before creating the busdma tag used for
  buffers, so we can potentially support more S/G segments and therefore
  larger I/O sizes.

  Also, fix some things that were broken about the module unload path.  It
  still gets hung up inside CAM, though.

  mpt.c:	Move some busdma initialization calls in here, and call
		them just after we've gotten the IOCFacts, and know how
		many S/G segments this adapter can support.

  mpt.h:	Add max_cam_seg_cnt.

  mpt_cam.c:	Fix the locking in mpt_cam_detach().

  mpt_pci.c:	Pull some busdma initialization and teardown out and put
		it in mpt.c.  We now delay it until we know many scatter
		gather segments the adapter can support, and therefore
		how to setup our busdma tags.

  mpt_raid.c:	Make sure we wake up the right wait channel to get the
		raid thread to wake up when we're trying to shut it down.

  Reviewed by:	gibbs, mjacob
  MFC after:	2 weeks
2011-07-25 16:45:12 +00:00
Marius Strobl 3e2ba3bc2b MFC: r203484
Do not release device, when changing number of openings.
2011-07-25 16:24:27 +00:00
Marius Strobl a7be453462 MFC: r210943
Figure which is the IO and MEM bars- do not assume that they are in
a fixed order.

PR:		149220
Obtained from:	John Baldwin
2011-07-25 16:20:02 +00:00
Marius Strobl 9820936eff MFC: r207543
Print IR_RESYNC updates informatively.

Obtained from:	pluknet
2011-07-25 16:14:36 +00:00
Marius Strobl 93a26a2fec MFC: r198262
Use callout_init_mtx on FreeBSD versions recent enough. This closes
the race where interrupt thread can complete the request for which
timeout has fired and while mpt_timeout has blocked on mpt_lock.
2011-07-25 16:11:52 +00:00
Marius Strobl da267f62d1 MFC: r220944, r220950
- Correct spelling. [1]
- Remove variables which are unused besides initialization. [2]

Submitted by:	brucec, N.J. Mann [1], Christoph Mallon [2]
2011-07-25 15:10:53 +00:00
Marius Strobl bfe1e06aaf MFC: r220943
Correct spelling in a comment.

Submitted by:	brucec
2011-07-25 15:05:37 +00:00
Marius Strobl b7a09e4a22 MFC: r220941
Correct spelling in comments.

Submitted by:	brucec
2011-07-25 15:01:40 +00:00
Marius Strobl 0fb9fe88ad MFC: r220940
Correct spelling in comments.

Submitted by:	brucec
2011-07-25 14:46:24 +00:00
Marius Strobl 40d9c36b02 MFC: r220939
Correct spelling in comments.

Submitted by:	brucec
2011-07-25 14:45:13 +00:00
Marius Strobl 6247b7e16c MFC: r220938
Correct spelling in comments.

Submitted by:	brucec
2011-07-25 14:44:00 +00:00
Marius Strobl 1187b42d76 MFC: r219782
On Serengeti-class machines the OFW root isn't the parent of the CPU
nodes.
2011-07-25 14:34:30 +00:00
Marius Strobl 3f8972c5af MFC: r216016
Define VM_KMEM_SIZE_MAX on sparc64. Otherwise kernel built with
DEBUG_MEMGUARD panics early in kmeminit() with the message
"kmem_suballoc: bad status return of 1" because of zero "size" argument
passed to kmem_suballoc() due to "vm_kmem_size_max" being zero.

The problem also exists on ia64.
2011-07-25 14:33:37 +00:00
Doug Barton c3e3a2170d MFC r197728:
Add OpenVPN IANA assigned port number.
2011-07-24 23:44:16 +00:00
Doug Barton 6ad9414e85 MFC r224125:
Commemorate the release of RFC 6303 by updating the comments regarding
our default empty zones.  No functional changes.
2011-07-22 21:45:28 +00:00
Doug Barton 8b6cabed9c MFC r224124:
Pick up the 2011-06-08 update to this file, the addition of an IPv6
address for D.
2011-07-22 21:43:23 +00:00
Doug Barton 46c29335aa MFC r224122:
Fix the location of the default pid file in named.8
2011-07-22 21:41:09 +00:00
Glen Barber 78fff821c3 MFC 216823, 223991, 223992:
216823 (by pjd):
- For compatibility with Linux and Solaris add poweroff(8).
  It is implemented as a hard link to shutdown(8) and it is equivalent
  of:

        # shutdown -p now

  While I'm here put one line of usage into one line of C code so it
  is easier to grep(1) and separate unrelated code with empty line.

223991:
- Improvements to the shutdown(8) manual.

223992:
- Remove trailing whitespace in the shutdown(8) manual.

Approved by:		delphij
2011-07-22 00:58:09 +00:00
Andrew Gallatin 2d8868f043 MFC r223958:
Update mxge(4) firmware to the latest version available from
  Myricom (1.4.53a).
2011-07-20 21:18:05 +00:00
Andrew Gallatin 58dc16647c MFC r223957: Fix media reporting for dual port CX4 myri10ge NICs 2011-07-20 20:24:40 +00:00
Tai-hwa Liang 902f1c5790 MFC r223035: Using statfs.f_fstypename rather than statfs.f_type whilst
performing fstype comparsion as nullfs will copy f_type from underlayer FS.

PR:		bin/156258
Submitted by:	Marcin Wisnicki <[email protected]>
2011-07-19 03:30:42 +00:00
John Baldwin 339cf820de MFC 222530,223841:
Add a new option to toggle the display of the system idle process (per-CPU
idle threads).  The process is displayed by default (subject to whether or
not system processes are displayed) to preserve existing behavior.  The
system idle process can be hidden via the '-z' command line argument or the
'z' key while top is running.  When it is hidden, top more closely matches
the behavior of FreeBSD <= 4.x where idle time was not accounted to any
process.
2011-07-18 18:37:15 +00:00
Matthew D Fleming 060120ec5c MFC r223875, r223876:
style(9) and cleanup fixes.

Add an option to have a fail point term only execute when run by a
specified pid.  This is helpful for automated testing involving a global
knob that would otherwise be executed by many other threads.
2011-07-18 18:09:10 +00:00
John Baldwin 65b18625de MFC 223870,223937:
- Note that -a, -C, -H, -j, and -z are also toggles.
- Add a leading space to the status messages output after toggling the
  'C' and 'H' flags at runtime.  This matches messages output for other
  toggles which leave the first column in the message blank to hold the
  cursor.
2011-07-14 19:25:42 +00:00
Sean Bruno 7d7b217fe8 MFC r222541, r222464, r222466
Modify the umount(8) command so that it doesn't do
a sync(2) syscall before unmount(2) for the "-f" case.
This avoids a forced dismount from getting stuck for
an NFS mountpoint in sync() when the server is not
responsive. With this commit, forced dismounts should
normally work for the NFS clients, but can take up to
about 1minute to complete.

Add a check for MNTK_UNMOUNTF at the beginning of nfs_sync()
in the old NFS client so that a forced dismount doesn't
get stuck in the VFS_SYNC() call that happens before
VFS_UNMOUNT() in dounmount(). Analagous to r222329 for the new NFS client.
An additional change is needed before forced dismounts will work.

Add a sentence to the umount.8 man page to clarify the behaviour
for forced dismount when used on an NFS mount point. Requested by
Jeremy Chadwick.
This is a content change
2011-07-13 17:09:15 +00:00
Andrey V. Elsukov 2dfe91e7ca MFC r223661:
Improve error reporting. Use corresponding error message when file to be
  preprocessed is missing. Also suggest to use absolute pathname if -p
  option is specified.

  PR:             bin/156653
2011-07-13 04:30:16 +00:00
David E. O'Brien a0b3d944f9 MFC:
+ r223940 (as r223969): If one's message is longer than the buffer size,
then we reset 'cnt' at the wrong point and the actual column # get out of
sync across the buffer size.
+ r175346: Handle wrapping correctly when \r appears in the input,
and don't remove the \r from the output.  For lines longer than 79
characters, don't drop every 80th character.
2011-07-12 23:48:57 +00:00
John Baldwin d3661e16a0 MFC 182966:
Display the sum of the runtime of all the threads in a process when it's
multithreaded instead of picking the time of the first thread found.
2011-07-12 14:28:13 +00:00
Pyun YongHyeon 6f394ee5a4 MFC r223683:
Document two known hardware errata which requires manual link
  configuration.

  Submitted by:	Aries Lee (arieslee <> jmicron com)
2011-07-10 22:09:53 +00:00
Andrey V. Elsukov 4abbec575a MFC r222808 (except SCTP support):
Sync ng_nat with recent (r222806) ipfw_nat changes:

    Make a behaviour of the libalias based in-kernel NAT a bit closer to
    how natd(8) does work. natd(8) drops packets only when libalias returns
    PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat
    always did drop packets that were not aliased, even if they should
    not be aliased and just are going through.
2011-07-07 09:51:31 +00:00
Andrey V. Elsukov 36901420b6 MFC r222806:
Make a behaviour of the libalias based in-kernel NAT a bit closer to
  how natd(8) does work. natd(8) drops packets only when libalias returns
  PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat
  always did drop packets that were not aliased, even if they should
  not be aliased and just are going through.

  PR:		kern/122109, kern/129093, kern/157379
  Submitted by:	Alexander V. Chernikov (previous version)
2011-07-07 09:42:32 +00:00
Andrey V. Elsukov bc937b9836 MFC r222582:
O_FORWARD_IP is only action which depends from the result of lookup of
  dynamic rules. We are doing forwarding in the following cases:
   o For the simple ipfw fwd rule, e.g.

        fwd 10.0.0.1 ip from any to any out xmit em0
        fwd 127.0.0.1,3128 tcp from any to any 80 in recv em1

   o For the dynamic fwd rule, e.g.

        fwd 192.168.0.1 tcp from any to 10.0.0.3 3333 setup keep-state

          When this rule triggers it creates a dynamic rule, but this
        dynamic rule should forward packets only in forward direction.

   o And the last case that does not work before - simple fwd rule which
   triggers when some dynamic rule is already executed.

  PR:           kern/136695, kern/147720, kern/150798
2011-07-06 06:57:07 +00:00
Pyun YongHyeon 3a41f614b8 MFC r223610:
Enable CPUSaver D102 E-step microcode loading for 82551 revision
  0x10.
2011-07-05 23:31:40 +00:00
Pyun YongHyeon 6a34cf919c MFC r223608:
Disable microcode loading for 82550 and 82550C controllers. Loading
  the microcode caused SCB timeouts. Linux driver does not allow
  microcode loading for these controllers and jfv also confirmed that
  there is no need to do and it shouldn't.

  PR:				kern/103332
  Additional confirmation from:	jfv
2011-07-05 23:18:28 +00:00
Jonathan Anderson 0e0a95d68f Merge r223505 from HEAD to stable/7:
--
Tidy up a capabilities-related comment.

This commit refers to an #ifdef that hasn't been merged [yet?]; remove it.

Approved by: rwatson
--
2011-07-05 14:58:10 +00:00
Sergey Kandaurov 1d7d8df388 MFC r223644:
Run load_rc_config early to fix quota knobs expansion.

PR:		conf/157687
2011-07-05 10:37:17 +00:00
Jaakko Heinonen ff8f009685 MFC r222825: Remove a gratuitous newline.
PR:		bin/153667
2011-07-03 07:16:59 +00:00
Pyun YongHyeon 50f65d2dab MFC r223405:
Remove link state change callback handler.  There is no need to
  register both status change and link state change callbacks.
  Implement checking valid link in state change callback and poll
  active link state in vr_tick().  This allows immediate detection of
  lost link as well as protecting driver from frequent link flips during
  link renegotiation.  taskq implementation was removed because driver
  now needs to poll link state in vr_tick().
  While I'm here do not report current link state if interface is not
  running.

  Tested by:	n_hibma
2011-06-29 17:20:10 +00:00
Dimitry Andric acbecca7ed MFC r223579:
For some reason, contrib/traceroute/traceroute.c ensures MAXHOSTNAMELEN
is defined, but then proceeds to use a hardcoded maximum hostname length
of 64 anyway.  Fix this by checking against MAXHOSTNAMELEN instead.

PR:	bin/157732
2011-06-29 16:46:12 +00:00
Edwin Groothuis 347f23e030 Get ISO3166 in sync with head.
MFC of recent updates on the ISO3166 file:

r223633
- Remove AN again now that tzdata2011h has been imported.

r222094
- Put AN back after finding out that tzsetup(1) will complain that
  it doesn't exist. It will be removed again once the tzdata distribution
  files have been updated with the replacements for AN.

r222014
- Revert change to "MF" I made in r189767.  I bet that at the time of r189767
  I checked with http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm
  and "MF" was officially spelled in English as "Saint Martin" there, but now
  that "SX" exists (for "Sint Maarten (Dutch part)") (nice official "English"
  spelling!) they seem to have added a "(French part)" suffix to "MF".  Since
  this is also in line with Newsletter VI-1 (2007-09-21), catch up.

r222011
- ISO3166: Update for newsletters VI-7 and VI-8 from 2010
  - Name change for SH
  - BQ, CW, and SX replace AN

  Reviewed by:	ru

r222010
- Whitespace and typo fixes.

  Found by:	codespell
  Reviewed by:	ru

r198948
- Revert the spelling of Taiwan to be politically neutral in accordance
  with the policy published at http://www.freebsd.org/internal/i18n.html.

  Requested by:	core (murray)

r197392
- List newsletters VI-2, VI-3 and VI-4 that were already applied.
- Apply newsletters VI-5 (BO's name change) and VI-6 (VE's name change).

r191347
- Back out my previous change

r191197
- Change Taiwan, Province of China to Taiwan, Republic of China

r189767
- Switch to using official English short country names.

r174241
- Update with data from Newsletter VI-1 2007-09-21:
    Added SAINT BARTHELEMY (BL) and SAINT MARTIN (MF).
  This allows an MFV of src/share/zoneinfo which uses these two new codes.
2011-06-28 11:01:11 +00:00
Edwin Groothuis f93f73d65c MFC of tzdata2011h, r223629
- Russia scraps DST in 2011
- Remove Netherlands Antilles, add Bonaire, Curacao, Sint Maarten
2011-06-28 10:29:18 +00:00
Andrey V. Elsukov 8bcae50039 MFC r223364:
When user specifies the bootcode with size smaller than VTOC_BOOTSIZE,
  gpart_write_partcode_vtoc8 does access out of range of allocated memory.
  Check size of bootcode before writing it.

  Pointed out by:	ru
2011-06-28 05:04:31 +00:00
Bjoern A. Zeeb bddf102e89 MFC r223267:
Add 'show logstate' to usage().

MFC r223345:

 Add global -d and -e options to either print device numbers
 (usually default) or enclosure:slot information as (Exx:Sxx)
 or both.

 Discussed with:	jhb
 Reviewed by:		jhb
Sponsored by:		Sandvine Incorporated
2011-06-27 11:13:58 +00:00
Bjoern A. Zeeb 82901fff43 MFC r223223:
gre(4) was using a field in the softc to detect possible recursion.
 On MP systems this is not a usable solution anymore and could easily
 lead to false positives triggering enough logging that even  using
 the console was no longer usable (multiple parallel ping -f can do).

 Switch to the suggested solution of using mbuf tags to carry per
 packet state between gre_output() invocations.  Contrary to the
 proposed solution modelled after gif(4) only allocate one mbuf tag
 per packet rather than per packet and per gre_output() pass through.

 As the sysctl to control the possible valid (gre in gre) nestings does
 no sanity checks, make sure to always allocate space in the mbuf tag
 for at least one, and at most 255 possible gre interfaces to detect
 loops in addition to the counter.

 Submitted by:	Cristian KLEIN (cristi net.utcluj.ro) (original version)
PR:		kern/114714
 Reviewed by:	Cristian KLEIN (cristi net.utcluj.ro)
 Reviewed bu:	Wooseog Choi (ben_choi hotmail.com)
Sponsored by:	Sandvine Incorporated
2011-06-27 11:11:19 +00:00
Doug Barton d8ade02449 MFC r223310:
Add the netwait rc.d script. It waits for the specified period for the
network to become active.

MFC r223311, r2233408:

The script itself, and a minor fix to it.
2011-06-25 23:14:49 +00:00
Doug Barton 6b455fbe3f MFC r223264:
Add rc.d/kld to load kernel modules after local disks are up.
2011-06-25 23:09:25 +00:00
Doug Barton 9832c5886d MFC r211094:
"whereis netscape" gives empty output for quite a long time already.
  Suggest to use "whereis firefox" instead.

MFC r212168:
  fix the move so that it matches what the rest of the internet
  says about this game...  This move also makes more sense...

MFC r213287
  Add advice to new fathers from Thomas Ptacek.

MFC r221908
  fortune(6): fix typos and misspellings.

  While here, drop words in the spelling files that are no longer used
  anywhere.

  Speling errors found via:	codespell from Lucas De Marchi

MFC r221909
  Convert a file to UTF-8. This only changes a character in the
  copyright section and will not require UTF-8 for fortune(6).

MFC r222890
  Minor typo, fix 2 attributions
2011-06-25 22:36:41 +00:00
Xin LI eb8a1d8396 MFC less v444. 2011-06-23 00:36:49 +00:00
Andriy Gapon 7174fa0841 MFC r222805: amdsbwd: update to support SB8xx southbridges
PR:		kern/157568
2011-06-22 06:58:42 +00:00
Pyun YongHyeon 3824ce885f MFC r222232:
Add 88E8075 Yukon Supreme to the list of supported hardware list.
2011-06-22 01:57:45 +00:00
Pyun YongHyeon 0e296002b9 MFC r222269:
style(9)
2011-06-22 01:55:47 +00:00
Pyun YongHyeon afb9eb3ad5 MFC r222230:
Add initial support for Marvell 88E8055/88E8075 Yukon Supreme.
2011-06-22 01:48:41 +00:00
Pyun YongHyeon e914a98d5e MFC r222219,222221,222223,222226-222227,222231,222516:
Merge all relevant changes from HEAD to fix long standing
  instability issues of msk(4).  To get desired effect of this
  merge, cold restarting is required because incorrectly programmed
  registers are not reset to default value.
  PR:	kern/114631, kern/116853, kern/139093, kern/144206,
	kern/147824, kern/151169, kern/154591, kern/155636,
	kern/156493

r222219:
  Do not blindly clear entire GPHY control register. It seems some
  bits of the register is used for other purposes such that clearing
  these bits resulted in unexpected results such as corrupted RX
  frames or missing LE status updates.  For old controllers like
  Yukon EC it had no effect but it caused all kind of troubles on
  Yukon Supreme.
  This change shall improve stability of controllers like Yukon
  Ultra, Ultra2, Extreme, Optima and Supreme.

r222221:
  Rework store and forward configuration of TX MAC FIFO. Basically it
  enables store and forward mode except for jumbo frame on Yukon
  Ultra.

r222223:
  Do not configure RAM registers for controllers that do not have
  them.  These registers are defined only for Yukon XL, Yukon EC and
  Yukon FE.

r222226:
  Make sure to enable all clocks before accessing registers.
  Releasing PHY from power down/COMA is done after enabling all
  clocks. While I'm here remove unnecessary controller reset.

r222227:
  Do not touch ASF related register for controllers that do not have
  these registers. Also disable Watchdog of ASF microcontroller.

r222231:
  When MTU is changed, check whether driver should be reinitialized or
  not.  If reinitialized is required, clear driver running flag.

r222516:
  Correctly check MAC running status before disabling TX/RX MACs.
2011-06-22 01:44:09 +00:00
Pyun YongHyeon 5c848ec1c4 MFC r205091,216860:
r205091:
  Implement Rx checksum offloading for Yukon EC, Yukon Ultra,
  Yukon FE and Yukon Ultra2. These controllers provide very simple
  checksum computation mechanism and it requires additional pseudo
  header checksum computation in upper stack. Even though I couldn't
  see much performance difference with/without Rx checksum offloading
  it may help notebook based controllers.

  Actually controller can compute two checksum value by giving
  different starting position of checksum computation on received
  frame. However, for long time, Marvell's checksum offloading engine
  have been known to have several silicon bugs so don't blindly trust
  computed partial checksum value. Instead, compute partial checksum
  twice by giving the same checksum computation position and compare
  the result. If the value is different it's clear indication of
  hardware bug. This configuration lose IP checksum offloading
  capability but I think it's better to take safe route.
  Note, Rx checksum offloading for Yukon XL was still disabled due to
  known silicon bug.

r216860:
  Fix endianness bug introduced in r205091.
  After controller updates control word in a RX LE, driver converts
  it to host byte order. The checksum value in the control word is
  stored in big endian form by controller. r205091 didn't account for
  the host byte order conversion such that the checksum value was
  incorrectly interpreted on big endian architectures which in turn
  made all TCP/UDP frames dropped. Make RX checksum offload work
  on any architectures by swapping the checksum value.

  Reported by:	Sreekanth M. ( kanthms <> netlogicmicro dot com )
  Tested by:	Sreekanth M. ( kanthms <> netlogicmicro dot com )
2011-06-22 00:49:24 +00:00
Pyun YongHyeon 927ceee8fa MFC r222542:
If driver is not running, disable interrupts and do not try to
  process received frames.  Previously it was possible to handle RX
  interrupts even if controller is not fully initialized. This
  resulted in non-working driver after system is up and running.

  Reported by:	hselasky
  Tested by:	hselasky
2011-06-22 00:39:36 +00:00
Pyun YongHyeon 7ef0cbe3d9 MFC r221974:
Correctly disable jumbo frame support for BCM5719 A0.
2011-06-22 00:22:26 +00:00
Pyun YongHyeon d29be935c6 MFC r221818:
Add initial BCM5719 support. TSO and jumbo frame was intentionally
  disabled for BCM5719 A0 revision due to known hardware errata.
  Many thanks to Broadcom for continuing support of FreeBSD.

  Submitted by:	Geans Pin at Broadcom
2011-06-22 00:17:48 +00:00
John Baldwin a0ccf79158 MFC 221346,223049:
Handle a rare edge case with nearly full TCP receive buffers.  If a TCP
buffer fills up causing the remote sender to enter into persist mode, but
there is still room available in the receive buffer when a window probe
arrives (either due to window scaling, or due to the local application
very slowing draining data from the receive buffer), then the single byte
of data in the window probe is accepted.  However, this can cause rcv_nxt
to be greater than rcv_adv.  This condition will only last until the next
ACK packet is pushed out via tcp_output(), and since the previous ACK
advertised a zero window, the ACK should be pushed out while the TCP
pcb is write-locked.  To guarantee this, advance the advertised window
(rcv_adv) even if we advertise a zero window.

During the window while rcv_nxt is greather than rcv_adv, a few places
would compute the remaining receive window via rcv_adv - rcv_nxt.
However, this value was then (uint32_t)-1.  On a 64 bit machine this
could expand to a positive 2^32 - 1 when cast to a long.  In particular,
when calculating the receive window in tcp_output(), the result would be
that the receive window was computed as 2^32 - 1 resulting in advertising
a far larger window to the remote peer than actually existed.

Fix various places that compute the remaining receive window to either
assert that it is not negative (i.e. rcv_nxt <= rcv_adv), or treat the
window as full if rcv_nxt is greather than rcv_adv.
2011-06-20 18:08:52 +00:00
Andrey V. Elsukov c56c781c4b MFC r222745:
Initialize co.use_set variable before parsing each new rule.

  PR:		bin/134975
2011-06-20 13:52:14 +00:00
Andrey V. Elsukov f3becdf1f0 MFC r222744:
Increase buffer size for the command line.

  PR:		bin/125370
2011-06-20 13:46:57 +00:00
Bjoern A. Zeeb 25bcf950be MFC r223057:
Add a new option -P to suppress getservbyport(3) calls when printing rules.
 This allows one to force consistent printing of numeric port numbers like
 we do with -n for other tools like netstat (just that -n was already taken)
 rather than the service names.

 PR:            misc/151015
 Submitted by:  Matt Koivisto (mkoivisto sandvine.com)
Sponsored by:   Sandvine Incorporated
2011-06-20 08:37:34 +00:00
Gregory Neil Shapiro fc186c4d2a sendmail has been updated to 8.14.5 2011-06-20 02:09:15 +00:00
Gregory Neil Shapiro f86fd89a49 MFC: Minor change to force commit this file so new freebsd*.cf files are
built to use the new sendmail-8.14.5/cf tree.
2011-06-20 02:06:45 +00:00
Gregory Neil Shapiro 0657767bfc MFC: Update DNSBL information (MAPS has been acquired, used a generic example) 2011-06-20 02:05:56 +00:00
Gregory Neil Shapiro 34b4c93e63 Merge sendmail 8.14.5 to RELENG_7 2011-06-20 02:04:20 +00:00
Benedict Reuschling 689415b5f8 MFC r223160:
Fix some wording and grammar in the BUGS section.

PR:             docs/157901
Submitted by:   Niclas Zeising (niclas dot zeising at gmail dot com)
Reviewed by:    mav
2011-06-19 11:14:02 +00:00
Bjoern A. Zeeb 42f80a3d4b MFC r219722 (by jhb):
Preserve errno in an error case.
  Submitted by: gcooper

MFC r222899:
  Contrary to when returning in all-good cases at the end of functions we
  did not free memory (1) or close the file descriptor (2) in error cases.

  Reported by:	Mark Johnston (1)
  Reported by:	attilio (2)
  Reviewed by:	jhb
Sponsored by:	Sandvine Incorporated
2011-06-18 22:12:53 +00:00
Bjoern A. Zeeb ce5daeaae3 MFC r222272:
Add FEATURE() definitions for IPv4 and IPv6 so that we can use
  feature_present(3) to dynamically decide whether to use one or the
  other family.
2011-06-18 22:09:44 +00:00
Jaakko Heinonen a138e20111 MFC r216177: Remove stale link.
PR:		151252
2011-06-18 05:13:48 +00:00
Glen Barber f99b2adb43 MFC 186487 by trhodes:
Remove reference to unimplemented "-c" option.

PR:		119338
2011-06-15 01:08:47 +00:00
Glen Barber a79bd6acb5 MFC 186445 by trhodes:
Netgroup database can be centralized via NIS, list it.
Add a missing comma and bump doc date.

PR:		127602
2011-06-14 23:30:48 +00:00
Glen Barber 21f0271598 MFC 187627 by trhodes:
Note the implication of setting the 'w' permission on directories,
while here, expand the 'naughty bits' comment in BUGS.

PR:		84268
2011-06-14 22:52:24 +00:00
Glen Barber 2ccdc58763 MFC 187663 by trhodes:
When "-b" is specified, one could easily create "smaller" files
that are much larger than expected (given the default size).
Change "smaller files" to "split files" which is more in line
with what "-b" actually does.

PR:		119329
2011-06-14 22:40:13 +00:00
Glen Barber fd3b927d5e MFC 187066 by trhodes:
Quote the "u" as it's the name of the union, this may prevent
some confusion when reading the manual page.

PR:		117798
2011-06-14 22:37:09 +00:00
John Baldwin cd93692f1f MFC 222750:
Clear the device_t pointer in 'struct resource' when releasing a device
as otherwise the sysctl to export rman info can dereference a stale
pointer.
2011-06-14 18:54:42 +00:00
Glen Barber 1df81cfa41 MFC 216147 [1], 219424 [2]:
216147 by delphij [1]:
 - Recommend a overwrite of whole geli provider before use.

219424 by pjd [2]:
 - Change example wording.

PR:		155385 [2]
2011-06-14 10:50:16 +00:00
Jaakko Heinonen 6735a6ddf1 MFC r221390: Don't pass empty mount options to nmount(2). 2011-06-13 15:59:21 +00:00
Glen Barber 3f8c2d4d1b MFC 176470 [1]:
Document TCLASS in ip6(4).

PR:		120945
Original commit by:	bms [1]
2011-06-11 01:58:31 +00:00
Glen Barber f932de4dfe MFC 181265 [1]:
Document EAGAIN in ERRORS according to kern_jail.c.

PR:		125253
Original commit by:	trhodes [1]
2011-06-11 01:44:49 +00:00
Glen Barber fc3938a399 MFC 186440 [1]:
Add "crit" to the list of keywords.

PR:		126934
Original commit by:	trhodes [1]
2011-06-11 01:21:54 +00:00
Glen Barber 84474e0ed8 MFC 222758, 222759, 222770:
- Document that when running 'su -m <user> -c <command>', <command> is
  run within a shell as <user>.
- Bump date
- Attempt to clear up some confusion in the following example, by
  stating the '-c' argument is passed to the shell, not to su(1), which
  would indicate the login class.

      'su -m <user> -c <command>'

PR:		157078
2011-06-11 00:31:37 +00:00
Glen Barber 842c7b0f28 MFC 186489 [1]:
Document that kldunloadf can return EINVAL.

PR:		125639
Original commit by:	trhodes [1]
2011-06-11 00:06:14 +00:00
Glen Barber 5b432bc958 MFC 191635 [1]:
- xref ndp(8)

PR:		134053
Original commit by:	danger [1]
2011-06-10 23:52:53 +00:00
Glen Barber 362ae5e4b3 MFC 198714 [1]:
- The majors file was removed long ago, 0 should be used instead.

PR:		139230
Original commit by:	brueffer
2011-06-10 23:42:49 +00:00
John Baldwin a6d47a1405 MFC 222532:
- Document the -H option and 'H' key alongside other options and keys
  rather than at the bottom of the manpage.
- Remove an obsolete comment about SWAIT being a stale state.  It was
  resurrected for a different purpose in FreeBSD 5 to mark idle ithreads.
- Add a comment documenting that the SLEEP and LOCK states typically
  display the name of the event being waited on with lock names being
  prefixed with an asterisk and sleep event names not having a prefix.
2011-06-10 19:16:50 +00:00
John Baldwin 53900c3d23 MFC 222651:
Properly return an ENOBUFS error if a write to a tun(4) device fails
due to m_uiotombuf() failing.

While here, trim unneeded error handling related to tuninit() since it
can never fail.
2011-06-10 19:08:17 +00:00
John Baldwin d94b905938 MFC 222254:
Fix an issue with critical sections and SMP rendezvous handlers.
Specifically, a critical_exit() call that drops the nesting level to zero
has a brief window where the pending preemption flag is set and the
nesting level is set to zero.  This is done purposefully to avoid races
where a preemption scheduled by an interrupt could be lost otherwise (see
revision 144777).  However, this does mean that if an interrupt fires
during this window and enters and exits a critical section, it may preempt
from the interrupt context.  This is generally fine as the interrupt code
is careful to arrange critical sections so that they are not exited until
it is safe to preempt (e.g. interrupts EOI'd and masked if necessary).

However, the SMP rendezvous IPI handler does not quite follow this rule,
and in general a rendezvous can never be preempted.  Rendezvous handlers
are also not permitted to schedule threads to execute, so they will not
typically trigger preemptions.  SMP rendezvous handlers may use
spinlocks (carefully) such as the rm_cleanIPI() handler used in rmlocks,
but using a spinlock also enters and exits a critical section.  If the
interrupted top-half code is in the brief window of critical_exit() where
the nesting level is zero but a preemption is pending, then releasing the
spinlock can trigger a preemption.  Because we know that SMP rendezvous
handlers can never schedule a thread, we know that a critical_exit() in
an SMP rendezvous handler will only preempt in this edge case.  We also
know that the top-half thread will happily handle the deferred preemption
once the SMP rendezvous has completed, so the preemption will not be lost.

This makes it safe to employ a workaround where we use a nested critical
section in the SMP rendezvous code itself around rendezvous action
routines to prevent any preemptions during an SMP rendezvous.  The
workaround intentionally avoids checking for a deferred preemption
when leaving the critical section on the assumption that if there is a
pending preemption it will be handled by the interrupted top-half code.
2011-06-10 19:03:32 +00:00
John Baldwin 89b0d0e382 MFC 222252:
Simplify a stale assertion.  We have not called mi_switch() from a nested
critical section during a preemption for several years.
2011-06-10 18:58:48 +00:00
John Baldwin 670302dd5c MFC 222032:
Fix a race in the SMP rendezvous code.  Specifically, the write by the
last CPU to to finish the rendezvous action may become visible to
different CPUs at different times.  As a result, the CPU that initiated
the rendezvous may exit the rendezvous and drop the lock allowing another
rendezvous to be initiated on the same CPU or a different CPU.  In that
case the exit sentinel may be cleared before all CPUs have noticed causing
those CPUs to hang forever.

Workaround this by using a generation count to notice when this race
occurs and to exit the rendezvous in that case.
2011-06-10 18:56:12 +00:00
John Baldwin 0ec1143fee MFC 220794:
When checking to see if a window update should be sent to the remote peer,
don't force a window update if the window would not actually grow due to
window scaling.  Specifically, if the window scaling factor is larger than
2 * MSS, then after the local reader has drained 2 * MSS bytes from the
socket, a window update can end up advertising the same window.  If this
happens, the supposed window update actually ends up being a duplicate ACK.
This can result in an excessive number of duplicate ACKs when using a
higher maximum socket buffer size.
2011-06-10 18:51:33 +00:00
John Baldwin 1547cc787b MFC 221209:
TCP reuses t_rxtshift to determine the backoff timer used for both the
persist state and the retransmit timer.  However, the code that implements
"bad retransmit recovery" only checks t_rxtshift to see if an ACK has been
received in during the first retransmit timeout window.  As a result, if
ticks has wrapped over to a negative value and a socket is in the persist
state, it can incorrectly treat an ACK from the remote peer as a
"bad retransmit recovery" and restore saved values such as snd_ssthresh and
snd_cwnd.  However, if the socket has never had a retransmit timeout, then
these saved values will be zero, so snd_ssthresh and snd_cwnd will be set
to 0.

If the socket is in fast recovery (this can be caused by excessive
duplicate ACKs such as those fixed by 220794), then each ACK that arrives
triggers either NewReno or SACK partial ACK handling which clamps snd_cwnd
to be no larger than snd_ssthresh.  In effect, the socket's send window
is permamently stuck at 0 even though the remote peer is advertising a
much larger window and pending data is only sent via TCP window probes
(so one byte every few seconds).

Fix this by adding a new TCP pcb flag (TF_PREVVALID) that indicates that
the various snd_*_prev fields in the pcb are valid and only perform
"bad retransmit recovery" if this flag is set in the pcb.  The flag is set
on the first retransmit timeout that occurs and is cleared on subsequent
retransmit timeouts or when entering the persist state.
2011-06-10 18:47:10 +00:00
Andriy Gapon bd82765348 MFC r222720,222721: corrections to amdsbwd.4 2011-06-09 08:33:42 +00:00
John Baldwin a4e09826c5 MFC 221208:
Add a 'show progress' command that shows a summary of all in-progress
commands for a given adapter.  Specifically, it shows the status of any
drive or volume activities currently in progress similar to the
'drive process' and 'volume progress' commands.
2011-06-08 21:10:55 +00:00
Andrey V. Elsukov e0713da0e7 MFC r222559:
Hide useless warning under debug macro.

  PR:           kern/69963, kern/139226

  This is direct commit to stable/7.
2011-06-08 04:54:22 +00:00
John Baldwin 84a4dc60d7 MFC 221138:
Only align MSI message groups based on the number of messages being
allocated, not the maximum number of messages the device supports.  The
spec only requires the former, and I believe I implemented the latter due
to misunderstanding an e-mail.  In particular, this fixes an issue where
having several devices that all support 16 messages can run out of
IDT vectors on x86 even though the driver only uses a single message.
2011-06-07 21:16:02 +00:00
Glen Barber 6e4f1caab1 MFC 187607 [1]:
Attaching to the init process returns EINVAL,
so give an example that is more likely to work.
Stolen from the ktrace(1) manual page.

PR:		128222
Original commit by:	trhodes
2011-06-06 22:14:46 +00:00
Glen Barber 5c2499a2e1 MFC 191634 [1]:
- fix path for locale.alias

PR:		134070
Original commit by:
2011-06-06 21:48:51 +00:00
Glen Barber 1037a07871 MFC 196727 [1]:
Document MALLOC_PRODUCTION knob.

PR:		136029
Original commit by:	maxim [1]
2011-06-06 21:41:10 +00:00
Glen Barber fb39826271 MFC 199873 [1]:
- correct xref sections

PR:		140940
Original commit by:	danger [1]
2011-06-06 21:24:07 +00:00
Glen Barber 67befa540e MFC 199245 [1]:
Fix the grammar in the isprint(3) description.

PR:		140456
Obtained from:	roam [1]
2011-06-06 20:49:16 +00:00
Glen Barber e686acb5bd MFC 190610 [1]:
Fix punctuation.

PR:		132834
Obtained from:	trhodes [1]
2011-06-06 20:28:19 +00:00
Glen Barber bf6c8b1caa MFC 190610 [1]:
Fix punctuation.

PR:		132834
Obtained from:	trhodes [1]
2011-06-06 20:27:32 +00:00
Glen Barber 7e1cb80255 MFC 218951 [1]:
- Add reference to makefs(8).

PR:		154708
Obtained from:	jh [1]
2011-06-06 16:17:56 +00:00
Benedict Reuschling 382435de66 MFC r222492:
Add a short description about NO_CHECKSUM.

PR:		docs/155980
Submitted by	KOIE Hidetaka (koie at suri co jp)
2011-06-06 07:14:29 +00:00
Xin LI 45c65f11bc MFC r222210, 222211, 222287:
- Diff reduction against NetBSD.  The most notable change is to zdiff(1)
   to handle more file formats including bzip2 and xz.
 - Match symbolic link handling behavior with GNU gzip, bzip2 and xz:
   When we are operating on a symbolic link pointing to an existing
   file, bail out by default, but go ahead if -f is specified.
2011-06-06 05:48:25 +00:00
Benedict Reuschling 3f497bf970 MFC r222447:
Mention that jumbo frame support is disabled on PCIe VT6130/VT6132
controllers because of TX MAC hangs when trying to send a frame
that is larger than 4K (see r200759).

PR:		docs/156742
Submitted by:	Michael Moll (kvedulv at kvedulv dot de)
Reviewed by:	yongari@
2011-06-04 11:30:12 +00:00
Matthew D Fleming b82cf201b4 Partial MFC of r212370. np@ requested this functionality so I kept in
the cxgb change, but otherwise MFC'd only the new function
sbuf_new_for_sysctl(9) and none of the changed code.

MFC r217830:

Document sbuf_new_for_sysctl(9).

Partial MFC of r217916:

Explicitly wire the user buffer rather than doing it implicitly in
sbuf_new_for_sysctl(9).  This allows using an sbuf with a SYSCTL_OUT
drain for extremely large amounts of data where the caller knows that
appropriate references are held, and sleeping is not an issue.
2011-06-01 18:27:13 +00:00
Matthew D Fleming de2646dd9f MFC r212478: (originally by kan@)
Add missing pointer increment to sbuf_cat.
2011-06-01 17:51:27 +00:00
Matthew D Fleming 7efa93f74b MFC r212365, r212367:
r212365: Refactor sbuf code so that most uses of sbuf_extend() are in
a new sbuf_put_byte().  This makes it easier to add drain
functionality when a buffer would overflow as there are fewer code
points.

r212367: Add drain functionality to sbufs.  The drain is a function
that is called when the sbuf internal buffer is filled.  For kernel
sbufs with a drain, the internal buffer will never be expanded.  For
userland sbufs with a drain, the internal buffer may still be expanded
by sbuf_[v]printf(3).

Sbufs now have three basic uses:
1) static string manipulation.  Overflow is marked.
2) dynamic string manipulation.  Overflow triggers string growth.
3) drained string manipulation.  Overflow triggers draining.

In all cases the manipulation is 'safe' in that overflow is detected and
managed.

Note that r212367 had to be minorly re-implemented to dynamically
allocate space for a function pointer, a void * argument, and an int
error, to not break the ABI/KBI.
2011-06-01 17:40:59 +00:00
Matthew D Fleming 87822df246 MFC r212180-r212184:
Use math rather than iteration when the desired sbuf size is larger than
SBUF_MAXEXTENDSIZE.

Fix brain fart when converting an if statement into a KASSERT.

Fix user-space libsbuf build.  Why isn't CTASSERT available to
user-space?

Style(9) fixes and eliminate the use of min().

Use a better #if guard.
2011-06-01 16:34:26 +00:00
Matthew D Fleming d377b1ffcd MFC r181462:
Switch to simplified BSD license (with phk's approval), plus whitespace
and style(9) cleanup.
2011-06-01 16:07:14 +00:00
Matthew D Fleming 76e3c5460e MFC r212364:
Fix small errors in the sbuf(9) man page.
2011-06-01 15:46:26 +00:00
Benedict Reuschling 6b8bcd14c8 MFC r222278:
Add a description to the checksum target about not only
being able to verify, but also having the ability to
fetch distfiles that are missing or failed the checksum
calculation

PR:		docs/138887
Submitted by:	Radim Kolar (hsn at sendmail dot cz)
2011-05-30 08:05:27 +00:00
Benedict Reuschling 157c3a10e8 MFC r218699:
Document TRYBROKEN in ports(7).

PR:		docs/153542
Submitted by:	Eitan Adler <[email protected]>
2011-05-30 08:00:28 +00:00
Doug Barton a497aab82e Upgrade to 9.4-ESV-R4-P1, which addresses the following issues:
1. Very large RRSIG RRsets included in a negative cache can trigger
an assertion failure that will crash named (BIND 9 DNS) due to an
off-by-one error in a buffer size check.

This bug affects all resolving name servers, whether DNSSEC validation
is enabled or not, on all BIND versions prior to today. There is a
possibility of malicious exploitation of this bug by remote users.

2. Named could fail to validate zones listed in a DLV that validated
insecure without using DLV and had DS records in the parent zone.
2011-05-28 00:58:19 +00:00
Pyun YongHyeon 5cd4f80585 MFC r221565-221568,221579:
r221565:
  Reuse the TX descriptor(DPD) if xl_encap() failed instead of just
  picking the next available one. This may explain why xl(4) sees TX
  underrun error with no queued frame. I hope this addresses a long
  standing xl(4) watchdog timeout issue as well.

  Obtained from:        OpenBSD

r221566,221579:
  Rename xl_stats_update() callout handler to xl_tick() and move MII
  tick driving logic to xl_tick(). Now xl_tick() handles MII tick as
  well as periodic updating of statistics.
  This change removes a hack used in interrupt handler where it
  wanted to update statistics without driving MII tick.

r221567:
  Rearm watchdog timer if driver kick controller to recover from TX
  underrun error.
  While here, prepend 0x to status code to show TX status is hex
  number.

r221568:
  XL_DMACTL is 32bit register, use 32bit write macro.
  While I'm here add more bits for the register.
2011-05-27 21:45:21 +00:00
Pyun YongHyeon 0fb2c0d2c3 MFC r221563-221564:
r221563:
  Terminate interrupt handler if driver detect it's not running.
  Also add check for driver running state before trying to send
  frames. While I'm here, use for loop.

r221564:
  Change xl_rxeof() a bit to return the number of processed frames in
  RX descriptor ring. Previously it returned the number of frames
  that were successfully passed to upper stack which in turn means it
  ignored frames that were discarded due to errors. The number of
  processed frames in RX descriptor ring is used to detect whether
  driver is out of sync with controller's current descriptor pointer.
  Returning number of processed frames reduces unnecessary (probably
  wrong) re-synchronization.

  While here, remove unnecessary local variable initialization.
2011-05-27 20:34:23 +00:00
Pyun YongHyeon bce8fb88b1 MFC r221557-221558,221560-221561,221571:
r221557:
  Remove unnecessary htole32/le32toh dance.

r221571:
  Remove unneeded use of variable status.

r221558:
  Set status word once instead of twice. For 3C90xB/3C90xC, frame
  length of status word is ignored. While here move bus_dmamap_sync()
  up where DMA map is loaded.

r221560:
  Call bus_dmamap_sync() only after TX DPD update.

r221561:
  Updating status word should be the last operation of UPD structure
  renewal.  Disable instruction reordering by adding volatile to
  xl_list_onefrag structure.
2011-05-27 20:22:19 +00:00
Pyun YongHyeon 431d7c407c MFC r221555:
Rewrite RX filter logic and provide controller specific filter
  handler for 3C90x and 3C90xB/C respectively.  This simplifies ioctl
  handler as well as enhancing readability.
  While I'm here don't reprogram multicast filter when driver is not
  running.
2011-05-27 19:27:17 +00:00
Pyun YongHyeon 70e980d936 MFC r222107:
Fix typo.

  Submitted by:	brad at OpenBSD
2011-05-27 19:05:01 +00:00
Pyun YongHyeon 796444f77e MFC r222135:
Remove unnecessary controller reinitialization by checking
  IFF_DRV_RUNNING flag.  Previously running dhclient or adding alias
  addresses reinitialized controller and it resulted in unnecessary
  link flips.
2011-05-27 18:59:24 +00:00
Pyun YongHyeon 2cb389979a MFC r221712:
Since r117657, bge(4) does not enable buffer manager for BCM5705 or
  newer controllers.  However, all data sheet I have access has no
  indication that buffer manager should not be touched on these
  controllers.  It seems the buffer manager always runs on BCM5705 or
  newer controllers. Some controller(e.g. BCM5719) needs other buffer
  manager configuration so driver should enable buffer manager for
  all controllers.  Both Linux and OpenBSD/NetBSD use the same
  approach.
  This change polls enable bit of block to know whether specified
  block was really stopped as well as enabling buffer manager for all
  controllers in driver initialization.

  Obtained from:	NetBSD
2011-05-27 18:47:48 +00:00
Pyun YongHyeon 806c1c491b MFC r222142:
Datasheet says vge(4) controllers support DAC but it seems that's
  not true on old PCI based controllers.  DAC configuration is read
  from EEPROM in device reset phase and driver can override DAC
  configuration.  However I guess there is an undocumented reason why
  EEPROM configuration does not enable DAC so do not blindly override
  DAC configuration.  Recent PCIe based controllers are supposed to
  support 64bit DMA so allow 64bit DMA only on PCIe based controllers.

  PR:	kern/157184
2011-05-27 18:40:31 +00:00
Sergey Kandaurov 4c723efe74 MFC r222136: Add missing header file. 2011-05-27 09:56:23 +00:00
Jaakko Heinonen ddb8c7f301 MFC r216461:
- Assert that dm_lock is exclusively held in devfs_rules_apply() and
  in devfs_vmkdir() while adding the entry to de_list of the parent.
- Apply devfs rules to newly created directories and symbolic links.

PR:		kern/125034
2011-05-26 15:38:11 +00:00
Konstantin Belousov 5f60b308ad MFC r222086:
The protection against the race with dev_rel(), introduced in r163328,
should be extended to cover destroy_devl() calls for the children of the
destroyed dev.

Requested and tested by:	Oliver Pinter <oliver.pntr gmail com>
2011-05-26 00:09:56 +00:00
Jilles Tjoelker 1a1ec5278b MFC r222037: mq_setattr(2): Add missing const to man page.
The declaration in the header file is correct.
2011-05-24 21:15:13 +00:00
Matthew D Fleming aeac341689 MFC r221843:
Note that the _SWAP operation is supported for all list/queue types.
Also place STAILQ_REMOVE_HEAD in alphabetical order.  Lastly, document
the _SWAP macros.

PR:		kern/143033
2011-05-24 16:06:26 +00:00
Marius Strobl 5b9fe70160 MFC: r221812
Some PHYs like the Level One LXT970 optionally can default to isolation
after rest, in which case we may need to deisolate them.
Tested by:	nwhitehorn
2011-05-21 16:17:39 +00:00
Jung-uk Kim c2655158b2 MFC: r221188
Define "Hypervisor Present" bit.  This bit is used by several hypervisors to
identify CPUs running under emulation.
2011-05-20 22:24:26 +00:00
Jung-uk Kim 4da6fb9b59 MFC: r221102
Use ACPI-supplied CPU frequencies instead of estimated ones.
2011-05-20 22:20:23 +00:00
Pyun YongHyeon ee789b0dac MFC r221468:
Enable Ethernet@WireSpeed for BCM5718/BCM57765 family. While I'm
  here inverse meaning of PHY flag as Ethernet@WireSpeed is enabled
  for most PHYs.
2011-05-20 20:31:36 +00:00
Pyun YongHyeon 42563388b9 MFC r221445:
Add initial BCM57765 family support. The BCM57765 family seems to
  have similar hardware features of BCM5718 family except the number
  of receive return ring is 4. The BCM57765 family is known to
  support IEEE 802.3az EEE(Energy Efficient Ethernet) but this change
  does not include EEE support code. I hope EEE is implemented in
  near future.
  This change will support BCM57761, BCM57765, BCM57781, BCM57785,
  BCM57791 and BCM57795. All hardware offloading features are
  supported and suspend/resume also should work.
  Many thanks to Broadcom for continuing support of FreeBSD.

  Tested by:	Paul Thornton (prt <> prt dot org)
  HW donated by:	Broadcom
2011-05-20 20:27:25 +00:00
Sergey Kandaurov 8610f888c3 MFC r222013: Add missing section number for .Xr jail. 2011-05-20 12:41:33 +00:00
Andriy Gapon 4ed5eca0a8 fix build breakage by adjusting for API difference in r222092 (MFC of
r221803,221809)

This is a direct commit.

Reported by:	Jeremy Chadwick <[email protected]>, tinderbox
Pointyhat to:	avg
2011-05-20 06:49:43 +00:00
Pyun YongHyeon 91eeae78c1 MFC r221817:
Explicitly clear 1000baseT control register for F1 PHY used in
  AR8132 FastEthernet controller. The PHY has no ability to
  establish a gigabit link. Previously only link parters which
  support down-shifting was able to establish link.
  This change should fix a long standing link establishment issue of
  AR8132.

  PR:	kern/156935
2011-05-19 17:20:13 +00:00
Andriy Gapon 70dfcf93b5 MFC r221803,221809: dsp/pcm: allow to mmap both read and write buffers 2011-05-19 07:09:13 +00:00
Andrey V. Elsukov 386868cba1 MFC r221433:
When checking existence of providers skip those which are orphaned.

  PR:		kern/132273
2011-05-18 16:28:28 +00:00
Andriy Gapon ed0d640a3e MFC r221585: scsi_cd: silence READ_TOC errors in CDIOREADTOCHEADER ioctl 2011-05-17 07:16:35 +00:00
Dimitry Andric f1dcc85d78 MFC r220630:
In r219639, SSSE3 instruction set support was backported to our gcc.

Therefore, we also need to install the new tmmintrin.h header containing
the related intrinsic functions, similar to xmmintrin.h, emmintrin.h,
etc.

Reported by:	George Liaskos <[email protected]>
2011-05-16 07:03:06 +00:00
Andriy Gapon 626a6371f1 MFC r221741: bitcount32: replace lengthy comment with a reference to SWAR 2011-05-15 08:27:32 +00:00
Andriy Gapon 7b869ad319 MFC r221740: dtrace: remove unused code 2011-05-15 08:24:26 +00:00
Doug Barton 383e3c1bee MFC r221475:
1. If PKG_DBDIR cannot be determined from make, set the default
2. Add the -H flag to tar in case /var/db/pkg itself is a symlink
3. Direct stderr to /dev/null to suppress the leading slash warning
2011-05-14 21:44:12 +00:00
Doug Barton fa89bae1fd MFC r221227:
Keep a list of the scripts run before early_late_divider, and use that list
to skip things in the second run.
2011-05-14 21:34:21 +00:00
Marius Strobl 125348bdd3 MFC: r220039, 220147
- A closer inspection of the OpenSolaris code indicates that the DMA
  syncing for Hummingbird and Sabre bridges should be applied with every
  BUS_DMASYNC_POSTREAD instead of in a wrapper around interrupt handlers
  for devices behind PCI-PCI bridges only as suggested by the documentation
  (code for the latter actually exists in OpenSolaris but is disabled by
  default), which also makes more sense.
- Take advantage of the ofw_pci_setup_device method introduced in r220038
  (MFC'ed to stable/7 in r221924) for disabling bus parking for certain
  EBus bridges in order to work around hardware bugs.
- Mark some unused parameters as such.
2011-05-14 21:15:50 +00:00
Marius Strobl b4882068fd MFC: r220038
- Merge the *_SET macros from fire(4) which generally print out the
  register changes when compiled with SCHIZO_DEBUG and take advantage
  of them.
- Add support for the XMITS Fireplane/Safari to PCI-X bridges. I tought
  I'd need this for a Sun Fire 3800, which then turned out to not being
  equipped with such a bridge though. The support for these should be
  complete but given that it hasn't actually been tested probing is
  disabled for now.
  This required a way to alter the XMITS configuration in case a PCI-X
  device is found further down the device tree so the sparc64 specific
  ofw_pci kobj was revived with a ofw_pci_setup_device method, which is
  called by the ofw_pcibus code for every device added.
- A closer inspection of the OpenSolaris code indicates that consistent
  DMA flushing/syncing as well as the block store workaround should be
  applied with every BUS_DMASYNC_POSTREAD instead of in a wrapper around
  interrupt handlers for devices behind PCI-PCI bridges only as suggested
  by the documentation (code for the latter actually exists in OpenSolaris
  but is disabled by default), which also makes more sense.
- Add a workaround for Casinni/Skyhawk combinations. Chances are that
  this solves the crashes seen when using the the on-board Casinni NICs
  of Sun Fire V480 equipped with centerplanes other than 501-6780 or
  501-6790. This also takes advantage of the ofw_pci_setup_device method.
- Mark some unused parameters as such.
2011-05-14 21:12:00 +00:00
Marius Strobl 16fd74e390 MFC: r218930
Resurrect ofw_pci_if.m from r178578.
2011-05-14 21:10:19 +00:00
Marius Strobl 541bfe4b27 MFC: r219785
- Make a panic message better reflect the actual problem.
- A closer inspection of the OpenSolaris code indicates the block store
  workaround is only necessary in case of BUS_DMASYNC_POSTREAD.
- Mark some unused parameters as such.
2011-05-14 21:07:52 +00:00
Marius Strobl 0ef16390bf MFC: r221341, r221713
- Probe the PHY accompanying BCM57765.
- Recognize BCM5719C PHY.
2011-05-14 20:51:19 +00:00
Max Laier 7a2a9d9b33 MFH r221714:
Another long standing vm bug found at Isilon:
  Fix a race between vm_object_collapse and vm_fault.

 Reviewed by:	alc@
2011-05-12 01:38:42 +00:00
Dag-Erling Smørgrav 331e3437ba Beware of blind MFCs...
Noticed by:	pluknet
2011-05-11 11:30:36 +00:00
Dag-Erling Smørgrav d622167334 Partially revert previous commit - WARNS does not default to 6 as in head. 2011-05-11 09:55:29 +00:00
Dag-Erling Smørgrav 33fca4b011 Sync with head: WARNS, static linking. 2011-05-11 09:51:42 +00:00
Dag-Erling Smørgrav 9b8375a262 Sync with head: proxy authentication, SSL hang, cached connection crash. 2011-05-11 09:46:36 +00:00
Andriy Gapon 542d483518 MFC r221593,221601: whitespace nits 2011-05-11 06:03:12 +00:00
Marius Strobl 2948a87335 Supply the correct size of the softc. This is a direct commit to stable/7
as in head the problem is no longer present as of r221407 but that revision
can't be MFC'ed.
2011-05-10 18:44:40 +00:00
Andriy Gapon 64f35ffc02 MFC r221388: SNDCTL_DSP_GETIPTR: set pointer to sndbuf_getfreeptr() 2011-05-07 09:33:37 +00:00
Glen Barber 7af6c4e508 MFC 205076 [1]:
manlint fixes.

Reported by:		manlint
Obtained from:		uqs [1]
2011-05-07 03:58:27 +00:00
Glen Barber 3f6c2df2aa MFC 173192 [1]:
manlint fixes.

Reported by:		manlint
Obtained from:		keramida [1]
2011-05-07 03:49:07 +00:00
Marius Strobl e749cb6de7 MFC: r216962
Inherit the APB and the generic OFW PCI-PCI bridge driver from the generic
PCI-PCI bridge driver in order to safe some code.
2011-05-06 20:04:47 +00:00
Marius Strobl dc20176741 MFC: r221343
Fix an logic bug which caused jumbo buffers to not be synced and unloaded.
Reported and tested by: Michael Moll
2011-05-06 20:02:26 +00:00
Xin LI 1ccd853222 MFC r221401:
Fix prototype for ffsll(3) and fls(3).

PR:		docs/156796
Submitted by:	Jean-Yves Migeon <jeanyves.migeon free.fr>
2011-05-06 18:40:51 +00:00
Fabien Thomas 19889bd0f9 MFC r220198:
Clearing the flag when preempting will let the preempted thread run
too much time. This can finish in a scheduler deadlock with ping-pong
between two threads.

One sample of this is:
- device lapic (to have a preemption point on critical_exit())
- options DEVICE_POLLING with HZ>1499 (to have lapic freq = hardclock freq)
- running a cpu intensive task (that does not enter the kernel)
- only one CPU on SMP or no SMP.

As requested by jhb@ 4BSD have received the same type of fix instead of
propagating the flag to the new thread.
2011-05-06 14:11:20 +00:00
Martin Matuska 669e56b57c MFC r221282:
Add ChangeLog.gcc43 for backported changes from gcc 4.3
2011-05-03 08:40:55 +00:00
Sergey Kandaurov f434c1ba34 MFC r221119:
Fix typo in "continuously" argument used in patrol auto command.

Unlike in head, this version preserves a misspelled argument.
2011-05-03 08:27:16 +00:00
Pyun YongHyeon ed115ac04d MFC r220368:
Add initial jumbo frame support for BCM5714/BCM5715 and BCM5780.
  Unlike other controllers which have more advanced jumbo support,
  these controllers have one send ring, one standard receive producer
  ring and one receive return ring. In order to receive jumbo frames
  on the controllers, driver now will increase Rx buffer size to 9k.
  Two Rx modes are supported on these controllers and I chose
  standard Rx BDs over extended Rx BDs. The extended Rx BD mode
  allows up to 4 segmentations for each Rx BDs such that kernel does
  not have to allocate large buffer of contiguous memory for
  receiving. The extended Rx BD mode is already used on controllers
  that have separate jumbo receive ring. However, using extended Rx
  BDs on BCM5714/BCM5715/BCM5780 reduces the number of Rx BDs to 256
  entries which in turn may reduce the performance.  Also UMA backed
  page allocator for jumbo frame returns contiguous memory so using
  extended Rx BD has no advantage on FreeBSD unless highly customized
  local allocator implemented in driver is used.
  To use jumbo buffers in standard receive ring, Rx buffer allocation
  handler was changed to allocate MJUM9BYTES sized mbuf.

  PR:		kern/155192
  Tested by:	Vijay Singh <vijju.singh <> gmail dot com>
  Submitted by:	mjacob (initial version)
2011-05-02 22:52:22 +00:00
Martin Matuska f06cfbc4e5 Bump __FreeBSD_version for the gcc MFC (r221317) 2011-05-02 08:33:20 +00:00
Martin Matuska 834a03a1c6 MFC 218895, 218896, 219374, 219376, 219639, 219640, 219697, 219711, 220150:
MFC r218895:
Backport svn r124339 from gcc 4.3 and add opteron-sse3, athlon64-sse3
and k8-sse3 cpu-types for -march=/-mtune= gcc options.
These new cpu-types include the SSE3 instruction set that is supported
by all newer AMD Athlon 64 and Opteron processors.
All three cpu-types are supported by clang and all gcc versions
starting with 4.3 SVN rev 124339 (at that time GPLv2 licensed).

Source: gcc-4_3-branch (rev. 124339; GPLv2)

MFC r218896:
Add opteron-sse3, athlon64-sse3 and k8-sse3 cpu types to bsd.cpu.mk.
- add "sse3" to MACHINE_CPU for the new cpu types
- for i386, default to CPUTYPE=prescott for the new cpu types

MFC r219374:
Backport Intel Core 2 and AMD Geode CPU types from gcc-4.3 (GPLv2)
These options are supported in this shape in all newer GCC versions.

Source:	gcc-4_3-branch (rev. 118090, 118973, 120846; GPLv2)

MFC r219376:
Add AMD Geode CPU type to bsd.cpu.mk and examples/etc/make.conf
For CPUTYPE=core2 use -march=core2

MFC r219639:
Backport SSSE3 instruction set support to base gcc.
Enabled by default for -march=core2

Source:	gcc-4_3-branch (rev. 117958, 121687, 121726, 123639; GPLv2)

MFC r219640:
Add ssse3 capability for CPUTYPE=core2 to MACHINE_CPU in bsd.cpu.mk

MFC r219697:
Fix -march/-mtune=native autodetection for Intel Core 2 CPUs

Source:	gcc-4_3-branch (partial rev. 119454; GPLv2)

MFC r219711:
Backport missing tunings for -march=core2:
- enable extra 80387 mathematical constants (ext_80387_constants)
- enable compare and exchange 16 bytes (cmpxchg16b)

Verified against llvm-gcc (and apple gcc)
Source:	gcc-4_3-branch (ref. svn revs. 119260, 121140; GPLv2)

MFC r220150:
Upgrade of base gcc and libstdc++ to the last GPLv2-licensed revision
(rev. 127959 of gcc-4_2-branch).

Resolved GCC bugs:
	c++: 17763, 29365, 30535, 30917, 31337, 31941, 32108, 32112, 32346,
	     32898, 32992
	debug: 32610, 32914
	libstdc++: 33084, 33128
	middle-end: 32563
	rtl-optimization: 33148
	tree-optimization: 25413, 32723
	target: 32218

Source:	gcc-4_2-branch (up to rev. 127959)

Obtained from:	gcc (var. revs of gcc-4_2-branch and gcc-4_3-branch; GPLv2)
PR:		gnu/153298, gnu/153959, gnu/154385, gnu/155308, gnu/154906
2011-05-02 08:31:53 +00:00
Doug Barton 74306c8540 MFC r192246:
do not create and mount new file systems on top of the old ones on every
invocation of this script once we already have one
(in case tmpmfs="YES").

MFC r221007:

Create a function for the code from r192246 so that it can be used both
times mount is called.

Limit the automatic behavior to when AUTO is specified (as it is in
etc/defaults/rc.conf) and for everything else take advantage of all
of the goodness in checkyesno.
2011-04-29 20:55:15 +00:00
Doug Barton 3a4c52e1a7 MFC r216744 for rc.d/devd:
Add pidfile [1]

While I'm here, don't run the sysctl frob unconditionally, and
s/sysctl/$SYSCTL/

MFC r220962:

Introduce to rc.subr get_pidfile_from_conf(). It does just what it sounds
like, determines the path to a pid file as it is specified in a conf file.

Use the new feature for rc.d/named and rc.d/devd, the 2 services in the
base that list their pid files in their conf files.

Remove the now-obsolete named_pidfile, and warn users if they have it set.

MFC r220963:

Improve the error handling for the new get_pidfile_from_conf()
2011-04-29 20:44:39 +00:00
Gavin Atkinson 9f53164a0d Merge r220652 from head:
Remove an incorrect be16toh() that prevented geom_part_apm from working on
  little-endian machines.
2011-04-29 10:33:54 +00:00
Yoshihiro Takahashi ccb12fc41c MFC: revision 218390
Clear the padding when returning context to the usermode, for
  MI ucontext_t and x86 MD parts.
2011-04-29 05:00:48 +00:00
John Baldwin 04073a360c MFC 186520:
Add support for the Oxford OX16PCI958-based card.
2011-04-28 19:08:31 +00:00
John Baldwin 557b82a9fe MFC 191897:
Add ID of one more SII3132 revision found on adaptec aar-1225sa rev a2.
2011-04-28 19:00:48 +00:00
Andrew Gallatin 14d4df9936 MFC r220424:
Fix a bug in mxge's LRO which can cause dup acks to
  get aggregated & hence prevent TCP from entering
  fast retransmit.

  Pointed out by: jeff
  Reviewed by: gnn
2011-04-28 14:55:41 +00:00
Andrew Gallatin 71559cbefa MFC r220385: Implement mxge_init()
This fixes a long standing bug in mxge(4) where "ifconfig mxge0 $IP"
  did not bring the interface into a RUNNING state, like it does on
  most (all?) other FreeBSD NIC drivers.

  Thanks to gnn for mentioning the bug, and yongari for pointing out that
  ether_ioctl() invokes ifp->if_init() in SIOCSIFADDR.
2011-04-28 14:42:55 +00:00
John Baldwin 262296bd18 MFC 210864:
- Retire acpi_pcib_resume().  It is has just been an alias for
  bus_generic_resume() since the pci_link(4) driver was added.
- Change the ACPI PCI-PCI bridge driver to inherit most of its methods
  from the generic PCI-PCI bridge driver.
- This also exposes the generic PCI-PCI bridge driver as pcib_driver so
  other drivers can inherit from it.
2011-04-27 21:13:40 +00:00
Edwin Groothuis 4149375beb MFC of 221092, tzdata2011g
- Egypt has cancelled the move to DST for now.
2011-04-26 22:16:22 +00:00
Glen Barber a14a2458fd MFC 220975:
- Clarification on kld_file_stat.size
- While here, remove a few C comments that don't seem to contribute
  anything additional to the man page.

PR:		146047
2011-04-26 13:09:54 +00:00
Andrey V. Elsukov ef0cf15368 MFC r220767:
Use M_WAITOK flag instead M_WAIT for malloc.

  Suggested by: glebius
2011-04-25 04:33:42 +00:00
Rick Macklem cbe1ff8a50 MFC: r220519
Fix a bug in the userland rpc library, where it would use a
negative return value from write to update its position in
a buffer. The patch, courtesy of Andrey Simonenko, also simplifies
a conditional by removing the "i != cnt" clause, since it is
always true at this point in the code. The bug caused problems
for mountd, when it generated a large reply to an exports RPC
request.
2011-04-24 22:12:00 +00:00
Doug Barton 40c3d4b375 MFC r201038:
Update the comments about files ending in .sh
2011-04-23 02:10:38 +00:00
Doug Barton c91d6ab83a MFC r220760:
The change in r206686 to allow the stop argument to work for a service
that is running even though not _enable'd had an annoying side effect.
If the service was already started at boot time by another means when
the related script came around again in rcorder it would start again,
regardless of _enable, because there was a valid pid. [1]

So, split the test into 2 parts, one for (!rcvar && !stop), and one
for (stop && !valid_pid). This preserves the behavior from r206686
while preventing the undesired side effect.
2011-04-22 23:45:33 +00:00
Jilles Tjoelker d62f5382b1 MFC r220646: getfh(2): Add xrefs for fhopen(2), open(2), stat(2). 2011-04-22 14:42:42 +00:00
Xin LI e566d55e53 MFC r219939:
humanize_number(3) multiply the input number by 100, which could cause an
integer overflow when the input is very large (for example, 100 Pi would
become about 10 Ei which exceeded signed int64_t).

Solve this issue by splitting the division into two parts and avoid the
multiplication.

PR:		bin/146205
Reviewed by:	arundel
2011-04-22 00:32:16 +00:00
Sergey Kandaurov 3392711984 MFC r220621:
Remove stale M_ZOMBIE malloc type.
2011-04-21 09:03:48 +00:00
Colin Percival c0324755de Fix CIDR parsing bug in mountd ACLs.
Approved by:	so (cperciva)
Security:	FreeBSD-SA-11:01.mountd
2011-04-20 21:00:24 +00:00
Sergey Kandaurov 311f1fa5b6 MFC r220594:
Remove the now defunct kern.ipc.nmbufs tunable.

PR:		kern/132497 (part)
2011-04-20 11:17:21 +00:00
Bjoern A. Zeeb 014d2e56e5 MFC r220619:
The mbuf_frag_size always was and is file local and not queried from base
  user space tools via kvm.  Mark it static.
2011-04-19 08:56:09 +00:00
Bjoern A. Zeeb f4d9ec0cad MFC r220463:
Remove a check in udp6_send() that prevented v4-mapped v6 addresses from
 working.  We store v4 and v6 addresses as a union but for v4-mapped
 addresses only store the 32bits w/o the ::ffff: word.  That failed the
 check as for example 127.0.0.1 would be ::7f00:1 rather than ::ffff:7f00:1
 and the IN6_IS_ADDR_V4MAPPED() never worked here.  Given we can hardly get
 here with an unbound local address or invalid inp_vflags remove the check.

 Reported by:	tuexen
 Reviewed by:	tuexen
2011-04-19 08:35:07 +00:00
Bjoern A. Zeeb 91be7a8e22 MFC r220462:
After r219579 and r219779 unbreak v4-mapped v6 sockets for UDP
 some more.  Similar to what we do for TCP check for v4-mapped
 addresses and then handle them or the normal v6 address case.
 For either set inp_vflags before calling into the pcb connect
 function so that we have an unambiguous view in case we need to
 set the local address or port.

 Looked at:	tuexen (as part of more)
2011-04-19 08:17:36 +00:00
Bjoern A. Zeeb 86091d0d6c MFC r219779:
Properly check for an IPv4 socket after r219579.

 In some cases as udp6_connect() without an earlier bind(2) to an
 address, v4-mapped sockets allowed and a non mapped destination
 address, we can end up here with both v4 and v6 indicated:
 	inp_vflag = (INP_IPV4|INP_IPV6|INP_IPV6PROTO)

 In that case however laddrp is NULL as the IPv6 path does not
 pass in a copy currently.

 Reported by:	Pawel Worach (pawel.worach gmail.com)
 Tested by:	Pawel Worach (pawel.worach gmail.com)
2011-04-19 08:00:44 +00:00
Bjoern A. Zeeb 8d3316076a MFC r219579:
Merge the two (logically) identical implementations for local port
 selections from in_pcbbind_setup() and in6_pcbsetport() in a single
 in_pcb_lport().
2011-04-19 07:45:54 +00:00
Bjoern A. Zeeb e4fb669105 MFC r220743:
Fix IPv6 ND.  After r219562 we in nd6_ns_input() were erroneously always
  passing the cached proxydl reference (sockaddr_dl initialized or not) to
  nd6_na_output().  nd6_na_output() will thus assume a proxy NA.  Revert to
  conditionally passing either &proxydl or NULL if no proxy case desired.

  Tested by:	ipv6gw and ref9-i386
  Tested by:	Pete French (petefrench ingresso.co.uk)
  Reported by:	Pete French (petefrench ingresso.co.uk on stable)
  Reported by:	bz, simon on Y! cluster
  Reported by:	kib
PR:		kern/151908
X-Early-MFC:	yes
2011-04-18 12:32:06 +00:00
Sergey Kandaurov da938a6065 MFC r220319:
Do not increment num_args if strsep(3) returned an empty field.
 That fixes devstat_buildmatch(3) crashes with certain strings.

Reported by:	arundel
2011-04-18 08:53:22 +00:00
Jilles Tjoelker 40c8cc00d8 MFC r220376: Allow strerror(0) and strerror_r(0, ...).
Of course, strerror_r() may still fail with ERANGE.

Although the POSIX specification said this could fail with EINVAL and
doing this likely indicates invalid use of errno, most other
implementations permitted it, various POSIX testsuites require it to
work (matching the older sys_errlist array) and apparently some
applications depend on it.

PR:		standards/151316
2011-04-17 22:26:07 +00:00
Edwin Groothuis c58e076985 MFC of r220448
When specifying the -t option (send tag in front of message), this tag
should also be forwarded to the remote logging host, not only when the
logging is done locally.

PR:             bin/154324
Submitted by:   Callum Gibson <[email protected]>
2011-04-17 21:57:08 +00:00
Konstantin Belousov aeb386efdd MFC r218327:
Clear the padding when returning context to the usermode, for
MI ucontext_t and x86 MD parts.

Tested-by: Oliver Pinter <oliver.pntr gmail com>
2011-04-17 11:35:22 +00:00
Rebecca Cran a52fae50af MFC r219522:
Fix warnings and set WARNS to 6.
2011-04-16 11:01:35 +00:00
Rebecca Cran 59b32312db MFC r219511:
Fix warnings and style(9) issues.
Set WARNS to 6.
2011-04-16 10:58:25 +00:00
Rebecca Cran d1fc8661de MFC r219527:
Fix warnings and style(9) issues.
Set WARNS to 6.
2011-04-16 10:22:06 +00:00
Rebecca Cran 3456fb99cc MFC r219613:
Fix typo.
2011-04-16 09:57:17 +00:00
John Baldwin 35041f541e MFC 220156:
Clamp the initial advertised receive window when responding to a SYN/ACK
to the maximum allowed window.  Growing the window too large would cause
an underflow in the calculations in tcp_output() to decide if a window
update should be sent which would prevent the persist timer from being
started if data was pending and the other end of the connection advertised
an initial window size of 0.
2011-04-15 20:42:14 +00:00
John Baldwin c105bc8bbd MFC 219276:
Use ffs() to locate free bits in the inode bitmap rather than a loop with
bit shifts.
2011-04-15 20:26:36 +00:00
John Baldwin 97d0fd4752 MFC 219865:
Add pci_find_cap() as an alias for pci_find_extcap() to ease driver
portability with 9+ where pci_find_extcap() has been renamed to
pci_find_cap().
2011-04-15 20:20:11 +00:00
John Baldwin 428ea8bb32 MFC 219717,220363:
- Add more details to the 'show battery' command including more raw
  capacity values, charge cycle count, temperature, and more detailed
  status.
- Add the ability to manage the state of write caching when the battery
  back-up is missing or dead.  The current state of this field is reported
  in 'mfiutil cache <volume>' and can be adjusted via
  'mfiutil cache <volume> bad-bbu-write-cache <enable|disable>'.  This
  setting should generally be disabled to avoid data loss.
2011-04-15 19:50:38 +00:00
Doug Barton af14c28eae MFC r220512:
Update recommendation for mergemaster. The -a and -i options are exclusive.
2011-04-13 19:55:58 +00:00
Jaakko Heinonen eeef122535 MFC r216391:
Handle the special ruleset 0 in devfs_ruleset_use(). An attempt set the
current ruleset to 0 with command "devfs ruleset 0" triggered a KASSERT
in devfs_ruleset_create().

PR:		kern/125030
2011-04-12 16:52:05 +00:00
Mikolaj Golub 2c3ac68909 MFC r220299:
In g_eli_read_done() and g_eli_write_done(), for a bio with
bio_children > 1, g_destroy_bio() is never called and the bio
leaks. Fix this by calling g_destroy_bio() earlier, before the check.

Submitted by:	Victor Balada Diaz <[email protected]> (initial version)

Tested by:	Oliver Pinter <[email protected]>
Approved by:	kib (co-mentor)
2011-04-12 09:36:38 +00:00
Edwin Groothuis 587ad4aa64 MFC of 220549, tzdata2011f:
- During 2011 the Falkland Islands will remain on Summer time.

Obtained from:  ftp://elsie.nci.nih.gov/pub/
2011-04-11 21:59:59 +00:00
Sergey Kandaurov f8f042171b MFC r220328:
Remove malloc type M_NETADDR unused since splitting into vfs_subr.c
 and vfs_export.c.
2011-04-11 09:28:28 +00:00
Marius Strobl 1000f490ad MFC: r220046, r220106
Wait until the DMA engine is stopped before unmapping buffers and
descriptors, which fixes DMA errors seen on sparc64.
2011-04-10 09:35:44 +00:00
Glen Barber 1a5b85d509 MFC 220382:
Correct 'list scan' description in the examples.  The previous description
was incorrect - 'list scan' does not actually do a scan, but instead lists
the results of the background 'scan' cache.
2011-04-09 19:07:44 +00:00
Bjoern A. Zeeb fd3c185903 MFC r219570:
Push a possible "unbind" in some situation from in6_pcbsetport() to
  callers.  This also fixes a problem when the prison call could set
  the inp->in6p_laddr (laddr) and a following priv_check_cred() call
  would return an error and will allow us to merge the IPv4 and IPv6
  implementation.
2011-04-09 12:38:09 +00:00
Bjoern A. Zeeb 45823e485f MFC r219562:
Make sure the locally cached value of rt->rt_gateway stays stable,
  even after dropping the reference and unlocking. Previously we
  have dereferenced a NULL pointer (after r121765).
  Simply unlocking after the block does not work either because of
  lock ordering (see r121765) and in addition we would still hold
  a pointer to something that might be gone by the time we access it.
  Thus take a copy of the value rather than just caching the pointer.

  Submitted by:	chenyl (netstar2008 126.com) (initial version)
PR:		kern/151908
2011-04-09 12:15:40 +00:00
Bjoern A. Zeeb b9ec6c7ed7 MFC r220247:
Do not allow directly recursive RFC3173 IPComp payload.

Security:	CVE-2011-1547
2011-04-09 10:58:38 +00:00
Bjoern A. Zeeb 65d5419deb MFC r219597:
Cross-reference ip(4) rather than sysctl(8) for the global, shared MIB
  values to control the various port ranges. ip(4) describes these in detail.
2011-04-09 10:44:53 +00:00
Bjoern A. Zeeb 97f9385afc MFC r219580:
INET6 for some time needed in_pcb.c so make sure we compile it in case of
  no inet.
2011-04-09 10:40:17 +00:00
Bjoern A. Zeeb 2d350f8ac7 MFC r219206:
Hide the outer IP addresses of a tunnel interfaces (gif(4), gre(4))
  from processes inside jails if the addresses do not belong to the jail.

  Originally reported by: Pieter de Boer via remko
  Tested by:	Piotr KUCHARSKI (nospam 42.pl) [gif]
PR:		kern/151119
2011-04-09 10:22:18 +00:00
Bjoern A. Zeeb 097419e267 MFC r219184:
Prevent crashes from a race when (cloned) interfaces go away.

PR:		bin/152143
  Submitted by:	Przemyslaw Frasunek (przemyslaw frasunek.com)
  Tested by:	Przemyslaw Frasunek (przemyslaw frasunek.com)
2011-04-09 10:18:46 +00:00
Andriy Gapon 75e4d27851 MFC r220031: linux compat: improve and fix sendmsg/recvmsg compatibility
PR:		kern/149168
2011-04-09 09:33:36 +00:00
Andriy Gapon 5d1fa5296f MFC r220030: drop dummy definitions
PR:		kern/149168
2011-04-09 09:27:11 +00:00
Andriy Gapon aa7975afce Regen after r220471
PR:		kern/149168
2011-04-09 09:20:11 +00:00
Andriy Gapon 7d1bb5bef3 MFC r220028: linux compat: add non-dummy capget and capset system calls
PR:		kern/149168
2011-04-09 09:12:44 +00:00
Pyun YongHyeon abf1ad1b7c MFC r220249,220252:
r220249:
  64bit DMA caused data corruption. Unfortunately there is no known
  workaround to use 64bit DMA.
  Disable 64bit DMA on Attansic L1 controller.

  Tested by:	Yamagi Burmeister (lists <> yamagi dot org)

r220252:
  Partially revert r184106. RX buffer ring also needs bus_dmamap_sync().

  Tested by:	Yamagi Burmeister (lists <> yamagi dot org)
2011-04-08 19:08:48 +00:00
Andriy Gapon 7a672b57b2 MFC r220004: rtld: eliminate double call to close(2) that may occur in load_object 2011-04-08 06:55:25 +00:00
Jaakko Heinonen 6181f17929 MFC r216224:
Don't write the terminating NUL past end of buffer.

PR:		bin/152345
2011-04-07 16:06:39 +00:00
Glen Barber 5006699767 MFC 219850:
s/buffer/buf as is used in the code.
2011-04-06 11:14:42 +00:00
Pyun YongHyeon f42e39675a MFC r219938:
Remove unused DMA map/tag in softc.
2011-04-04 20:45:39 +00:00
Pyun YongHyeon d2892646b3 MFC r220103:
Normally fxp(4) does not receive bad frames but promiscuous mode
  makes controller to receive bad frames and i82557 will also receive
  bad frames since fxp(4) have to receive VLAN oversized frames. If
  fxp(4) encounter DMA overrun error, the received frame size would
  be 0 so the actual frame size after checksum field extraction the
  length would be negative(-2). Due to signed/unsigned comparison
  used in driver, frame length check did not work for DMA overrun
  frames. Correct this by casting it to int.
  While I'm here explicitly check DMA overrun error and discard the
  frame regardless of result of received frame length check.

  Reported by:	n_hibma
  Tested by:	n_hibma
2011-04-04 20:41:35 +00:00
Navdeep Parhar a36105237f MFC r219945, r219946, r220009
r219945:
T3C initialization should setup the parity fence too.

r219946:
t3_free_sge_resources should be given the number of qsets it needs to free.

r220009:
Update T3 firmware to 7.11.0
2011-04-04 20:02:29 +00:00
Hajimu UMEMOTO 806fb0dc18 MFC r220055: getlogin() may return NULL. 2011-04-04 14:57:28 +00:00
Sergey Kandaurov b63324d057 MFC r220157:
Use FD_CLOEXEC explicitly.
2011-04-04 09:38:05 +00:00
Edwin Groothuis effdb879d2 MFC of 220286, tzdata2011e:
Change for Africa/Casablanca:
- The 3rd april 2011 at 00:00:00, [it] will be 3rd april 1:00:00
- The 31th july 2011 at 00:59:59,  [it] will be 31th July 00:00:00

Update for SouthAmerica/Chili:
- Chile's clocks will go back an hour this year on the 7th of May instead
  of this Saturday. They will go forward again the 3rd Saturday in
  August, not in October as they have since 1968. This is a pilot plan
  which will be reevaluated in 2012.
2011-04-03 03:44:48 +00:00
Dmitry Chagin cd6baa28e7 Revert r220263, SV_ABI patches was never merged to 7. 2011-04-02 10:31:41 +00:00
Dmitry Chagin 57f67552ea Revert r220268, SV_ABI patches was never merged to 7. 2011-04-02 10:28:08 +00:00
Dmitry Chagin 85d64e10a9 MFC r219043:
Teach kdump to understand sv_flags records in the trace files.

MFC r219044:

Update manual page to reflect latest changes of ABI description support.

MFC r219138:

Teach kdump to understand linux syscalls names too.

Fix bug introduced in r219043: the kernel always dump native
signal numbers, so no need to check the ABI in ktrpsig().
2011-04-02 08:34:24 +00:00
Dmitry Chagin 29ac7632d1 MFC r219041:
ktrace_resize_pool() locking slightly reworked:
1) do not take a lock around the single atomic operation.
2) do not lose the invariant of lock by dropping/acquiring
   ktrace_mtx around free() or malloc().

MFC r219042:

Introduce preliminary support of the show description of the ABI of
traced process by adding two new events which records value of process
sv_flags to the trace file at process creation/execing/exiting time.

MFC r219311:

Partially rework r219042.
The reason for this is a bug at ktrops() where process dereferenced
without having a lock. This might cause a panic if ktrace was runned
with -p flag and the specified process exited between the dropping
a lock and writing sv_flags.

Since it is impossible to acquire sx lock while holding mtx switch
to use asynchronous enqueuerequest() instead of writerequest().

Rename ktr_getrequest_ne() to more understandable name.

MFC r219312:

Fix indentation in comment, double ';' in variable declaration.

PR:		ports/155083
2011-04-02 06:25:13 +00:00
Doug Barton f8578f83e1 MFC r220020:
Add a daily period script to back up /var/db/pkg

MFC r220049:

Hook the 220.backup-pkgdb script I added to the build unconditionally
Hook up 610.ipf6denied based on MK_IPFILTER as 510.ipfdenied is now
2011-03-28 19:42:21 +00:00
Doug Barton b9a6814bc2 Direct commit to update svn:executable property on remaining scripts 2011-03-28 19:29:30 +00:00
Doug Barton a1cd42ffdf MFC r219587, r220017, r220048
Adjust svn:executable properties
2011-03-28 19:27:46 +00:00
Pyun YongHyeon b572ed4ce5 MFC r201449:
Fix CardBus spelling.
2011-03-28 00:19:01 +00:00
Pyun YongHyeon 6aa3b3c9ee MFC r219701:
Remove too expensive bus_dmamap_sync(9) call in dc_rx_resync().
  With this change, driver may not notice updated descriptor status
  change when bounce buffers are active. However, rxeof() in next run
  will handle the synchronization.

  Change dc_rxeof() a bit to return the number of processed frames in
  RX descriptor ring. Previously it returned the number of frames
  that were successfully passed to upper stack which in turn means it
  ignored frames that were discarded due to errors. The number of
  processed frames in RX descriptor ring is used to detect whether
  driver is out of sync with controller's current descriptor pointer.
  Returning number of processed frames reduces unnecessary (probably
  wrong) re-synchronization.

  Reviewed by:	marius
2011-03-28 00:14:56 +00:00
Pyun YongHyeon ec156ea67a MFC r219407:
Rearrange dc_tx_underrun() a bit to correctly set TX FIFO threshold
  value. Controllers that always require "store and forward" mode(
  Davicom and PNIC 82C168) have no way to recover from TX underrun
  except completely reinitializing hardware. Previously only Davicom
  was reinitialized and the TX FIFO threshold was changed not to use
  "store and forward" mode after reinitialization since the default
  FIFO threshold value was 0. This effectively disabled Davicom
  controller's "store and forward" mode once it encountered TX
  underruns. In theory, this can cause watchodg timeouts.

  Intel 21143 controller requires TX MAC should be idle before
  changing TX FIFO threshold. So driver tried to disable TX MAC and
  checked whether it saw the idle state of TX MAC. Driver should
  perform full hardware reinitialization on failing to enter to idle
  state and it should not touch TX MAC again once it performed full
  reinitialization.

  While I'm here remove resetting TX FIFO threshold to 0 when
  interface is put into down state. If driver ever encountered TX
  underrun, it's likely to trigger TX underrun again whenever
  interface is brought to up again. Keeping old/learned TX FIFO
  threshold value shall reduce the chance of seeing TX underrns in
  next run.
2011-03-27 23:14:02 +00:00
Pyun YongHyeon 9eb84f30de MFC r218834-218835:
r218834:
  Consistently use a tab character instead of space after #define.
  No functional changes.

r218835:
  s/u_intXX_t/uintXX_t/g
2011-03-27 23:09:09 +00:00
Pyun YongHyeon 119a488288 MFC r218833,218964:
r218833:
  Count how many frames driver lost in interrupt handler. This
  register is cleared on read so make sure to clear it in driver
  initialization phase.

r218964:
  Remove unnecessary controller reinitialization which resulted in
  link flips during alias address insertion or dhclient operation.
  While I'm here remove dc_reset() in DC_ISR_BUS_ERR case. Device is
  fully reinitialized again in dc_init_locked().
2011-03-27 23:03:15 +00:00
Pyun YongHyeon b32da909c4 MFC r218832:
Split common TX/RX descriptor DMA tag to TX and RX DMA tags
  respectively and fix all bus_dma(9) issues seen when bounce buffers
  are used.
   o Setup frame handling had no bus_dmamap_sync(9) which prevented
     driver from configuring RX filter. Add missing bus_dmamap_sync(9)
     in both dc_setfilt_21143()/dc_setfilt_xircom() and dc_txeof().
   o Use bus_addr_t for DMA segment instead of using u_int32_t.
   o Introduce dc_dma_alloc()/dc_dma_free() functions to allocate/free
     DMA'able memory.
   o Create two DMA descriptor list for each TX/RX lists. This change
     will minimize the size of bounce buffers that would be used in
     each TX/RX path.  Previously driver had to copy both TX/RX lists
     when bounce buffer is active.
   o 21143 data sheet says descriptor list requires 4 bytes alignment.
     Remove PAGE_SIZE alignment restriction and use
     sizeof(struct dc_dec).
   o Setup frame requires 4 bytes alignment.  Remove PAGE_SIZE
     alignment restriction and use sizeof(struct dc_dec).
   o Add missing DMA map unload for both setup frame and TX/RX
     descriptor list.
   o Overhaul RX handling logic such that make driver always allocate
     new RX buffer with dc_newbuf(). Previously driver allowed to
     copy received frame with m_devget(9) after passing the
     descriptor ownership to controller. This can lead to passing
     wrong frame to upper stack.
   o Introduce dc_discard_rxbuf() which will discard received frame
     and reuse loaded DMA map and RX mbuf.
   o Correct several wrong bus_dmamap_sync(9) usage in dc_rxeof and
     dc_txeof. The TX/RX descriptor lists are updated by both driver
     and HW so READ/WRITE semantics should be used.
   o If driver failed to allocate new RX buffer, update if_iqdrops
     counter instead of if_ierrors since driver received the frame
     without errors.
   o Make sure to unload loaded setup frame DMA map in dc_txeof and
     clear the mark of setup frame of the TX descriptor in dc_txeof().
   o Add check for possible TX descriptor overruns in dc_encap() and
     move check for free buffer to caller, dc_start_locked().
   o Swap the loaded DMA map and the last DMA map for multi-segmented
     frames. Since dc_txeof() assumes the last descriptor of the
     frame has the DMA map, driver should swap the first and the last
     DMA map in dc_encap(). Previously driver tried to unload
     not-yet-loaded DMA map such that the loaded DMA map was not
     unloaded at all for multi-segmented frames.
   o Rewrite DC_RXDESC/DC_TXDESC macro to simpler one.
   o Remove definition of ETHER_ALIGN, it's already defined in
     ethernet.h.
  With this changes, dc(4) works with bounce buffers and it shall
  also fix issues which might have shown in PAE environments.

  Tested by:	marius
2011-03-27 22:50:09 +00:00
Pyun YongHyeon 3bbd013c1e MFC r218830-218831:
r218830:
  Send frames only when there is a valid link and driver is running
  as well as controller has enough free TX descriptors.
  Remove check for number of queued frames before attempting to
  transmit. I guess it was added to allow draining queued frames
  even if there is no link. I'm under the impression this type of
  check should be done in upper layer. No other drivers in tree do
  that.

r218831:
  Rearrange interrupt handler a bit and remove forever loop.
  Previously dc(4) always checked whether there is pending interrupts
  and this consumed a lot of CPU cycles in interrupt handler. Limit
  the number of processing for TX/RX frames to 16. Also allow sending
  frames in the loop not to starve TX under high RX load.
  Reading DC_ISR register should be protected with driver lock,
  otherwise interrupt handler could be run(e.g. link state change)
  before the completion of dc_init_locked().

  While I'm here remove unneeded code.
2011-03-27 22:37:28 +00:00
Pyun YongHyeon b7e885665b MFC r218789,218820,218826-218828:
r218789:
  Remove use case of DC_TX_ONE. It was used to limit queue just 1 TX
  frame in DM910x controllers. In r67595(more than 10 years ago) it
  was replaced to use "Store and Forward" mode and made controller
  generate TX completion interrupt for every frame.

r218820:
  For controllers that have TX interrupt moderation capability,
  request TX completion interrupt for every 8-th frames. Previously
  dc(4) requested TX completion interrupt if number of queued TX
  descriptors is greater than 64. This caused a lot of TX completion
  interrupt under high TX load once driver queued more than 64 TX
  descriptors. It's quite normal to see more than 64 queued TX
  descriptors under high TX load.
  This change reduces the number of TX completion interrupts to be
  less than 17k under high TX load. Because this change does not
  generate TX completion interrupt for each frame, add reclaiming
  transmitted buffers in dc_tick not to generate false watchdog
  timeouts.
  While I'm here add check for queued descriptors in dc_txeof() since
  there is no more work to do when there is no pending descriptors.

r218826:
  Make sure to clear status word of TX descriptor in dc_list_tx_init().
  Do not update if_opackets if the transmission had failed.

r218827:
  There is no need to execute filter configuration when driver is not
  running. Remove wrong driver state change in dc_setfilt_xircom().
  While I'm here nuke unnecessary assignments.

r218828:
  Fix a long standing bug where driver handed over RX descriptor
  ownership to controller before completion of access to the
  descriptor. Driver is faking up status word so it should not give
  ownership to controller until it completes RX processing.
2011-03-27 22:32:14 +00:00
Pyun YongHyeon c28c32465e MFC r213841,218787-218788:
r213841:
  It seems some multi-port dc(4) controllers shares SROM of the first
  port such that reading station address from second port always
  returned 0xFF:0xFF:0xFF:0xFF:0xFF:0xFF Unfortunately it seems there
  is no easy way to know whether SROM is shared or not. Workaround
  the issue by traversing dc(4) device list and see whether we're
  using second port and use station address of controller 0 as base
  station address of second port.

  PR:		kern/79262

r218787:
  When driver have to use base softc due to lack of SROM on second
  port, copy SROM information from base softc as well and run SROM
  parser again.  This change is necessary for some dual port
  controllers to make dc(4) correctly detect PHY media based on first
  port configuration table.
  While I'm here add a check for validity of the base softc before
  duplicating SROM contents from base softc. If driver failed to
  attach to the first port it can access invalid area.

  PR:		kern/79262
  Reviewed by:	marius

r218788:
  Apply special PHY initialization code for 21143 controllers before
  any other media configuration. Otherwise some 21143 controller
  cannot establish a link. While I'm here remove the PHY
  initialization code in dc_setcfg(). Since dc_setcfg() is called
  whenever link state is changed, having the PHY initialization code
  in dc_setcfg() resulted in continuous link flips.
  After driver resets SIA, use default SIA transmit/receive
  configuration instead of disabling autosense/autonegotiation.
  Otherwise, controller fails to establish a link as well as losing
  auto-negotiation capability. For manual media configuration, always
  configure 21143 controller with specified media to ensure media
  change. This change makes ANA-6922 establish link with/without
  auto-negotiation.

  While I'm here be more strict on link UP/DOWN detection logic.

  Many thanks to marius who fixed several bugs in initial patch and
  even tested the patch on a couple of dc(4) controllers.

  PR:		kern/79262
  Reviewed by:	marius
  Tested by:	marius
2011-03-27 22:21:52 +00:00
Pyun YongHyeon c98c6cfb54 MFC r218786:
Always check memory allocation failure. If driver encounter memory
  allocation error, do not attach driver.

  Reviewed by:	marius
2011-03-27 22:14:14 +00:00
Pyun YongHyeon e174d2d871 MFC r219787:
Correct broadcast frame handling. Setting bit6 of MCR0 register
  enables broadcast filtering. Make sure to clear the bit to receive
  broadcast frames. While I'm here rename the bit definition to
  reflect reality.

  Reported by:  brad@OpenBSD
2011-03-26 21:32:10 +00:00
Matthew D Fleming 35e2fb61e6 Fix r220012 (MFC of r216060); the KBI of sysctl_oid was *supposed* to be
preserved, but I was hasty.
2011-03-25 22:17:24 +00:00
Matthew D Fleming 76842914af MFC r216060. This differs from the original commit in that it
preserves the KBI size of struct sysctl_oid.  Also, on stable/8 the
compiler thinks that 'len' in sysctl_sysctl_name2oid() is used
uninitialized.

Do not hold the sysctl lock across a call to the handler.  This fixes a
general LOR issue where the sysctl lock had no good place in the
hierarchy.  One specific instance is #284 on
http://sources.zabbadoz.net/freebsd/lor.html .
2011-03-25 22:11:54 +00:00
Matthew D Fleming e147e98731 MFC r216058 and r216059:
r216058:

Use the SYSCTL_CHILDREN macro in kern_sysctl.c to help de-obfuscate the
code.

r216059:

Slightly modify the logic in sysctl_find_oid to reduce the indentation.
There should be no functional change.
2011-03-25 22:00:43 +00:00
Matthew D Fleming 4f5b5d46e8 MFC r192908 (introduced before the stable/8 split from CURRENT):
fail(9) support:

Add support for kernel fault injection using KFAIL_POINT_* macros and
fail_point_* infrastructure. Add example fail point in vfs_bio.c to
simulate VM buf pressure.

MFC r192978:

Fix style/grammar issues in fail(9) man page.

MFC r216616:

Move the fail_point_entry definition from fail.h to kern_fail.c, which
allows putting the enumeration constants of fail point types with the
text string that matches them.

MFC r216620:

Initialize fp_location for explicitly managed fail points, and push
the parentheses around the location for simple fail points into the
location string.  This makes the print on fail point set more
consistent between the two versions.

Also fix up fail.h a little for style(9): only use one of sys/param.h
and sys/types.h, and use the existing __XSTRING() macro instead of
rolling our own.  Also fix up a few tabs on changed and nearby lines.

Lastly, since KFAIL_POINT_{BEGIN,END} are not meant for use outside
this file, just eliminate the macros entirely.
2011-03-25 20:51:20 +00:00
Matthew D Fleming c6b1cb8289 MFC r218825. [The implementation change to kdb_sysctl_available()
cannot be MFC'd as it requires a non-MFCable change (adding drains to
sbuf)].

Modify kdb_trap() so that it re-calls the dbbe_trap function as long as
the debugger back-end has changed.  This means that switching from ddb
to gdb no longer requires a "step" which can be dangerous on an
already-crashed kernel.

Also add a capability to get from the gdb back-end back to ddb, by
typing ^C in the console window.

While here, simplify kdb_sysctl_available() by using
sbuf_new_for_sysctl(), and use strlcpy() instead of strncpy() since the
strlcpy semantic is desired.
2011-03-25 18:16:49 +00:00
Ulrich Spörlein 863af340a9 MFH r219209: Unbreak .Aq for non-ASCII output like -Tps or -Tutf8.
PR:             gnu/154822
Submitted by:   Dominic Fandrey <[email protected]>
2011-03-24 17:09:37 +00:00
Glen Barber 1b1e7643d2 MFC 219834:
Bump date from previous commit.
2011-03-21 15:23:10 +00:00
Glen Barber bb94058dba MFC 219805:
- Use 'list scan' in favor of 'scan', as 'scan' has a different purpose.
2011-03-21 13:28:38 +00:00
Xin LI b3fc0d6f7d MFC r218816:
Add a helper script that detects which partition we are on and update the
other.

Obtained from:	FreeNAS
Sponsored by:	iXsystems, Inc.
2011-03-21 06:18:26 +00:00
Andriy Gapon 37793a427d MFC r219525: amd64/NOTES: use a greater number in KSTACK_PAGES example 2011-03-20 12:05:57 +00:00
Glen Barber 8f52c62ffc MFC 219723:
- Formatting fix.
2011-03-19 01:41:58 +00:00
Glen Barber e6e41aab35 MFC 219574:
- Add example of using 'scan' for wireless networks, similarly to
  OpenBSD's ifconfig(8).
- wlan0 isn't available on 7.x, so substitute ath0 for wlan0 in the
  example.

PR:		151952
2011-03-19 00:35:11 +00:00
John Baldwin 9d076ef3a5 MFC 219460: Remove now-obsolete comment. 2011-03-18 17:20:45 +00:00
John Baldwin 960ae6d612 MFC 219399:
When constructing a new cpuset, apply the parent cpuset's mask to the new
set's mask rather than the root mask.  This was causing the root mask to
be modified incorrectly.
2011-03-18 17:18:24 +00:00
John Baldwin 1135b14b60 MFC 219384:
The UFS dirhash code was attempting to update shared state in the dirhash
from multiple threads while holding a shared lock during a lookup operation.
This could result in incorrect ENOENT failures which could then be
permanently stored in the name cache.

Specifically, the dirhash code optimizes the case that a single thread is
walking a directory sequentially opening (or stat'ing) each file.  It uses
state in the dirhash structure to determine if a given lookup is using the
optimization.  If the optimization fails, it disables it and restarts the
lookup.  The problem arises when two threads both attempt the optimization
and fail.  The first thread will restart the loop, but the second thread
will incorrectly think that it did not try the optimization and will only
examine a subset of the directory entires in its hash chain.  As a result,
it may fail to find its directory entry and incorrectly fail with ENOENT.

To make this safe for use with shared locks, simplify the state stored in
the dirhash and move some of the state (the part that determines if the
current thread is trying the optimization) into a local variable.  One
result is that we will now try the optimization more often.  We still
update the value under the shared lock, but it is a single atomic store
similar to i_diroff that is stored in UFS directory i-nodes for the
non-dirhash lookup.
2011-03-18 17:15:46 +00:00
Glen Barber 9eff16f592 MFC 219455:
- Move the explanation of using arguments for the PRIMARIES above
  the list of PRIMARIES.

PR:		151812
2011-03-17 22:36:21 +00:00
Edwin Groothuis 8de67f4d3a MFC of 219687, tzdata2011d:
- Pacific/Apia will have DST on 2 April instead of 3 April in 2011.
- Turkye will go to DST on 28 April instead of 27 April in 2011.
- Cuba will go to DST on 20 April in 2011.

Obtained from:  ftp://elsie.nci.nih.gov/pub/
2011-03-16 03:34:41 +00:00
Andrey V. Elsukov a58fb7fd7b MFC r219127:
Add XMIT_FAILOVER transmit algorithm to ng_one2many node. Packets are
  delivered out the first active "many" hook.

  PR:           kern/137775
  Submitted by: Maxim Ignatenko
2011-03-15 07:15:46 +00:00
Konstantin Belousov b735d6e4f0 Fix mismerge.
Pointy hat to:	kib
2011-03-13 13:37:23 +00:00
Konstantin Belousov 04747e2ec5 MFC r219352:
The execution of the shebang script requires putting interpreter path,
possible option and script path in the place of argv[0] supplied to
execve(2).  It is possible and valid for the substitution to be shorter
then the argv[0].

Avoid signed underflow in this case.

PR:     kern/155321
2011-03-13 10:08:02 +00:00
Doug Barton b8fbfe335a MFC r219353:
mbone is no longer a physical category

Submitted by:	pav
2011-03-11 23:16:04 +00:00
Ulrich Spörlein 9d78f1e9d4 MFH r206622,210933,219210: Typo fixes, prologue ordering. 2011-03-11 22:09:13 +00:00
Andriy Gapon aed130a425 MFC r216505: cyclic xcall: use smp_no_rendevous_barrier as setup
function parameter
2011-03-11 18:42:17 +00:00
Andriy Gapon d3d32c4e2c MFC r216374: fix atomic_set_xxx misuse in drm 2011-03-11 18:21:16 +00:00
Andriy Gapon 0a5427cdbf MFC r216376: acpi_fujitsu: update for P8010
PR:		kern/121102
2011-03-11 18:10:37 +00:00
Andriy Gapon 16decc2383 MFC r216503: small cleanup of acpi battery status setting and checking
PR:		kern/124744
2011-03-11 17:12:39 +00:00
Andriy Gapon 4698d594ce MFC r216254: opensolaris cyclic: fix deadlock and make a little bit
closer to upstream
2011-03-11 16:13:26 +00:00
Andriy Gapon 14a5e6518e MFC r216252: opensolaris cyclic xcall: no need for special handling of curcpu 2011-03-11 16:07:20 +00:00
Andriy Gapon 1f98d3fe6d MFC r216251: dtrace_xcall: no need for special handling of curcpu 2011-03-11 16:02:38 +00:00
Andriy Gapon 71c0e158eb MFC r216373: fix incorrect use of atomic_set_xxx in cxgb 2011-03-11 15:53:11 +00:00
Andriy Gapon 34c98bcd91 MFC r215748: specialreg.h: add definitions for some useful bits found in
CPUID.6 EAX and ECX
2011-03-11 15:06:56 +00:00
Andriy Gapon 56434b075d MFC r215524: specialreg.h: add definitions for MPERF/APERF pair of MSRs 2011-03-11 15:01:54 +00:00
Andriy Gapon 576e8d569f MFC r215523: specialreg.h: add AMD-specific "Hardware Configuration
Register" MSR
2011-03-11 14:55:23 +00:00
Andriy Gapon a1b14400fc MFC r215522: specialreg.h: add definition for AMD Core Performance Boost bit 2011-03-11 14:46:27 +00:00
Jaakko Heinonen 48ec5f43e2 MFC r179926 by gonzo:
Get pointer to devfs_ruleset struct after garbage collection has been
performed. Otherwise if ruleset is used by given mountpoint and is empty
it's freed by devfs_ruleset_reap and pointer becomes bogus.

PR:		kern/124853
2011-03-10 16:51:28 +00:00
Xin LI 9a03170cba MFC r218432:
Don't consider ioctl returning error as a fatal error and move on to next
disk.  When multiple devices are specified, a non-supporting ioctl will
cause diskinfo(8) to stop at the point which does not seem to be necessary.
2011-03-10 01:02:53 +00:00
Edwin Groothuis f03e429fdb MFC of tzdata2011c, r219411
- No leapsecond in June 2011
- Add and update timezones for America/Juneau, America/Sitka,
  America/Metlakatla
- Change of Summer time to Winter time in Chili happens in April
  2011, not in March 2011.
2011-03-08 21:14:14 +00:00
Jaakko Heinonen d6d3f09801 MFC r196526 by delphij:
Add a missing .El.
2011-03-08 17:43:35 +00:00
Jilles Tjoelker d5e6e15732 MFC r198216 by ed: Fix quoting in a comment,
to make it look more consistent.
2011-03-07 22:50:27 +00:00
Jung-uk Kim 7e50f5099e MFC: r218293
Do not let pw.conf(5) or -M option affect creation of basehome, e.g., /home.
When the basehome does not exist, it creates all intermediate directories as
required, which is logically equivalent to mkdir(1) with -m and -p options.
However, it modifies all intermediate directories, not just the final home
directory unlike mkdir.  This problem was introduced in two revisions, i.e.,
r1.59 (SVN r167919) and r1.60 (SVN r168044).
2011-03-07 18:01:58 +00:00
John Baldwin b7a822b95b MFC 218970,219240:
Use umtx_key objects to uniquely identify futexes.  Private futexes in
different processes that happen to use the same user address in the
separate processes will now be treated as distinct futexes rather than the
same futex.  We can now honor shared futexes properly by mapping them to a
AUTO_SHARED umtx_key.  Private futexes use THREAD_SHARED umtx_key objects.
2011-03-07 17:14:18 +00:00
Xin LI b968aad7ab MFC r219158:
Correct a typo.

PR:		bin/155175
Submitted by:	Peter J. Philipp <pjp centroid.eu>
2011-03-07 09:04:06 +00:00
Pyun YongHyeon 3d3a13f25b MFC r219102:
Make sure changing ownership of RX descriptor to be done as last
  operation.  Previously ownership was transferred to hardware before
  setting address of new RX buffer such that it was possible for
  hardware to use wrong RX buffer address.
  While here keep compiler from re-ordering instructions by declaring
  descriptor members volatile. Memory barriers would do the same job
  but volatile is supposed to be cheaper than using memory barriers,
  especially on MP systems.

  Submitted by:	marius
2011-03-07 00:44:00 +00:00
Rebecca Cran e26231102a MFC r218965, r219055:
Fix typos - remove duplicate "is".

PR:           docs/154934
Submitted by: Eitan Adler <lists at eitanadler.com>
2011-03-05 04:33:42 +00:00
Rebecca Cran fd0fcd40aa MFC r219081:
Merge fix from r1.108 of NetBSD's usr.bin/ftp/main.c:

Only attempt to el_parse() a command unknown by the default parser
if editing is enabled.

PR:           bin/100089
2011-03-05 04:18:29 +00:00
Rebecca Cran 6ae715bdcd MFC r177626, r219096, r219126:
Fix some "in in" typos in comments.

PR:		121490
Submitted by:	Anatoly Borodin <anatoly.borodin at gmail.com>
2011-03-05 04:11:06 +00:00
Doug Barton 6b0db5d054 MFC r218535:
Synthesize the change from NetBSD's 1.33:

"Do not crash if a date cannot be represented (localtime returning
NULL), use the Epoch value instead."

Obtained from:  [email protected]
2011-03-05 04:08:07 +00:00
Doug Barton db46d76ca4 MFC r218961:
Update how accounting log files are rotated, clean up the rc.d script
a bit.

MFC r218986:

The new accounting file needs to be 644 so that unprivileged users
can use lastcomm(1)
2011-03-05 02:12:36 +00:00
Jung-uk Kim dc302c8dea MFC: r219046
Set C1 "I/O then Halt" capability bit for Intel EIST.  Some broken BIOSes
refuse to load external SSDTs if this bit is unset for _PDC.
2011-03-04 23:43:10 +00:00
Jung-uk Kim 4fe56f275f MFC: r218685, r218687
Copy just enough data for the resource type.
2011-03-04 23:12:14 +00:00
Rebecca Cran dde4add9cf MFC r218966, r219124:
Change the return type of vmspace_swap_count to a long to match the other
vmspace_*_count functions.

While here, clean up some style(9) issues.

PR:   kern/152200
2011-03-04 20:30:18 +00:00
Sergey Kandaurov 41ab8af109 MFC r219031:
Fix division by zero, causing floating point exception in a drive progress
 command.

Approved by:	avg (mentor), kib (mentor)
2011-03-04 12:20:14 +00:00
John Baldwin 27931c4b05 MFC 218969:
Expose the umtx_key structure and API to the rest of the kernel.
2011-03-03 22:09:10 +00:00
John Baldwin 258da4bb98 MFC 218968:
Properly handle BARs bigger than 4G.  The '1' was treated as an int
causing the size calculation to be truncated to the size of an int
(32-bits on all current architectures).
2011-03-03 20:14:00 +00:00
John Baldwin fe8fc10934 MFC 218777:
Save a copy of errno before invoking syslog() if accept() or select() fail.
syslog() can trash the errno value causing nfsd to exit for non-fatal
errors like ECONNABORTED from accept().
2011-03-03 19:57:49 +00:00
John Baldwin f892a24a95 MFC 218707: Properly check for errors from waitpid(). 2011-03-03 19:55:22 +00:00
John Baldwin c05afb7b92 MFC 218290: Correct include path. 2011-03-03 17:11:11 +00:00
John Baldwin 2bac0820ab MFC 200761,218272:
Always assert that the turnstile chain lock is held in turnstile_wait()
and remove a duplicate hash lookup.
2011-03-03 17:04:45 +00:00
John Baldwin b976d50e2e MFC 218270:
Use M_WAITOK rather than M_NOWAIT when creating taskqueues via the
TASKQUEUE_DEFINE macros.  All the places that use these macros to create
taskqueues assume that the operation succeeds.
2011-03-03 16:59:20 +00:00
John Baldwin fcae1141d8 MFC 217239:
Add a nested include of <sys/linker_set.h> to make the sysctl(9) manpage
accurate.  <sys/linker_set.h> is one of the very few headers similar to
<sys/queue.h> for which nested includes is allowed.
2011-03-02 21:51:22 +00:00
John Baldwin b7f0e024c2 MFC 217858: Remove dead code. 2011-03-02 19:29:35 +00:00
Edwin Groothuis 7c4a1dcb48 MFC of 219149, tzdata2011b:
USA/Mercer County, North Dakota - Moved from Mountain time to Central time.
2011-03-01 21:29:08 +00:00
Jaakko Heinonen 449533031b MFC r187105 by obrien:
Fix issue where ata_atapicmd() can never really return EBUSY which is
expected in acd_fixate().

This should fix various problems folks are having with 'burncd' reporting
"burncd: ioctl(CDRIOCFIXATE): Input/output error" during the fixate phase
when "fixate" is issued together with the "data" command.

PR:		95979
2011-03-01 18:05:57 +00:00
Pyun YongHyeon f51405ff64 MFC r217914:
Document newly added tunables.
   hw.re.intr_filter
   hw.re.msix_disable
   dev.re.%d.int_rx_mod
2011-03-01 00:13:50 +00:00
Pyun YongHyeon 7a1595aab0 MFC r218760:
Add initial support for RTL8401E PCIe Fast Ethernet.

  PR:	154789
2011-03-01 00:08:49 +00:00
Pyun YongHyeon 9959eb94a1 MFC r218289:
Disable TX IP checksum offloading for RTL8168C controllers.  The
  controller in question generates frames with bad IP checksum value
  if packets contain IP options.  For instance, packets generated by
  ping(8) with record route option have wrong IP checksum value. The
  controller correctly computes checksum for normal TCP/UDP packets
  though.
  There are two known RTL8168/8111C variants in market and the issue
  I observed happened on RL_HWREV_8168C_SPIN2. I'm not sure
  RL_HWREV_8168C also has the same issue but it would be better to
  assume it has the same issue since they shall share same core.
  RTL8102E which is supposed to be released at the time of
  RTL8168/8111C announcement does not have the issue.

  Tested by:	Konstantin V. Krotov ( kkv <> insysnet dot ru )
2011-03-01 00:05:46 +00:00
Pyun YongHyeon e24f8565ff MFC r217911:
Add support for RTL8105E PCIe Fast Ethernet controller. It seems
  the controller has a kind of embedded controller/memory and vendor
  applies a large set of magic code via undocumented PHY registers in
  device initialization stage. I guess it's a firmware image for the
  embedded controller in RTL8105E since the code is too big compared
  to other DSP fixups. However I have no idea what that magic code
  does and what's purpose of the embedded controller. Fortunately
  driver seems to still work without loading the firmware.

  While I'm here change device description of RTL810xE controller.

  H/W donated by:	Realtek Semiconductor Corp.
2011-03-01 00:02:46 +00:00
Pyun YongHyeon 931f26de41 MFC r217902:
Do not use interrupt taskqueue on controllers with MSI/MSI-X
  capability. One of reason using interrupt taskqueue in re(4) was
  to reduce number of TX/RX interrupts under load because re(4)
  controllers have no good TX/RX interrupt moderation mechanism.
  Basic TX interrupt moderation is done by hardware for most
  controllers but RX interrupt moderation through undocumented
  register showed poor RX performance so it was disabled in r215025.
  Using taskqueue to handle RX interrupt greatly reduced number of
  interrupts but re(4) consumed all available CPU cycles to run the
  taskqueue under high TX/RX network load.  This can happen even with
  RTL810x fast ethernet controller and I believe this is not
  acceptable for most systems.

  To mitigate the issue, use one-shot timer register to moderate RX
  interrupts. The timer register provides programmable one-shot timer
  and can be used to suppress interrupt generation. The timer runs at
  125MHZ on PCIe controllers so the minimum time allowed for the
  timer is 8ns. Data sheet says the register is 32 bits but
  experimentation shows only lower 13 bits are valid so maximum time
  that can be programmed is 65.528us. This yields theoretical maximum
  number of RX interrupts that could be generated per second is about
  15260. Combined with TX completion interrupts re(4) shall generate
  less than 20k interrupts. This number is still slightly high
  compared to other intelligent ethernet controllers but system is
  very responsive even under high network load.

  Introduce sysctl variable dev.re.%d.int_rx_mod that controls amount
  of time to delay RX interrupt processing in units of us. Value 0
  completely disables RX interrupt moderation. To provide old
  behavior for controllers that have MSI/MSI-X capability, introduce
  a new tunable hw.re.intr_filter. If the tunable is set to non-zero
  value, driver will use interrupt taskqueue. The default value of
  the tunable is 0. This tunable has no effect on controllers that
  has no MSI/MSI-X capability or if MSI/MSI-X is explicitly disabled
  by administrator.

  While I'm here cleanup interrupt setup/teardown since re(4) uses
  single MSI/MSI-X message at this moment.
2011-02-28 23:46:59 +00:00
Pyun YongHyeon 8dd85936fe MFC r217868:
Remove TX taskqueue and directly invoke re_start in interrupt task.
2011-02-28 23:37:38 +00:00
Pyun YongHyeon 0a9bb34bd9 MFC r217857:
Prefer MSI-X to MSI on controllers that support MSI-X. All
  recent PCIe controllers(RTL8102E or later and RTL8168/8111C or
  later) supports either 2 or 4 MSI-X messages. Unfortunately vendor
  did not publicly release RSS related information yet. However
  switching to MSI-X is one-step forward to support RSS.
2011-02-28 21:25:35 +00:00
Rebecca Cran ba69ec6760 MFC r218974:
Handle memory allocation failures in include().

PR:           i386/85652
Submitted by: Ben Thomas <bthomas at virtualiron.com>
2011-02-26 12:07:16 +00:00
Rebecca Cran 66f0d191ac MFC r218985:
Use the cprd_mem field when setting the start and length for a memory
resource - the layout of cprd_port is identical but using cprd_mem
makes the code easier to understand.

PR:           kern/118493
Submitted by: Weongyo Jeong <weongyo.jeong at gmail.com>
2011-02-26 11:52:34 +00:00
Alexander Leidinger 3922632bfd MFC r216591:
Suggest to run the delete-old target after the second mergemaster. If you run
  it before, your rc scripts may still reference old files/directories and
  if you are in the unlucky situation to have triggered a reboot (intentionally
  or not) between the delete-old run and the mergemaster, your system may not
  start anymore.

  While I'm here, give a hint about delete-old-libs.

  Noticed by:        bcr (luckily in a discussion and not by getting hit by
                          this)
2011-02-25 16:08:31 +00:00
Jilles Tjoelker a7c862c647 MFC r218724: test: Note that this is used both as a normal program and
a shell builtin.
2011-02-25 14:56:06 +00:00
Doug Barton ca1af199ee MFC r218753:
Remove in-addr.arpa from the list of zones it is possible to slave locally

MFC r218865:

Add a note about AXFR of important zones being available from ICANN
2011-02-24 23:45:13 +00:00
Ken Smith 438a7ba368 7.4-RELEASE has been announced, shift to -STABLE. 2011-02-24 21:19:30 +00:00
Hiroki Sato e7133e20ac Fix a typo. 2011-02-24 19:22:59 +00:00
Hiroki Sato 5827b22dd5 Add relnotes items for 7.4R. 2011-02-24 19:22:04 +00:00
Rebecca Cran 5ceeec32d6 MFC r218918:
Make private functions static.

PR:           kern/43611
Submitted by: Matt Emmerton <matt at gsicomp.on.ca>
2011-02-24 11:09:41 +00:00
Rebecca Cran 563f52a058 MFC r218910:
The FD_FORM ioctl used to ignore errors from the floppy controller; now when
it encounters an error it returns an error from the ioctl.
Ignore any errors when using the FD_FORM ioctl.

PR:   kern/103862
2011-02-24 11:04:47 +00:00
Rebecca Cran 5d332418b0 MFC r218909:
Fix typos - remove duplicate "the".

PR:		bin/154928
Submitted by:	Eitan Adler <lists at eitanadler.com>
2011-02-24 10:45:41 +00:00
Hiroki Sato a2496c19f5 Update release documents for 7.4R. Document OpenSSL vuln was fixed and
shlib version was decreased in Errata.
2011-02-23 20:50:42 +00:00
Ulrich Spörlein d68ed7345a MFH r218477: Fix termcap entry typo. 2011-02-23 20:24:20 +00:00
Pyun YongHyeon f6ae224355 MFC r218710:
Fix a regression introduced in r215906. The change made in r215906
  caused link re-negotiation whenever application joins or leaves a
  multicast group.  If driver is running, it would have established a
  link so there is no need to start re-negotiation. The re-negotiation
  broke established link which in turn stopped multicast application
  working while re-negotiation is in progress.

  PR:	kern/154667
2011-02-22 21:27:46 +00:00
Rebecca Cran 0a087f2a0d MFC r218854:
Update the icmp example to show allowing only the safe types.

Suggested by: Tom Judge <tom at tomjudge.com>
2011-02-22 17:51:45 +00:00
Rebecca Cran 2e3e0bf959 MFC r218839, r218840, r218841:
In the distribution list, 'A' is listed as the key to press to select both
'All' and 'Minimal'. Update the keys for Minimal and Custom to avoid the
conflict.

Remove the quotas option from the Startup Services menu.
GENERIC has no support for quotas so this option has no effect.

Allow users to create ufs1 filesystems via the noninteractive install.cfg
system.

PR:   bin/153809
PR:   bin/123237
PR:   bin/113979
2011-02-22 17:50:33 +00:00
Jaakko Heinonen da1cfb3ed4 MFC r216098:
- Report an error when a label with invalid name is attempted to be
  created with glabel(8).
- Fix a typo in an error message.
- Fix comment typos.
2011-02-21 16:33:01 +00:00
Pyun YongHyeon 69f953b2d0 MFC r217524,217766:
r217524:
  Change model names of controller RTL_HWREV_8168_SPIN[123] to real ones.
  s/RL_HWREV_8168_SPIN1/RL_HWREV_8168B_SPIN1/g
  s/RL_HWREV_8168_SPIN2/RL_HWREV_8168B_SPIN2/g
  s/RL_HWREV_8168_SPIN3/RL_HWREV_8168B_SPIN3/g
  No functional changes.

r217766:
  Apply TX interrupt moderation to all RTL810xE PCIe Fast Ethernet
  controllers. Experimentation with RTL8102E, RTL8103E and RTL8105E
  showed dramatic decrement of TX completion interrupts under high TX
  load(e.g.  from 147k interrupts/second to 10k interrupts/second)
  With this change, TX interrupt moderation is applied to all
  controllers except RTL8139C+.
2011-02-21 01:20:56 +00:00
Pyun YongHyeon 72309eb0f6 MFC r217499:
Implement initial jumbo frame support for RTL8168/8111 C/D/E PCIe
  GbE controllers. It seems these controllers no longer support
  multi-fragmented RX buffers such that driver have to allocate
  physically contiguous buffers.

   o Retire RL_FLAG_NOJUMBO flag and introduce RL_FLAG_JUMBOV2 to
     mark controllers that use new jumbo frame scheme.
   o Configure PCIe max read request size to 4096 for standard frames
     and reduce it to 512 for jumbo frames.
   o TSO/checksum offloading is not supported for jumbo frames on
     these controllers. Reflect it to ioctl handler and driver
     initialization.
   o Remove unused rl_stats_no_timeout in softc.
   o Embed a pointer to structure rl_hwrev into softc to keep track
     of controller MTU limitation and remove rl_hwrev in softc since
     that information is available through a pointer to structure
     rl_hwrev.

  Special thanks to Realtek for donating sample hardwares which made
  this possible.

  H/W donated by:	Realtek Semiconductor Corp.
2011-02-21 01:15:11 +00:00
Pyun YongHyeon 0bbdf15349 MFC r217498:
Add initial support for RTL8168E/8111E-VL PCIe GbE.
2011-02-21 01:05:23 +00:00
Pyun YongHyeon d5970684fe MFC r217247,217381-217382,217384-217385:
r217247:
  When driver is not running, do not send DUMP command to controller
  and just show old (cached) values. Controller will not respond to
  the command unless MAC is enabled so DUMP request for down
  interface caused request timeout.

r217381:
  Allow TX/RX checksum offloading to be configured independently.

r217382:
  re_reset() should be called only after setting device specific
  features.

r217384:
  Make sure to check validity of dma maps before destroying.

r217385:
  If driver is not able to allocate RX buffer, do not start driver.
  While I'm here move RX buffer allocation and descriptor
  initialization up to not touch hardware registers in case of RX
  buffer allocation failure.
2011-02-21 01:01:26 +00:00
Pyun YongHyeon 3bdb348260 MFC r217246,217832:
r217246:
  Implement TSO on RealTek RTL8168/8111 C or later controllers.
  RealTek changed TX descriptor format for later controllers so these
  controllers require MSS configuration in different location of TX
  descriptor. TSO is enabled by default for controllers that use new
  descriptor format.
  For old controllers, TSO is still disabled by default due to broken
  frames under certain conditions but users can enable it.
  Special thanks to Hayes Wang at RealTek.

r217832:
  Disable TSO for all Realtek controllers. Experimentation showed
  RTL8111C generated corrupted frames where TCP option header was
  broken. All other sample controllers I have did not show such
  problem so it could be RTL8111C specific issue. Because there are
  too many variants it's hard to tell how many controllers have such
  issue. Just disable TSO by default but have user override it.
2011-02-21 00:50:48 +00:00
Ulrich Spörlein 18accee950 MFH r218089:
syscons: install all available kbdmaps

us.dvorakl.kbd, and us.dvorakr.kbd were not installed.

Found by:     Neil Short <[email protected]>
2011-02-20 11:30:12 +00:00
Pyun YongHyeon d8769196e2 MFC r215432:
MCP55 is the only NVIDIA controller that supports VLAN tag
  insertion/stripping and it also supports TSO over VLAN. Implement
  TSO over VLAN support for MCP55 controller.

  While I'm here clean up SIOCSIFCAP ioctl handler. Since nfe(4)
  sets ifp capabilities based on various hardware flags in device
  attach, there is no need to check hardware flags again in
  SIOCSIFCAP ioctl handler. Also fix a bug which toggled both TX and
  RX checksum offloading even if user requested either TX or RX
  checksum configuration change.

  Tested by:	Rob Farmer ( rfarmer <> predatorlabs dot net )
2011-02-20 01:26:29 +00:00
Pyun YongHyeon bc7d04b566 MFC r217794:
Reinitialize driver when MTU is changed and driver is running.

  Reported by:	Huang, Yusheng ( yusheng.huang <> bluecoat com )
2011-02-20 01:22:48 +00:00
Pyun YongHyeon 45776486fc MFC r218141:
alc_rev was used without initialization such that it failed to
  apply AR8152 v1.0 specific initialization code. Fix this bug by
  explicitly reading PCI device revision id via PCI accessor.

  Reported by:	Gabriel Linder ( linder.gabriel <> gmail dot com )
2011-02-20 01:16:59 +00:00
Pyun YongHyeon 9c99b3bba5 MFC r217379:
- Move ether_ifdetach() earlier and remove now-unneeded IN_DETACH flag.
  - Expand locking in interrupt handler.
2011-02-20 01:10:14 +00:00
Pyun YongHyeon 3147cbfc4f MFC r217353:
- Add a locked variant of jme_start() and invoke it directly while holding
    the lock instead of queueing it to a task.
  - Do not invoke jme_rxintr() to reclaim any unprocessed but received
    packets when shutting down the interface.  Instead, just drop these
    packets to match the behavior of other drivers.
  - Hold the driver lock in the interrupt handler to avoid races with
    ioctl requests to down the interface.
2011-02-20 01:05:35 +00:00
Glen Barber adbeb29340 MFC 212492:
Bump date in cpuset_getaffinity(2).  Note, the original commit
also affects dbopen(3), however that change is not needed here.
2011-02-18 17:42:29 +00:00
Rebecca Cran 1bbb6266f6 MFC r218620:
If the pf.conf(5) example file is copied when setting up a firewall it's
easy to forget about icmp. Update the file to show allowing icmp through
the firewall.

PR:	docs/144986
2011-02-16 21:46:03 +00:00
Rebecca Cran ba388a1aa8 MFC r218619:
Fix typos.

PR:	docs/131625
Submitted by:	Andrew Wright <andrew at qemg.org>
2011-02-16 21:29:05 +00:00
Rebecca Cran e95637b031 MFC r218652, r218677:
Only print the unit number when invoked with the -n flag.

PR:	bin/144300
Submitted by:	arundel
2011-02-16 21:24:09 +00:00
Rebecca Cran 79d8a5f57a MFC r218650:
Move potentially offensive fortune to fortunes-o.

PR:	bin/137702
2011-02-16 21:13:02 +00:00
Ken Smith abc1590546 Guess when all the bits will be in place for announcing 7.4-RELEASE. 2011-02-16 15:18:28 +00:00
Bjoern A. Zeeb 4318543f7e MFC r218114:
Update interface stats counters to match the current format in linux and
  try to export as much information as we can match.

  Requested on: Debian GNU/kFreeBSD list (debian-bsd lists.debian.org) 2010-12
  Tested by:    Mats Erik Andersson (mats.andersson gisladisker.se)
2011-02-15 09:30:31 +00:00
Bjoern A. Zeeb 0ba33b7aca MFC r218078:
Remove duplicate printing of TF_NOPUSH in db_print_tflags().
2011-02-15 09:28:07 +00:00
Giorgos Keramidas a89d7a0fac MFC 216698 by maxim from /head
Fix -u flag description: it takes a username as an argument.

PR:             docs/153416
Submitted by:   Eitan Adler
2011-02-15 07:12:16 +00:00
Giorgos Keramidas f1179245b9 MFC 217746 from /head/usr.bin/top
Touch up the sample memory usage numbers a bit, to avoid wrapping
on terminal boundary.  While here add definition for ’G’ and fix
the indentation of ’K’ units.

Submitted by:   plunket
PR:             docs/153614
2011-02-15 06:34:30 +00:00
Glen Barber f56390439b MFC 212438:
Add EINVAL to list of possible return values for cpuset_getaffinity(2).

PR:		149978
Approved by:	keramida (mentor)
2011-02-15 01:34:46 +00:00
Ulrich Spörlein 937af6459a Add back soon-to-be-release FreeBSD 7.4 which got clobbered in the previous
merges.
2011-02-13 22:17:49 +00:00
Ulrich Spörlein b6f30a7001 MFH r202358,217595:
Pull up vendor changes.  The following local changes made obsolete:

- Addition of several FreeBSD versions.
- r192561 that attempted to fix UTF-8 issues.

Update groff manpage and symbols with what has been submitted upstream.
Also remove local overrides that are now in the contrib tree.
2011-02-13 22:09:33 +00:00
Ulrich Spörlein 5fb8a12850 MFH r209772,217890
Fix an error in the EXAMPLES section of getopt(1), which is based on
the same fix present in NetBSD.

Fix typo in example getopt(1) script: $i vs $1 [1]
While here apply style hammer.

PR:		docs/133118, docs/154289 [1]
Submitted by:	Oleg A. Mamontov, Jamie Landeg Jones
2011-02-13 19:07:17 +00:00
Rebecca Cran ff289d0a49 MFC r216156:
Document the fact that passing in a count of zero to the bus_space functions
will result in undefined behaviour.
Taken from NetBSD's bus_space(9).

PR:	kern/80980
2011-02-13 18:00:05 +00:00
Josh Paetzel a36566340d MFC 218523:
Netgear renamed the WG311 to the WG311v1 after they released a second
version of it.  There is also a WG311v3 which uses a chipset covered by
malo(4). Along the way add the WG311T to the list which is also an
atheros chipset.

Approved by:	kib (mentor)
2011-02-13 16:18:22 +00:00
Simon L. B. Nielsen 70d4990d67 MFC 218625:
Fix Incorrectly formatted ClientHello SSL/TLS handshake messages could
 cause OpenSSL to parse past the end of the message.

 Note: Applications are only affected if they act as a server and call
 SSL_CTX_set_tlsext_status_cb on the server's SSL_CTX. This includes
 Apache httpd >= 2.3.3, if configured with "SSLUseStapling On".

The very quick MFC is done to get this fix into 7.4 / 8.2.

Discussed with:	re
Approved by:	so (simon, for "instant" MFC)
Obtained from:	OpenSSL CVS
Security:	http://www.openssl.org/news/secadv_20110208.txt
Security:	CVE-2011-0014
2011-02-13 10:24:36 +00:00
Glen Barber 7228b164ac MFC 212827, 217717:
Note that devfs(5) and fdescfs(5) both create /dev/fd file descriptors.

PR:		144534
Approved by:	keramida (mentor)
2011-02-12 17:58:36 +00:00
Marius Strobl ae99feab4c MFC: r218478
Correct signedness and off-by-one issues in parameters used for DMA tag
creation.

PR:		154259
Submitted by:	Vladislav Movchan (partially)
2011-02-12 13:41:02 +00:00
John Baldwin 449f364b5c MFC 218271:
When turning off TCP_NOPUSH, only call tcp_output() to immediately flush
any pending data if the connection is established.
2011-02-11 15:13:03 +00:00
Glen Barber d2755d7826 MFC 212440,212493,212500:
Add RETURN VALUES section to devclass_get_maxunit(9).

PR:		149979
Approved by:	keramida (mentor)
2011-02-11 13:59:56 +00:00
Glen Barber 9d7c5319fe MFC 218398:
Fix typo in amdtemp(4).

Approved by:	keramida (mentor)
2011-02-11 13:56:06 +00:00
Glen Barber 2cfe7ffd16 MFC 218421:
Remove CRT reference from zmore(1).

PR:		154441
Approved by:	keramida (mentor)
2011-02-11 13:53:39 +00:00
Jaakko Heinonen 9053e754e7 MFC r217090:
Warn if rules could not be read from a ruleset file. Now at least
something gets logged if the file has syntax errors.

PR:		conf/91342
2011-02-11 10:06:49 +00:00
Doug Barton a1463e1cd1 MFC 218350:
Catch up with reality and references from the latest RFCs
(especially 5735) for our default empty zones.
2011-02-11 05:57:33 +00:00
Doug Barton fa78a2b30a MFC 218142:
Let rpcbind clean up after itself
2011-02-11 05:54:46 +00:00
Max Laier 65b46d724e MFH: r180238
Use bcopy instead of strlcpy in uipc_bind and unp_connect, since
  soun->sun_path isn't a null-terminated string.  As UNIX(4) states, "the
  terminating NUL is not part of the address." Since strlcpy has to return
  "the total length of the string [it] tried to create," it walks off the
  end of soun->sun_path looking for a \0.

  This reverts r105332.
2011-02-10 00:20:56 +00:00
Sergey Kandaurov cb922b29e8 MFC r218189:
Remove OpenSolaris include path referring to a non-existing directory.

Reported by:	arundel on freebsd-hackers@ via clang
Approved by:	kib (mentor)
2011-02-09 15:40:48 +00:00
Marius Strobl 893566a5de MFC: r216961
Reserve INTR_MD[1-4] similarly to what BUS_DMA_BUS[1-4] are intended for
and switch sparc64 to use the first one for bus error filter handlers of
bridge drivers instead of (ab)using INTR_FAST for that so we eventually
can get rid of the latter.

Reviewed by:	jhb
2011-02-08 22:14:19 +00:00
John Baldwin 9a4b32b19d Properly close a socket for a TCP NFS client if the NFS server notices that
the client has disconnected while attempting to fetch a request.  This
accidentally works most of the time because the socket upcall is invoked
twice for some reason causing two nfsd threads to be assigned to the
same connection.  The first thread notices the disconnect when soreceive()
fails, and the second thread will then cleanup the connection.  Occasionally
the second thread will grab the NFSD lock before the first thread has
returned from soreceive() to mark the connection as disconnected.  When that
happens, the socket is never cleaned up and is leaked.

Fix this by checking for the disconnect flag if there is an error pulling a
request from the connection and closing the socket if it nfsrv_rcv() marked
the connection as disconnected.  Now the first thread will close the socket
in most cases and the socket is never leaked.

This is a direct commit to 7 as it is specific to the pre-krpc code used
in 7.
2011-02-08 21:05:07 +00:00
Xin LI b88b263ed8 MFC r216675:
Allow overriding pidfile and dumpfile.

PR:		bin/153362
Submitted by:	Joe Holden <joe rewt org uk>
2011-02-08 11:48:47 +00:00
Glen Barber f7e416598b MFC 212610:
Synchronize newfs(8) manual with code.

PR:		61716
Approved by:	keramida (mentor)
2011-02-07 19:13:20 +00:00
Glen Barber bfc5dc38ad MFC 214374:
Minor grammar fixes.

Approved by:	keramida (mentor)
2011-02-07 11:13:28 +00:00
Ed Maste 08f7aa9d14 MFC r218207:
Revert part of r173264.  Both aac_ioctl_sendfib and aac_ioctl_send_raw_srb
  make use of the aac_ioctl_event callback, if acc_alloc_command fails.
  This can end up in an infinite loop in the while loop in
  aac_release_command.
2011-02-06 01:00:40 +00:00
Jilles Tjoelker 868ecc2864 MFC r217847: sh: Clean up some old comments:
* There is no plan for an alternative to the command "set".
* Attempting to unset a readonly variable has not raised an error for quite
  a while, so the order of unsetting a variable and a function with the same
  name does not matter.
2011-02-05 15:13:18 +00:00
Gordon Tetlow e622ae8bb5 MFC r217767:
Honor $PAGER instead of always calling more.

Approved by:	colin@
2011-02-05 06:26:16 +00:00
Pyun YongHyeon 148876b293 MFC r216831,216858:
r216831:
  Add vte(4) man page and hook up vte(4) to the build.
  Also add Xr to appropriate man pages.

r216858:
  Remove duplicated "perfect"
2011-02-04 20:59:45 +00:00
Pyun YongHyeon 2717aa09c9 MFC r216830:
Add vte(4) to the list of supported network interface.
2011-02-04 20:52:13 +00:00
Pyun YongHyeon b6732bb501 Make vte(4) work on stable/7. This is direct commit to stable/7
since if_maddr_rlock/if_maddr_runlock is not available in stable/7.
2011-02-04 20:48:53 +00:00
Pyun YongHyeon 32ae60bcdb MFC r216829,216833:
rr216829:
  Add driver for DM&P Vortex86 RDC R6040 Fast Ethernet.
  The controller is commonly found on DM&P Vortex86 x86 SoC.  The
  driver supports all hardware features except flow control.  The
  flow control was intentionally disabled due to silicon bug.

  DM&P Electronics, Inc. provided all necessary information including
  sample board to write driver and answered many questions I had.
  Many thanks for their support of FreeBSD.

  H/W donated by:	DM&P Electronics, Inc.

r216833:
  Remove debugging leftovers.
2011-02-04 20:47:46 +00:00
Pyun YongHyeon 525e466a34 MFC r216828:
Add RDC Semiconductor R6040 10/100 PHY driver.
2011-02-04 20:27:50 +00:00
Ed Schouten 96473996d7 MFC r217207:
Add missing __dead2 to __assert().

  __assert() is called when an assertion fails. After printing an error
  message, it will call abort(). abort() never returns, hence it has the
  __dead2 attribute. Also add this attribute to __assert().
2011-02-04 19:27:59 +00:00
John Baldwin ac6d344959 MFC 217351:
Introduce two new helper macros to define the priority ranges used for
interactive timeshare threads (PRI_*_INTERACTIVE) and non-interactive
timeshare threads (PRI_*_BATCH) and use these instead of PRI_*_REALTIME
and PRI_*_TIMESHARE.  No functional change.
2011-02-04 17:11:53 +00:00
John Baldwin 2d807df808 MFC 217292:
- Retire some unused ithread priorities: PI_TTYHIGH, PI_TAPE, and
  PI_DISKLOW.  While here, rename PI_TTYLOW to PI_TTY.
- Add a macro PI_SWI() that takes a SWI_* constant as an argument and
  returns the suitable thread priority.

To preserve the KBI, I did not renumber priorities but simply removed
unused ones.
2011-02-04 16:32:34 +00:00
John Baldwin ec31d6f609 MFC 217075:
Retire PCONFIG and leave the priority of thread0 alone when waiting for
interrupt config hooks to execute.

To preserve the KBI, I did not renumber priorities but simply removed
PCONFIG.
2011-02-04 14:44:59 +00:00
John Baldwin f1e38f821f MFC 218171:
Output an appropriate amount of padding to line up per-CPU state columns
rather than using a terminal sequence to move the cursor when drawing the
initial screen.
2011-02-04 14:25:39 +00:00
John Baldwin 1ddd7bc7aa MFC 200605:
Add entries to NOTES for the modular phy support so that these options are
documented.
2011-02-04 13:40:02 +00:00
Rebecca Cran 979b87c5a5 MFC r216873:
There can be more than 0x20000000 swap meta blocks allocated if a swap-backed
md(4) device is used. Don't panic when deallocating such a device is swap
has been used.

PR:	kern/133170
2011-02-04 10:22:19 +00:00
Pyun YongHyeon 8f1d29fecd MFC r216925,217331,217349,217542:
r216925:
  Add a 'locked' variant of the foo_start() routine and call it directly
  from interrupt handlers and watchdog routines instead of queueing a task
  to call foo_start().

r217331:
  Make sure to invoke unlocked foo_start since the taskqueue does not
  hold a driver lock. This should fix a regression introduced in
  r216925.

r217349:
  Forgot to remove unlock of the driver lock from age_start_locked() when
  converting it to a locked variant.

r217542:
  Fix some bugs in my last set of changes to ale(4):
  - Remove extra unlock from end of ale_start_locked().
  - Expand scope of locking in interrupt handler.
  - Move ether_ifdetach() earlier and retire now-unneeded DETACH flag.

  Tested by:	Aryeh Friedman
2011-02-02 18:44:02 +00:00
Ken Smith 5bf5880363 Update to reflect the package layout for 7.4-RELEASE. 2011-01-31 16:58:33 +00:00
Andrey V. Elsukov 9d23110dd1 MFC r188728 by pjd:
Document kern.geom.journal.* sysctls.

  PR:		docs/130548
  Submitted by:	Hywel Mallett <[email protected]>

MFC r188729 by pjd:
  Correct the year.

  Reported by:	Florian Smeets <[email protected]>
2011-01-31 16:20:28 +00:00
Edwin Groothuis 228c4953c1 MFC of 218122, tzdata2011a:
- Cleanup rules for Australia/South_Australia (nothing changed)
- Add historical information for Honolulu.
2011-01-31 09:30:25 +00:00
Pyun YongHyeon 91990e5a1b MFC r218038:
Fix logic error. Due to the bug, it incorrectly checked TXQ status
  which in turn can leave TXQ active.

  Submitted by:	Brad ( brad <> comstyle dot com )
2011-01-31 00:29:11 +00:00
Pyun YongHyeon 9e10df3712 MFC r216766:
Add device id for RDC M3010 which is found on Vortex86 SoC.

  Reviewed by:	mav
2011-01-30 23:29:45 +00:00
Pyun YongHyeon 6391d1cacd MFC r216596:
Document limitation of station address reprogramming.
2011-01-30 23:18:55 +00:00
Pyun YongHyeon 298692dbf8 MFC r216576,216578-216581,217974:
r216576,217974:
  ae(4), igb(4) and ixgbe(4) supports altq(4).

r216578:
  Add .Xr to altq(4).

r216579,216581:
  igb(4), ixgbe(4), mxge(4) and nxge(4) support VLAN hardware tag
  insertion/stripping.
  et(4) and fwe(4) support VLAN oversized frames.

r216580:
  Add ae(4) to the list of drivers use the miibus interface.
2011-01-30 23:16:49 +00:00
Jilles Tjoelker 3e3638cfcc MFC r217704: getgroups(2): Remove <sys/types.h> and refer to sysconf(3).
Because {NGROUPS_MAX} may become variable, its value should be obtained
using sysconf(3).

In head, r217704 removed mention of <sys/param.h>; this was not mentioned in
stable/7.
2011-01-30 21:00:57 +00:00
John Baldwin f523c3f58d MFC 217702:
Restore support for the 'async' and 'sync' mount options lost when
switching to nmount(2).  While here, sort the options.
2011-01-28 20:22:03 +00:00
John Baldwin 074863f062 MFC 217416:
Add two more features to cpuset(1):
- Add a new -C flag to create a new cpuset and move an existing pid into
  that set.
- Allow 'all' to be specified for a cpu list (e.g. cpuset -s 1 -l all)
  which maps to the list of all CPUs in the system.
2011-01-28 20:06:51 +00:00
Remko Lodder 1fd2419e7a MFC r174460,174478
Add information about the maximum file size for msdosfs.

  PR: docs/112935
  Submitted by: Julian Stacey <jhs at berklix dot org>
  Actually this was inspired by the ticket submitted
  by Julian.
  MFC After: 3 days

PR:		docs/112935
2011-01-28 07:04:01 +00:00
Gavin Atkinson 71c9428851 Merge r217264 from head:
Remove a bullet point that appears to have been accidentally inserted twice.
  It has also been included within the feature lists to which it is relevant.

PR:		tobez
2011-01-27 23:07:23 +00:00
Colin Percival 6a75f7039b MFC r217872: Unbreak .Dd line.
Approved by:	re (kib)
2011-01-27 21:39:03 +00:00
John Baldwin 1159bc87eb MFC 217237,217291:
- Fix two harmless off-by-one errors.
- Always use PRI_BASE() when checking the base type of a thread's priority
  class.
2011-01-27 21:33:06 +00:00
John Baldwin e4de498f21 MFC 217078,217079: Various priority fixes for creating new threads:
- Move sched_fork() later in fork() after the various sections of the new
  thread and proc have been copied and zeroed from the old thread and
  proc.  Otherwise attempts to modify thread or process data in sched_fork()
  could be undone.
- Don't copy td_{base,}_user_pri from the old thread to the new thread in
  sched_fork_thread() in ULE.  This is already done courtesy the bcopy()
  of the thread copy region.
- Always initialize the real priority (td_priority) of new threads to the
  new thread's base priority (td_base_pri) to avoid bogusly inheriting a
  borrowed priority from the parent thread.
- Properly initialize the base priority (td_base_pri) of thread0 to PVM
  to match the desired priority in td_priority.  Otherwise the first time
  thread0 used a borrowed priority it would drop down to PUSER instead of
  PVM.
- Explicitly initialize the starting priority of new kprocs to PVM to
  avoid inheriting some random priority from thread0.
2011-01-27 21:21:09 +00:00
Remko Lodder 3c1abbd5d4 MFC r183110
Document the -F 's return statement.
  If the application returns succesfully
  the return code is 7 (which means the
  filesystem is clean).

  PR: 127432
  Submitted by: edwin
  MFC after: 3 days

PR:		127432
2011-01-27 20:53:03 +00:00
Remko Lodder 770b9f5788 MFC r186424
Add quirk for the Storcase InfoStation 12bay
  SATA to FC SAN.

  PR:		129858
  Submitted by:	Nick Triantos <nick-freebsd at triantos dot com>
  MFC after:	1 week

PR:		129858
2011-01-27 20:50:03 +00:00
Remko Lodder 2a092a00b2 MFC r194558
Add architecture support for TinyBSD

  PR:	 135301
  Submitted by:	Olivier Cochard-Labbe <olivier at cochard dot me>
  Reviewed by:	Jean Milanez Melo <jmelo at freebsdbrasil dot com dot br> (maintainer)
  Approved by:	imp (mentor, implicit)
  MFC after:	1 week

PR:		135301
2011-01-27 20:39:19 +00:00
John Baldwin 3ead133faf MFC 217077:
Only change the priority of timeshare threads to PRI_MAX_TIMESHARE
when yield() is called.  Specifically, leave the priority of real time
and idle threads unchanged.
2011-01-27 20:12:35 +00:00
Pyun YongHyeon 0504797b69 MFC r182771:
Hook up ixgbe(4) to the build.  D'oh!
2011-01-27 19:38:03 +00:00
Remko Lodder 8955286bd6 MFC r194582
Add support for the Myson Heden 8813.
  Note that I also added the usbdev to the list, because the 8813 version
  is not yet known there. I might have twisted the sorting there but because
  8813 comes before 8818, I added it before that (with _8813 to differentiate)
  the item.

  PR:	 135628
  Submitted by:	Yoshikazu GOTO <goto at on-link dot jp>
  Approved by:	imp (mentor, implicit)

PR:		135628
2011-01-27 19:37:01 +00:00
Pyun YongHyeon 06a2614663 MFC r179724,179852:
r179724:
  Add man page for ixgbe driver

r179852:
  Bring this up to date with regard to our other section 4 and Intel manpages,
  also fixes a few mdoc bugs.
2011-01-27 19:32:53 +00:00
Pyun YongHyeon 761c1b43f1 MFC r183646,216552:
r183646:
  Add a HARDWARE section.  It doesn't contain any information not
  already in the DESCRIPTION section, but this allows for the manual
  page to be used in the automatic hardware notes generation.

r216552:
  Document JMC251/JMC261 support.
2011-01-27 19:17:31 +00:00
Remko Lodder de19ad271b MFC r198787
Document the WWWSUPFILE variable.

  PR:	 137723
  Submitted by:	Sofian Brabez <sbrabez at gmail dot com>
  Approved by:	imp (mentor, implicit)
  MFC after:	3 days
  Facilitated by:	Snow B.V.

PR:		137723
2011-01-27 19:12:04 +00:00
Remko Lodder a6c69b5f2c MFC r178987
Fix pstat behaviour when using coredumps. The reference to tp was
  incorrect and should have been poining to &tty, tp is a virtual
  address from the coredump, while we should obtain the address through
  the tty struct.

  Approved by:	imp (mentor, implicit trivial changes)
  MFC after:	1 week
  Submitted by:	Ed Schouten (ed at 80836 dot nl)

PR:		138131
2011-01-27 19:08:01 +00:00
Pyun YongHyeon 42d3dae271 MFC r216551:
Add support for JMicron JMC251/JMC261  Gigabit/Fast ethernet
  controller with Card Read Host Controller. These controllers are
  multi-function devices and have the same ethernet core of
  JMC250/JMC260. Starting from REVFM 5(chip full mask revision)
  controllers have the following features.
   o eFuse support
   o PCD(Packet Completion Deferring)
   o More advanced PHY power saving

  Because these controllers started to use eFuse, station address
  modified by driver is permanent as if it was written to EEPROM. If
  you have to change station address please save your controller
  default address to safe place before reprogramming it. There is no
  way to restore factory default station address.

  Many thanks to JMicron for continuing to support FreeBSD.

  HW donated by:	JMicron
2011-01-27 19:04:17 +00:00
Pyun YongHyeon 3268dff23f MFC r216546,216548-216550:
r216546:
  Consistently put a tab character between #define and the macro name.

r216548:
  Fix a regression introduced in r213893. FPGA version requires PHY
  probing so allow PHY probing on all possible addresses.

r216549:
  Make sure whether driver allocated resource before releasing it.

r216550:
  Use system defined PCIR_EXPRESS_DEVICE_CTL instead of using magic
  number.
2011-01-27 18:46:26 +00:00
Pyun YongHyeon 2587eeb43c MFC r216438:
Remove unecessary and clearly wrong usage of atomic(9).
2011-01-27 18:38:48 +00:00
Pyun YongHyeon 3648026a04 MFC r216362:
Remove unecessary and clearly wrong usage of atomic(9).
2011-01-27 18:34:05 +00:00
Colin Percival ae977a8212 MFC r217869,217870: Fix .Dd lines in re(4) and nfe(4). 2011-01-27 09:01:44 +00:00
John Baldwin c95ccceb65 MFC 216486,216764:
Use bus_alloc_resource_any() instead of bus_alloc_resource().
2011-01-26 20:36:20 +00:00
John Baldwin e5198831ae MFC 216621: Fix a typo in a comment. 2011-01-26 20:29:28 +00:00
John Baldwin 7c8010b18f MFC 216590:
Don't whine about child drivers calling pci_enable_busmaster().  That is
perfectly normal.
2011-01-26 20:26:58 +00:00
John Baldwin 8f744f99a2 MFC 216334:
When reopening a stream backed by an open file descriptor, do not close
the existing file descriptor.  Instead, let dup2() atomically close the
old file descriptor when assigning the newly opened file to the same
descriptor.  This closes a race in a multithreaded application where a
concurrent open() could allocate the existing file descriptor in between
the calls to close() and dup2().
2011-01-26 20:14:12 +00:00
John Baldwin 6b0dcb883e MFC 216235,216236:
When masking direct and processor devices during an inquiry, properly
preserve the upper bits of the first data byte.
2011-01-26 20:09:08 +00:00
John Baldwin ec2b33d4bd MFC 214835:
Adjust the order of operations in spinlock_enter() and spinlock_exit() to
work properly with single-stepping in a kernel debugger.
2011-01-25 22:08:43 +00:00
Jilles Tjoelker 1059eb5ba6 MFC r217484: mknod(2): The required include is <sys/stat.h>, not <unistd.h>.
This is what SUSv4 requires, and also the only thing that works if strict
standards compliance is requested.

PR:		standards/123688
Submitted by:	gcooper
2011-01-25 21:51:32 +00:00
John Baldwin d9bacaed68 MFC 215541:
Set the POSIX semaphore capability when the semaphore module is enabled.
2011-01-25 20:54:29 +00:00
John Baldwin 3470dbf518 MFC 215540:
Set various POSIX capability sysctls to the version of the API that is
supported rather than 1.  They are supposed to return a suitable value
for sysconf(3).  While here, make the fsync sysctl match <unistd.h>.
2011-01-25 20:49:24 +00:00
John Baldwin b7a5fc39dc MFC 204329,210723,210933,214778,215526:
Sync mfiutil(8) with HEAD:
- Handle malloc() failures more gracefully by error'ing out rather than
  segfaulting.
- Fixed dependencies (make checkdpadd).
- Fix typos and spelling mistakes.
2011-01-25 20:44:24 +00:00
John Baldwin c35bdea433 MFC 211514,214158:
- There isn't really a need to hold the ktrace mutex just to read the
  value of p_traceflag that is stored in the kinfo_proc structure.
- When disabling ktracing on a process, free any pending requests that
  may be left.  This fixes a memory leak that can occur when tracing is
  disabled on a process via disabling tracing of a specific file (or if
  an I/O error occurs with the tracefile) if the process's next system
  call is exit().  The trace disabling code clears p_traceflag, so exit1()
  doesn't do any KTRACE-related cleanup leading to the leak.  I chose to
  make the free'ing of pending records synchronous rather than patching
  exit1().
- Move KTRACE-specific logic out of kern_(exec|exit|fork).c and into
  kern_ktrace.c instead.  Make ktrace_mtx private to kern_ktrace.c as a
  result.
2011-01-25 20:33:47 +00:00
John Baldwin 9fa5972550 MFC 214144:
- Make 'vm_refcnt' volatile so that compilers won't be tempted to treat
  its value as a loop invariant.  Currently this is a no-op because
  'atomic_cmpset_int()' clobbers all memory on current architectures.
- Use atomic_fetchadd_int() instead of an atomic_cmpset_int() loop to drop
  a reference in vmspace_free().
2011-01-25 19:44:55 +00:00
Glen Barber 433b63f170 MFC 217148, 217786:
Document rc.conf.d in rc.conf(5).

PR:		140495
Approved by:	keramida (mentor)
2011-01-24 15:18:18 +00:00
Pyun YongHyeon 872f134e2e MFC r217649:
Correct wrong definition of PM timer mask and adjust L1/PM timer
  value. While I'm here enable all clocks before initializing
  controller. This change should fix lockup issue seen on AR8152
  v1.1 PCIe Fast Ethernet controller.

  PR:	kern/154076
2011-01-23 02:18:18 +00:00
Jack F Vogel d32bce51a8 MFC rev 217591 2011-01-22 20:01:46 +00:00
Jack F Vogel 4c4d37baed MFC rev 217295 2011-01-22 20:00:24 +00:00
Jung-uk Kim 16d3bd3750 MFC: r217424
Remove redundant, bogus, and even harmful uses of setting TS bit in CR0.
It is done from fpstate_drop() when it is really necessary.
2011-01-21 18:32:29 +00:00
Marius Strobl 87493022c0 MFC: r217417
- Even after masking the media with IFM_GMASK the result may have bits
  besides the duplex ones set so just comparing it with IFM_FDX may lead
  to false negatives.
- Just let the default case handle all unsupported media types.
- In pnphy_status() don't unnecessarily read a register twice.
- Remove unnused macros.
2011-01-21 00:53:37 +00:00
Marius Strobl f375fa35ad MFC: r217414
- Don't announce PAUSE support for half-duplex when MIIF_FORCEPAUSE is
  set.
- Let mii_phy_auto() also announce PAUSE support for 10baseT-FDX.
2011-01-21 00:50:34 +00:00
Marius Strobl 98b32890e8 MFC: r217413
- Even after masking the media with IFM_GMASK the result may have bits
  besides the duplex ones set so just comparing it with IFM_FDX may lead
  to false negatives.
- Simplify ciphy_service() to only set the manual configuration bits
  once after we have figured them all out. This also means we no longer
  unnecessarily update the hardware along the road.
2011-01-21 00:48:08 +00:00
Marius Strobl 4b6f70ff25 MFC: r217412
- Masking IFM_GMASK when also masking IFM_FDX is redundant and just
  complicates the code.
- Don't let atphy_setmedia() announce PAUSE support for half-duplex when
  MIIF_FORCEPAUSE is set.
- Simplify e1000phy_service() and ip1000phy_service() to only set the
  manual configuration bits once after we have figured them all out. For
  ip1000phy_service() this also means we no longer unnecessarily update
  the hardware along the road.
2011-01-21 00:40:51 +00:00
Pyun YongHyeon 3c93e27625 MFC r217548:
Rework RX filter programming by providing separate handler for
  DP8381[56] and SiS 900/7016 controllers.  After r212119, sis(4) no
  longer reinitializes controller if ALLMULTI/PROMISC was changed.
  However, RX filter handling code assumed some bits of the RX filter
  is programmed by driver initialization. This caused ALLMULTI/PROMISC
  configuration is ignored under certain conditions.
  Fix that issue by reprogramming all bits of RX filter register.
  While I'm here follow recommended RX filter programming steps
  recommended by National DP8381[56] data sheet(RX filter should be
  is disabled before programming).

  Reported by:	Paul Schenkeveld < freebsd () psconsult dot nl >
  Tested by:	Paul Schenkeveld < freebsd () psconsult dot nl >
2011-01-21 00:35:34 +00:00
Pyun YongHyeon 2af4b4c957 MFC r192784,192805:
Free the memory correctly in the error case

  PR:	misc/154152
2011-01-20 21:25:16 +00:00
Giorgos Keramidas cbd17187b8 MFC r217481 and r217606 from /head
r217481...
  Fix the mount example of xfs(5) filesystems by including the read-only
  option.  We only support ro mounts for xfs, so it’s nice if the examples
  we show in the manpage are easy to copy/paste.

  PR:           docs/149106
  Submitted by: amdmi3

r217606...
  Bump .Dd date of manpage for r217481
2011-01-19 21:49:42 +00:00
Giorgos Keramidas b3a890b1a5 MFC r199985 from /head
Describe what setpgid(2) does when pgid=0.  The text has been
copied from NetBSD’s manpage, and it also matches the behavior
described by the Open Group’s online copy of setpgid.2 at
http://www.opengroup.org/onlinepubs/009695399/functions/setpgid.html

Obtained from:        NetBSD
Submitted by:         Petros Barbayiannis <[email protected]>
2011-01-19 21:35:48 +00:00
Giorgos Keramidas 479b6f98db MFC r205978 from /head
Document DEBUG_FLAGS in a more visible place, in the build(7) manpage

Noticed by:     Alexander Best <alexbestms.at.wwu.de>
Reviewed by:    jhb
2011-01-19 21:28:21 +00:00
Giorgos Keramidas 3a8eb0b063 MFC r217064 - sort & fix includes, remove -include from CFLAGS of acct tests
- Sort the includes of pack.c, moving sys/*.h files near the top.
- Add a couple of missing #include lines, and remove the need for
  custom -include options in the CFLAGS of the test Makefile.
- Remove the ad-hoc ’all’ target, but keep its ’regress’ bits for
  testing.
- Convert the ad-hoc ’clean’ target to proper CLEANFILES stuff,
  so that the normal bsd.prog.mk machinery can clean up.
- Use ‘make -V .OBJDIR’ to detect the place where ’pack’ lives,
  so that regress.t works both with and without ’make obj’.
2011-01-19 21:19:23 +00:00
Giorgos Keramidas 495deeacb9 MFC -r188305 and r189207 from /head
: r188305 -->
: Fix language on atol(3) manpage.  Add a COMPATIBILITY section
: stating that in FreeBSD the atol() and atoll() functions affect
: errno in the same way as strtol() and stroll().
:
: PR:             docs/126487
: Submitted by:   edwin
: Reviewed by:    trhodes, gabor
: MFC after:      1 week

: r189207 -->
: "-isoC-99" should be spelled without 'c'.
2011-01-19 15:43:23 +00:00
Giorgos Keramidas a5d000269b MFC -r 186783 from /head
Document the NO_XXX options supported by our Makefile.inc1.

  Noticed by:   simon
  Reviewed by:  imp
2011-01-19 15:12:38 +00:00
Simon L. B. Nielsen c4bd91a017 Decrease the libcrypto and libssl shared object version numbers from 6
to 5. They were accidentally bumped in r215997 (on 2010-11-28) with the
merge of OpenSSL 0.9.8p, but unfortunately this was not caught until
now.

Also add compat links for libcrypto.so.6 / libssl.so.6 (pointing to
their .5 counterparts) in case any users have compiled any third party
during the time stable/7 (and releng/7.4) were broken.

This is deemed the last poor of bad options.  Had the number bump not
been reverted binary packages for stable/7 would not have worked on the
still supported 7.3 and 7.1 releases.

Discussed with:	re, portmgr
Approved by:	re (kensmith - in principle)
Pointyhat to:	simon
2011-01-18 22:19:55 +00:00
Marius Strobl a60256705b MFC: r217464, r217468, r217475
Add a manual page for rgephy(4) and reference it as appropriate. The
motivation for having rgephy.4 is to document the special media option
added in r217415 (MFC'ed to stable/7 in r217503).
2011-01-18 11:51:51 +00:00
Marius Strobl fd92aa79c0 MFC: r217415
- Allow IFM_FLAG0 to be set indicating that auto-negotiation with manual
  configuration, which is used to work around issues with certain setups
  (see r161237) by default, should not be triggered as it may in turn
  cause harm in some edge cases.
- Even after masking the media with IFM_GMASK the result may have bits
  besides the duplex ones set so just comparing it with IFM_FDX may lead
  to false negatives.
- Announce PAUSE support also for manually selected 1000BASE-T, but for
  all manually selected media types only in full-duplex mode. Announce
  asymmetric PAUSE support only for manually selected 1000BASE-T.
- Simplify setting the manual configuration bits to only once after we
  have figured them all out. This also means we no longer unnecessarily
  update the hardware along the road.
- Remove a stale comment.

Reviewed by:	yongari (plus additional testing)
2011-01-17 15:12:37 +00:00
Konstantin Belousov 6c883c20dd MFC r217383:
The (%esp & 0xf) == 0 should be true before the call instruction is
executed, for the properly aligned stack.
2011-01-16 10:47:35 +00:00
Jaakko Heinonen 893a742002 MFC r214748:
Extend the g_eventlock mutex coverage in one_event() to include setting
of the EV_DONE flag and use the mutex to protect against losing wakeups
in g_waitfor_event().
2011-01-15 09:36:31 +00:00
Pyun YongHyeon d4321c300b MFC r217296:
For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E),
  limit maximum RX buffer size to RE_RX_DESC_BUFLEN instead of
  blindly configuring it to 16KB. Due to lack of documentation, re(4)
  didn't allow jumbo frame on these controllers. However it seems
  controller is confused with jumbo frame such that it can DMA the
  received frame to wrong address instead of splitting it into
  multiple RX buffers. Of course, this caused panic.

  Since re(4) does not support jumbo frames on these controllers,
  make controller drop frame that is longer than RE_RX_DESC_BUFLEN
  sized frame. Fortunately RTL810x controllers, which do not support
  jumbo frame, have no such issues but this change also limited
  maximum RX buffer size allowed to RTL810x controllers. Allowing
  16KB RX buffer for controllers that have no such capability is
  meaningless.
2011-01-15 00:34:50 +00:00
Pyun YongHyeon 37845ea117 MFC r216131:
Document loader tunable hw.re.prefer_iomap.
2011-01-14 22:58:41 +00:00
Marius Strobl 4faaf45890 MFC: r217013
Teach ifconfig(8) the handy shared option shortcut aliases the NetBSD
counterpart also takes, i.e. "fdx" for "full-duplex", "flow" for
"flowcontrol", "hdx" for "half-duplex" as well as "loop" and "loopback"
for "hw-loopback".
2011-01-14 20:43:24 +00:00
Marius Strobl 988b6c0984 MFC: r217010
Fix whitespace.
2011-01-14 20:30:17 +00:00
Marius Strobl 9460472653 MFC: r217009
Remove a redundant variable assignment found with the clang static analyzer.
2011-01-14 20:28:12 +00:00
Bjoern A. Zeeb 49bca232d0 MFC r217135:
Clarify when we switch from keepidle to keepinvtl intervals if sending
  TCP keepalive probes is enabled.
2011-01-14 13:35:55 +00:00
Lawrence Stewart a611ce592e MFC r216995,217043:
Add a man page for the Object Specific Data (OSD) KPI.

Although not directly related the FreeBSD Foundation funded "Five New TCP
Congestion Control Algorithms for FreeBSD" project, the understanding and
inspiration required to write this documentation was significantly bolstered by
the Foundation's support.

Reviewed by:	pjd
2011-01-14 01:07:39 +00:00
Giorgos Keramidas ae3d81a70c MFC r217208 - regression/date: unset all LC_xxx vars and set LANG/LC_ALL
When running with a custom locale setup, it's easy to confuse the
date regression tests and cause them to fail, e.g. when LANG='C'
but LC_ALL='el_GR.UTF-8'.  Set LC_ALL to 'C', which overrides all
other LC_xxx options, to avoid this sort of problem.
2011-01-13 12:26:39 +00:00
Doug Barton 49e5def9f9 For stat.c
==========

MFC r216196:

Bring in the change from NetBSD 1.18:

"If using stat (the -L flag) and it fails, fall back to lstat().  It
may be the case that we're examining a broken symlink, and anything is
better than nothing."

The changes in 1.14 through 1.17 were not relevant to us.

Obtained from:	[email protected]

MFC r216202:

Bring in the change from NetBSD 1.22:

"Fix a trivial truncation case, and eliminate a corner case that might
print a nul character."

I am purposely bypassing the following versions:
1.19	A build infrastructure change that does not apply to us
1.20	A feature I am not interested in, but don't object if someone else
	wants to pick it up
1.21	A build infrastructure change that does not apply to us

Obtained from:	[email protected]

MFC r216203:

Bring in a new feature, adding a -f option to readlink to print the path
of the target, similar to realpath(1). See the discussion at:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=34662

This brings in the following changes:
1.24
"PR/34662: martijnb at atlas dot ipv6 dot stack dot nl: readlink doesn't
grok -f, and there's no alternative (+fix)

Patch applied with minor tweak (%y -> %R, as it was already taken) plus
some nits from myself. Thanks!"

Obtained from:	[email protected]

1.25
"Fix a segfault when doing 'stat -f %R' on the stdin file handle, instead
fake the filename '(stdin)' like the %N format."

Obtained from:	[email protected]

1.27
"The ofmt variable is actually a bit mask (not the character that was
in the format string) so that we can "or" it with the bits in the
formats variable.  This fixes the missing " -> " in front of the real
path (when you use %SR).

Also, the ?: needs another space."

Obtained from:	[email protected]

I am purposely omitting the following changes:
1.23	A humanize_number(3) clone that should better be implemented by
	actually using humanize_number(3)
1.26	This is the removal of license clause 3 and 4, already handled
	by imp in r203971

MFC 216205:

Bring in the update from NetBSD 1.28:

"Fix WARNS=4 issues (-Wcast-qual -Wsign-compare)"

Because of code differences I had to hand-apply parts of the patch,
so responsibility for errors goes to me.

Obtained from:	[email protected]

MFC 216206:	[ Also applies to Makefile ]

Fix an "unused variable" error that gets us all the way to WARNS=6

MFC 216207:

Bring in the following changes from NetBSD. See the discussion at:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44128

1.29
"Don't printf time_t with %d; fixes PR 44128 from yamt. With this change it
successfully prints mtimes after 2038."

1.30
"Improve previous with comments."

Obtained from:	[email protected] (both)

MFC 216343:

Bring in the change from OpenBSD's 1.14:

"synchronize synopsis and usage; "-l", "-r", "-s" and "-x" are mutually
exclusive; while here, slightly improve spacing in the source code
so it fits on a 80-column display again.

diff greatly improved by martynas@"

Obtained from:	[email protected]

MFC 216512:

Bring in the relevant changes from NetBSD's 1.31:

"Use strlcpy, not strncpy, when the desired semantics are strlcpy's
rather than strncpy's."

Note: NetBSD's 1.32 is their adoption of our r216206

Obtained from:	[email protected]

For stat.1
==========

MFC 216197:

Add my own documentation for the change in our r216196, aka NetBSD's 1.18
For -L if stat(2) fails, fall back to lstat(2).

.Dd purposely not bumped because more changes are coming.

MFC 216204:

Bring in the update from NetBSD 1.19, the documentation of readlink -f

"PR/34662: martijnb at atlas dot ipv6 dot stack dot nl: readlink doesn't
grok -f, and there's no alternative (+fix)

Patch applied with minor tweak (%y -> %R, as it was already taken) plus
some nits from myself. Thanks!"

Obtained from:	[email protected]

MFC 216209:

Bring in the change from NetBSD 1.12:

"document default format."

Obtained from:	[email protected]

MFC 216213:

Bring in the changes from NetBSD 1.13 that we did not already have, with
some differences.

"Sort options. Use more mdoc macros. Some nit fixes. Bump date."

Obtained from:	[email protected]

MFC 216215:

Bring in the changes from NetBSD 1.16 that we did not already have.

"Some fixes from jmc@openbsd."

Obtained from:	[email protected]

MFC 216216:

Bring in the change from NetBSD 1.20:

"Make sentence easier to parse. From jsing@openbsd via jmc@openbsd."

Obtained from:	[email protected]

MFC 216218:

Bring in the following changes from NetBSD:

1.21
"Document the flags displayed by the default format, and mention their short
names. From espie@openbsd via jmc@openbsd."

1.24
"Fix three variable names.
From Todd T. Fries via Jason McIntyre."

Obtained from:	[email protected] (previous 2)

1.25
"Be consistent: document the birthtime field of struct stat for
the "B" field specifier."

Obtained from:	[email protected]

1.26
"Drop trailing space."

Obtained from:	[email protected]

1.27
"Since we have st_birthtime in struct stat, it is in default display."

Obtained from:	[email protected]

Purposely skipping the following revisions:
1.22	NetBSD-specific change
1.23	Removal of license clauses 3 and 4, already handled by imp
	in our r203971

MFC 216219:

Bring in the change from NetBSD 1.28:

"\\ -> \e"

Obtained from:	[email protected]

Bump .Dd because we're now up to date with the latest NetBSD version
2011-01-12 07:38:48 +00:00
Doug Barton 5152a1cd78 MFC r188498 (partial):
"I've changed main() to set file properly, so output() is never called
with file set to NULL."

Obtained from:	ed

The other bits of that revision are related to using fdevname(3).
This was never merged back to RELENG_7, however the cleanup of
the code in this MFC is good both for general purposes, and diff
reduction to HEAD (which in turn will make the following MFCs easier).
2011-01-12 07:27:30 +00:00
Doug Barton 9affd66594 MFC 178651:
The referenced section name is 'Formats', not 'FORMATS'.
2011-01-12 05:37:13 +00:00
Doug Barton 3524148a59 MFC r203971:
The NetBSD Foundation has granted permission to remove clause 3 and 4
from their software.

Obtained from:  NetBSD
2011-01-11 20:05:53 +00:00
Pyun YongHyeon 789ab80d00 MFC r217226:
Apply DMA address space restriction to controllers that have 4GB
  DMA boundary bug and runs with PCI-X mode.  watchdog timeout was
  observed on BCM5704 which lives behind certain PCI-X bridge(e.g.
  AMD 8131 PCI-X bridge).  It's still not clear whether the root
  cause came from that PCI-X bridge or not. The watchdog timeout
  indicates the issue is in TX path. If the bridge reorders TX
  mailbox write accesses it would generate all kinds of problems but
  I'm not sure.  This should be revisited.

  Early MFC requested by re@ for inclusion in 8.2-RC2/7.4-RC2.

  Tested by:	Michael L. Squires (mikes <> siralan dot org)
2011-01-10 19:48:24 +00:00
Josh Paetzel c68e20ca30 MFC 216983:
Fix typo in comment.

Approved by:	Warner Losh <[email protected]>
2011-01-07 18:41:32 +00:00
Brian Somers 98dd30c6a1 MFC r216832: Make -S functional 2011-01-07 08:45:56 +00:00
Marius Strobl 2d1b306a52 MFC: r216820 (partial)
Add CPUTYPE support for sparc64. The net result is that it's now possible
to let the compiler optimize for the famility of UltraSPARC-III CPUs as the
default already was to optimize for UltraSPARC-I/II and generating generic
64-bit V9 is mainly for reference purposes. At least for SPARC64-V CPUs
code optimized for UltraSPARC-I/II still is the most performant one.
Thanks go to Michael Moll for testing SPARC64-V.
2011-01-05 13:36:59 +00:00
Marius Strobl 643b1615c1 MFC: r216802
- Move the macros for generating load and store instructions to asmacros.h
  so they can be shared by different source files and extend them by a
  variant for atomic compare and swap.
- Consistently use EMPTY.
2011-01-05 12:27:57 +00:00
Marius Strobl fac3d59ee7 MFC: r216801
Rename the "xor" parameter to "xorval" as the former is a reserved keyword
in C++.

Submitted by:	gahr
2011-01-05 12:20:55 +00:00
Marius Strobl 1e89a2cf1d MFC: r216628
Extend the hack of r182730 (MFC'ed to stable/7 in r190033) to trick
GAS/GCC into compiling access to STICK/STICK_COMPARE independently
of the selected instruction set by TICK_COMPARE so tick.c once again
can be compiled with gcc -mcpu=v9 for reference purposes.
2011-01-05 12:05:31 +00:00
Marius Strobl 5ca0753649 MFC: r216623
- Add a comment regarding the fact that as documented in the datasheet
  manual 1000BASE-T modes of DP83865 only work together with other National
  Semiconductor PHYs.
- Spell 10BASE-T correctly
- Remove some redundant braces.
2011-01-05 11:46:18 +00:00
Marius Strobl 85045c7cce MFC: r216085
- Remove the remaining support for older (in this case pre-7.0-RELEASE)
  versions of FreeBSD. In fact we are already missing a lot of conditional
  code necessary to support older versions of FreeBSD, including alternatives
  for vital functionality not yet provided by the respective subsystem back
  then (see for example r199663). So this change shouldn't actually break
  this driver on versions of FreeBSD that were supported before. Besides,
  this driver also isn't maintained as an multi-release version outside of
  the main repository, so removing the conditional code shouldn't be a
  problem in that regard either.
- Sprinkle some more const on tables.
2011-01-05 11:43:17 +00:00
Marius Strobl f44a32b942 MFC: r216891
Extend the section in which interrupts are disabled in the TLB demap
functions, otherwise if we get preempted after checking whether a certain
pmap is active on the current CPU but before disabling interrupts we might
operate on an outdated state as the pmap might have been deactivated in
the meantime. As the same issue may arises when the TLB demap function is
interrupted by a TLB demap IPI, just entering a critical section before
the check isn't sufficient so we have to fully disable interrupts instead.
2011-01-05 11:29:10 +00:00
Gavin Atkinson 3a0c7d068d Merge r216045 from head (by hand, due to code changes):
Support the Falcom Twist USB GSM/GPRS modem in uftdi(4)

PR:		usb/151862
Submitted by:	Alessandro de Manzano <demanzano dqmicro.it>
2011-01-04 20:38:52 +00:00
John Baldwin 2d7537be7a MFC 216769:
Start sentences on a new line to ease life for translators.  Tweak the
wording in a few places.
2011-01-04 15:11:08 +00:00
Lawrence Stewart ae2bb0acf4 MFC r210144 (originally committed by imp):
Put warnings out to stderr rather than stdout.
2011-01-02 13:31:10 +00:00
Bjoern A. Zeeb 9f83f5cafb MFC r216848:
Happy New Year 2011.

  Approved by:  core (kib)
2010-12-31 18:16:44 +00:00
John Baldwin 8219215297 MFC 199805,203532,204329,210063,210065:
- Change gcore in order to get rid of the procfs accesses and use FreeBSD's
  specific sysctls and ptrace interfaces.
  This change switches a bit gcore POLA that is summarized here:
  - now gcore can recognize threads within the process and handle dumps
    on thread-scope
  - the process to be analyzed will be stopped during its gcore run
  - gcore may not work with processes which are actively being analyzed
    by gdb or truss
  - the ptrace interface may cause syscalls to return EINTR, thus
    interferring with signals handling within the process
- Fix gcore so that it can have the '-s' flag without hanging.
- Fix the way the segments are included in the gcore outputs (with the
  default invokation):
  - Right now if segments are not writable are not included. Remove this.
  - Right now if a segment is mapped with NOCORE the check is not honoured.
    Change this by checking the newly added flag, from libutil,
    KVME_FLAG_NOCOREDUMP.

  Besides that, add a new flag (-f) that forces a 'full' dump of all the
  segments excluding just the malformed ones. This might be used very
  carefully as, among the reported segments, there could be memory
  mapped areas that could be vital to program execution.
2010-12-28 19:26:57 +00:00
John Baldwin 98d4669339 MFC 208587: Add support for reporting the NOCOREDUMP flag from
sysctl_kern_proc_vmmap().
2010-12-28 18:37:10 +00:00
Ken Smith 37b269a76f Add the package directories for the 7.4, 8.1, and 8.2 releases.
Approved by:	re (implicit)
2010-12-22 14:47:45 +00:00
Ken Smith 806667a621 Adjust __FreeBSD_version to reflect that the branch for the FreeBSD 7.4
release has happened.

Approved by:	re (implicit)
2010-12-22 14:45:43 +00:00
Ken Smith 855387ee45 Misc. 7.3 -> 7.4 adjustments as part of progress on the FreeBSD 7.4 release.
Approved by:	re (implicit)
2010-12-22 14:44:22 +00:00
Ken Smith 6578d88b02 Adjust the version of FreeBSD printed on the manual pages.
Approved by:	re (implicit)
2010-12-22 14:43:20 +00:00
4306 changed files with 444824 additions and 103110 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
The compilation of software known as FreeBSD is distributed under the
following terms:
Copyright (c) 1992-2010 The FreeBSD Project. All rights reserved.
Copyright (c) 1992-2013 The FreeBSD Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+2 -1
View File
@@ -3,7 +3,7 @@ $FreeBSD$
Please note that the content of this file is strictly advisory.
No locks listed here are valid. The only strict review requirements
are granted by core. These are documented in src/LOCKS and enforced
by CVSROOT/approvers.
by svnadmin/conf/approvers.
The source tree is a community effort. However, some folks go to the
trouble of looking after particular areas of the tree. In return for
@@ -129,6 +129,7 @@ gnu/usr.bin/send-pr bugmaster Pre-commit review requested.
BSD.{local,x11*}.dist portmgr Pre-commit review requested, since these files interface with ports.
usb core Please contact core@ before any major changes
ncurses rafan Heads-up appreciated, try not to break it.
isci(4) jimharris Pre-commit review requested.
Following are the entries from the Makefiles, and a few other sources.
Please remove stale entries from both their origin, and this file.
+9 -7
View File
@@ -21,7 +21,7 @@
# check-old-dirs - List obsolete directories.
# check-old-files - List obsolete files.
# check-old-libs - List obsolete libraries.
# delete-old - Delete obsolete directories/files/libraries.
# delete-old - Delete obsolete directories/files.
# delete-old-dirs - Delete obsolete directories.
# delete-old-files - Delete obsolete files.
# delete-old-libs - Delete obsolete libraries.
@@ -57,7 +57,7 @@
# 6. `mergemaster -p'
# 7. `make installworld'
# 8. `make delete-old'
# 9. `mergemaster' (you may wish to use -U or -ai).
# 9. `mergemaster' (you may wish to use -i, along with -U or -F).
# 10. `reboot'
# 11. `make delete-old-libs' (in case no 3rd party program uses them anymore)
#
@@ -139,10 +139,12 @@ buildworld: upgrade_checks
#
# In the following, the first 'rm' in a series will usually remove all
# files and directories. If it does not, then there are probably some
# files with chflags set, so this unsets them and tries the 'rm' a
# files with file flags set, so this unsets them and tries the 'rm' a
# second time. There are situations where this target will be cleaning
# some directories via more than one method, but that duplication is
# needed to correctly handle all the possible situations.
# needed to correctly handle all the possible situations. Removing all
# files without file flags set in the first 'rm' instance saves time,
# because 'chflags' will need to operate on fewer files afterwards.
#
BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
cleanworld:
@@ -270,9 +272,9 @@ make: .PHONY
# existing system is.
#
.if make(universe)
TARGETS?=amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v
TARGETS?=amd64 arm i386 ia64 pc98 powerpc sparc64
universe: universe_prologue
universe: universe_prologue upgrade_checks
universe_prologue:
@echo "--------------------------------------------------------------"
@echo ">>> make universe started on ${STARTTIME}"
@@ -283,7 +285,7 @@ KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \
! -name DEFAULTS ! -name LINT
KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/}
universe: universe_${target}
.ORDER: universe_prologue universe_${target} universe_epilogue
.ORDER: universe_prologue upgrade_checks universe_${target}_prologue universe_${target} universe_epilogue
universe_${target}:
.if !defined(MAKE_JUST_KERNELS)
@echo ">> ${target} started on `LC_ALL=C date`"
+10 -3
View File
@@ -735,15 +735,17 @@ buildkernel:
@echo ">>> stage 2.3: build tools"
@echo "--------------------------------------------------------------"
cd ${KRNLOBJDIR}/${_kernel}; \
PATH=${BPATH}:${PATH} \
MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \
${MAKE} -DNO_CPU_CFLAGS -DNO_CTF \
${MAKE} -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \
-f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile
# XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case.
.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules)
.for target in obj depend all
cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \
PATH=${BPATH}:${PATH} \
MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \
${MAKE} -DNO_CPU_CFLAGS -DNO_CTF ${target}
${MAKE} -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF ${target}
.endfor
.endif
.if !defined(NO_KERNELDEPEND)
@@ -888,6 +890,10 @@ _colldef= usr.bin/colldef
_gencat= usr.bin/gencat
.endif
.if ${BOOTSTRAPPING} >= 1000013
_yacc= usr.bin/yacc
.endif
.if ${BOOTSTRAPPING} < 600016
_mklocale= usr.bin/mklocale
.endif
@@ -922,6 +928,7 @@ bootstrap-tools:
${_gencat} \
usr.bin/lorder \
usr.bin/makewhatis \
${_yacc} \
${_mklocale} \
usr.bin/rpcgen \
usr.bin/xinstall \
@@ -986,7 +993,7 @@ build-tools:
#
# cross-tools: Build cross-building tools
#
.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 702102
.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 702104
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
_btxld= usr.sbin/btxld
.endif
+4
View File
@@ -14,12 +14,16 @@
# The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
#
# 20110224: sticky.8 -> sticky.7
OLD_FILES+=usr/share/man/man8/sticky.8.gz
# 20101114: Remove long-obsolete MAKEDEV.8
OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz
# 20101112: vgonel(9) has gone to private API a while ago
OLD_FILES+=usr/share/man/man9/vgonel.9.gz
# 20101025: catch up with vm_page_sleep_if_busy rename
OLD_FILES+=usr/share/man/man9/vm_page_sleep_busy.9.gz
# 20100815: retired last traces of chooseproc(9)
OLD_FILES+=usr/share/man/man9/chooseproc.9.gz
# 20091129: pecoff image activator removed
.if ${TARGET_ARCH} == "i386"
OLD_FILES+=usr/include/machine/pecoff_machdep.h
+17 -5
View File
@@ -8,6 +8,13 @@ Items affecting the ports and packages system can be found in
/usr/ports/UPDATING. Please read that file before running
portupgrade.
20111101:
The broken amd(4) driver has been replaced with esp(4) in the amd64,
i386 and pc98 GENERIC kernel configuration files.
20110221:
FreeBSD 7.4-RELEASE
20101126:
New version of minidump format for amd64 architecture was
introduced in r215874. To analyze vmcore files produced by
@@ -985,8 +992,8 @@ COMMON ITEMS:
<reboot in single user> [3]
mergemaster -p [5]
make installworld
make delete-old
mergemaster [4]
make delete-old [6]
<reboot>
@@ -1023,8 +1030,8 @@ COMMON ITEMS:
<reboot in single user> [3]
mergemaster -p [5]
make installworld
make delete-old
mergemaster -i [4]
make delete-old [6]
<reboot>
Make sure that you've read the UPDATING file to understand the
@@ -1066,6 +1073,10 @@ COMMON ITEMS:
install) after the buildworld before this step if you last updated
from current before 20020224 or from -stable before 20020408.
[6] This only deletes old files and directories. Old libraries
can be deleted by "make delete-old-libs", but you have to make
sure that no program is using those libraries anymore.
[8] In order to have a kernel that can run the 4.x binaries
needed to do an installworld, you must include the COMPAT_FREEBSD4
option in your kernel. Failure to do so may leave you with a system
@@ -1088,9 +1099,10 @@ COMMON ITEMS:
FORMAT:
This file contains a list, in reverse chronological order, of major
breakages in tracking -current. Not all things will be listed here,
and it only starts on October 16, 2004. Updating files can found in
previous releases if your system is older than this.
breakages in tracking -current. It is not guaranteed to be a complete
list of such breakages, and only contains entries since October 16, 2004.
If you need to see UPDATING entries from before that date, you will need
to fetch an UPDATING file from an older FreeBSD release.
Copyright information:
+7 -2
View File
@@ -32,7 +32,7 @@
.\" @(#)chmod.1 8.4 (Berkeley) 3/31/94
.\" $FreeBSD$
.\"
.Dd December 22, 2006
.Dd January 23, 2009
.Dt CHMOD 1
.Os
.Sh NAME
@@ -281,6 +281,10 @@ Operations upon the other permissions only (specified by the symbol
``o'' by itself), in combination with the
.Ar perm
symbols ``s'' or ``t'', are ignored.
.Pp
The ``w'' permission on directories will permit file creation, relocation,
and copy into that directory.
Files created within the directory itself will inherit its group ID.
.Sh EXAMPLES
.Bl -tag -width "u=rwx,go=u-w" -compact
.It Li 644
@@ -343,4 +347,5 @@ command appeared in
.Sh BUGS
There is no
.Ar perm
option for the naughty bits.
option for the naughty bits which are ``S'' and
``T'' respectively.
+3 -3
View File
@@ -18,7 +18,7 @@ DFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG}"'
DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"'
.endif
CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS}
WARNS?= 0
WARNS?= 1
SRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
@@ -107,10 +107,10 @@ gethost: gethost.c sh.err.h tc.const.h sh.h
@rm -f ${.TARGET}
${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c
tc.defs.c: gethost ${.CURDIR}/host.defs
tc.defs.c: gethost ${TCSHDIR}/host.defs
@rm -f ${.TARGET}
@echo "/* Do not edit this file, make creates it */" > ${.TARGET}
./gethost ${.CURDIR}/host.defs >> ${.TARGET}
./gethost ${TCSHDIR}/host.defs >> ${.TARGET}
ed.defns.h: ed.defns.c
@rm -f ${.TARGET}
+57 -22
View File
@@ -1,5 +1,5 @@
/* $FreeBSD$ */
/* config.h. Generated by configure. */
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to the type of elements in the array set by `getgroups'. Usually
@@ -12,9 +12,6 @@
/* Define to 1 if you have the <auth.h> header file. */
/* #undef HAVE_AUTH_H */
/* Define to 1 if you have the `catgets' function. */
#define HAVE_CATGETS 1
/* Define to 1 if you have the <crypt.h> header file. */
/* #undef HAVE_CRYPT_H */
@@ -41,6 +38,9 @@
/* Define to 1 if you have the `dup2' function. */
#define HAVE_DUP2 1
/* Define to 1 if you have the <features.h> header file. */
/* #undef HAVE_FEATURES_H */
/* Define to 1 if you have the `getauthid' function. */
/* #undef HAVE_GETAUTHID */
@@ -56,7 +56,10 @@
/* Define to 1 if you have the `getutent' function. */
/* #undef HAVE_GETUTENT */
/* Define if you have the iconv() function. */
/* Define to 1 if you have the `getutxent' function. */
/* #undef HAVE_GETUTXENT */
/* Define if you have the iconv() function and it works. */
/* #undef HAVE_ICONV */
/* Define to 1 if you have the <inttypes.h> header file. */
@@ -65,6 +68,9 @@
/* Define to 1 if the system has the type `long long'. */
#define HAVE_LONG_LONG 1
/* Define to 1 if you have the `mallinfo' function. */
/* #undef HAVE_MALLINFO */
/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
#define HAVE_MBRTOWC 1
@@ -77,6 +83,9 @@
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mkstemp' function. */
#define HAVE_MKSTEMP 1
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */
@@ -86,6 +95,9 @@
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <paths.h> header file. */
#define HAVE_PATHS_H 1
/* Define to 1 if you have the `sbrk' function. */
#define HAVE_SBRK 1
@@ -120,22 +132,34 @@
/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1
/* Define to 1 if `d_ino' is member of `struct dirent'. */
/* Define to 1 if `d_ino' is a member of `struct dirent'. */
#define HAVE_STRUCT_DIRENT_D_INO 1
/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */
/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
/* Define to 1 if `ut_host' is member of `struct utmp'. */
/* Define to 1 if `ut_host' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_HOST */
/* Define to 1 if `ut_tv' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_TV */
/* Define to 1 if `ut_user' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_USER */
/* Define to 1 if `ut_xtime' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_XTIME */
/* Define to 1 if `ut_host' is a member of `struct utmp'. */
#define HAVE_STRUCT_UTMP_UT_HOST 1
/* Define to 1 if `ut_tv' is member of `struct utmp'. */
/* Define to 1 if `ut_tv' is a member of `struct utmp'. */
/* #undef HAVE_STRUCT_UTMP_UT_TV */
/* Define to 1 if `ut_user' is member of `struct utmp'. */
/* Define to 1 if `ut_user' is a member of `struct utmp'. */
/* #undef HAVE_STRUCT_UTMP_UT_USER */
/* Define to 1 if `ut_xtime' is member of `struct utmp'. */
/* Define to 1 if `ut_xtime' is a member of `struct utmp'. */
/* #undef HAVE_STRUCT_UTMP_UT_XTIME */
/* Define to 1 if you have the `sysconf' function. */
@@ -179,25 +203,31 @@
/* Support NLS. */
#define NLS 1
/* Support NLS catalogs. */
#define NLS_CATALOGS 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
#define PACKAGE_BUGREPORT "http://bugs.gw.com/"
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
#define PACKAGE_NAME "tcsh"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
#define PACKAGE_STRING "tcsh 6.18.01"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
#define PACKAGE_TARNAME "tcsh"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
#define PACKAGE_VERSION "6.18.01"
/* Define to 1 if the `setpgrp' function takes no argument. */
/* #undef SETPGRP_VOID */
/* The size of a `wchar_t', as computed by sizeof. */
/* The size of `wchar_t', as computed by sizeof. */
#define SIZEOF_WCHAR_T 4
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
@@ -206,6 +236,11 @@
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
/* #undef _UINT32_T */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
@@ -215,7 +250,7 @@
/* Define to `int' if <sys/types.h> does not define. */
/* #undef mode_t */
/* Define to `unsigned' if <sys/types.h> does not define. */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `int' if neither <sys/types.h> nor <sys/socket.h> define. */
@@ -227,6 +262,10 @@
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef uid_t */
/* Define to the type of an unsigned integer type of width exactly 32 bits if
such a type exists and the standard includes do not define it. */
/* #undef uint32_t */
/* Define to empty if the keyword `volatile' does not work. Warning: valid
code using `volatile' can become incorrect without. Disable with care. */
/* #undef volatile */
@@ -234,9 +273,5 @@
#include "config_p.h"
#include "config_f.h"
#ifndef NO_NLS_CATALOGS
#define NLS_CATALOGS
#endif
/* Work around a vendor issue where config_f.h is #undef'ing this setting */
#define SYSMALLOC
-3
View File
@@ -105,9 +105,6 @@
#elif defined(__APPLE__)
# define SYSMALLOC
#else
# define NLS_CATALOGS
#endif
#endif /* _h_config */
-1140
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -124,7 +124,7 @@ main(int argc, char *argv[])
/* FALLTHROUGH */
case 'P':
/*
* POSIX specifically discusses the the behavior of
* POSIX specifically discusses the behavior of
* both -k and -P. It states that the blocksize should
* be set to 1024. Thus, if this occurs, simply break
* rather than clobbering the old blocksize.
+3
View File
@@ -94,6 +94,7 @@ put_sbuf_line(const char *cs)
;
if (s - cs >= LINECHARS) {
errmsg = "line too long";
free(lp);
return NULL;
}
len = s - cs;
@@ -102,6 +103,7 @@ put_sbuf_line(const char *cs)
if (fseeko(sfp, (off_t)0, SEEK_END) < 0) {
fprintf(stderr, "%s\n", strerror(errno));
errmsg = "cannot seek temp file";
free(lp);
return NULL;
}
sfseek = ftello(sfp);
@@ -112,6 +114,7 @@ put_sbuf_line(const char *cs)
sfseek = -1;
fprintf(stderr, "%s\n", strerror(errno));
errmsg = "cannot write temp file";
free(lp);
return NULL;
}
lp->len = len;
+2 -2
View File
@@ -231,7 +231,7 @@ The current line (address) in the buffer.
The last line in the buffer.
.It n
The
.Em n Ns th,
.Em n Ns th
line in the buffer
where
.Em n
@@ -649,7 +649,7 @@ The mark is not cleared until the line is
deleted or otherwise modified.
.It (.,.)l
Print the addressed lines unambiguously.
If a single line fills for than one screen (as might be the case
If a single line fills more than one screen (as might be the case
when viewing a binary file, for instance), a
.Dq Li --More--
prompt is printed on the last line.
+1 -1
View File
@@ -183,7 +183,7 @@ do_move(char *from, char *to)
} else if (iflg) {
(void)fprintf(stderr, "overwrite %s? %s", to, YESNO);
ask = 1;
} else if (access(to, W_OK) && !stat(to, &sb)) {
} else if (access(to, W_OK) && !stat(to, &sb) && isatty(STDIN_FILENO)) {
strmode(sb.st_mode, modep);
(void)fprintf(stderr, "override %s%s%s/%s for %s? %s",
modep + 1, modep[9] == ' ' ? "" : " ",
+18 -11
View File
@@ -29,7 +29,7 @@
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
.Dd May 16, 2009
.Dd October 1, 2011
.Dt PS 1
.Os
.Sh NAME
@@ -54,6 +54,11 @@ utility
displays a header line, followed by lines containing information about
all of your
processes that have controlling terminals.
If the
.Fl x
options is specified,
.Nm
will also display processes that do not have controlling terminals.
.Pp
A different set of processes can be selected for display by using any
combination of the
@@ -90,8 +95,8 @@ and
.Fl o
options).
The default output format includes, for each process, the process' ID,
controlling terminal, CPU time (including both user and system time),
state, and associated command.
controlling terminal, state, CPU time (including both user and system time)
and associated command.
.Pp
The process file system (see
.Xr procfs 5 )
@@ -103,13 +108,9 @@ The options are as follows:
.Bl -tag -width indent
.It Fl a
Display information about other users' processes as well as your own.
This will skip any processes which do not have a controlling terminal,
unless the
.Fl x
option is also specified.
This can be disabled by setting the
If the
.Va security.bsd.see_other_uids
sysctl to zero.
sysctl is set to zero, this option is honored only if the UID of the user is 0.
.It Fl c
Change the
.Dq command
@@ -213,6 +214,9 @@ with the standard input.
.It Fl t
Display information about processes attached to the specified terminal
devices.
Full pathnames, as well as abbreviations (see explanation of the
.Cm tt
keyword) can be specified.
.It Fl U
Display the processes belonging to the specified usernames.
.It Fl u
@@ -411,12 +415,15 @@ The process is being traced or debugged.
An abbreviation for the pathname of the controlling terminal, if any.
The abbreviation consists of the three letters following
.Pa /dev/tty ,
or, for the console,
.Dq Li con .
or, for pseudo-terminals, the corresponding entry in
.Pa /dev/pts .
This is followed by a
.Ql -
if the process can no longer reach that
controlling terminal (i.e., it has been revoked).
The full pathname of the controlling terminal is available via the
.Cm tty
keyword.
.It Cm wchan
The event (an address in the system) on which a process waits.
When printed numerically, the initial part of the address is
+17 -4
View File
@@ -288,10 +288,16 @@ rm_tree(char **argv)
if (fflag)
continue;
/* FALLTHROUGH */
default:
case FTS_F:
case FTS_NSOK:
if (Pflag)
if (!rm_overwrite(p->fts_accpath, NULL))
if (!rm_overwrite(p->fts_accpath, p->fts_info ==
FTS_NSOK ? NULL : p->fts_statp))
continue;
/* FALLTHROUGH */
default:
rval = unlink(p->fts_accpath);
if (rval == 0 || (fflag && errno == ENOENT)) {
if (rval == 0 && vflag)
@@ -386,7 +392,7 @@ rm_file(char **argv)
int
rm_overwrite(char *file, struct stat *sbp)
{
struct stat sb;
struct stat sb, sb2;
struct statfs fsb;
off_t len;
int bsize, fd, wlen;
@@ -405,8 +411,15 @@ rm_overwrite(char *file, struct stat *sbp)
file, sbp->st_ino);
return (0);
}
if ((fd = open(file, O_WRONLY, 0)) == -1)
if ((fd = open(file, O_WRONLY|O_NONBLOCK|O_NOFOLLOW, 0)) == -1)
goto err;
if (fstat(fd, &sb2))
goto err;
if (sb2.st_dev != sbp->st_dev || sb2.st_ino != sbp->st_ino ||
!S_ISREG(sb2.st_mode)) {
errno = EPERM;
goto err;
}
if (fstatfs(fd, &fsb) == -1)
goto err;
bsize = MAX(fsb.f_iosize, 1024);
+1 -1
View File
@@ -944,7 +944,7 @@ numvar:
/*
* Record the the fact that we have to scan this region of the
* Record the fact that we have to scan this region of the
* string for IFS characters.
*/
+3 -6
View File
@@ -523,9 +523,8 @@ var_compare(const void *a, const void *b)
/*
* Command to list all variables which are set. Currently this command
* is invoked from the set command when the set command is called without
* any variables.
* Command to list all variables which are set. This is invoked from the
* set command when it is called without any options or operands.
*/
int
@@ -760,9 +759,7 @@ setvarcmd(int argc, char **argv)
/*
* The unset builtin command. We unset the function before we unset the
* variable to allow a function to be unset when there is a readonly variable
* with the same name.
* The unset builtin command.
*/
int
+4
View File
@@ -9,6 +9,10 @@
*
* This program is in the Public Domain.
*/
/*
* Important: This file is used both as a standalone program /bin/test and
* as a builtin for /bin/sh (#define SHELL).
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+6 -3
View File
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd September 7, 2005
.Dd May 23, 2012
.Dt UUIDGEN 1
.Os
.Sh NAME
@@ -52,8 +52,11 @@ instructs
to not generate them in batch, but one at a time.
.It Fl n
This option controls the number of identifiers generated.
By default, multiple
identifiers are generated in batch.
By default, multiple identifiers are generated in batch.
The upper hard limit is 2048
.Po see
.Xr uuidgen 2
.Pc .
.It Fl o
Redirect output to
.Ar filename
+4 -2
View File
@@ -95,8 +95,10 @@ zmount(const char *spec, const char *dir, int mflag, char *fstype,
build_iovec(&iov, &iovlen, "fspath", __DECONST(char *, dir),
(size_t)-1);
build_iovec(&iov, &iovlen, "from", __DECONST(char *, spec), (size_t)-1);
for (p = optstr; p != NULL; strsep(&p, ",/ "))
build_iovec(&iov, &iovlen, p, NULL, (size_t)-1);
for (p = optstr; p != NULL; strsep(&p, ",/ ")) {
if (*p != '\0')
build_iovec(&iov, &iovlen, p, NULL, (size_t)-1);
}
rv = nmount(iov, iovlen, 0);
free(optstr);
return (rv);
@@ -45,7 +45,7 @@
#undef input
#undef unput
#else
/*
/*
* Define YY_INPUT for flex since input() can't be re-defined.
*/
#define YY_INPUT(buf,result,max_size) \
@@ -60,6 +60,19 @@
buf[n] = *yypcb->pcb_strptr++; \
result = n; \
}
/*
* Do not EOF let tokens to be put back. This does not work with flex.
* On the other hand, leaving current buffer in same state it was when
* last EOF was received guarantees that input() will keep returning EOF
* for all subsequent invocations, which is the effect desired.
*/
#undef unput
#define unput(c) \
do { \
int _c = c; \
if (_c != EOF) \
yyunput(_c, yytext_ptr); \
} while(0)
#endif
static int id_or_type(const char *);
+86
View File
@@ -1,3 +1,89 @@
--- 9.4-ESV-R5-P1 released ---
3218. [security] Cache lookup could return RRSIG data associated with
nonexistent records, leading to an assertion
failure. [RT #26590]
--- 9.4-ESV-R5 released ---
3135. [port] FreeBSD: workaround broken IPV6_USE_MIN_MTU processing.
See http://www.freebsd.org/cgi/query-pr.cgi?pr=158307
[RT #24950]
3023. [bug] Named could be left in an inconsistent state when
receiving multiple AXFR response messages that were
not all TSIG-signed. [RT #23254]
--- 9.4-ESV-R5rc1 released ---
3124. [bug] Use an rdataset attribute flag to indicate
negative-cache records rather than using rrtype 0;
this will prevent problems when that rrtype is
used in actual DNS packets. [RT #24777]
3121. [security] An authoritative name server sending a negative
response containing a very large RRset could
trigger an off-by-one error in the ncache code
and crash named. [RT #24650]
3120. [bug] Named could fail to validate zones list in a DLV
that validated insecure without using DLV and had
DS records in the parent zone. [RT #24631]
3113. [doc] Document the relationship between serial-query-rate
and NOTIFY messages.
--- 9.4-ESV-R5b1 released ---
3095. [bug] Handle isolated reserved ports in the port range.
[RT #23957]
3088. [bug] Remove bin/tests/system/logfileconfig/ns1/named.conf
and add setup.sh in order to resolve changing
named.conf issue. [RT #23687]
3071. [bug] has_nsec could be used unintialised in
update.c:next_active. [RT #20256]
3067. [bug] ixfr-from-differences {master|slave}; failed to
select the master/slave zones. [RT #23580]
3065. [bug] RRSIG could have time stamps too far in the future.
[RT #23356]
3064. [bug] powerpc: add sync instructions to the end of atomic
operations. [RT #23469]
3058. [bug] Cause named to terminate at startup or rndc reconfig/
reload to fail, if a log file specified in the conf
file isn't a plain file. [RT #22771]
3051. [bug] NS records obsure DNAME records at the bottom of the
zone if both are present. [RT #23035]
3041. [bug] dnssec-signzone failed to generate new signatures on
ttl changes. [RT #23330]
3040. [bug] Named failed to validate insecure zones where a node
with a CNAME existed between the trust anchor and the
top of the zone. [RT #23338]
3037. [doc] Update COPYRIGHT to contain all the individual
copyright notices that cover various parts.
3014. [bug] Fix the zonechecks system test to match expected
behaviour for 9.4 and to fail on error. [RT #22905]
3009. [bug] clients-per-query code didn't work as expected with
particular query patterns. [RT #22972]
3007. [bug] Named failed to preserve the case of domain names in
rdata which is not compressible when writing master
files. [RT #22863]
2996. [security] Temporarily disable SO_ACCEPTFILTER support.
[RT #22589]
--- 9.4-ESV-R4 released ---
2970. [security] Adding a NO DATA negative cache entry failed to clear
+491 -3
View File
@@ -1,4 +1,4 @@
Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 1996-2003 Internet Software Consortium.
Permission to use, copy, modify, and/or distribute this software for any
@@ -13,9 +13,15 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
$Id: COPYRIGHT,v 1.9.18.7 2010/01/07 23:46:07 tbox Exp $
$Id: COPYRIGHT,v 1.9.18.9 2011-02-22 06:45:07 marka Exp $
Portions Copyright (C) 1996-2001 Nominum, Inc.
Portions of this code release fall under one or more of the
following Copyright notices. Please see individual source
files for details.
For binary releases also see: OpenSSL-LICENSE.
Copyright (C) 1996-2001 Nominum, Inc.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -28,3 +34,485 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-----------------------------------------------------------------------------
Copyright (C) 1995-2000 by Network Associates, Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NETWORK ASSOCIATES DISCLAIMS
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-----------------------------------------------------------------------------
Copyright (C) 2002 Stichting NLnet, Netherlands, [email protected].
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all
copies.
THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
USE OR PERFORMANCE OF THIS SOFTWARE.
The development of Dynamically Loadable Zones (DLZ) for Bind 9 was
conceived and contributed by Rob Butler.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all
copies.
THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
USE OR PERFORMANCE OF THIS SOFTWARE.
-----------------------------------------------------------------------------
Copyright (c) 1987, 1990, 1993, 1994
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (C) The Internet Society 2005. This version of
this module is part of RFC 4178; see the RFC itself for
full legal notices.
(The above copyright notice is per RFC 3978 5.6 (a), q.v.)
-----------------------------------------------------------------------------
Copyright (c) 2004 Masarykova universita
(Masaryk University, Brno, Czech Republic)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (c) 1997 - 2003 Kungliga Tekniska Högskolan
(Royal Institute of Technology, Stockholm, Sweden).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the Institute nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (c) 1998 Doug Rabson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright ((c)) 2002, Rice University
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Rice University (RICE) nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
This software is provided by RICE and the contributors on an "as is"
basis, without any representations or warranties of any kind, express
or implied including, but not limited to, representations or
warranties of non-infringement, merchantability or fitness for a
particular purpose. In no event shall RICE or contributors be liable
for any direct, indirect, incidental, special, exemplary, or
consequential damages (including, but not limited to, procurement of
substitute goods or services; loss of use, data, or profits; or
business interruption) however caused and on any theory of liability,
whether in contract, strict liability, or tort (including negligence
or otherwise) arising in any way out of the use of this software, even
if advised of the possibility of such damage.
-----------------------------------------------------------------------------
Copyright (c) 1993 by Digital Equipment Corporation.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies, and that
the name of Digital Equipment Corporation not be used in advertising or
publicity pertaining to distribution of the document or software without
specific, written prior permission.
THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
-----------------------------------------------------------------------------
Copyright 2000 Aaron D. Gifford. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (c) 1998 Doug Rabson.
Copyright (c) 2001 Jake Burkholder.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the project nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (c) 1999-2000 by Nortel Networks Corporation
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS
BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
-----------------------------------------------------------------------------
Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved.
By using this file, you agree to the terms and conditions set forth bellow.
LICENSE TERMS AND CONDITIONS
The following License Terms and Conditions apply, unless a different
license is obtained from Japan Network Information Center ("JPNIC"),
a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
Chiyoda-ku, Tokyo 101-0047, Japan.
1. Use, Modification and Redistribution (including distribution of any
modified or derived work) in source and/or binary forms is permitted
under this License Terms and Conditions.
2. Redistribution of source code must retain the copyright notices as they
appear in each source code file, this License Terms and Conditions.
3. Redistribution in binary form must reproduce the Copyright Notice,
this License Terms and Conditions, in the documentation and/or other
materials provided with the distribution. For the purposes of binary
distribution the "Copyright Notice" refers to the following language:
"Copyright (c) 2000-2002 Japan Network Information Center. All rights
reserved."
4. The name of JPNIC may not be used to endorse or promote products
derived from this Software without specific prior written approval of
JPNIC.
5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-----------------------------------------------------------------------------
Copyright (C) 2004 Nominet, Ltd.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND NOMINET DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
-----------------------------------------------------------------------------
Portions Copyright RSA Security Inc.
License to copy and use this software is granted provided that it is
identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
(Cryptoki)" in all material mentioning or referencing this software.
License is also granted to make and use derivative works provided that
such works are identified as "derived from the RSA Security Inc. PKCS #11
Cryptographic Token Interface (Cryptoki)" in all material mentioning or
referencing the derived work.
RSA Security Inc. makes no representations concerning either the
merchantability of this software or the suitability of this software for
any particular purpose. It is provided "as is" without express or implied
warranty of any kind.
-----------------------------------------------------------------------------
Copyright (c) 1996, David Mazieres <[email protected]>
Copyright (c) 2008, Damien Miller <[email protected]>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-----------------------------------------------------------------------------
Copyright (c) 2000-2001 The OpenSSL Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. All advertising materials mentioning features or use of this
software must display the following acknowledgment:
"This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
endorse or promote products derived from this software without
prior written permission. For written permission, please contact
[email protected].
5. Products derived from this software may not be called "OpenSSL"
nor may "OpenSSL" appear in their names without prior written
permission of the OpenSSL Project.
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
+1 -1
View File
@@ -17,7 +17,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: FAQ.xml,v 1.4.4.29 2009/10/06 01:33:54 tbox Exp $ -->
<!-- $Id: FAQ.xml,v 1.4.4.29 2009-10-06 01:33:54 tbox Exp $ -->
<article class="faq">
<title>Frequently Asked Questions about BIND 9</title>
+1 -1
View File
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.43.18.8 2009/02/20 23:46:01 tbox Exp $
# $Id: Makefile.in,v 1.43.18.8 2009-02-20 23:46:01 tbox Exp $
srcdir = @srcdir@
VPATH = @srcdir@
+7 -3
View File
@@ -42,15 +42,19 @@ BIND 9
Stichting NLnet - NLnet Foundation
Nominum, Inc.
BIND 9.4-ESV-R5 (Extended Support Version)
BIND 9.4-ESV-R5 is expected to be the last release in the 9.4
series.
BIND 9.4-ESV (Extended Support Version)
BIND 9.4-ESV is the Extended Support Version of BIND 9.4
and incorporates the final maintenance release fixing bugs
in BIND 9.4.3.
BIND 9.4-ESV will be supported until December 31, 2010, at
which time you will need to upgrade to the current release
of BIND.
BIND 9.4-ESV will be supported until May 31, 2011, at which
time you will need to upgrade to the current release of BIND.
BIND 9.4.3
+1 -1
View File
@@ -109,4 +109,4 @@ about idnkit and this patch.
Bug reports and comments on this kit should be sent to
[email protected] and [email protected], respectively.
; $Id: README.idnkit,v 1.2.2.3 2009/01/19 00:36:25 marka Exp $
; $Id: README.idnkit,v 1.2.2.3 2009-01-19 00:36:25 marka Exp $
+127 -47
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
- Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2010, 2011 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,108 +16,188 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: RELEASE-NOTES-BIND-9.4-ESV.html,v 1.1.2.2 2010/11/29 01:15:44 tbox Exp $ -->
<!-- $Id: RELEASE-NOTES-BIND-9.4-ESV.html,v 1.1.2.12 2011-07-24 08:05:11 tbox Exp $ -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><link rel="stylesheet" type="text/css" href="release-notes.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /></head><body><div class="article"><div class="titlepage"><hr /></div>
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><link rel="stylesheet" href="release-notes.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.71.1" /></head><body><div class="article" lang="en" xml:lang="en"><div class="titlepage"><hr /></div>
<div class="section" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id36111797"></a>Introduction</h2></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id3359578"></a>Introduction</h2></div></div></div>
<p>
BIND 9.3-ESV-R4 is a maintenance release for BIND 9.4-ESV.
BIND 9.4-ESV-R5 is the current production release
of BIND 9.4.
</p>
<p>
This document summarizes changes from BIND 9.4-ESV-R3 to BIND 9.4-ESV-R4.
This document summarizes changes from BIND 9.4-ESV-R4 to BIND 9.4-ESV-R5.
Please see the CHANGES file in the source code release for a
complete list of all changes.
</p>
</div>
<div class="section" title="Download"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id36111880"></a>Download</h2></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id3358597"></a>Download</h2></div></div></div>
<p>
The latest release of BIND 9 software can always be found
on our web site at
<a class="ulink" href="http://www.isc.org/software/bind" target="_top">http://www.isc.org/software/bind</a>.
<a href="http://www.isc.org/downloads/all" target="_top">http://www.isc.org/downloads/all</a>.
There you will find additional information about each release,
source code, and some pre-compiled versions for certain operating
systems.
</p>
</div>
<div class="section" title="Support"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id36111815"></a>Support</h2></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id3358630"></a>Support</h2></div></div></div>
<p>Product support information is available on
<a class="ulink" href="http://www.isc.org/services/support" target="_top">http://www.isc.org/services/support</a>
<a href="http://www.isc.org/services/support" target="_top">http://www.isc.org/services/support</a>
for paid support options. Free support is provided by our user
community via a mailing list. Information on all public email
lists is available at
<a class="ulink" href="https://lists.isc.org/mailman/listinfo" target="_top">https://lists.isc.org/mailman/listinfo</a>.
<a href="https://lists.isc.org/mailman/listinfo" target="_top">https://lists.isc.org/mailman/listinfo</a>.
</p>
</div>
<div class="section" title="New Features"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id36111957"></a>New Features</h2></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id3358679"></a>New Features</h2></div></div></div>
<div class="section" title="9.4-ESV-R4"><div class="titlepage"><div><div><h3 class="title"><a id="id36111972"></a>9.4-ESV-R4</h3></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id3358720"></a>9.4-ESV-R5</h3></div></div></div>
<p>None.</p>
</div>
</div>
<div class="section" title="Feature Changes"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id36111905"></a>Feature Changes</h2></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id3358748"></a>Feature Changes</h2></div></div></div>
<div class="section" title="9.4-ESV-R4"><div class="titlepage"><div><div><h3 class="title"><a id="id36111988"></a>9.4-ESV-R4</h3></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id3358768"></a>9.4-ESV-R5</h3></div></div></div>
<p>None.</p>
</div>
</div>
<div class="section" title="Security Fixes"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id36111999"></a>Security Fixes</h2></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id3358796"></a>Security Fixes</h2></div></div></div>
<div class="section" title="9.4-ESV-R4"><div class="titlepage"><div><div><h3 class="title"><a id="id36112004"></a>9.4-ESV-R4</h3></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id3358816"></a>9.4-ESV-R5</h3></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
Adding a NO DATA signed negative response to cache failed to clear
any matching RRSIG records already in cache. A subsequent lookup
of the cached NO DATA entry could crash named (INSIST) when the
unexpected RRSIG was also returned with the NO DATA cache entry.
[RT #22288] [CVE-2010-3613] [VU#706148]
</li><li class="listitem">
BIND, acting as a DNSSEC validator, was determining if the NS RRset
is insecure based on a value that could mean either that the RRset
is actually insecure or that there wasn't a matching key for the RRSIG
in the DNSKEY RRset when resuming from validating the DNSKEY RRset.
This can happen when in the middle of a DNSKEY algorithm rollover,
when two different algorithms were used to sign a zone but only the
new set of keys are in the zone DNSKEY RRset.
[RT #22309] [CVE-2010-3614] [VU#837744]
</li></ul></div>
<div class="itemizedlist"><ul type="disc"><li>
A bug in NetBSD and FreeBSD kernels with SO_ACCEPTFILTER enabled allows
for a TCP DoS attack. Until there is a kernel fix, ISC is disabling
SO_ACCEPTFILTER support in BIND. [RT #22589]
</li><li>
named, set up to be a caching resolver, is vulnerable to a
user querying a domain with very large resource record sets (RRSets)
when trying to negatively cache the response. Due to an off-by-one
error, caching the response could cause named to crash. [RT #24650]
[CVE-2011-1910]
</li><li>
Change #2912 (see CHANGES) exposed a latent bug in the DNS message
processing code that could allow certain UPDATE requests to crash
named. This was fixed by disambiguating internal database representation
vs DNS wire format data. [RT #24777] [CVE-2011-2464]
</li></ul></div>
</div>
</div>
<div class="section" title="Bug Fixes"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id36112029"></a>Bug Fixes</h2></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id3358855"></a>Bug Fixes</h2></div></div></div>
<div class="section" title="9.4-ESV-R4"><div class="titlepage"><div><div><h3 class="title"><a id="id36112035"></a>9.4-ESV-R4</h3></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id3358861"></a>9.4-ESV-R5</h3></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
isc_print_vsnprintf() failed to check if there was
space available in the buffer when adding a left
justified character with a non zero width,
(e.g. "%-1c").
[RT #22270]
</li><li class="listitem">
win32: add more dependencies to BINDBuild.dsw.
[RT #22062]
</li></ul></div>
<div class="itemizedlist"><ul type="disc"><li>
During RFC5011 processing some journal write errors were not detected.
This could lead to managed-keys changes being committed but not
recorded in the journal files, causing potential inconsistencies
during later processing. [RT #20256]
<p>
A potential NULL pointer deference in the DNS64 code could cause
named to terminate unexpectedly. [RT #20256]
</p>
<p>
A state variable relating to DNSSEC could fail to be set during
some infrequently-executed code paths, allowing it to be used whilst
in an unitialized state during cache updates, with unpredictable results.
[RT #20256]
</p>
<p>
A potential NULL pointer deference in DNSSEC signing code could
cause named to terminate unexpectedly [RT #20256]
</p>
<p>
Several cosmetic code changes were made to silence warnings
generated by a static code analysis tool. [RT #20256]
</p>
</li><li>
Cause named to terminate at startup or rndc reconfig
reload to fail, if a log file specified in the
conf file isn't a plain file. (RT #22771]
</li><li>
Prior to this fix, when named was was writing a zone to disk (as slave,
when resigning, etc.), it might not correctly preserve the case of domain
name labels within RDATA, if the RDATA was not compressible. The result
is that when reloading the zone from disk would, named could serve data
that did not match the RRSIG for that data, due to case mismatch. named
now correctly preserves case. After upgrading to fixed code, the operator
should either resign the data (on the master) or delete the disk file
on the slave and reload the zone. [RT #22863]
</li><li>
Fix the zonechecks system test to fail on error (warning in 9.6,
fatal in 9.7) to match behaviour for 9.4. [RT #22905]
</li><li>
There was a bug in how the clients-per-query code worked with some
query patterns. This could result, in rare circumstances, in having all
the client query slots filled with queries for the same DNS label,
essentially ignoring the max-clients-per-query setting.
[RT #22972]
</li><li>
If a slave initiates a TSIG signed AXFR from the master and the master
fails to correctly TSIG sign the final message, the slave would be left
with the zone in an unclean state. named detected this error too late
and named would crash with an INSIST. The order dependancy has been
fixed. [RT #23254]
</li><li>
Fixed precedence order bug with NS and DNAME records if both are present.
(Also fixed timing of autosign test in 9.7+) [RT #23035]
</li><li>
Changing TTL did not cause dnssec-signzone to generate new signatures.
[RT #23330]
</li><li>
If named encountered a CNAME instead of a DS record when walking
the chain of trust down from the trust anchor, it incorrectly stopped
validating. [RT #23338]
</li><li>
RRSIG records could have time stamps too far in the future.
[RT #23356]
</li><li>
If running on a powerpc CPU and with atomic operations enabled,
named could lock up. Added sync instructions to the end of atomic
operations. [RT #23469]
</li><li>
ixfr-from-differences {master|slave};
failed to select the master/slave zones, resulting in on diff/journal
file being created.
[RT #23580]
</li><li>
Remove bin/tests/system/logfileconfig/ns1/named.conf and
add setup.sh in order to resolve changing named.conf issue. [RT #23687]
</li><li>
The autosign tests attempted to open ports within reserved ranges. Test
now avoids those ports.
[RT #23957]
</li><li>
Named could fail to validate zones list in a DLV that validated insecure
without using DLV and had DS records in the parent zone. [RT #24631]
</li><li>
A bug in FreeBSD kernels causes IPv6 UDP responses greater than
1280 bytes to not fragment as they should. Until there is a kernel
fix, named will work around this by setting IPV6_USE_MIN_MTU on a
per packet basis. [RT #24950]
</li></ul></div>
</div>
</div>
<div class="section" title="Thank You"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id36112054"></a>Thank You</h2></div></div></div>
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id3359002"></a>Thank You</h2></div></div></div>
<p>
Thank you to everyone who assisted us in making this release possible.
If you would like to contribute to ISC to assist us in continuing to make
quality open source software, please visit our donations page at
<a class="ulink" href="http://www.isc.org/supportisc" target="_top">http://www.isc.org/supportisc</a>.
<a href="http://www.isc.org/supportisc" target="_top">http://www.isc.org/supportisc</a>.
</p>
</div>
</div></body></html>
Binary file not shown.
+84 -25
View File
@@ -2,16 +2,16 @@
Introduction
BIND 9.3-ESV-R4 is a maintenance release for BIND 9.4-ESV.
BIND 9.4-ESV-R5 is the current production release of BIND 9.4.
This document summarizes changes from BIND 9.4-ESV-R3 to BIND
9.4-ESV-R4. Please see the CHANGES file in the source code release for
This document summarizes changes from BIND 9.4-ESV-R4 to BIND
9.4-ESV-R5. Please see the CHANGES file in the source code release for
a complete list of all changes.
Download
The latest release of BIND 9 software can always be found on our web
site at http://www.isc.org/software/bind. There you will find
site at http://www.isc.org/downloads/all. There you will find
additional information about each release, source code, and some
pre-compiled versions for certain operating systems.
@@ -25,42 +25,101 @@ Support
New Features
9.4-ESV-R4
9.4-ESV-R5
None.
Feature Changes
9.4-ESV-R4
9.4-ESV-R5
None.
Security Fixes
9.4-ESV-R4
9.4-ESV-R5
* Adding a NO DATA signed negative response to cache failed to clear
any matching RRSIG records already in cache. A subsequent lookup of
the cached NO DATA entry could crash named (INSIST) when the
unexpected RRSIG was also returned with the NO DATA cache entry.
[RT #22288] [CVE-2010-3613] [VU#706148]
* BIND, acting as a DNSSEC validator, was determining if the NS RRset
is insecure based on a value that could mean either that the RRset
is actually insecure or that there wasn't a matching key for the
RRSIG in the DNSKEY RRset when resuming from validating the DNSKEY
RRset. This can happen when in the middle of a DNSKEY algorithm
rollover, when two different algorithms were used to sign a zone
but only the new set of keys are in the zone DNSKEY RRset. [RT
#22309] [CVE-2010-3614] [VU#837744]
* A bug in NetBSD and FreeBSD kernels with SO_ACCEPTFILTER enabled
allows for a TCP DoS attack. Until there is a kernel fix, ISC is
disabling SO_ACCEPTFILTER support in BIND. [RT #22589]
* named, set up to be a caching resolver, is vulnerable to a user
querying a domain with very large resource record sets (RRSets)
when trying to negatively cache the response. Due to an off-by-one
error, caching the response could cause named to crash. [RT #24650]
[CVE-2011-1910]
* Change #2912 (see CHANGES) exposed a latent bug in the DNS message
processing code that could allow certain UPDATE requests to crash
named. This was fixed by disambiguating internal database
representation vs DNS wire format data. [RT #24777] [CVE-2011-2464]
Bug Fixes
9.4-ESV-R4
9.4-ESV-R5
* isc_print_vsnprintf() failed to check if there was space available
in the buffer when adding a left justified character with a non
zero width, (e.g. "%-1c"). [RT #22270]
* win32: add more dependencies to BINDBuild.dsw. [RT #22062]
* During RFC5011 processing some journal write errors were not
detected. This could lead to managed-keys changes being committed
but not recorded in the journal files, causing potential
inconsistencies during later processing. [RT #20256]
A potential NULL pointer deference in the DNS64 code could cause
named to terminate unexpectedly. [RT #20256]
A state variable relating to DNSSEC could fail to be set during
some infrequently-executed code paths, allowing it to be used
whilst in an unitialized state during cache updates, with
unpredictable results. [RT #20256]
A potential NULL pointer deference in DNSSEC signing code could
cause named to terminate unexpectedly [RT #20256]
Several cosmetic code changes were made to silence warnings
generated by a static code analysis tool. [RT #20256]
* Cause named to terminate at startup or rndc reconfig reload to
fail, if a log file specified in the conf file isn't a plain file.
(RT #22771]
* Prior to this fix, when named was was writing a zone to disk (as
slave, when resigning, etc.), it might not correctly preserve the
case of domain name labels within RDATA, if the RDATA was not
compressible. The result is that when reloading the zone from disk
would, named could serve data that did not match the RRSIG for that
data, due to case mismatch. named now correctly preserves case.
After upgrading to fixed code, the operator should either resign
the data (on the master) or delete the disk file on the slave and
reload the zone. [RT #22863]
* Fix the zonechecks system test to fail on error (warning in 9.6,
fatal in 9.7) to match behaviour for 9.4. [RT #22905]
* There was a bug in how the clients-per-query code worked with some
query patterns. This could result, in rare circumstances, in having
all the client query slots filled with queries for the same DNS
label, essentially ignoring the max-clients-per-query setting. [RT
#22972]
* If a slave initiates a TSIG signed AXFR from the master and the
master fails to correctly TSIG sign the final message, the slave
would be left with the zone in an unclean state. named detected
this error too late and named would crash with an INSIST. The order
dependancy has been fixed. [RT #23254]
* Fixed precedence order bug with NS and DNAME records if both are
present. (Also fixed timing of autosign test in 9.7+) [RT #23035]
* Changing TTL did not cause dnssec-signzone to generate new
signatures. [RT #23330]
* If named encountered a CNAME instead of a DS record when walking
the chain of trust down from the trust anchor, it incorrectly
stopped validating. [RT #23338]
* RRSIG records could have time stamps too far in the future. [RT
#23356]
* If running on a powerpc CPU and with atomic operations enabled,
named could lock up. Added sync instructions to the end of atomic
operations. [RT #23469]
* ixfr-from-differences {master|slave}; failed to select the
master/slave zones, resulting in on diff/journal file being
created. [RT #23580]
* Remove bin/tests/system/logfileconfig/ns1/named.conf and add
setup.sh in order to resolve changing named.conf issue. [RT #23687]
* The autosign tests attempted to open ports within reserved ranges.
Test now avoids those ports. [RT #23957]
* Named could fail to validate zones list in a DLV that validated
insecure without using DLV and had DS records in the parent zone.
[RT #24631]
* A bug in FreeBSD kernels causes IPv6 UDP responses greater than
1280 bytes to not fragment as they should. Until there is a kernel
fix, named will work around this by setting IPV6_USE_MIN_MTU on a
per packet basis. [RT #24950]
Thank You
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: acconfig.h,v 1.44.18.7 2008/12/01 23:45:56 tbox Exp $ */
/* $Id: acconfig.h,v 1.44.18.7 2008-12-01 23:45:56 tbox Exp $ */
/*! \file */
+1 -1
View File
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.23 2004/03/05 04:57:10 marka Exp $
# $Id: Makefile.in,v 1.23 2004-03-05 04:57:10 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
+1 -1
View File
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.24.18.6 2006/06/09 00:54:08 marka Exp $
# $Id: Makefile.in,v 1.24.18.6 2006-06-09 00:54:08 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: check-tool.c,v 1.10.18.23 2009/09/24 21:38:50 jinmei Exp $ */
/* $Id: check-tool.c,v 1.10.18.23 2009-09-24 21:38:50 jinmei Exp $ */
/*! \file */
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: check-tool.h,v 1.7.18.4 2005/06/20 01:19:25 marka Exp $ */
/* $Id: check-tool.h,v 1.7.18.4 2005-06-20 01:19:25 marka Exp $ */
#ifndef CHECK_TOOL_H
#define CHECK_TOOL_H
+1 -1
View File
@@ -13,7 +13,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: named-checkconf.8,v 1.16.18.14 2009/07/11 01:31:43 tbox Exp $
.\" $Id: named-checkconf.8,v 1.16.18.14 2009-07-11 01:31:43 tbox Exp $
.\"
.hy 0
.ad l
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named-checkconf.c,v 1.28.18.18 2009/02/16 23:46:03 tbox Exp $ */
/* $Id: named-checkconf.c,v 1.28.18.18 2009-02-16 23:46:03 tbox Exp $ */
/*! \file */
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkconf.docbook,v 1.8.18.10 2007/08/28 07:19:55 tbox Exp $ -->
<!-- $Id: named-checkconf.docbook,v 1.8.18.10 2007-08-28 07:19:55 tbox Exp $ -->
<refentry id="man.named-checkconf">
<refentryinfo>
<date>June 14, 2000</date>
+1 -1
View File
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkconf.html,v 1.9.18.21 2009/07/11 01:31:43 tbox Exp $ -->
<!-- $Id: named-checkconf.html,v 1.9.18.21 2009-07-11 01:31:43 tbox Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+1 -1
View File
@@ -13,7 +13,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: named-checkzone.8,v 1.18.18.25 2009/07/11 01:31:43 tbox Exp $
.\" $Id: named-checkzone.8,v 1.18.18.25 2009-07-11 01:31:43 tbox Exp $
.\"
.hy 0
.ad l
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named-checkzone.c,v 1.29.18.24 2009/05/29 02:19:20 marka Exp $ */
/* $Id: named-checkzone.c,v 1.29.18.24 2009-05-29 02:19:20 marka Exp $ */
/*! \file */
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkzone.docbook,v 1.11.18.23 2009/01/22 23:45:59 tbox Exp $ -->
<!-- $Id: named-checkzone.docbook,v 1.11.18.23 2009-01-22 23:45:59 tbox Exp $ -->
<refentry id="man.named-checkzone">
<refentryinfo>
<date>June 13, 2000</date>
+1 -1
View File
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkzone.html,v 1.11.18.32 2009/07/11 01:31:43 tbox Exp $ -->
<!-- $Id: named-checkzone.html,v 1.11.18.32 2009-07-11 01:31:43 tbox Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+1 -1
View File
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.33.18.6 2005/09/09 14:11:04 marka Exp $
# $Id: Makefile.in,v 1.33.18.6 2005-09-09 14:11:04 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
+1 -1
View File
@@ -13,7 +13,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: dig.1,v 1.23.18.27 2009/07/11 01:31:43 tbox Exp $
.\" $Id: dig.1,v 1.23.18.27 2009-07-11 01:31:43 tbox Exp $
.\"
.hy 0
.ad l
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.c,v 1.186.18.37 2009/05/06 10:21:00 fdupont Exp $ */
/* $Id: dig.c,v 1.186.18.37 2009-05-06 10:21:00 fdupont Exp $ */
/*! \file */
+1 -1
View File
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dig.docbook,v 1.17.18.27 2009/02/02 04:45:22 marka Exp $ -->
<!-- $Id: dig.docbook,v 1.17.18.27 2009-02-02 04:45:22 marka Exp $ -->
<refentry id="man.dig">
<refentryinfo>
+1 -1
View File
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dig.html,v 1.13.18.33 2009/07/11 01:31:44 tbox Exp $ -->
<!-- $Id: dig.html,v 1.13.18.33 2009-07-11 01:31:44 tbox Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dighost.c,v 1.259.18.58 2009/06/24 03:44:52 marka Exp $ */
/* $Id: dighost.c,v 1.259.18.58 2009-06-24 03:44:52 marka Exp $ */
/*! \file
* \note
+1 -1
View File
@@ -13,7 +13,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: host.1,v 1.14.18.18 2009/07/11 01:31:44 tbox Exp $
.\" $Id: host.1,v 1.14.18.18 2009-07-11 01:31:44 tbox Exp $
.\"
.hy 0
.ad l
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: host.c,v 1.94.18.22 2009/09/08 23:29:03 marka Exp $ */
/* $Id: host.c,v 1.94.18.22 2009-09-08 23:29:03 marka Exp $ */
/*! \file */
+1 -1
View File
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: host.docbook,v 1.5.18.15 2009/01/22 23:46:00 tbox Exp $ -->
<!-- $Id: host.docbook,v 1.5.18.15 2009-01-22 23:46:00 tbox Exp $ -->
<refentry id="man.host">
<refentryinfo>
+1 -1
View File
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: host.html,v 1.7.18.24 2009/07/11 01:31:44 tbox Exp $ -->
<!-- $Id: host.html,v 1.7.18.24 2009-07-11 01:31:44 tbox Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.h,v 1.82.18.25 2008/12/16 23:46:02 tbox Exp $ */
/* $Id: dig.h,v 1.82.18.25 2008-12-16 23:46:02 tbox Exp $ */
#ifndef DIG_H
#define DIG_H
+1 -1
View File
@@ -12,7 +12,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: nslookup.1,v 1.1.10.15 2009/07/11 01:31:44 tbox Exp $
.\" $Id: nslookup.1,v 1.1.10.15 2009-07-11 01:31:44 tbox Exp $
.\"
.hy 0
.ad l
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nslookup.c,v 1.101.18.20 2009/05/06 23:45:59 tbox Exp $ */
/* $Id: nslookup.c,v 1.101.18.20 2009-05-06 23:45:59 tbox Exp $ */
#include <config.h>
+1 -1
View File
@@ -17,7 +17,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: nslookup.docbook,v 1.4.2.13 2007/08/28 07:19:55 tbox Exp $ -->
<!-- $Id: nslookup.docbook,v 1.4.2.13 2007-08-28 07:19:55 tbox Exp $ -->
<!--
- Copyright (c) 1985, 1989
- The Regents of the University of California. All rights reserved.
+1 -1
View File
@@ -13,7 +13,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: nslookup.html,v 1.1.10.22 2009/07/11 01:31:44 tbox Exp $ -->
<!-- $Id: nslookup.html,v 1.1.10.22 2009-07-11 01:31:44 tbox Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+1 -1
View File
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.26.18.4 2005/05/02 00:26:11 marka Exp $
# $Id: Makefile.in,v 1.26.18.4 2005-05-02 00:26:11 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
+1 -1
View File
@@ -13,7 +13,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: dnssec-keygen.8,v 1.23.18.17 2009/07/11 01:31:44 tbox Exp $
.\" $Id: dnssec-keygen.8,v 1.23.18.17 2009-07-11 01:31:44 tbox Exp $
.\"
.hy 0
.ad l
+1 -1
View File
@@ -16,7 +16,7 @@
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-keygen.c,v 1.66.18.10 2007/08/28 07:19:55 tbox Exp $ */
/* $Id: dnssec-keygen.c,v 1.66.18.10 2007-08-28 07:19:55 tbox Exp $ */
/*! \file */
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-keygen.docbook,v 1.7.18.13 2008/10/15 23:46:06 tbox Exp $ -->
<!-- $Id: dnssec-keygen.docbook,v 1.7.18.13 2008-10-15 23:46:06 tbox Exp $ -->
<refentry id="man.dnssec-keygen">
<refentryinfo>
<date>June 30, 2000</date>
+1 -1
View File
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-keygen.html,v 1.9.18.23 2009/07/11 01:31:44 tbox Exp $ -->
<!-- $Id: dnssec-keygen.html,v 1.9.18.23 2009-07-11 01:31:44 tbox Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+1 -1
View File
@@ -13,7 +13,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: dnssec-signzone.8,v 1.28.18.20 2009/07/11 01:31:44 tbox Exp $
.\" $Id: dnssec-signzone.8,v 1.28.18.20 2009-07-11 01:31:44 tbox Exp $
.\"
.hy 0
.ad l
+12 -12
View File
@@ -1,5 +1,5 @@
/*
* Portions Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 2004-2009, 2011 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 1999-2003 Internet Software Consortium.
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
*
@@ -16,7 +16,7 @@
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signzone.c,v 1.177.18.29 2009/07/21 06:44:32 tbox Exp $ */
/* $Id: dnssec-signzone.c,v 1.177.18.31 2011-02-27 23:45:14 tbox Exp $ */
/*! \file */
@@ -435,32 +435,32 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
if (!expired)
keep = ISC_TRUE;
} else if (issigningkey(key)) {
if (!expired && setverifies(name, set, key, &sigrdata))
{
if (!expired && rrsig.originalttl == set->ttl &&
setverifies(name, set, key, &sigrdata)) {
vbprintf(2, "\trrsig by %s retained\n", sigstr);
keep = ISC_TRUE;
wassignedby[key->position] = ISC_TRUE;
nowsignedby[key->position] = ISC_TRUE;
} else {
vbprintf(2, "\trrsig by %s dropped - %s\n",
sigstr,
expired ? "expired" :
"failed to verify");
sigstr, expired ? "expired" :
rrsig.originalttl != set->ttl ?
"ttl change" : "failed to verify");
wassignedby[key->position] = ISC_TRUE;
resign = ISC_TRUE;
}
} else if (iszonekey(key)) {
if (!expired && setverifies(name, set, key, &sigrdata))
{
if (!expired && rrsig.originalttl == set->ttl &&
setverifies(name, set, key, &sigrdata)) {
vbprintf(2, "\trrsig by %s retained\n", sigstr);
keep = ISC_TRUE;
wassignedby[key->position] = ISC_TRUE;
nowsignedby[key->position] = ISC_TRUE;
} else {
vbprintf(2, "\trrsig by %s dropped - %s\n",
sigstr,
expired ? "expired" :
"failed to verify");
sigstr, expired ? "expired" :
rrsig.originalttl != set->ttl ?
"ttl change" : "failed to verify");
wassignedby[key->position] = ISC_TRUE;
}
} else if (!expired) {
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-signzone.docbook,v 1.10.18.19 2008/10/15 23:46:06 tbox Exp $ -->
<!-- $Id: dnssec-signzone.docbook,v 1.10.18.19 2008-10-15 23:46:06 tbox Exp $ -->
<refentry id="man.dnssec-signzone">
<refentryinfo>
<date>June 30, 2000</date>
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-signzone.html,v 1.8.18.26 2009/07/11 01:31:44 tbox Exp $ -->
<!-- $Id: dnssec-signzone.html,v 1.8.18.26 2009-07-11 01:31:44 tbox Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssectool.c,v 1.40.18.3 2005/07/01 03:55:28 marka Exp $ */
/* $Id: dnssectool.c,v 1.40.18.3 2005-07-01 03:55:28 marka Exp $ */
/*! \file */
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssectool.h,v 1.18 2004/03/05 04:57:41 marka Exp $ */
/* $Id: dnssectool.h,v 1.18 2004-03-05 04:57:41 marka Exp $ */
#ifndef DNSSECTOOL_H
#define DNSSECTOOL_H 1
+1 -1
View File
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.80.18.7 2005/09/05 00:18:10 marka Exp $
# $Id: Makefile.in,v 1.80.18.7 2005-09-05 00:18:10 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: builtin.c,v 1.5.18.5 2005/08/23 04:12:38 marka Exp $ */
/* $Id: builtin.c,v 1.5.18.5 2005-08-23 04:12:38 marka Exp $ */
/*! \file
* \brief
+4 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2004-2009, 2011 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: client.c,v 1.219.18.33 2009/01/19 23:46:14 tbox Exp $ */
/* $Id: client.c,v 1.219.18.35 2011-05-06 23:45:18 tbox Exp $ */
#include <config.h>
@@ -619,6 +619,7 @@ ns_client_endrequest(ns_client_t *client) {
dns_message_puttemprdataset(client->message, &client->opt);
}
client->signer = NULL;
client->udpsize = 512;
client->extflags = 0;
client->ednsversion = -1;
@@ -1934,6 +1935,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
client->next = NULL;
client->shutdown = NULL;
client->shutdown_arg = NULL;
client->signer = NULL;
dns_name_init(&client->signername, NULL);
client->mortal = ISC_FALSE;
client->tcpquota = NULL;
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.c,v 1.47.18.35 2008/09/04 08:03:07 marka Exp $ */
/* $Id: config.c,v 1.47.18.35 2008-09-04 08:03:07 marka Exp $ */
/*! \file */
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: control.c,v 1.20.10.12 2009/07/11 23:46:06 tbox Exp $ */
/* $Id: control.c,v 1.20.10.12 2009-07-11 23:46:06 tbox Exp $ */
/*! \file */
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: controlconf.c,v 1.40.18.14 2008/07/23 23:33:02 marka Exp $ */
/* $Id: controlconf.c,v 1.40.18.14 2008-07-23 23:33:02 marka Exp $ */
/*! \file */
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: builtin.h,v 1.2.18.2 2005/04/29 00:15:34 marka Exp $ */
/* $Id: builtin.h,v 1.2.18.2 2005-04-29 00:15:34 marka Exp $ */
#ifndef NAMED_BUILTIN_H
#define NAMED_BUILTIN_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: client.h,v 1.69.18.11 2009/01/19 23:46:14 tbox Exp $ */
/* $Id: client.h,v 1.69.18.11 2009-01-19 23:46:14 tbox Exp $ */
#ifndef NAMED_CLIENT_H
#define NAMED_CLIENT_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.h,v 1.6.18.6 2006/02/28 03:10:47 marka Exp $ */
/* $Id: config.h,v 1.6.18.6 2006-02-28 03:10:47 marka Exp $ */
#ifndef NAMED_CONFIG_H
#define NAMED_CONFIG_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: control.h,v 1.14.18.8 2006/03/09 23:46:20 marka Exp $ */
/* $Id: control.h,v 1.14.18.8 2006-03-09 23:46:20 marka Exp $ */
#ifndef NAMED_CONTROL_H
#define NAMED_CONTROL_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: globals.h,v 1.64.18.6 2008/10/24 01:43:17 tbox Exp $ */
/* $Id: globals.h,v 1.64.18.6 2008-10-24 01:43:17 tbox Exp $ */
#ifndef NAMED_GLOBALS_H
#define NAMED_GLOBALS_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: interfacemgr.h,v 1.26.18.4 2005/04/27 05:00:35 sra Exp $ */
/* $Id: interfacemgr.h,v 1.26.18.4 2005-04-27 05:00:35 sra Exp $ */
#ifndef NAMED_INTERFACEMGR_H
#define NAMED_INTERFACEMGR_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: listenlist.h,v 1.11.18.2 2005/04/29 00:15:34 marka Exp $ */
/* $Id: listenlist.h,v 1.11.18.2 2005-04-29 00:15:34 marka Exp $ */
#ifndef NAMED_LISTENLIST_H
#define NAMED_LISTENLIST_H 1
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: log.h,v 1.21.18.4 2009/09/24 23:46:06 tbox Exp $ */
/* $Id: log.h,v 1.21.18.4 2009-09-24 23:46:06 tbox Exp $ */
#ifndef NAMED_LOG_H
#define NAMED_LOG_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: logconf.h,v 1.11.18.4 2006/03/02 00:37:21 marka Exp $ */
/* $Id: logconf.h,v 1.11.18.4 2006-03-02 00:37:21 marka Exp $ */
#ifndef NAMED_LOGCONF_H
#define NAMED_LOGCONF_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwaddr.h,v 1.4.18.2 2005/04/29 00:15:35 marka Exp $ */
/* $Id: lwaddr.h,v 1.4.18.2 2005-04-29 00:15:35 marka Exp $ */
/*! \file */
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwdclient.h,v 1.14.18.4 2009/01/19 23:46:14 tbox Exp $ */
/* $Id: lwdclient.h,v 1.14.18.4 2009-01-19 23:46:14 tbox Exp $ */
#ifndef NAMED_LWDCLIENT_H
#define NAMED_LWDCLIENT_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwresd.h,v 1.13.18.4 2006/03/02 00:37:21 marka Exp $ */
/* $Id: lwresd.h,v 1.13.18.4 2006-03-02 00:37:21 marka Exp $ */
#ifndef NAMED_LWRESD_H
#define NAMED_LWRESD_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwsearch.h,v 1.5.18.2 2005/04/29 00:15:36 marka Exp $ */
/* $Id: lwsearch.h,v 1.5.18.2 2005-04-29 00:15:36 marka Exp $ */
#ifndef NAMED_LWSEARCH_H
#define NAMED_LWSEARCH_H 1
+1 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: main.h,v 1.11.18.2 2005/04/29 00:15:37 marka Exp $ */
/* $Id: main.h,v 1.11.18.2 2005-04-29 00:15:37 marka Exp $ */
#ifndef NAMED_MAIN_H
#define NAMED_MAIN_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: notify.h,v 1.10.18.4 2009/01/19 23:46:14 tbox Exp $ */
/* $Id: notify.h,v 1.10.18.4 2009-01-19 23:46:14 tbox Exp $ */
#ifndef NAMED_NOTIFY_H
#define NAMED_NOTIFY_H 1
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ns_smf_globals.h,v 1.2.2.4 2005/05/13 01:32:46 marka Exp $ */
/* $Id: ns_smf_globals.h,v 1.2.2.4 2005-05-13 01:32:46 marka Exp $ */
#ifndef NS_SMF_GLOBALS_H
#define NS_SMF_GLOBALS_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.h,v 1.36.18.2 2005/04/29 00:15:37 marka Exp $ */
/* $Id: query.h,v 1.36.18.2 2005-04-29 00:15:37 marka Exp $ */
#ifndef NAMED_QUERY_H
#define NAMED_QUERY_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.h,v 1.73.18.10 2009/07/11 23:46:06 tbox Exp $ */
/* $Id: server.h,v 1.73.18.10 2009-07-11 23:46:06 tbox Exp $ */
#ifndef NAMED_SERVER_H
#define NAMED_SERVER_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: sortlist.h,v 1.5.18.4 2006/03/02 00:37:21 marka Exp $ */
/* $Id: sortlist.h,v 1.5.18.4 2006-03-02 00:37:21 marka Exp $ */
#ifndef NAMED_SORTLIST_H
#define NAMED_SORTLIST_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: tkeyconf.h,v 1.10.18.4 2006/03/02 00:37:21 marka Exp $ */
/* $Id: tkeyconf.h,v 1.10.18.4 2006-03-02 00:37:21 marka Exp $ */
#ifndef NS_TKEYCONF_H
#define NS_TKEYCONF_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: tsigconf.h,v 1.10.18.4 2006/03/02 00:37:21 marka Exp $ */
/* $Id: tsigconf.h,v 1.10.18.4 2006-03-02 00:37:21 marka Exp $ */
#ifndef NS_TSIGCONF_H
#define NS_TSIGCONF_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: types.h,v 1.21.18.2 2005/04/29 00:15:38 marka Exp $ */
/* $Id: types.h,v 1.21.18.2 2005-04-29 00:15:38 marka Exp $ */
#ifndef NAMED_TYPES_H
#define NAMED_TYPES_H 1
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: update.h,v 1.9.18.2 2005/04/29 00:15:39 marka Exp $ */
/* $Id: update.h,v 1.9.18.2 2005-04-29 00:15:39 marka Exp $ */
#ifndef NAMED_UPDATE_H
#define NAMED_UPDATE_H 1
Loaded 100 of 4306 files, more files were not shown because too many files have changed in this diff. Show more