]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoUpdate gcc's __FreeBSD__ and __FreeBSD_cc_version macros for FreeBSD 9.
dim [Thu, 20 Oct 2011 17:33:22 +0000 (17:33 +0000)]
Update gcc's __FreeBSD__ and __FreeBSD_cc_version macros for FreeBSD 9.

This is a direct commit to stable/9, since the macro values are
different in head.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226575 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226318:
np [Thu, 20 Oct 2011 17:09:53 +0000 (17:09 +0000)]
MFC r226318:

Make sure the inp wasn't dropped when rexmt let go of the inp and
pcbinfo locks.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226574 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226432, r226273:
gabor [Thu, 20 Oct 2011 16:08:11 +0000 (16:08 +0000)]
MFC r226432, r226273:
  - Use getprogname() instead of __progname
  - Allow disabling bzip2 support with WITHOUT_BZIP2
  - Fix handling patterns that start with a dot
  - Remove superfluous semicolon
  - Fix counting of match limit (-m)

Approved by: re (kib), delphij (mentor, implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226573 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFhead 226401,226402:
glebius [Thu, 20 Oct 2011 15:58:05 +0000 (15:58 +0000)]
MFhead 226401,226402:

  Remove last remnants of classful addressing:

  - Remove ia_net, ia_netmask, ia_netbroadcast from struct in_ifaddr.
  - Remove net.inet.ip.subnetsarelocal, I bet no one need it in 2011.
  - fix bug when we were not forwarding to a host which matches classful
    net address. For example router having 192.168.x.y/16 network attached,
    would not forward traffic to 192.168.*.0, which are legal IPs in
    CIDR world.
  - For compatibility, leave autoguessing of mask based on class.

  Reviewed by:  andre, bz, rwatson

  Add support for IPv4 /31 prefixes, as described in RFC3021.

  To run a /31 network, participating hosts MUST drop support
  for directed broadcasts, and treat the first and last addresses
  on subnet as unicast. The broadcast address for the prefix
  should be the link local broadcast address, INADDR_BROADCAST.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226572 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFhead r226367:
glebius [Thu, 20 Oct 2011 15:55:01 +0000 (15:55 +0000)]
MFhead r226367:

  Never switch directly from INIT to MASTER, since this produces
  nasty status flaps.

  PR:           kern/161123
  Submitted by: Damien Fleuriot <dam my.gd>
  OpenBSD:      ip_carp.c, rev. 1.115

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226571 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFhead r226338:
glebius [Thu, 20 Oct 2011 15:53:26 +0000 (15:53 +0000)]
MFhead r226338:

  Restore functions in6_ifaddloop() and in6_ifremloop() that were
  inlined by Qing Li in his big new-ARP commit. I am going to utilize
  them in my newcarp work, and also these functions left declared
  in in6_var.h for all the time they were absent.

  Reviewed by:  bz

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226570 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226410:
nwhitehorn [Thu, 20 Oct 2011 15:34:17 +0000 (15:34 +0000)]
MFC r226410:
Enforce a memory barrier in stream operations, as is done on other
bus_space calls. This makes ath(4) work correctly on PowerPC.

Submitted by: adrian
Tested by: andreast
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226567 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226474:
hselasky [Thu, 20 Oct 2011 14:45:16 +0000 (14:45 +0000)]
MFC r226474:
Make the usbdump utility work again by using the correct BPF structures.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226565 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoRemove the last of the debugging support (INVARIANT*) from the ia64
kensmith [Wed, 19 Oct 2011 23:02:57 +0000 (23:02 +0000)]
Remove the last of the debugging support (INVARIANT*) from the ia64
GENERIC config file, the ia64 kernel runs OK without it.

Reviewed by: marcel
Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226548 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226507:
kensmith [Tue, 18 Oct 2011 13:48:31 +0000 (13:48 +0000)]
MFC r226507:
> Escape the newline so we get a proper line continuation.  Without this
> the text of the menu selections doesn't get displayed properly and it
> makes the installer appear to lock up for no obvious reason.
>
> Reviewed by: nwhitehorn

Insta-MFC being done because 9.0-RC1 builds are being held for this.

Approved by:    re (kib, bz)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226511 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 226453
qingli [Mon, 17 Oct 2011 03:35:24 +0000 (03:35 +0000)]
MFC 226453

The code change made in r226040 was incomplete and resulted in
routes such as fe80::1%lo0 no being installed. This patch completes
the original intended fix.

Reviewed by: hrs. bz
Approved by: re (ken)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226455 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoReady for RC1.
kensmith [Sun, 16 Oct 2011 15:55:23 +0000 (15:55 +0000)]
Ready for RC1.

Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226438 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226311:
dim [Sat, 15 Oct 2011 23:13:24 +0000 (23:13 +0000)]
MFC r226311:

Add link from clang to clang-cpp, so you can use CPP=clang-cpp in
Makefiles.  Also add a manpage symlink for it.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226409 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226310:
dim [Sat, 15 Oct 2011 23:09:21 +0000 (23:09 +0000)]
MFC r226310:

Add manpage symlink for clang++(1).

PR: docs/149051
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226408 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge r226301 from head to stable/9:
rwatson [Sat, 15 Oct 2011 22:27:59 +0000 (22:27 +0000)]
Merge r226301 from head to stable/9:

  Correct a bug in export of capability-related information from the sysctls
  supporting procstat -f: properly provide capability rights information to
  userspace.  The bug resulted from a merge-o during upstreaming (or rather,
  a failure to properly merge FreeBSD-side changed downstream).

  Spotted by:     des, kibab

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226407 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoRemove extra debuggin gsupport that is turned on for head but turned off
kensmith [Sat, 15 Oct 2011 21:23:04 +0000 (21:23 +0000)]
Remove extra debuggin gsupport that is turned on for head but turned off
for stable branches:

- shift to MALLOC_PRODUCTION
- turn off automatic crash dumps
- remove kernel debuggers, INVARIANT*[1], WITNESS* from GENERIC
  kernel config files

[1] INVARIANT* left on for ia64 at least temporarily, marcel@ will test
    to see if they are still required as they had been for stable/8.

Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226405 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226149
brueffer [Sat, 15 Oct 2011 12:35:58 +0000 (12:35 +0000)]
MFC: r226149

Fix an infinite loop in siba_bwn_suspend().

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226146
brueffer [Sat, 15 Oct 2011 12:33:24 +0000 (12:33 +0000)]
MFC: r226146

Remove dead code, "error" doesn't change between this check and the
previous one.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226387 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226117
brueffer [Sat, 15 Oct 2011 12:10:34 +0000 (12:10 +0000)]
MFC: r226117

Add missing va_end() in an error case to clean up after va_start()
(already done in the non-error case).

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226386 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226116
brueffer [Sat, 15 Oct 2011 12:08:21 +0000 (12:08 +0000)]
MFC: r226116

Add missing va_end() to clean up after va_start().

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226143
brueffer [Sat, 15 Oct 2011 12:05:42 +0000 (12:05 +0000)]
MFC: r226143

Remove two dublicated assignments.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226082:
delphij [Fri, 14 Oct 2011 22:33:39 +0000 (22:33 +0000)]
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
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226368 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 226120
qingli [Thu, 13 Oct 2011 09:21:49 +0000 (09:21 +0000)]
MFC 226120

PR: kern/159602
Submitted by: pluknet
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226337 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 226114
qingli [Thu, 13 Oct 2011 08:26:23 +0000 (08:26 +0000)]
MFC 226114

Remove the reference held on the loopback route when the interface
address is being deleted. Only the last reference holder deletes the
loopback route. All other delete operations just clear the IFA_RTSELF
flag.

PR: kern/159601
Submitted by: pluknet
Reviewed by: discussed on net@
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226333 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 226040
qingli [Thu, 13 Oct 2011 03:21:48 +0000 (03:21 +0000)]
MFC 226040

The IFA_RTSELF instead of the IFA_ROUTE flag should be checked to
determine if a loopback route should be installed for an interface
IPv6 address. Another condition is the address must not belong to a
looopback interface.

Reviewed by: hrs
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226332 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 226224
qingli [Thu, 13 Oct 2011 00:44:24 +0000 (00:44 +0000)]
MFC 226224

All indirect routes will fail the rtcheck, except for a special host
route where the destination IP and the gateway IP is the same. This
special case handling is only meant for backward compatibility reason.
The last commit introduced a bug in the route check logic, where a
valid special case is treated as an error. This patch fixes that bug
along with some code cleanup.

Suggested by: glebius smirnoff
Reviewed by: kmacy, discussed with glebius smirnoff
Approved by: re (hrs)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226331 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 225947
qingli [Wed, 12 Oct 2011 21:02:58 +0000 (21:02 +0000)]
MFC 225947

A system may have multiple physical interfaces, all of which are on the
same prefix. Since a single route entry is installed for the prefix
(without RADIX_MPATH), incoming packets on the interfaces that are not
associated with the prefix route may trigger an error message about
unable to allocation LLE entry, and fails L2. This patch makes sure a
valid route is present in the system, and allow the aforementioned
condition to exist and treats as valid.

Reviewed by: bz
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226326 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226277: Add INDEX-9 to the set of INDEX files built by portsnap.
cperciva [Wed, 12 Oct 2011 20:38:07 +0000 (20:38 +0000)]
MFC r226277: Add INDEX-9 to the set of INDEX files built by portsnap.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226322 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoHandle page dirty mask with atomics.
kib [Wed, 12 Oct 2011 20:08:25 +0000 (20:08 +0000)]
Handle page dirty mask with atomics.

MFC r225838:
Use the explicitly-sized types for the dirty and valid masks.

MFC r225840:
Use the trick of performing the atomic operation on the contained aligned
word to handle the dirty mask updates in vm_page_clear_dirty_mask().

MFC 225841
Remove locking of the vm page queues from several pmaps.

MFC r225843:
Fix grammar.

MFC r225856:
Style nit.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226319 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226176
marius [Wed, 12 Oct 2011 19:23:00 +0000 (19:23 +0000)]
MFC: r226176

Recognize the Intel(R) Centrino(R) Wireless-N 130.

PR: 161162
Submitted by: Mikhail Tsatsenko
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226315 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226028: portsnap: Detect error immediately if we can't fetch the
jilles [Wed, 12 Oct 2011 17:57:57 +0000 (17:57 +0000)]
MFC r226028: portsnap: Detect error immediately if we can't fetch the
snapshot metadata.

Also add some quotes around command substitution where useful and possible.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226312 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226220
hselasky [Wed, 12 Oct 2011 15:43:56 +0000 (15:43 +0000)]
MFC r226220
Fix libusb compliance.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226307 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226219
hselasky [Wed, 12 Oct 2011 15:43:22 +0000 (15:43 +0000)]
MFC r226219
Fix panic due to re-using in-use modem unit number.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226306 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 226252:
tuexen [Wed, 12 Oct 2011 15:29:50 +0000 (15:29 +0000)]
MFC 226252:
Use the most significant 6 bits of the dscp instead of the least
significant ones.
This has changed in the latest version of the socket API ID and
provides backwards compatibility and gets it in syn with the
usage of the IP_TOS socket option.

Approved by: re@

git-svn-id: svn://svn.freebsd.org/base/stable/9@226304 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226118:
marius [Wed, 12 Oct 2011 15:02:06 +0000 (15:02 +0000)]
MFC r226118:

Sync with ahc(4)/ahd(4)/sym(4) etc:
Zero any sense not transferred by the device as the SCSI specification
mandates that any untransferred data should be assumed to be zero.

Reviewed by: ken
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226303 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226105:
andre [Wed, 12 Oct 2011 11:34:14 +0000 (11:34 +0000)]
MFC r226105:
  Add back the IP header length to the total packet length field on
  raw IP sockets.  It was deducted in ip_input() in preparation for
  protocols interested only in the payload.

  On raw sockets the IP header should be delivered as it at came in
  from the network except for the byte order swaps in some fields.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226299 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC of tzdata2011l, 226289
edwin [Wed, 12 Oct 2011 11:08:09 +0000 (11:08 +0000)]
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/
Approved by: re (Kostik)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC of r226283
edwin [Wed, 12 Oct 2011 11:06:55 +0000 (11:06 +0000)]
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.

Approved by: re (Kostik)
Obtained from: http://www.iso.org/iso/country_codes.html

git-svn-id: svn://svn.freebsd.org/base/stable/9@226297 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226099:
ed [Wed, 12 Oct 2011 09:28:09 +0000 (09:28 +0000)]
MFC r226099:

  Tab should not blank cells.

  It seems I was under the impression that a tab differs from a single
  forward tabulation, namely that it blanks the underlying cells. This
  seems not to be the case. They are identical.

  This should fix applications like jove(1) that use tabs instead of
  explicit cursor position setting.

  Reported by:  Brett Glass <brett lariat net>

MFC r226183:

  Properly use the cursor to bound the position for CUP.

  We must take the origin region into account when clamping the cursor
  position.

Approved by: re@ (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226295 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226095
marius [Wed, 12 Oct 2011 08:39:57 +0000 (08:39 +0000)]
MFC: r226095

Merge from r225950 (merged to stable/9 in r226067):

Set the sense residual properly.

Reviewed by: ken
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226288 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 225946
qingli [Wed, 12 Oct 2011 08:08:08 +0000 (08:08 +0000)]
MFC 225946

This patch allows ARP to work properly in the presence of
self-referencing routes. This patch is a rework of r223862.

Reviewed by: bz, zec
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226287 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 226222:
tuexen [Wed, 12 Oct 2011 05:18:15 +0000 (05:18 +0000)]
MFC 226222:
Get struct sctp_net_route in tune with struct route.
struct route was changed in
http://svn.freebsd.org/changeset/base/225698
and since then SCTP support was broken.

Approved by: re@

git-svn-id: svn://svn.freebsd.org/base/stable/9@226278 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226170:
nwhitehorn [Wed, 12 Oct 2011 01:57:39 +0000 (01:57 +0000)]
MFC r226170:
Use UFS labels and bsdlabels (like the 8.x memsticks) instead of GPT to
fix problems with some BIOSes.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226276 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd support to makefs(8) to add UFS labels to images.
nwhitehorn [Wed, 12 Oct 2011 01:57:00 +0000 (01:57 +0000)]
Add support to makefs(8) to add UFS labels to images.

Submitted by: avg
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226275 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 226203
tuexen [Tue, 11 Oct 2011 19:31:02 +0000 (19:31 +0000)]
MFC 226203

When moving an stcb to a new inp and we copy over the list of
bound addresses, update the last used address pointer.
If not, it might result in a crash if the old inp goes away.

Approved by: re@

git-svn-id: svn://svn.freebsd.org/base/stable/9@226268 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 226168
tuexen [Tue, 11 Oct 2011 19:21:17 +0000 (19:21 +0000)]
MFC 226168
Update the inp stored in a HB-timer when moving an stcb to a new inp.
Use only this stored inp when processing a HB timeout.
This fixes a bug which results in a crash.

Approved by: re@

git-svn-id: svn://svn.freebsd.org/base/stable/9@226267 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 226035, 226047:
gabor [Tue, 11 Oct 2011 15:03:42 +0000 (15:03 +0000)]
MFC 226035, 226047:

  Update BSD grep to the latest development version.  It has some code
  backported that was written for the TRE integration project in Google
  Summer of Code 2011.  This is a temporary solution until the whole
  regex library is not replaced so that BSD grep development can continue
  and the backported code gets some review and testing.  This change only
  improves scalability slightly, there is no big performance boost yet
  but several minor bugs have been found and fixed.

Approved by: re (kib), delphij (mentor, implicit)
Sposored by: Google Summer of Code 2011

git-svn-id: svn://svn.freebsd.org/base/stable/9@226261 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdaptive spinning for locking primitives, in read-mode, have some tuning
attilio [Tue, 11 Oct 2011 13:45:04 +0000 (13:45 +0000)]
Adaptive spinning for locking primitives, in read-mode, have some tuning
SYSCTLs which are inappropriate for a daily use of the machine (mostly
useful only by a developer which wants to run benchmarks on it).
Remove them before the release as long as we do not want to ship with
them in.

Now that the SYSCTLs are gone, instead than use static storage for some
constants, use real numeric constants in order to avoid eventual compiler
dumbiness and the risk to share a storage (and then a cache-line) among
CPUs when doing adaptive spinning together.

Please note that this patch is not a MFC, but an 'edge case' as commit
directly to STABLE_9.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226060:
attilio [Tue, 11 Oct 2011 13:42:42 +0000 (13:42 +0000)]
MFC r226060:
Skip TCP_SIGNATURE calculation for INP_TIMEWAIT case.

Sponsored by: Sandvine Incorporated
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226254 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226022:
kib [Tue, 11 Oct 2011 13:22:35 +0000 (13:22 +0000)]
MFC r226022:
Move parts of the commit log for r166167, where Tor explained the
interaction between vnode locks and vfs_busy(), into comment.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226251 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226161:
nwhitehorn [Tue, 11 Oct 2011 13:19:56 +0000 (13:19 +0000)]
MFC r226161:
Avoid magicking into existence sub-partitions due to leftover blocks when
creating new ones by destroying any geom that may have come into
existence immediately after adding a partition. The EBR partition scheme
is particularly enthusiastic about false positives in this case.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226250 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226160:
nwhitehorn [Tue, 11 Oct 2011 13:19:06 +0000 (13:19 +0000)]
MFC r226160:
Usability enhancements: do not allow setting a mountpoint on bsdlabel
container partitions, which didn't do anything anyway, and check for
an existing freebsd-boot partition before bothering the user to make one.

PR: bin/160931
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226249 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225791:
kib [Tue, 11 Oct 2011 13:18:44 +0000 (13:18 +0000)]
MFC r225791:
Do not deliver SIGTRAP on exec as the normal signal, use ptracestop() on
syscall exit path. Otherwise, if SIGTRAP is ignored, that tdsendsignal()
do not want to deliver the signal, and debugger never get a notification
of exec.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226248 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226068, r226069, r226071, r226072, r226073, r226074, r226078, r226079
jkim [Mon, 10 Oct 2011 19:54:50 +0000 (19:54 +0000)]
MFC: r226068, r226069, r226071, r226072, r226073, r226074, r226078, r226079

- Unroll inlined strnlen(9) and make it easier to read.
- Inline do_sa_get() function and remove an unused return value.
- Retern more appropriate errno when Linux path name is too long.
- Restore the original socket address length if it was not really AF_INET6.
- Make sure to ignore the leading NULL byte from Linux abstract namespace.
- Use uint32_t instead of u_int32_t.  Fix style(9) nits.
- Remove a now-defunct variable.
- Use the caculated length instead of maximum length.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226029
jkim [Mon, 10 Oct 2011 19:07:55 +0000 (19:07 +0000)]
MFC: r226029

Add strnlen() to libkern.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226229 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226113:
andre [Mon, 10 Oct 2011 18:26:23 +0000 (18:26 +0000)]
MFC r226113:
  Prevent TCP sessions from stalling indefinitely in reassembly
  when reaching the zone limit of reassembly queue entries.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226228 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226156:
kib [Mon, 10 Oct 2011 14:48:18 +0000 (14:48 +0000)]
MFC r226156:
Handle the R_386_TLS_TPOFF32 relocation.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226215 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226155:
kib [Mon, 10 Oct 2011 14:46:40 +0000 (14:46 +0000)]
MFC r226155:
Setting up TLS block for the main thread must be done after the
relocations are processed.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226214 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226083:
nwhitehorn [Mon, 10 Oct 2011 13:59:33 +0000 (13:59 +0000)]
MFC r226083:
Work around some behavior of gpart that I absolutely do not understand in
order to make every operation of the partition editor fully revertable.
Under *no circumstances* will it any longer touch the disks until the user
presses Finish and confirms it.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226212 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226059:
nwhitehorn [Mon, 10 Oct 2011 13:58:33 +0000 (13:58 +0000)]
MFC r226059:
Move "Exit" to the first entry in the list, so that it is the default
choice.

PR: bin/160913
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226211 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226058:
nwhitehorn [Mon, 10 Oct 2011 13:57:35 +0000 (13:57 +0000)]
MFC r226058:
Ask if you want to set the keymap before invoking kdbmap to prevent
confusion.

PR: bin/160913
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226210 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226081, r226104
rmacklem [Mon, 10 Oct 2011 13:51:21 +0000 (13:51 +0000)]
MFC: r226081, r226104
A crash reported on freebsd-fs@ on Sep. 23, 2011 under the subject
heading "kernel panics with RPCSEC_GSS" appears to be caused by a
corrupted tailq list for the client structure. Looking at the code, calls
to the function svc_rpc_gss_forget_client() were done in an SMP unsafe
manner, with the svc_rpc_gss_lock only being acquired in the function
and not before it. As such, when multiple threads called
svc_rpc_gss_forget_client() concurrently, it could try and remove the
same client structure from the tailq lists multiple times.
The patch fixes this by moving the critical code into a separate
function called svc_rpc_gss_forget_client_locked(), which must be
called with the lock held. For the one case where the caller would
have no interest in the lock, svc_rpc_gss_forget_client() was retained,
but a loop was added to check that the client structure is still in
the tailq lists before removing it, to make it safe for multiple
concurrent calls.
Also, remove an extraneous "already" from a comment introduced by r226081.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226209 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225943:
kib [Mon, 10 Oct 2011 12:30:16 +0000 (12:30 +0000)]
MFC r225943:
Do not allow the kernel to access usermode pages without installed
fault handler. Panic immediately in such situation, on i386 and amd64.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226204 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225942:
kib [Mon, 10 Oct 2011 12:27:40 +0000 (12:27 +0000)]
MFC r225942:
Assert that exiting process does not return to usermode.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226202 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225894:
kib [Mon, 10 Oct 2011 12:07:04 +0000 (12:07 +0000)]
MFC r225894:
The sigwait(3) function shall not return EINTR, according to the
POSIX/SUSvN. The sigwait(2) syscall does return EINTR, and libc.so.7
contains the wrapper sigwait(3) which hides EINTR from callers.  The
EINTR return is used by libthr to handle required cancellation point
in the sigwait(3).

To help the binaries linked against pre-libc.so.7, i.e. RELENG_6 and
earlier, to have right ABI for sigwait(3), transform EINTR return from
sigwait(2) into ERESTART.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226199 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225858, 225859, 226172:
gjb [Mon, 10 Oct 2011 11:14:03 +0000 (11:14 +0000)]
MFC r225858, 225859, 226172:

225858:
 - Document and provide an example for PORTS_MODULES [1]

225859:
 - Whitespace cleanup

226172:
 - Bump date

PR: 161017 [1]
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226193 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 225908, 225912, 225927:
gjb [Mon, 10 Oct 2011 11:11:05 +0000 (11:11 +0000)]
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

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226190 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225857:
gjb [Mon, 10 Oct 2011 11:05:58 +0000 (11:05 +0000)]
MFC r225857:
 - Fix a few grammar and mdoc nits in script.1

PR: 161088
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226187 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226026:
delphij [Fri, 7 Oct 2011 20:40:45 +0000 (20:40 +0000)]
MFC r226026:

Add the 9750 SATA+SAS 6Gb/s RAID controller card driver, tws(4).  Many
thanks for their contiued support to FreeBSD.

This is version 10.80.00.003 from codeset 10.2.1 [1]

Obtained from: LSI http://kb.lsi.com/Download16574.aspx [1]
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226115 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225938:
trasz [Fri, 7 Oct 2011 06:46:46 +0000 (06:46 +0000)]
MFC r225938:

Fix bug introduced in r225641, which would cause panic if racct_proc_fork()
returned error -- the racct_destroy_locked() would get called twice.

MFC r225940:

Fix another bug introduced in r225641, which caused rctl to access certain
fields in 'struct proc' before they got initialized in do_fork().

MFC r225944:

Move some code inside the racct_proc_fork(); it spares a few lock operations
and it's more logical this way.

MFC r225981:

Actually enforce limit for inheritable resources on fork.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226092 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225776:
pluknet [Thu, 6 Oct 2011 20:25:35 +0000 (20:25 +0000)]
MFC r225776:

Fix typo in OSIOCGIFADDR.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226070 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225950:
ken [Thu, 6 Oct 2011 19:15:51 +0000 (19:15 +0000)]
MFC r225950:

Add descriptor sense support to CAM, and honor sense residuals properly in
CAM.

Desriptor sense is a new sense data format that originated in SPC-3.  Among
other things, it allows for an 8-byte info field, which is necessary to
pass back block numbers larger than 4 bytes.

This change adds a number of new functions to scsi_all.c (and therefore
libcam) that abstract out most access to sense data.

This includes a bump of CAM_VERSION, because the CCB ABI has changed.
Userland programs that use the CAM pass(4) driver will need to be
recompiled.

camcontrol.c: Change uses of scsi_extract_sense() to use
scsi_extract_sense_len().

Use scsi_get_sks() instead of accessing sense key specific
data directly.

scsi_modes: Update the control mode page to the latest version (SPC-4).

scsi_cmds.c,
scsi_target.c: Change references to struct scsi_sense_data to struct
scsi_sense_data_fixed.  This should be changed to allow the
user to specify fixed or descriptor sense, and then use
scsi_set_sense_data() to build the sense data.

ps3cdrom.c: Use scsi_set_sense_data() instead of setting sense data
manually.

cam_periph.c: Use scsi_extract_sense_len() instead of using
scsi_extract_sense() or accessing sense data directly.

cam_ccb.h: Bump the CAM_VERSION from 0x15 to 0x16.  The change of
struct scsi_sense_data from 32 to 252 bytes changes the
size of struct ccb_scsiio, but not the size of union ccb.
So the version must be bumped to prevent structure
mis-matches.

scsi_all.h: Lots of updated SCSI sense data and other structures.

Add function prototypes for the new sense data functions.

Take out the inline implementation of scsi_extract_sense().
It is now too large to put in a header file.

Add macros to calculate whether fields are present and
filled in fixed and descriptor sense data

scsi_all.c: In scsi_op_desc(), allow the user to pass in NULL inquiry
data, and we'll assume a direct access device in that case.

Changed the SCSI RESERVED sense key name and description
to COMPLETED, as it is now defined in the spec.

Change the error recovery action for a number of read errors
to prevent lots of retries when the drive has said that the
block isn't accessible.  This speeds up reconstruction of
the block by any RAID software running on top of the drive
(e.g. ZFS).

In scsi_sense_desc(), allow for invalid sense key numbers.
This allows calling this routine without checking the input
values first.

Change scsi_error_action() to use scsi_extract_sense_len(),
and handle things when invalid asc/ascq values are
encountered.

Add a new routine, scsi_desc_iterate(), that will call the
supplied function for every descriptor in descriptor format
sense data.

Add scsi_set_sense_data(), and scsi_set_sense_data_va(),
which build descriptor and fixed format sense data.  They
currently default to fixed format sense data.

Add a number of scsi_get_*() functions, which get different
types of sense data fields from either fixed or descriptor
format sense data, if the data is present.

Add a number of scsi_*_sbuf() functions, which print
formatted versions of various sense data fields.  These
functions work for either fixed or descriptor sense.

Add a number of scsi_sense_*_sbuf() functions, which have a
standard calling interface and print the indicated field.
These functions take descriptors only.

Add scsi_sense_desc_sbuf(), which will print a formatted
version of the given sense descriptor.

Pull out a majority of the scsi_sense_sbuf() function and
put it into scsi_sense_only_sbuf().  This allows callers
that don't use struct ccb_scsiio to easily utilize the
printing routines.  Revamp that function to handle
descriptor sense and use the new sense fetching and
printing routines.

Move scsi_extract_sense() into scsi_all.c, and implement it
in terms of the new function, scsi_extract_sense_len().
The _len() version takes a length (which should be the
sense length - residual) and can indicate which fields are
present and valid in the sense data.

Add a couple of new scsi_get_*() routines to get the sense
key, asc, and ascq only.

mly.c: Rename struct scsi_sense_data to struct
scsi_sense_data_fixed.

sbp_targ.c: Use the new sense fetching routines to get sense data
instead of accessing it directly.

sbp.c: Change the firewire/SCSI sense data transformation code to
use struct scsi_sense_data_fixed instead of struct
scsi_sense_data.  This should be changed later to use
scsi_set_sense_data().

ciss.c: Calculate the sense residual properly.  Use
scsi_get_sense_key() to fetch the sense key.

mps_sas.c,
mpt_cam.c: Set the sense residual properly.

iir.c: Use scsi_set_sense_data() instead of building sense data by
hand.

iscsi_subr.c: Use scsi_extract_sense_len() instead of grabbing sense data
directly.

umass.c: Use scsi_set_sense_data() to build sense data.

Grab the sense key using scsi_get_sense_key().

Calculate the sense residual properly.

isp_freebsd.h: Use scsi_get_*() routines to grab asc, ascq, and sense key
values.

Calculate and set the sense residual.

Approved by: re (kib)
Sponsored by: Spectra Logic Corporation

git-svn-id: svn://svn.freebsd.org/base/stable/9@226067 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225878:
ae [Thu, 6 Oct 2011 14:33:32 +0000 (14:33 +0000)]
MFC r225878:
  Add Oxford Semiconductor OXPCIe952 (0x1c38) 1 port serial card.

  PR: kern/160895
  Submitted by: Konstantin V. Krotov

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226061 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225828:
mm [Wed, 5 Oct 2011 19:57:59 +0000 (19:57 +0000)]
MFC r225828:
Remove assertion that prevents zfs rename of datasets with mountpoint=none
or mountpoint=legacy that have children datasets. This also fixes dataset
rename when receiving incremental snapshots as reported on freebsd-fs@

This assertion was made triggerable by opensolaris change #10196.

PR: bin/160400
Reviewed by: pjd
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226044 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226035
jkim [Wed, 5 Oct 2011 15:50:05 +0000 (15:50 +0000)]
MFC: r226035

Avoid accidental conflicts with C++ operator keywords.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226036 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoFix a bug in UNIX socket handling in the linux emulator which was
cperciva [Tue, 4 Oct 2011 19:07:38 +0000 (19:07 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/9@226023 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r225815: document that passive mode is the default
des [Tue, 4 Oct 2011 17:27:10 +0000 (17:27 +0000)]
MFH r225815: document that passive mode is the default
MFH r225982: convert to UTF-8

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226016 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r225810 r225812: make passive mode the default.
des [Tue, 4 Oct 2011 17:26:40 +0000 (17:26 +0000)]
MFH r225810 r225812: make passive mode the default.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@226015 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r225852: regenerate after hpn patch
des [Tue, 4 Oct 2011 15:06:11 +0000 (15:06 +0000)]
MFH r225852: regenerate after hpn patch

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225983 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225885:
bz [Tue, 4 Oct 2011 12:45:24 +0000 (12:45 +0000)]
MFC r225885:

 Fix an obvious bug from r186196 shadowing a variable, not correctly
 appending the new mbuf to the chain reference but possibly causing an mbuf
 nextpkt loop leading to a memory used after handoff (or having been freed)
 and leaking an mbuf here.

 Reviewed by:   rwatson, brooks
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225971 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225837:
bz [Tue, 4 Oct 2011 11:35:18 +0000 (11:35 +0000)]
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.

 Submitted by: multiple (see PR)
 Suggested by: rwatson [1]
 Reviewed by: rwatson
PR: kern/134931
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225970 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225790:
kib [Tue, 4 Oct 2011 11:08:44 +0000 (11:08 +0000)]
MFC r225790:
Install ciss(4) ioctl header.

PR: kern/109813
Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225967 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225793:
bz [Tue, 4 Oct 2011 11:02:48 +0000 (11:02 +0000)]
MFC r225793:

 Unbreak no-ip and no-inet6 module builds with ipfw.  For now continue to
 build the ip_fw_pfil.c hooks and ipfw even in case of no-ip under the
 assumption that the private L2 hook (which hopefully eventually will be a
 pfil hook as well) can still be useful.

 Allow building the module without inet as well.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225965 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 225953:
mav [Tue, 4 Oct 2011 10:02:14 +0000 (10:02 +0000)]
MFC 225953:
Revert r225875, r225877:
It is reported that on some chips (e.g. the 970MP) behavior of POW bit set
simultaneously with modifying other bits is undefined and may cause hangs.
The race should be handled in some other way, but for now just get back.

Reported by:    nwitehorn
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225963 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225809:
trociny [Tue, 4 Oct 2011 10:00:28 +0000 (10:00 +0000)]
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.

Submitted by: Ronald Klop <ronald-freebsd8@klop.yi.org>
Discussed with: kib, Chris Torek <chris.torek@gmail.com>

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225962 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225880:
dim [Mon, 3 Oct 2011 20:27:51 +0000 (20:27 +0000)]
MFC r225880:
Revive the LLVM and Clang license files, which were removed in my
too-thorough cleanup of unused files, in r213695.  Also make sure these
get installed under /usr/share/doc.

Submitted by: rwatson, brooks
Pointy hat to: dim
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225949 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225869:
mav [Sun, 2 Oct 2011 12:15:15 +0000 (12:15 +0000)]
MFC r225869:
- Add special support for the MFI_CMD ioctl with MFI_CMD_STP command,
used by present MegaCLI version. It has some special meaning for the
first s/g list entry, while the main s/g list begins from the the second
entry, and those lists should remain separate after loading to the
busdma map.
 - Fix bug in 32bit ioctl compatibility shims when s/g list consists of
more then on element.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225918 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225875, r225877:
mav [Sun, 2 Oct 2011 11:13:28 +0000 (11:13 +0000)]
MFC r225875, r225877:
Handle the race in cpu_idle() when due to the critical section CPU could
get into sleep after receiving interrupt, delaying interrupt thread
execution indefinitely until the next interrupt arrive.

Reviewed by:    nwhitehorn
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225917 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225906: Shut up warnings with Cyrus SASL 2.1.25.
ume [Sat, 1 Oct 2011 19:58:35 +0000 (19:58 +0000)]
MFC r225906: Shut up warnings with Cyrus SASL 2.1.25.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225907 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225775
gabor [Sat, 1 Oct 2011 13:47:50 +0000 (13:47 +0000)]
MFC: r225775
  - Move misplaced reference
  - Sort references
  - s/Since/Because/

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225902 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225789:
mav [Thu, 29 Sep 2011 10:37:59 +0000 (10:37 +0000)]
MFC r225789:
Add one more ID for the Marvell 88SE9128 6Gbps SATA controller.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225873 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225807:
mckusick [Wed, 28 Sep 2011 19:38:47 +0000 (19:38 +0000)]
MFC r225807:
This update eliminates a lock-order reversal warning discovered
whle tracking down the system hang reported in kern/160662 and
corrected in revision 225806 (MFC'ed as 225850). The LOR is not
the cause of the system hang and indeed cannot cause an actual
deadlock. However, it can be easily eliminated by defering the
acquisition of a buflock until after all the vnode locks have
been acquired.

As journaled soft updates first appeared in 9.0, this will be the
only MFC of this change.

Approved by:     re (kib)
Reported by:     Hans Ottevanger
PR:              kern/160662

git-svn-id: svn://svn.freebsd.org/base/stable/9@225851 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225806:
mckusick [Wed, 28 Sep 2011 19:36:21 +0000 (19:36 +0000)]
MFC: r225806:
This update eliminates the system hang reported in kern/160662 when
taking a snapshot on a filesystem running with journaled soft updates.

As journaled soft updates first appeared in 9.0, this will be the
only MFC of this change.

Approved by:     re (kib)
Reported by:     Hans Ottevanger
Fix verified by: Hans Ottevanger
PR:              kern/160662

git-svn-id: svn://svn.freebsd.org/base/stable/9@225850 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoFix handling of corrupt compress(1)ed data. [11:04]
bz [Wed, 28 Sep 2011 08:47:17 +0000 (08:47 +0000)]
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

git-svn-id: svn://svn.freebsd.org/base/stable/9@225827 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r225805: use fseeko(2) instead of fseek(2).
des [Tue, 27 Sep 2011 19:08:27 +0000 (19:08 +0000)]
MFH r225805: use fseeko(2) instead of fseek(2).

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225816 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years ago- MFC r225778:
stas [Tue, 27 Sep 2011 18:40:13 +0000 (18:40 +0000)]
- MFC r225778:
  - Add missing interdependencies to kerberos libraries.  Some of the
    kerberos libraries were not linked properly (missing dependencies),
    which causes 3rd party applications linking to fail when --as-needed
    ld flag is used.  I also added the --no-undefined ld(1) flag to make
    sure that there're no missing dependencies.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225811 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225798: Improve battery capacity reporting
emaste [Tue, 27 Sep 2011 17:11:09 +0000 (17:11 +0000)]
MFC r225798: Improve battery capacity reporting

  When a status pointer is passed in mfi_dcmd_command does not return an
  errno (if the ioctl is successful), so move the test for NO_HW_PRESENT
  outside of the error case.  This should fix incorrect reporting for
  systems with a dead or no battery.

  Additionally, handle error codes other than NO_HW_PRESENT by omitting
  the battery capacity display.  LSI's supercap-based parts (CV series)
  report their data using the same interface as battery-based parts,
  except that they do not include the capacity stats (state of charge,
  cumulative charge cycles, etc.)

PR:           bin/160581
Approved by:  re

git-svn-id: svn://svn.freebsd.org/base/stable/9@225804 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r225800: finally fix resume mode with non-cooperating server.
des [Tue, 27 Sep 2011 17:04:13 +0000 (17:04 +0000)]
MFH r225800: finally fix resume mode with non-cooperating server.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225803 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225788:
mav [Tue, 27 Sep 2011 15:08:59 +0000 (15:08 +0000)]
MFC r225788:
Fix interrupt counters dumping on SW_WATCHDOG fire.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225799 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoBackout r225372.
attilio [Tue, 27 Sep 2011 14:00:32 +0000 (14:00 +0000)]
Backout r225372.
Eventhandler mutex cannot be acquired in kernel context.

Sponsored by: Sandvine Incorporated
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@225797 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f