]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
12 years agoMFC r224011:
bz [Thu, 9 Feb 2012 09:23:37 +0000 (09:23 +0000)]
MFC r224011:

 Fix indentation.

 Obtained from: Ed Maste at Sandvine Incorporated
 Sponsored by: Sandvine Incorporated

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

12 years agoMFH r226502,r226503: factor out the common code and fix two display bugs
bapt [Thu, 9 Feb 2012 09:20:50 +0000 (09:20 +0000)]
MFH r226502,r226503: factor out the common code and fix two display bugs

Approved by: des (mentor)

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

12 years agoMFC r223739:
bz [Thu, 9 Feb 2012 08:41:56 +0000 (08:41 +0000)]
MFC r223739:

 Remove extra white space to comply with style for the rest of the struct.

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

12 years agoMFC r223667:
bz [Thu, 9 Feb 2012 07:52:45 +0000 (07:52 +0000)]
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

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

12 years agoMFC r230921:
mav [Thu, 9 Feb 2012 07:45:02 +0000 (07:45 +0000)]
MFC r230921:
Insert ordered command every 1/4 of the current command timeout, not 1/4
of the default one.

Without this change setting kern.cam.ada.default_timeout to 1 instead of 30
allowed me to trigger several false positive command timeouts under heavy
ZFS load on a SiI3132 siis(4) controller with 5 HDDs on a port multiplier.

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

12 years agoMFC r230912:
mav [Thu, 9 Feb 2012 07:40:13 +0000 (07:40 +0000)]
MFC r230912:
Make CAM ATA honor old hw.ata.ata_dma and hw.ata.atapi_dma tunables.

Even having more specific hint.ata.X.mode controls, global ones are
still could be useful from some points, including compatibility.

PR:             kern/164651

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

12 years agoMRC r223626:
bz [Thu, 9 Feb 2012 07:27:59 +0000 (07:27 +0000)]
MRC 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

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

12 years agoMFH r230307: fix SIGINFO-related data corruption bug
bapt [Thu, 9 Feb 2012 06:50:43 +0000 (06:50 +0000)]
MFH r230307: fix SIGINFO-related data corruption bug

Approved by: des (mentor)

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

12 years agoMerge from head to stable/8:
scf [Thu, 9 Feb 2012 01:18:23 +0000 (01:18 +0000)]
Merge from head to stable/8:

r230656:
msdos was renamed to msdosfs in 2001 by r77577.

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

12 years agoGiven that sun4u uses sparc64/sparc64/ofw_machdep.c, use the sparc64
marius [Wed, 8 Feb 2012 23:57:03 +0000 (23:57 +0000)]
Given that sun4u uses sparc64/sparc64/ofw_machdep.c, use the sparc64
<machine/ofw_machdep.h> here also. This isn't exactly a clean approach
though as ofw_machdep.h also includes some prototypes for functions
that aren't actually shared between both architectures but just happen
to have the same interface. Given that the sun4v support actually is
dead and this is just to allow things to continue to compile it should
be okay though.

This is a direct commit to stable/8.

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

12 years agoMerge from r230889:
marius [Wed, 8 Feb 2012 23:47:22 +0000 (23:47 +0000)]
Merge from r230889:

Mark cpu_{halt,reset}() and hv_mach_{exit,sir}() as __dead2 as appropriate.

This is a direct commit to stable/8.

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

12 years agoMerge from head to stable/8:
scf [Wed, 8 Feb 2012 23:13:21 +0000 (23:13 +0000)]
Merge from head to stable/8:

r230655:
Since April 2, 2006, Indiana has observed DST.

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

12 years agoMFC r227285:
hselasky [Wed, 8 Feb 2012 22:29:41 +0000 (22:29 +0000)]
MFC r227285:
Add support for new USB modem protocol.

PR: usb/159919

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

12 years agoMFC r229317:
hselasky [Wed, 8 Feb 2012 22:27:07 +0000 (22:27 +0000)]
MFC r229317:
Fix support for suspend and resume.

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

12 years agoMFC r223359:
bz [Wed, 8 Feb 2012 19:31:32 +0000 (19:31 +0000)]
MFC r223359:

 Garbage collect never used global, sysctl, externs.

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

12 years agoMFC r228641:
bz [Wed, 8 Feb 2012 18:51:20 +0000 (18:51 +0000)]
MFC r228641:

 Allow toggling of IFCAP_VLAN_HWCSUM for hardware that supports checksum
 offloading on vlans and document the new option.

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

12 years agoRemove sun4v from universe targets.
bz [Wed, 8 Feb 2012 18:21:48 +0000 (18:21 +0000)]
Remove sun4v from universe targets.

Approved by: re

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

12 years agoMFC r222845:
bz [Wed, 8 Feb 2012 17:54:02 +0000 (17:54 +0000)]
MFC r222845:

 Correct comments and debug logging in ipsec to better match reality.

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

12 years agoMFC r225428:
bz [Wed, 8 Feb 2012 17:03:12 +0000 (17:03 +0000)]
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

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

12 years agoMFC r225036:
bz [Wed, 8 Feb 2012 16:44:54 +0000 (16:44 +0000)]
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.

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

12 years agoMFC r225033:
bz [Wed, 8 Feb 2012 16:24:56 +0000 (16:24 +0000)]
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

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

12 years agoMFC r225032,225034:
bz [Wed, 8 Feb 2012 16:03:05 +0000 (16:03 +0000)]
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

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

12 years agoMFC r225030:
bz [Wed, 8 Feb 2012 15:37:34 +0000 (15:37 +0000)]
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

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

12 years agoMFC r230553:
kib [Wed, 8 Feb 2012 15:19:49 +0000 (15:19 +0000)]
MFC r230553:
When doing vflush(WRITECLOSE), clean vnode pages.

Unmounts do vfs_msync() before calling VFS_UNMOUNT(), but there is
still a race allowing a process to dirty pages after msync
finished. Remounts rw->ro just left dirty pages in system.

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

12 years agoMFC 230877:
mav [Wed, 8 Feb 2012 07:31:55 +0000 (07:31 +0000)]
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.

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

12 years agoMFC r231177:
marcel [Wed, 8 Feb 2012 04:47:06 +0000 (04:47 +0000)]
MFC r231177:
Rev. 228360 moved the call to cpu_set_upcall() to happen before
td_proc gets initialized in td (=newtd). Use td0 instead.

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

12 years agoMFC r225643,225644:
delphij [Tue, 7 Feb 2012 22:31:16 +0000 (22:31 +0000)]
MFC r225643,225644:

Change the example of using smbfs in fstab to a password-less one,
which is less likely to block a remote system from boot.

Submitted by: Garrett Cooper <yanegomi@gmail.com>
PR: doc/160775

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

12 years agoMFC 229465: Use correct locking when traversing interface address list.
jhb [Tue, 7 Feb 2012 22:13:54 +0000 (22:13 +0000)]
MFC 229465: Use correct locking when traversing interface address list.

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

12 years agoMFC r226274,r226416:
delphij [Tue, 7 Feb 2012 22:13:33 +0000 (22:13 +0000)]
MFC r226274,r226416:

Fix the error message when setgid() failed.

PR: bin/161509
Submitted by: Jeremy Huddleston <jeremyhu apple com>

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

12 years agoMFC r227454:
delphij [Tue, 7 Feb 2012 21:56:58 +0000 (21:56 +0000)]
MFC r227454:

Use __packed to prevent alignment from taking place, which otherwise may
change the on-disk format in an incompatible way. Without this change,
msdosfs created on FreeBSD/arm would not be mountable.

PR: bin/162486
Submitted by: Ian Lepore <freebsd damnhippie dyndns org>
Reported by: Mattia Rossi <mrossi at swin.edu.au>

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

12 years agoMFC 229614:
jhb [Tue, 7 Feb 2012 19:56:22 +0000 (19:56 +0000)]
MFC 229614:
Add new variants of the IF_ADDR_*LOCK*() macros used for protecting
interface address lists that distinguish read locks from write locks.
To preserve the KPI, the previous operations are mapped to the write
lock macros.  The lock is still kept as a mutex for now.

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

12 years agoHoist mergeinfo for modules/sound/driver/* up to sys/.
jhb [Tue, 7 Feb 2012 19:45:15 +0000 (19:45 +0000)]
Hoist mergeinfo for modules/sound/driver/* up to sys/.

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

12 years agoMFC 229598:
jhb [Tue, 7 Feb 2012 19:41:21 +0000 (19:41 +0000)]
MFC 229598:
Remove use of explicit bus space tags and handles and use methods that
operate on resource objects instead.

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

12 years agoMFC 228962:
jhb [Tue, 7 Feb 2012 19:23:31 +0000 (19:23 +0000)]
MFC 228962:
Use curthread rather than PCPU_GET(curthread).  'curthread' uses
special-case optimizations on several platforms and is preferred.

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

12 years agoRegen.
jhb [Tue, 7 Feb 2012 19:13:47 +0000 (19:13 +0000)]
Regen.

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

12 years agoMFC 228957:
jhb [Tue, 7 Feb 2012 19:12:21 +0000 (19:12 +0000)]
MFC 228957:
Implement linux_fadvise64() and linux_fadvise64_64() using
kern_posix_fadvise().

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

12 years agoMFC r230514:
mm [Tue, 7 Feb 2012 17:57:59 +0000 (17:57 +0000)]
MFC r230514:
Merge illumos revisions 13572, 13573, 13574:

Rev. 13572:
disk sync write perf regression when slog is used post oi_148 [1]

Rev. 13573:
crash during reguid causes stale config [2]
allow and unallow missing from zpool history since removal of pyzfs [5]

Rev. 13574:
leaking a vdev when removing an l2cache device [3]
memory leak when adding a file-based l2arc device [4]
leak in ZFS from metaslab_group_create and zfs_ereport_checksum [6]

References:
https://www.illumos.org/issues/1909 [1]
https://www.illumos.org/issues/1949 [2]
https://www.illumos.org/issues/1951 [3]
https://www.illumos.org/issues/1952 [4]
https://www.illumos.org/issues/1953 [5]
https://www.illumos.org/issues/1954 [6]

Obtained from: illumos (issues #1909, #1949, #1951, #1952, #1953, #1954)

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

12 years agoMFC r230495:
mm [Tue, 7 Feb 2012 17:47:04 +0000 (17:47 +0000)]
MFC r230495:
Try resolving jail path with realpath(3).

jail(8) does a chdir(2) to the given path argument. Kernel evaluates the
jail path from the new cwd and not from the original cwd, which leads to
undesired behavior if given a relative path.

Reviewed by: jamie

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

12 years agoMFC r226441 and r226443
cognet [Tue, 7 Feb 2012 15:50:14 +0000 (15:50 +0000)]
MFC r226441 and r226443
r226441:
Explicitely set ARM_RAS_START and ARM_RAS_END once the cacheline or the
page has been allocated, or we could end up using random values, and bad things
 could happen.

 PR: arm/161492
 Submitted by: Ian Lepore <freebsd AT damnhippie dot dyndns DOT org>

r226443:
Fix 2 bugs :

- A race condition could happen if two threads were using RAS at the same time
  as the code didn't reset RAS_END, the RAS code could believe we were not in
  a RAS, when we were in fact.
- Using signed value logic to compare addresses wasn't such a good idea.
  Many thanks to Ian to investigate on these issues.

  Pointy hat to:  cognet
  PR: arm/161498
  Submitted by: Ian Lepore <freebsd At damnhippie DOT dyndns dot org

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

12 years agoMFC r230978:
kib [Tue, 7 Feb 2012 09:40:22 +0000 (09:40 +0000)]
MFC r230978:
Be as explicit as possible when describing relation between the -m mask
argument and slices. Adjust example for the same reason.

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

12 years agoMFC r222974:
np [Tue, 7 Feb 2012 07:56:00 +0000 (07:56 +0000)]
MFC r222974:
Add "context" subcommand to fetch and display SGE context.

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

12 years agoMFC r227893 and r228119:
emaste [Tue, 7 Feb 2012 04:06:21 +0000 (04:06 +0000)]
MFC r227893 and r228119:

  Avoid double free creating a new RAID with invalid command line
  arguments.

  In build_volume(), check if arrays is allocated before traversing its
  items.  While parsing the arrays input, it's possible that we reach the
  error path before initializing the 'arrays' pointer, which in turn leads
  to a NULL deference.

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

12 years agoMFC r226697 and r226708:
emaste [Tue, 7 Feb 2012 03:37:29 +0000 (03:37 +0000)]
MFC r226697 and r226708:

  Avoid printing // for packages that install to /

  I have some packages that install to / (for whatever reason).  Right now we
  print entries of the form //path/to/file when listing files (pkg_info -L,
  pkg_info -g etc.)  This change avoids printing the redundant / .

  Staticify elide_root() for now to fix build.

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

12 years agoMFC r219708:
emaste [Tue, 7 Feb 2012 03:15:12 +0000 (03:15 +0000)]
MFC r219708:

  Reemove uptime validity check that hasn't been necessary since r151417
  switched to clock_gettime.  vmstat will now not exit with an error
  if run on a system with 10 years of uptime.

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

12 years agoMFC r228825:
np [Tue, 7 Feb 2012 02:21:46 +0000 (02:21 +0000)]
MFC r228825:
Fix return value of function.

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

12 years agoMFC r228491, r228561, r228594.
np [Tue, 7 Feb 2012 01:26:29 +0000 (01:26 +0000)]
MFC r228491, r228561, r228594.

r228491:
Do not clobber the ingress queue's congestion setting.

r228561:
Many updates to cxgbe(4)

- Device configuration via plain text config file.  Also able to operate
  when not attached to the chip as the master driver.

- Generic "work request" queue that serves as the base for both ctrl and
  ofld tx queues.

- Generic interrupt handler routine that can process any event on any
  kind of ingress queue (via a dispatch table).

- A couple of new driver ioctls.  cxgbetool can now install a firmware
  to the card ("loadfw" command) and can read the card's memory
  ("memdump" and "tcb" commands).

- Lots of assorted information within dev.t4nex.X.misc.*  This is
  primarily for debugging and won't show up in sysctl -a.

- Code to manage the L2 tables on the chip.

- Updates to cxgbe(4) man page to go with the tunables that have changed.

- Updates to the shared code in common/

- Updates to the driver-firmware interface (now at fw 1.4.16.0)

r228594:
Catch up with new driver ioctls in cxgbe.

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

12 years agoMFC r222900 and r224768
np [Mon, 6 Feb 2012 21:23:12 +0000 (21:23 +0000)]
MFC r222900 and r224768

r222900:
cxgbetool: a tool for the cxgbe(4) driver.

r224768:
Move cxgbtool from usr.sbin to tools/tools.

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

12 years agoMFC r229714
np [Mon, 6 Feb 2012 18:47:07 +0000 (18:47 +0000)]
MFC r229714

Always release the inp lock before returning from tcp_detach.

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

12 years agoMFC r229692:
jh [Mon, 6 Feb 2012 17:28:55 +0000 (17:28 +0000)]
MFC r229692:

Check the return value of sbuf_finish() in pfs_readlink() and return
ENAMETOOLONG if the buffer overflowed.

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

12 years agoMFC r230212:
dumbbell [Mon, 6 Feb 2012 13:36:49 +0000 (13:36 +0000)]
MFC r230212:
sh: Fix execution of multiple statements in a trap when evalskip is set

Before this fix, only the first statement of the trap was executed if
evalskip was set. This is for example the case when:
    o  "-e" is set for this shell
    o  a trap is set on EXIT
    o  a function returns 1 and causes the script to abort

Reviewed by: jilles
Sponsored by: Yakaz (http://www.yakaz.com)

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

12 years agoMFC: r230787
brueffer [Mon, 6 Feb 2012 13:26:12 +0000 (13:26 +0000)]
MFC: r230787

Manpages for the buf_ring and drbr interfaces.

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

12 years agoMFC r230211:
dumbbell [Mon, 6 Feb 2012 13:17:57 +0000 (13:17 +0000)]
MFC r230211:
sh: Test EXIT trap with multiple statements in it

Reviewed by: jilles

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

12 years agoMFC r230785:
kib [Mon, 6 Feb 2012 10:35:21 +0000 (10:35 +0000)]
MFC r230785:
A debugger which requested PT_FOLLOW_FORK should get the notification
about new child not only when doing PT_TO_SCX, but also for PT_CONTINUE.
If TDB_FORK flag is set, always issue a stop, the same as is done for
TDB_EXEC.

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

12 years agoMFC: r230897
pfg [Sun, 5 Feb 2012 20:18:53 +0000 (20:18 +0000)]
MFC: r230897

Use new OSS-based BSD-licensed header for cs sound driver.

The cs driver requires a table with firmware values. An
alternative firmware is available in a similar Open Sound
System driver. This is actually a partial revert of
Revision 77504.

The csa driver is now free of the GPL.

Tested by: joel
Approved by: jhb (mentor)

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

12 years agoMFC r230325
sbruno [Sun, 5 Feb 2012 19:38:22 +0000 (19:38 +0000)]
MFC r230325

Wrap changes from svn r212126 inside LOADER_NFS_SUPPORT

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

12 years agoMFC r230313, r230316, r230323, r230588
sbruno [Sun, 5 Feb 2012 19:10:48 +0000 (19:10 +0000)]
MFC r230313, r230316, r230323, r230588

Support new raid controllers

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

12 years agoMFC r229699, r229744, r229778, r229944, r229945, r229946, r230092, r230395,
trociny [Sun, 5 Feb 2012 15:54:32 +0000 (15:54 +0000)]
MFC r229699, r229744, r229778, r229944, r229945, r229946, r230092, r230395,
  r230396, r230436, r230457, r230515, r230976:

r229699 (pjd):

Constify argument.

r229744 (pjd):

fork(2) returns -1 on failure, not some random negative number.

r229778 (uqs):

Spelling fixes for sbin/

r229944 (pjd):

Don't touch pidfiles when running in foreground. Before that change we
would create an empty pidfile on start and check if it changed on SIGHUP.

r229945 (pjd):

For functions that return -1 on failure check exactly for -1 and not for
any negative number.

r229946 (pjd):

- Fix a bug where pidfile was removed in SIGHUP when it hasn't changed in
  configuration file.
- Log the fact that pidfile has changed.

r230092 (pjd):

Style cleanups.

r230395 (pjd):

Remove unused token 'port'.

r230396 (pjd):

Remove another unused token.

r230436 (pjd):

Fix minor memory leak.

r230457 (pjd):

Free memory that won't be used in child.

r230515 (pjd):

- Fix documentation to note that /etc/hast.conf is the default configuration
  file for hastd(8) and hastctl(8) and not hast.conf.
- In copyright statement correct that this file is documentation, not software.
- Bump date.

r230976 (pjd):

Fix typo in comment.

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

12 years agoMFC r230611:
mav [Sat, 4 Feb 2012 15:43:16 +0000 (15:43 +0000)]
MFC r230611:
Return proper error message if recording device is not specified.

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

12 years agoMFC: r228740
pfg [Fri, 3 Feb 2012 23:35:39 +0000 (23:35 +0000)]
MFC: r228740

Many style fixes.
Remove C99 initializers: they don't help in this case.
Set errno to 0 before strtoll() (from NetBSD).

PR: 151850
Suggested by: bde
Approved by: jhb (Mentor)

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

12 years agoMFC r229753:
dim [Fri, 3 Feb 2012 23:08:58 +0000 (23:08 +0000)]
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

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

12 years agoMFC: r229981, r230898
pfg [Fri, 3 Feb 2012 23:00:28 +0000 (23:00 +0000)]
MFC:  r229981, r230898

Replace a GPL'd header in the emu10kx snd driver code.

This uses the emuxkireg.h already used in the emu10k1
snd driver. Special thanks go to Alexander Motin as
he was able to find some errors and reverse engineer
some wrong values in the emuxkireg header.

While here also merge some cleanups to the module Makefile.

PR: 153901
Obtained from: NetBSD
Approved by: core (mentor implicit)

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

12 years agoMFC: r229430, r229980
pfg [Fri, 3 Feb 2012 22:13:36 +0000 (22:13 +0000)]
MFC:  r229430, r229980

Replace a GPL'd header in the emu10k1 snd driver code.

This brings in the emuxkireg.h from NetBSD (dev/pci) which
is used for the same purpose but is smaller. The emu10k1
is now free from the GPL.

While here also merge some cleanups to the module Makefile.

PR: 153901
Obtained from: NetBSD
Approved by: core (mentor implicit)

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

12 years agoMFC: r228780
pfg [Fri, 3 Feb 2012 21:30:31 +0000 (21:30 +0000)]
MFC: r228780

Update libstdc++ with small changes up to the latest rev. (135556)
from the gcc 4.2 branch.
The libraries in the gcc-4_2-branch remained under the LGPLv2.

Reviewed by: mm
Approved by: jhb (mentor)

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

12 years agoMFC: r228756
pfg [Fri, 3 Feb 2012 21:26:25 +0000 (21:26 +0000)]
MFC: r228756

Clean an inconsistency with -ffinite-math-only.
Backported from the gcc-4_3-branch, revision (118001)
under the GPLv2.
This issue was also fixed in Apple's gcc.

PR: 157025
Reviewed by: mm
Approved by: jhb (mentor)

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

12 years agoMFC did not get the new files...
jfv [Fri, 3 Feb 2012 05:00:43 +0000 (05:00 +0000)]
MFC did not get the new files...

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

12 years agoMFC: r230345
rmacklem [Fri, 3 Feb 2012 03:41:43 +0000 (03:41 +0000)]
MFC: r230345
Martin Cracauer reported a problem to freebsd-current@ under the
subject "Data corruption over NFS in -current". During investigation
of this, I came across an ugly bogusity in the new NFS client where
it replaced the cr_uid with the one used for the mount. This was
done so that "system operations" like the NFSv4 Renew would be
performed as the user that did the mount. However, if any other
thread shares the credential with the one doing this operation,
it could do an RPC (or just about anything else) as the wrong cr_uid.
This patch fixes the above, by using the mount credentials instead of
the one provided as an argument for this case. It appears
to have fixed Martin's problem.
This patch is needed for NFSv4 mounts and NFSv3 mounts against
some non-FreeBSD servers that do not put post operation attributes
in the NFSv3 Statfs RPC reply.

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

12 years agoMFC of the latest ixgbe driver.
jfv [Fri, 3 Feb 2012 01:36:02 +0000 (01:36 +0000)]
MFC of the latest ixgbe driver.

Revisions included:
209602,209603,209607,209609,209622,215911,
215913,215914,215924,217129,217556,222588,
222592,225405,229767,230329,230775,230790

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

12 years agoMFC 230592:
ken [Thu, 2 Feb 2012 19:03:29 +0000 (19:03 +0000)]
MFC 230592:

Bring in the LSI-supported version of the mps(4) driver.

This involves significant changes to the mps(4) driver, but is not a
complete rewrite.

Some of the changes in this version of the driver:
 - Integrated RAID (IR) support.
 - Support for WarpDrive controllers.
 - Support for SCSI protection information (EEDP).
 - Support for TLR (Transport Level Retries), needed for tape drives.
 - Improved error recovery code.
 - ioctl interface compatible with LSI utilities.

mps.4: Update the mps(4) driver man page somewhat for the driver
changes.  The list of supported hardware still needs to be
updated to reflect the full list of supported cards.

conf/files: Add the new driver files.

mps/mpi/*: Updated version of the MPI header files, with a BSD style
copyright.

mps/*: See above for a description of the new driver features.

modules/mps/Makefile:
Add the new mps(4) driver files.

Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com>
Sponsored by: LSI, Spectra Logic
Reviewed by: ken

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

12 years agoMFC r230783:
kib [Thu, 2 Feb 2012 06:39:33 +0000 (06:39 +0000)]
MFC r230783:
Add definition for PT_GNU_RELRO.

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

12 years agoMFC: r230664
marius [Wed, 1 Feb 2012 21:28:16 +0000 (21:28 +0000)]
MFC: r230664

As it turns out r227960 (MFC'ed to stable/8 in r228145) may still be
insufficient with PREEMPTION so try harder to get the CDMA sync
interrupt delivered and also in a more efficient way:
- wrap the whole process of sending and receiving the CDMA sync
  interrupt in a critical section so we don't get preempted,
- send the CDMA sync interrupt to the CPU that is actually waiting
  for it to happen so we don't take a detour via another CPU,
- instead of waiting for up to 15 seconds for the interrupt to
  trigger try the whole process for up to 15 times using a one
  second timeout (the code was also changed to just ignore belated
  interrupts of a previous tries should they appear).

According to testing done by Peter Jeremy with the debugging also
added as part of this commit the first two changes apparently are
sufficient to now properly get the CDMA sync interrupts delivered
at the first try though.

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

12 years agoMFC: r230662
marius [Wed, 1 Feb 2012 21:24:06 +0000 (21:24 +0000)]
MFC: r230662

Fully disable interrupts while we fiddle with the FP context in the
VIS-based block copy/zero implementations. While with 4BSD it's
sufficient to just disable the tick interrupts, with ULE+PREEMPTION
it's otherwise also possible that these are preempted via IPIs.

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

12 years agoMFC: r230633, r230634
marius [Wed, 1 Feb 2012 21:19:54 +0000 (21:19 +0000)]
MFC: r230633, r230634

Now that we have a working OF_printf() since r230631 and a OF_panic()
helper since r230632 (MFC'ed to stable/8 in r230885 and r230887
respectively), use these for output and panicing during the early
cycles and move cninit() until after the static per-CPU data has
been set up. This solves a couple of issue regarding the non-
availability of the static per-CPU data:
- panic() not working and only making things worse when called,
- having to supply a special DELAY() implementation to the low-level
  console drivers,
- curthread accesses of mutex(9) usage in low-level console drivers
  that aren't conditional due to compiler optimizations (basically,
  this is the problem described in r227537 but in this case for
  keyboards attached via uart(4)). [1]

PR: 164123 [1]

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

12 years agoMFC: r230628
marius [Wed, 1 Feb 2012 21:15:27 +0000 (21:15 +0000)]
MFC: r230628

Mark cpu_{halt,reset}() as __dead2 as appropriate.

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

12 years agoMFC: r230632
marius [Wed, 1 Feb 2012 21:14:07 +0000 (21:14 +0000)]
MFC: r230632

- Now that we have a working OF_printf() since r230631 (MFC'ed to stable/8
  in r230885), use it for implementing a simple OF_panic() that may be used
  during the early cycles when panic() isn't available, yet.
- Mark cpu_{exit,shutdown}() as __dead2 as appropriate.

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

12 years agoMFC: r230631
marius [Wed, 1 Feb 2012 21:11:09 +0000 (21:11 +0000)]
MFC: r230631

Implement OF_printf() using kvprintf() directly, avoiding to use a
buffer and allowing to handle newlines properly.

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

12 years agoMFC: r230630
marius [Wed, 1 Feb 2012 21:10:00 +0000 (21:10 +0000)]
MFC: r230630

For machines where the kernel address space is unrestricted increase
VM_KMEM_SIZE_SCALE to 2, awaiting more insight from alc@. As it turns
out, the VM apparently has problems with machines that have large holes
in the physical address space, causing the kmem_suballoc() call in
kmeminit() to fail with a VM_KMEM_SIZE_SCALE of 1. Using a value of 2
allows these, namely Blade 1500 with 2GB of RAM, to boot.

PR: 164227

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

12 years agoMFC: r230627
marius [Wed, 1 Feb 2012 21:08:35 +0000 (21:08 +0000)]
MFC: r230627

Using ATA_CAM along with ATAPI DMA causes data corruption with ALI_NEW
and CMD controllers for reasons unknown so disable it.

PR: 164226

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

12 years agoMFC r228820, r228851:
mav [Wed, 1 Feb 2012 18:05:54 +0000 (18:05 +0000)]
MFC r228820, r228851:
Merge to da driver quirks hinting 4K physical sector sizes for SATA disks
connected via SAS or USB. Unluckily I've found that SAS (mps) and USB-SATA
I have translate models in different ways, requiring twice more quirks.
Unluckily for Hitachi, their model names are trimmed on SAS, making
impossible to identify 4K sector drives that way.

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

12 years agoRevert r230854 as the change does not apply to stable/8.
emaste [Wed, 1 Feb 2012 01:36:46 +0000 (01:36 +0000)]
Revert r230854 as the change does not apply to stable/8.

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

12 years agoMFC r230293:
emaste [Wed, 1 Feb 2012 01:28:35 +0000 (01:28 +0000)]
MFC r230293:

  Add missing line continuation \.  It did not cause any issue because
  the same path is already being included in ../Makefile.inc.

  PR:           164192
  Submitted by: Devin Teske <dteske vicor com>

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

12 years ago- Hook up VTOC8 geometry adjustments.
marius [Tue, 31 Jan 2012 23:24:46 +0000 (23:24 +0000)]
- Hook up VTOC8 geometry adjustments.
- Remove some unused externs.

This is a direct commit to stable/8 in order to unbreak the build with
r230666 in place.

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

12 years agoAdd more sparc64 compatibility macros for the shared loader.
marius [Tue, 31 Jan 2012 23:20:14 +0000 (23:20 +0000)]
Add more sparc64 compatibility macros for the shared loader.
This is a direct commit to stable/8 in order to unbreak the build with
r224370 in place.

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

12 years agoMFC: 230000, 230544
ken [Tue, 31 Jan 2012 23:09:27 +0000 (23:09 +0000)]
MFC: 230000, 230544

Fix a race condition in CAM peripheral free handling, locking
in the CAM XPT bus traversal code, and a number of other periph level
issues.

  r230544 | ken | 2012-01-25 10:58:47 -0700 (Wed, 25 Jan 2012) | 9 lines

  Fix a bug introduced in r230000.  We were eliminating all LUNs on a target
  in response to CAM_DEV_NOT_THERE, instead of just the LUN in question.

  This will now just eliminate the specified LUN in response to
  CAM_DEV_NOT_THERE.

  Reported by: Richard Todd <rmtodd@servalan.servalan.com>

  r230000 | ken | 2012-01-11 17:41:48 -0700 (Wed, 11 Jan 2012) | 72 lines

  Fix a race condition in CAM peripheral free handling, locking
  in the CAM XPT bus traversal code, and a number of other periph level
  issues.

  cam_periph.h,
  cam_periph.c: Modify cam_periph_acquire() to test the CAM_PERIPH_INVALID
   flag prior to allowing a reference count to be gained
   on a peripheral.  Callers of this function will receive
   CAM_REQ_CMP_ERR status in the situation of attempting to
   reference an invalidated periph.  This guarantees that
   a peripheral scheduled for a deferred free will not
   be accessed during its wait for destruction.

   Panic during attempts to drop a reference count on
   a peripheral that already has a zero reference count.

   In cam_periph_list(), use a local sbuf with SBUF_FIXEDLEN
   set so that mallocs do not occur while the xpt topology
   lock is held, regardless of the allocation policy of the
   passed in sbuf.

   Add a new routine, cam_periph_release_locked_buses(),
   that can be called when the caller already holds
   the CAM topology lock.

   Add some extra debugging for duplicate peripheral
   allocations in cam_periph_alloc().

   Treat CAM_DEV_NOT_THERE much the same as a selection
   timeout (AC_LOST_DEVICE is emitted), but forgo retries.

  cam_xpt.c: Revamp the way the EDT traversal code does locking
   and reference counting.  This was broken, since it
   assumed that the EDT would not change during
   traversal, but that assumption is no longer valid.

   So, to prevent devices from going away while we
   traverse the EDT, make sure we properly lock
   everything and hold references on devices that
   we are using.

   The two peripheral driver traversal routines should
   be examined.  xptpdperiphtraverse() holds the
   topology lock for the entire time it runs.
   xptperiphtraverse() is now locked properly, but
   only holds the topology lock while it is traversing
   the list, and not while the traversal function is
   running.

   The bus locking code in xptbustraverse() should
   also be revisited at a later time, since it is
   complex and should probably be simplified.

  scsi_da.c: Pay attention to the return value from cam_periph_acquire().

   Return 0 always from daclose() even if the disk is now gone.

   Add some rudimentary error injection support.

  scsi_sg.c: Fix reference counting in the sg(4) driver.

   The sg driver was calling cam_periph_release() on close,
   but never called cam_periph_acquire() (which increments
   the reference count) on open.

   The periph code correctly complained that the sg(4)
   driver was trying to decrement the refcount when it
   was already 0.

  Sponsored by: Spectra Logic

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

12 years agoMFC of e1000 drivers
jfv [Tue, 31 Jan 2012 22:47:10 +0000 (22:47 +0000)]
MFC of e1000 drivers

The following revs are merged:
212303,212304,213234,214363,214441,217556,219902,221505,
223676,226436,227309,228386,228387,228405,228415,228788,
228803,229606,229767,230023,230024,230742

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

12 years agoMFC 226828: Fix a memory leak in tzload().
jhb [Tue, 31 Jan 2012 19:07:08 +0000 (19:07 +0000)]
MFC 226828: Fix a memory leak in tzload().

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

12 years agoMFC r225708 into stable/8:
gibbs [Tue, 31 Jan 2012 18:13:49 +0000 (18:13 +0000)]
MFC r225708 into stable/8:

Modify the netfront driver so it can successfully attach to
PV devices with the ioemu attribute set.

sys/dev/xen/netfront/netfront.c:
o If a mac address for the interface cannot be found
  in the front-side XenStore tree, look for an entry
  in the back-side tree.  With ioemu devices, the
  emulator does not populate the front side tree and
  neither does Xend.
o Return an error rather than panic when an attach
  attempt fails.

Reported by: Janne Snabb (fix inspired by patch provided)
PR: kern/154302

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

12 years agoMFC r217314 (ae):
wblock [Tue, 31 Jan 2012 01:43:03 +0000 (01:43 +0000)]
MFC r217314 (ae):
Fix up the grammar.

MFC r217342 (maxim):
o Typo fixes.

MFC r217343 (maxim):
o Start each sentence on a new line.  No content changes.

MFC r222359 (ae):
Add example how to create MBR and BSD schemes and install boot code.

MFC r222495 (ae):
Document kern.geom.part.check_integrity sysctl variable.

MFC r222599 (uqs):
mdoc: fix markup

MFC r222646 (ru):
Generally clean up markup.

MFC r222778 (gavin):
Rework parts of this man page to improve grammar.

MFC r225003 (ae):
Add new section "BOOTSTRAPPING" to the gpart(8), that describes
bootstrap code images used to boot from MBR, GPT, BSD and VTOC8
schemes.

MFC r227774:
Add a section that explicitly describes partitioning schemes.  Modify
existing sections to refer to the new one.  Rearrange partitioning scheme
list so MBR and EBR types are together.  Also add several corrections for
grammar, clarity, and consistency.

MFC r227777:
Fix date.

MFC r227800:
Correct and expand BSD partitioning scheme description.
Correct GUID to GPT in RECOVERING section.

MFC r229838:
Clarity improvements.

MFC r229847:
Whitespace-only fix.

Approved by: gjb (mentor)

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

12 years agoMFC r217071 and r217213:
dougb [Tue, 31 Jan 2012 00:49:04 +0000 (00:49 +0000)]
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.

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

12 years agoMFC r230613:
pluknet [Mon, 30 Jan 2012 12:29:51 +0000 (12:29 +0000)]
MFC r230613:
Remove a left-over reference to make.conf(5) for now-defunct -DVM_STACK

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

12 years agoMFC r230531: Remove unused variable.
pluknet [Mon, 30 Jan 2012 12:13:50 +0000 (12:13 +0000)]
MFC r230531: Remove unused variable.

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

12 years agoMFC r230064:
truckman [Mon, 30 Jan 2012 07:23:53 +0000 (07:23 +0000)]
MFC r230064:

Allow an MBR primary or extended Linux swap partition to be specified
as the system dump device.  This was already allowed for GPT.  The Linux
swap metadata at the beginning of the partition should not be disturbed
because the crash dump is written at the end.

Reviewed by: alfred, pjd, marcel

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

12 years agoMFC r230101:
mckusick [Mon, 30 Jan 2012 05:45:11 +0000 (05:45 +0000)]
MFC r230101:

Convert FFS mount error messages from kernel printf's to using the
vfs_mount_error error message facility provided by the nmount
interface.

Clean up formatting of mount warnings which still need to use
kernel printf's since they do not return errors.

Requested by: Craig Rodrigues <rodrigc@crodrigues.org>

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

12 years agoMFC r228268:
trociny [Sun, 29 Jan 2012 21:58:18 +0000 (21:58 +0000)]
MFC r228268:

Protect process environment variables with p_candebug().

Discussed with: jilles, kib, rwatson

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

12 years agoMFC: r204556
marius [Sun, 29 Jan 2012 15:00:31 +0000 (15:00 +0000)]
MFC: r204556

Update a comment to reflect reality and explain why we're using the
medany code model.

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

12 years agoMFC: r204556
marius [Sun, 29 Jan 2012 14:58:54 +0000 (14:58 +0000)]
MFC: r204556

Move csup away from contrib/ and into usr.bin/. Software is no longer
contributed, and main development is happening in the FreeBSD repo.

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

12 years agoo MFC: r204556, r204628
marius [Sun, 29 Jan 2012 14:55:38 +0000 (14:55 +0000)]
o MFC: r204556, r204628

  Move csup away from contrib/ and into usr.bin/. Software is no longer
  contributed, and main development is happening in the FreeBSD repo.

o MFC: r204558

  Unmark authentication support as a TODO item.

o MFC: r204629

  Remove unused include path.

o MFC: r204639

  Include CURDIR in case the makefile is not run from the same directory.

o MFC: r204664

  Fix spelling.

o MFC: r206621

  Add and expand $FreeBSD$ keyword to allow committing to this file.

o MFC: r206622 (partial)

  mdoc: order prologue macros consistently by Dd/Dt/Os

  Although groff_mdoc(7) gives another impression, this is the ordering
  most widely used and also required by mdocml/mandoc.

o MFC: r208291 (partial)

  mdoc: consistently spell our email addresses <foo@FreeBSD.org>

o MFC: r210874

  Don't point users at the old csup homepage.

o MFC: r213300

  If an RCS file is truncated, rcsfile_getdelta() will return NULL.  Instead
  of faulting, check for NULL.  However, returning an error would cause csup
  to just abort the entire update.  Instead, break out of the loop and
  return ok.  The attempts to update the file will trigger a MD5 failure which
  will cause csup to download the entire file as a fixup.

o MFC: r213573 (partial)

  mdoc: drop redundant .Pp and .LP calls

  They have no effect when coming in pairs, or before .Bl/.Bd

o MFC: r216370 (partial)

  Remove the advertising clause from UCB copyrighted files in usr.bin.  This
  is in accordance with the information provided at
  ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

  Also add $FreeBSD$ to a few files to keep svn happy.

o MFC: r216542

  Signal that data should not be modified.

o MFC: r217858

  Remove dead code.

o MFC: r225535

  Fix csup to allow case insensitive server names in the auth file,
  just as advertised in the manpage.

  PR: 158652

o MFC: r225536

  Fix typos in error messages.

o MFC: r225979

  Update the comment to reflect what is actually going on.

o MFC: r225980

  Handle the situation where fixups_close() has been called but more fixups
  are still available on the queue.

o MFC: r228625

  In usr.bin/csup/auth.c, use the correct number of bytes for zeroing the
  shared secret, and use long long format to snprintf a time_t.

o MFC: r228626

  In usr.bin/csup/proto.c, use the correct printf length modifier to print
  an off_t.

o MFC: r228667

  In usr.bin/csup/auth.c, cast time_t to intmax_t instead, and use the
  corresponding printf length modifier.

o MFC: r228857

  On FreeBSD just use the MD5 implementation of libmd rather than that of
  libcrypto so we don't need to relinquish csup when world is built without
  OpenSSL.

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

12 years agoMFC: r228211
marius [Sun, 29 Jan 2012 12:58:07 +0000 (12:58 +0000)]
MFC: r228211

It doesn't make much sense to check whether child is NULL after already
having dereferenced it. We either should generally check the device_t's
supplied to bus functions before using them (which we seem to virtually
never do) or just assume that they are not NULL.
While at it make this code fit 78 columns.

Found with: Coverity Prevent(tm)
CID: 4230

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

12 years agoMFC: r228209
marius [Sun, 29 Jan 2012 12:56:21 +0000 (12:56 +0000)]
MFC: r228209

- In device_probe_child(9) check the return value of device_set_driver(9)
  when actually setting a driver as especially ENOMEM is fatal in these
  cases.
- Annotate other calls to device_set_devclass(9) and device_set_driver(9)
  without the return value being checked and that are okay to fail.

Reviewed by: yongari (slightly earlier version)

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

12 years agoMFC: r228027
marius [Sun, 29 Jan 2012 12:54:36 +0000 (12:54 +0000)]
MFC: r228027

Move the scsi_da_bios_params() prototype from pc98_machdep.h to md_var.h
where the prototype for pc98_ata_disk_firmware_geom_adjust() also lives
in order to avoid an #ifdef'ed include in cam(4).

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

12 years agoMFC: r228024
marius [Sun, 29 Jan 2012 12:52:36 +0000 (12:52 +0000)]
MFC: r228024

Update comment.

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