]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMFC r260401
ian [Thu, 21 Aug 2014 17:18:21 +0000 (17:18 +0000)]
MFC r260401

  Remove aicasm as a build dependency.  It made sense when the ahc and ahd
  drivers and their firmware were under active development, but those days
  have passed.  The firmware now exists in pre-compiled form, no longer
  dependent on it's sources or on aicasm.  If you wish to rebuild the
  firmware from source, the glue still exists under the 'make firmware'
  target in sys/modules/aic7xxx.

  This also fixes the problem introduced with r257777 et al with building
  kernels the old fashioned way in sys/$arch/compile/$CONFIG when the
  ahc/ahd drivers were included.

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

9 years agoMFC r257637, r257730, r257734, r257777, r257825, r257838, r257873:
ian [Thu, 21 Aug 2014 14:56:57 +0000 (14:56 +0000)]
MFC r257637, r257730, r257734, r257777, r257825, r257838, r257873:

Changes to how the aicasm tool is built.  This series of changes results
in the aicasm tool being built as part of the tools stages of world and
kernel builds.

Most of these changes will ultimately be undone when r260401 is MFC'd,
but it will leave in place the new kernel-build-tool machinery (KTMAKE
stuff) in case a new special kernel tool ever comes along.

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

9 years agoMFC r268480:
bryanv [Thu, 21 Aug 2014 13:27:05 +0000 (13:27 +0000)]
MFC r268480:

  Add accessor to get the number of free descriptors in the virtqueue

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

9 years agoCommit forgotten chunk of r270264.
kib [Thu, 21 Aug 2014 12:30:01 +0000 (12:30 +0000)]
Commit forgotten chunk of r270264.

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

9 years agoMFC: Make BSD tree more contemporary-looking.
marck [Thu, 21 Aug 2014 11:48:37 +0000 (11:48 +0000)]
MFC: Make BSD tree more contemporary-looking.

This is actually batch of MFCs from the beginning of stable/10 branch.

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

9 years agoMFC r269656:
kib [Thu, 21 Aug 2014 10:46:19 +0000 (10:46 +0000)]
MFC r269656:
Implement and use proc_realparent(9).

MFC r270024 (by markj):
Correct the order of arguments passed to LIST_INSERT_AFTER().

For merge, the p_treeflag member of struct proc was moved to the end
of the structure, to keep KBI intact.

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

9 years agovt(4): Colors are indexed against a console palette, not a VGA palette
dumbbell [Thu, 21 Aug 2014 10:18:42 +0000 (10:18 +0000)]
vt(4): Colors are indexed against a console palette, not a VGA palette

Rename vt_generate_vga_palette() to vt_generate_cons_palette() and
change it to build a palette where the color index is the same than in
terminal escape codes, not the VGA index. That's what TCHAR_CREATE()
uses and passes to vt(4).

The main differences between both orders are:
    o  Blue and red are swapped (1 <-> 4)
    o  Yellow and cyan are swapped (3 <-> 6)

The problem remained unnoticed, because the RGB bit indexes passed to
vt_generate_vga_palette() were reversed. This inversion was cancelled
by the colors inversions in the generated palette. For instance, red
(0xff0000) and blue (0x0000ff) have bytes in opposite order, but were
swapped in the palette. But after changing the value of blue (see last
paragraph), the modified color was in fact the red one.

While here, tune the palette to better match console colors and improve
the readability (especially the dark blue).

This is an MFC of r269783 and r269791.

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

9 years agoMFC r270062: switch rpc mount protocol for showmount and umount from
peter [Thu, 21 Aug 2014 04:31:48 +0000 (04:31 +0000)]
MFC r270062: switch rpc mount protocol for showmount and umount from
mountv1 to mountv3 - it breaks by default on the new netapp release with
the legacy protocols removed.

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

9 years agoMFC r265256:
eadler [Thu, 21 Aug 2014 04:26:16 +0000 (04:26 +0000)]
MFC r265256:
Syntax fix

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

9 years agoMFC: r270005
rmacklem [Thu, 21 Aug 2014 01:07:27 +0000 (01:07 +0000)]
MFC: r270005
Try to clarify how file systems are exported for NFSv4.
This is a content change.

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

9 years agoMFC 270063: update of netmap code
luigi [Wed, 20 Aug 2014 23:34:36 +0000 (23:34 +0000)]
MFC 270063: update of netmap code
(vtnet and cxgbe not merged yet because we need some other mfc first)

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

9 years agoMFC r269314 and r269316
slm [Wed, 20 Aug 2014 23:09:27 +0000 (23:09 +0000)]
MFC r269314 and r269316

r269314:
Bring in LSI's phase16 - phase18 changes
* Implements Start Stop Unit for SATA direct-attach devices in IR mode to avoid
  data corruption.
* Use CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT and CAM_TID_INVALID

r269316:
Bring in LSI's phase19 changes
* Removed unused mpssas_discovery_timeout function.
* Don't alter mapping boundaries if not raid firmware.
* Check free_busaddr instead of post_busaddr (diff minimisation really)

Approved by: ken (co-mentor) and smh

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

9 years agoMFC r268429: Don't install locale1.0 if MK_NLS == no.
jilles [Wed, 20 Aug 2014 19:39:07 +0000 (19:39 +0000)]
MFC r268429: Don't install locale1.0 if MK_NLS == no.

The test locale1.0 depends on locale support; it is meaningless without a
working LC_MESSAGES.

I added an OptionalObsoleteFiles.inc entry.

PR: 181151
Submitted by: Garrett Cooper (original version)
Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r267021:
loos [Wed, 20 Aug 2014 19:37:05 +0000 (19:37 +0000)]
MFC r267021:

  FreeBSD, historically, has always used 8-bit addresses for i2c devices
  (7-bit device address << 1), always leaving the room for the read/write
  bit.

  This commit convert ti_i2c and revert r259127 on bcm2835_bsc to make them
  compatible with 8-bit addresses.  Previous to this commit an i2c device
  would have different addresses depending on the controller it was attached
  to (by example, when compared to any iicbb(4) based i2c controller), which
  was a pretty annoying behavior.

  Also, update the PMIC i2c address on beaglebone* DTS files to match the
  new address scheme.

  Now the userland utilities need to do the correct slave address shifting
  (but it is going to work with any i2c controller on the system).

  Discussed with: ian

MFC r267834:

  Clarify the expected usage of I2C 7-bit slave addresses on ioctl(2)
  interface.

  While here add the cross reference to iic(4) on iicbus(4).

  CR: D210
  Suggested by: jmg

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

9 years agoMFC devd-related changes
asomers [Wed, 20 Aug 2014 19:30:58 +0000 (19:30 +0000)]
MFC devd-related changes

r270004
Convert devd's client socket to type SOCK_SEQPACKET.

  This change consists of two merges from projects/zfsd/head along with the
  addition of an ATF test case for the new functionality.

  sbin/devd/tests/Makefile
  sbin/devd/tests/client_test.c
        Add ATF test cases for reading events from both devd socket types.

  r266519:
  sbin/devd/devd.8
  sbin/devd/devd.cc
        Create a new socket, of type SOCK_SEQPACKET, for communicating with
        clients. SOCK_SEQPACKET sockets preserve record boundaries,
        simplying code in the client. The old SOCK_STREAM socket is retained
        for backwards-compatibility with existing clients.

  r269993:
  sbin/devd/devd.8
        Fix grammar bug.

r270019 (from bz)
Remove bogus ; at the end of the if condition in order to unbreak gcc builds
  after r270004.

  MFC after:    4 days
  X-MFX with:   r270004

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

9 years agoMFC r266923:
loos [Wed, 20 Aug 2014 19:12:19 +0000 (19:12 +0000)]
MFC r266923:

  Ignore IIC_ENOADDR from iicbus_reset() as it only means we have a
  master-only controller.

  This fixes the iic bus scan with i2c(8) (on supported controllers).

  Tested with gpioiic(4).

MFC r267009:

  Remove the unnecessary i2c slave address assignment.

  The ti_i2c controller only works in the master mode and the i2c address
  passed on iicbus_reset() is used to set the controller slave address when
  operating as an i2c slave (which isn't currently supported).

  When talking to a slave, the slave address is correctly provided to
  ti_i2c_tranfer().

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

9 years agoComplete MFC of r270233, also unbreak the build.
davide [Wed, 20 Aug 2014 18:40:29 +0000 (18:40 +0000)]
Complete MFC of r270233, also unbreak the build.

Reported by: grehan

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

9 years agoMFC r266960:
loos [Wed, 20 Aug 2014 18:10:12 +0000 (18:10 +0000)]
MFC r266960:

  Configure the analog input 7 which, on BBB, is connected to the 3V3B rail
  through a voltage divisor (R163 and R164 on page 4 of BBB schematic).

  Add a note about this on ti_adc(4) man page.  The ti_adc(4) man page will
  first appear on 10.1-RELEASE.

  Suggested by: Sulev-Madis Silber (ketas)
  Manual page reviewed by:      brueffer (D127)

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

9 years agoMFC r266937:
loos [Wed, 20 Aug 2014 17:57:23 +0000 (17:57 +0000)]
MFC r266937:

  Export two new settings for the AM335x PWM, the clock prescaler (clkdiv)
  and the actual PWM frequency.

  Enforce the maximum value for the period sysctl.

  The frequency systcl now allows the direct setting of the PWM frequency
  (it will try to find the better clkdiv and period for a given frequency,
  i.e. the ones that will give the better PWM resolution).

  This allows the use lower frequencies on the PWM.  Without changing the
  clock prescaler the minimum PWM frequency was 1.52kHz.

  PWM frequencies checked with an osciloscope.

  PWM output tested with some R/C servos at 50Hz.

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

9 years agoMFC r266922:
loos [Wed, 20 Aug 2014 17:39:53 +0000 (17:39 +0000)]
MFC r266922:

  Add a bounds verification to the SCL and SDA pin values.

  At attach, print the SCL and SDA pin numbers.

  Remove a stray blank line.

  Remove the GPIOBUS locking from gpioiic_reset(), it is already called with
  this lock held.  This fixes a crash when you try to scan the iicbus with
  i2c(8).

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

9 years agoMFC 259907 (dates back to december)
luigi [Wed, 20 Aug 2014 17:33:32 +0000 (17:33 +0000)]
MFC 259907 (dates back to december)
use the correct netmap <-> nic slot mapping on the transmit ring for 'lem'.
This bug would manifest only in netmap mode and on packets transmitted after
a NIC reset while netmap mode is active.

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

9 years agoMFC r269502:
davide [Wed, 20 Aug 2014 17:26:05 +0000 (17:26 +0000)]
MFC r269502:
Fix an overflow in getsockopt(). optval isn't big enough to hold
sbintime_t.
Re-introduce r255030 behaviour capping socket timeouts to INT_32
if they're too large.

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

9 years agoMFC r269524:
markj [Wed, 20 Aug 2014 14:57:55 +0000 (14:57 +0000)]
MFC r269524:
Preserve the errno value of an ioctl before calling free(3). Previously,
errno was very occasionally being clobbered, resulting in a bogus error from
dt_consume() and thus an error from dtrace(1).

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

9 years agoMFC r269907:
kib [Wed, 20 Aug 2014 08:24:37 +0000 (08:24 +0000)]
MFC r269907:
Fix leaks of unqueued unwired pages.

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

9 years agoMFC r266473,267331,267511:
ian [Tue, 19 Aug 2014 23:33:51 +0000 (23:33 +0000)]
MFC r266473,267331,267511:

  Use an intermediate target to associate with _SUBDIR which is marked .MAKE
  this allows make -n to do tree walks as expected without
  doing anything else (as intended).
  Use prefix _sub. to help avoid conflict with any real target.

  Put the test suite in its own tests.txz distribution file.
  Force all the contents of /usr/tests to go into a separate distribution
  file so that users of binary releases can easily choose to not install

  Create a mechanism for providing fine-grained build order dependencies
  during SUBDIR_PARALLEL builds.  This augments the coarse .WAIT mechanism,
  which is still useful if you've got a situation such as "almost everything
  depends on A and B".

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

9 years agoMFC r266103
grehan [Tue, 19 Aug 2014 23:15:47 +0000 (23:15 +0000)]
MFC r266103

Update dis_tables.c to the latest Illumos version.

This includes decodes of recent Intel instructions, in particular
VT-x and related instructions. This allows the FBT provider to
locate the exit points of routines that include these new
instructions.

Illumos issues:
 3414 Need a new word of AT_SUN_HWCAP bits
 3415 Add isainfo support for f16c and rdrand
 3416 Need disassembler support for rdrand and f16c
 3413 isainfo -v overflows 80 columns
 3417 mdb disassembler confuses rdtscp for invlpg
 1518 dis should support AMD SVM/AMD-V/Pacifica instructions
 1096 i386 disassembler should understand complex nops
 1362 add kvmstat for monitoring of KVM statistics
 1363 add vmregs[] variable to DTrace
 1364 need disassembler support for VMX instructions
 1365 mdb needs 16-bit disassembler support

This corresponds to Illumos-gate (github) version
eb23829ff08a873c612ac45d191d559394b4b408

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

9 years agoMFC r265098
grehan [Tue, 19 Aug 2014 23:08:47 +0000 (23:08 +0000)]
MFC r265098

Bump WITNESS_PENDLIST by MAXCPU to account for the
pmap pvlist locks which are scaled by MAXCPU.

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

9 years agovt(4): Add vtbuf_dirty*_locked() to lock vtbuf once, not twice
dumbbell [Tue, 19 Aug 2014 20:53:28 +0000 (20:53 +0000)]
vt(4): Add vtbuf_dirty*_locked() to lock vtbuf once, not twice

In several functions, vtbuf_putchar() in particular, the lock on vtbuf
is acquired twice:
    1. once by the said functions;
    2. once in vtbuf_dirty().

Now, vtbuf_dirty_locked() and vtbuf_dirty_cell_locked() allow to
acquire that lock only once.

This improves the input speed of vt(4). To measure the gain, a
50,000-lines file was displayed on the console using cat(1). The time
taken by cat(1) is reported below:
    o  On amd64, with vt_vga:
        - before: 1.0"
        - after:  0.5"
    o  On sparc64, with creator_vt:
        - before: 13.6"
        - after:  10.5"

This is an MFC of r269780.

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

9 years agoBump __FreeBSD_version after r269490 so ports can use it.
bdrewery [Tue, 19 Aug 2014 15:49:38 +0000 (15:49 +0000)]
Bump __FreeBSD_version after r269490 so ports can use it.

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

9 years agoMFC r269859:
hselasky [Tue, 19 Aug 2014 11:04:24 +0000 (11:04 +0000)]
MFC r269859:
Fix for memory leak.

Sponsored by: Mellanox Technologies

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

9 years agoMFC r267921, r267934, r267949, r267959, r267966, r268202, r268276,
grehan [Tue, 19 Aug 2014 01:20:24 +0000 (01:20 +0000)]
MFC r267921, r267934, r267949, r267959, r267966, r268202, r268276,
    r268427, r268428, r268521, r268638, r268639, r268701, r268777,
    r268889, r268922, r269008, r269042, r269043, r269080, r269094,
    r269108, r269109, r269281, r269317, r269700, r269896, r269962,
    r269989.

Catch bhyve up to CURRENT.

Lightly tested with FreeBSD i386/amd64, Linux i386/amd64, and
OpenBSD/amd64. Still resolving an issue with OpenBSD/i386.

Many thanks to jhb@ for all the hard work on the prior MFCs !

r267921 - support the "mov r/m8, imm8" instruction
r267934 - document options
r267949 - set DMI vers/date to fixed values
r267959 - doc: sort cmd flags
r267966 - EPT misconf post-mortem info
r268202 - use correct flag for event index
r268276 - 64-bit virtio capability api
r268427 - invalidate guest TLB when cr3 is updated, needed for TSS
r268428 - identify vcpu's operating mode
r268521 - use correct offset in guest logical-to-linear translation
r268638 - chs value
r268639 - chs fake values
r268701 - instr emul operand/address size override prefix support
r268777 - emulation for legacy x86 task switching
r268889 - nested exception support
r268922 - fix INVARIANTS build
r269008 - emulate instructions found in the OpenBSD/i386 5.5 kernel
r269042 - fix fault injection
r269043 - Reduce VMEXIT_RESTARTs in task_switch.c
r269080 - fix issues in PUSH emulation
r269094 - simplify return values from the inout handlers
r269108 - don't return -1 from the push emulation handler
r269109 - avoid permanent sleep in vm_handle_hlt()
r269281 - list VT-x features in base kernel dmesg
r269317 - Mark AHCI fatal errors as not completed
r269700 - Support PCI extended config space in bhyve
r269896 - Minor cleanup
r269962 - use max guest memory when creating IOMMU domain
r269989 - fix interrupt mode names

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

9 years agoMFC of 269533 (by mckusick):
mckusick [Mon, 18 Aug 2014 22:53:48 +0000 (22:53 +0000)]
MFC of 269533 (by mckusick):

Add support for multi-threading of soft updates.

Replace a single soft updates thread with a thread per FFS-filesystem
mount point. The threads are associated with the bufdaemon process.

Reviewed by:  kib
Tested by:    Peter Holm and Scott Long
MFC after:    2 weeks
Sponsored by: Netflix

MFC of 269853 (by kib):

Revision r269457 removed the Giant around mount and unmount code, but
r269533, which was tested before r269457 was committed, implicitely
relied on the Giant to protect the manipulations of the softdepmounts
list.  Use softdep global lock consistently to guarantee the list
structure now.

Insert the new struct mount_softdeps into the softdepmounts only after
it is sufficiently initialized, to prevent softdep_speedup() from
accessing bare memory.  Similarly, remove struct mount_softdeps for
the unmounted filesystem from the tailq before destroying structure
rwlock.

Reported and tested by: pho
Reviewed by:    mckusick
Sponsored by:   The FreeBSD Foundation

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

9 years agoMFC r269977
asomers [Mon, 18 Aug 2014 20:21:12 +0000 (20:21 +0000)]
MFC r269977

Skip pgrep-j and pkill-j if jail or jls is not installed.

Even though jail is part of the base system, it can be disabled by src.conf
settings. Therefore, it should be listed as a required program for tests that
use it.

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

9 years agoMFC r269183, r269191:
mav [Mon, 18 Aug 2014 16:06:04 +0000 (16:06 +0000)]
MFC r269183, r269191:
Add netmasks support to initiator-portal option.

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

9 years agoMFC r269492:
mav [Mon, 18 Aug 2014 15:54:35 +0000 (15:54 +0000)]
MFC r269492:
Improve locking of multicast addresses in VLAN and LAGG interfaces.

This fixes several scenarios of reproducible panics, cause by races
between multicast address changes and interface destruction.

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

9 years agoMFC r269814:
royger [Mon, 18 Aug 2014 08:50:05 +0000 (08:50 +0000)]
MFC r269814:

blkfront: add support for unmapped IO

Sponsored by: Citrix Systems R&D
Tested by: robak
PR: 191173

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

9 years agoMFC r269543: MFV r269542:
delphij [Mon, 18 Aug 2014 05:22:09 +0000 (05:22 +0000)]
MFC r269543: MFV r269542:

In vdev_get_stats, check that the vdev is not a hole before computing the
fragmentation.  This fixes a panic when removing log device.

Illumos issue:
    5049 panic when removing log device

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

9 years agoMFC r269431: MFV r269427:
delphij [Mon, 18 Aug 2014 05:17:24 +0000 (05:17 +0000)]
MFC r269431: MFV r269427:

In dnode_children_t, use C99's "[]" idiom for declaring the variable
sized array dnc_children at the end of the structure.

This prevents the compiler from mistakenly optimizing away accesses
beyond the array's defined size.

Illumos issue:
    5038 Remove "old-style" flexible array usage in ZFS.
    Author: Justin T. Gibbs <justing@spectralogic.com>

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

9 years agoMFC r269430: MFV r269426:
delphij [Mon, 18 Aug 2014 05:13:46 +0000 (05:13 +0000)]
MFC r269430: MFV r269426:

Double test device size for ztest(1).

Illumos issue:
    5039 ztest should default to larger device sizes
    Author: Matthew Ahrens <mahrens@delphix.com>

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

9 years agoMFC: r269875
ache [Mon, 18 Aug 2014 03:06:49 +0000 (03:06 +0000)]
MFC: r269875

According to opie code and even direct mention in opie(4) challenge buffer
size must be OPIE_CHALLENGE_MAX + 1, not OPIE_CHALLENGE_MAX

Reviewed by:    des

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

9 years agoDirect commit to stable/10 reflecting r269961 because the rest can't be
ache [Mon, 18 Aug 2014 02:42:23 +0000 (02:42 +0000)]
Direct commit to stable/10 reflecting r269961 because the rest can't be
merged.

Bump version because challenge buffer size changed.

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

9 years agoDirect commit to stable/10 reflecting r269815 because rest can't be merged
ache [Mon, 18 Aug 2014 02:32:48 +0000 (02:32 +0000)]
Direct commit to stable/10 reflecting r269815 because rest can't be merged

Add otp-sha

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

9 years agoMFC: r269806,r269809,r269811,r269810
ache [Mon, 18 Aug 2014 02:13:45 +0000 (02:13 +0000)]
MFC: r269806,r269809,r269811,r269810

r269806:
Fix too long (seed length >12 chars) challenge handling.
1) " ext" length should be included into OPIE_CHALLENGE_MAX (as all places
of opie code expects that).
2) Overflow check in challenge.c is off by 1 even with corrected
OPIE_CHALLENGE_MAX
3) When fallback to randomchallenge() happens and rval is 0 (i.e.
challenge is too long), its value should be set to error state too.

To demonstrate the bug, run opiepasswd with valid seed:
opiepasswd -s 1234567890123456
and notice that it falls back to randomchallenge() (i.e. no
1234567890123456 in the prompt).

r269809:
When sha1 support was added, they forget to increase OPIE_HASHNAME_MAX

r269811:
Last '/' for program name, not first one.

r269810:
Link otp-sha1 to match real challenge prompt, not otp-sha.

PR:     191511
Submitted by: mitsururike@gmail.com (partially, PR 269806)

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

9 years agoMFC: r269788
rmacklem [Sun, 17 Aug 2014 19:24:26 +0000 (19:24 +0000)]
MFC: r269788
Document the use of the vfs.nfsd sysctls that control the size of
the NFS server's DRC for TCP.
This is a content change.

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

9 years agoMFC r269631:
mav [Sun, 17 Aug 2014 18:26:34 +0000 (18:26 +0000)]
MFC r269631:
Reduce reported additional INQUIRY data length.

sizeof(struct scsi_inquiry_data) of 256 bytes combined with off-by-one
error in the changed code gave total INQUIRY data length above 255 bytes,
that was maximal INQUIRY length in SPC-2.  While SPC-3 increased the
maximal length to 64K, at least sg3_utils are still confused by that.

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

9 years agoMFC r269622:
mav [Sun, 17 Aug 2014 18:24:59 +0000 (18:24 +0000)]
MFC r269622:
Fix several issues and inconsistencies in UNMAP capabilities reporting.

This makes Windows 2012 to start using UNMAP on our disks.

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

9 years agoMFC r269587:
mav [Sun, 17 Aug 2014 18:23:43 +0000 (18:23 +0000)]
MFC r269587:
Reimplement WRITE USING TOKEN with Block Zero token using WRITE SAME.

On my ZVOL of SSDs that increases speed of zero writing in that way from
1 to 2.5GB/s by reducing CPU overhead.

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

9 years agoMFC r269497:
mav [Sun, 17 Aug 2014 18:22:42 +0000 (18:22 +0000)]
MFC r269497:
Add support for Windows dialect of EXTENDED COPY command, aka Microsoft ODX.

This allows to avoid extra network traffic when copying files on NTFS iSCSI
disks within one storage host by drag'n'dropping them in Windows Explorer
of Windows 8/2012.  It should also accelerate Hyper-V VM operations, etc.

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

9 years agoMFC r269954:
dim [Sun, 17 Aug 2014 13:12:07 +0000 (13:12 +0000)]
MFC r269954:

Stop telling people to directly report llvm or clang bugs upstream,
point them to the FreeBSD bug tracker instead, since we use our own
patches.

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

9 years agoMFC r269948:
dim [Sun, 17 Aug 2014 13:08:15 +0000 (13:08 +0000)]
MFC r269948:

Supplement r259111 by also using correct casts in gcc's emmintrin.h for
the first argument of the following builtin function:

* __builtin_ia32_psrlqi128() takes __v2di instead of __v4si

This should fix the following errors when building the graphics/webp
port with base gcc:

lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'

Reported by: Jos Chrispijn <ports@webrz.net>

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

9 years agoMFC r269457:
kib [Sun, 17 Aug 2014 09:07:21 +0000 (09:07 +0000)]
MFC r269457:
Remove Giant acquisition from the mount and unmount pathes.

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

9 years agoMFC r269020:
mjg [Sun, 17 Aug 2014 07:24:23 +0000 (07:24 +0000)]
MFC r269020:

Cosmetic changes to unp_internalize

Don't throw away the result of fget_unlocked.
Move fdp increment to for loop to make it consistent with similar code
elsewhere.

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

9 years agoMFC r268636:
mjg [Sun, 17 Aug 2014 07:22:40 +0000 (07:22 +0000)]
MFC r268636:

Plug p_pptr null test in do_execve. It is always true.

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

9 years agoMFC r268634:
mjg [Sun, 17 Aug 2014 07:20:37 +0000 (07:20 +0000)]
MFC r268634:

Manage struct sigacts refcnt with atomics instead of a mutex.

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

9 years agoMFC r264114, r264310, r268570:
mjg [Sun, 17 Aug 2014 07:16:03 +0000 (07:16 +0000)]
MFC r264114, r264310, r268570:

r264114 by davidxu:

Fix SIGIO delivery. Use fsetown() to handle file descriptor owner
ioctl and use pgsigio() to send SIGIO.

r264310 by davidxu:

Add kqueue support for devctl.

r268570:

Clear nonblock and async on devctl close instaed of open.

This is a purely cosmetic change.

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

9 years agoMFC r268514:
mjg [Sun, 17 Aug 2014 07:06:55 +0000 (07:06 +0000)]
MFC r268514:

Eliminate plim and vtmp local vars in exit1.

No functional changes.

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

9 years agoMFC r259407:
mjg [Sun, 17 Aug 2014 07:05:30 +0000 (07:05 +0000)]
MFC r259407:

proc exit: don't take PROC_LOCK while freeing rlimits

Code wishing to check rlimits of some process should check whether it
is exiting first, which current consumers do.

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

9 years agoMFC r268505, r268507:
mjg [Sun, 17 Aug 2014 07:00:47 +0000 (07:00 +0000)]
MFC r268505, r268507:

Avoid relocking filedesc lock when closing fds during fdp destruction.

Don't call bzero nor fdunused from fdfree for such cases. It would do
unnecessary work and complain that the lock is not taken.

=======

Don't zero fd_nfiles during fdp destruction.

Code trying to take a look has to check fd_refcnt and it is 0 by that time.

This is a follow up to r268505, without this the code would leak memory for
tables bigger than the default.

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

9 years agoMFC r268365:
mjg [Sun, 17 Aug 2014 06:58:14 +0000 (06:58 +0000)]
MFC r268365:

Don't call crdup nor uifind under vnode lock.

A locked vnode can get into the way of satisyfing malloc with M_WATOK.

This is a fixup to r268087.

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

9 years agoMFC r268136:
mjg [Sun, 17 Aug 2014 06:56:22 +0000 (06:56 +0000)]
MFC r268136:

Plug gcc warning after r268074 about unitialized newsigacts

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

9 years agoMFC r268087:
mjg [Sun, 17 Aug 2014 06:54:49 +0000 (06:54 +0000)]
MFC r268087:

Don't call crcopysafe or uifind unnecessarily in execve.

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

9 years agoMFC r268074:
mjg [Sun, 17 Aug 2014 06:52:35 +0000 (06:52 +0000)]
MFC r268074:

Perform a lockless check in sigacts_shared.

It is used only during execve (i.e. singlethreaded), so there is no fear
of returning 'not shared' which soon becomes 'shared'.

While here reorganize the code a little to avoid proc lock/unlock in
shared case.

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

9 years agoMFC r267338
grehan [Sun, 17 Aug 2014 03:01:56 +0000 (03:01 +0000)]
MFC r267338
Replace enum forward declarations with complete definitions

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

9 years agoMFC r269688: m4 now requires libohash, build it when bootstrapping.
ian [Sun, 17 Aug 2014 02:40:44 +0000 (02:40 +0000)]
MFC r269688: m4 now requires libohash, build it when bootstrapping.

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

9 years agoMFC r269769, r269770:
ian [Sun, 17 Aug 2014 01:59:54 +0000 (01:59 +0000)]
MFC r269769, r269770:

  Use a separate variable for resource id, because 'i' may increment at a
  rate greater than 1 on each iteration.

  Handle various ways that interrupt config data can be malformed by
  warning and assuming more or less reasonable values.

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

9 years agoMFC r269646: Use a SYSINIT to init the array of interrupt names on arm.
ian [Sun, 17 Aug 2014 01:48:12 +0000 (01:48 +0000)]
MFC r269646: Use a SYSINIT to init the array of interrupt names on arm.

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

9 years agoMFC r269607, r269698:
ian [Sun, 17 Aug 2014 01:32:33 +0000 (01:32 +0000)]
MFC r269607, r269698:

  Cache the imx6 SoC type in a static var so that it only has to be figured
  out by sniffing hardware registers once.

  Add a missing clock register definition.

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

9 years agoMFC r269594, r269596, r269597, r269598, r269605, r269606:
ian [Sun, 17 Aug 2014 01:28:03 +0000 (01:28 +0000)]
MFC r269594, r269596, r269597, r269598, r269605, r269606:

  Set ofwbus and simplebus to attach during BUS_PASS_BUS.

  Define names that drivers can use to adjust their position relative to
  other drivers within a BUS_PASS

  Adjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that
  a platform can attach some other bus first if necessary.

  Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU.

  Attach arm generic interrupt and timer drivers in the middle of
  BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively.

  Add an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass
  device attachment on arm platforms.  If this is defined, nexus attaches
  early in BUS_PASS_BUS, and other busses and devices attach later, in the
  pass number they are set up for.  Without it defined, nexus attaches in
  BUS_PASS_DEFAULT and thus so does everything else, which is status quo.

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

9 years agoMFC r267311, r267330, r267811, r267884
grehan [Sun, 17 Aug 2014 01:23:52 +0000 (01:23 +0000)]
MFC r267311, r267330, r267811, r267884

Turn on interrupt window exiting unconditionally when an ExtINT is being
injected into the guest.

Add helper functions to populate VM exit information for rendezvous and
astpending exits.

Provide APIs to directly get 'lowmem' and 'highmem' size directly.

Expose the amount of resident and wired memory from the guest's vmspace

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

9 years agoMFC r267178, r267300
grehan [Sun, 17 Aug 2014 01:16:40 +0000 (01:16 +0000)]
MFC r267178, r267300

Support guest accesses to %cr8

Add reserved bit checking when doing %CR8 emulation and inject #GP if required.

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

9 years agoMFC r269387: Update the ARMv6 core clang targets to be an arm1176jzf-s.
ian [Sun, 17 Aug 2014 01:15:34 +0000 (01:15 +0000)]
MFC r269387: Update the ARMv6 core clang targets to be an arm1176jzf-s.

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

9 years agoMFC r267216
grehan [Sun, 17 Aug 2014 01:00:42 +0000 (01:00 +0000)]
MFC r267216
Add ioctl(VM_REINIT) to reinitialize the virtual machine state maintained
by vmm.ko. This allows the virtual machine to be restarted without having
to destroy it first.

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

9 years agoMFC r266933
grehan [Sun, 17 Aug 2014 00:52:07 +0000 (00:52 +0000)]
MFC r266933
Activate vcpus from bhyve(8) using the ioctl VM_ACTIVATE_CPU instead of doing
it implicitly in vmm.ko.

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

9 years agoMFC: r269771
rmacklem [Sat, 16 Aug 2014 21:36:22 +0000 (21:36 +0000)]
MFC: r269771
Change the NFS server's printf related to hitting
the DRC cache's flood level so that it suggests
increasing vfs.nfsd.tcphighwater.

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

9 years agoMFC r264601,264646,265766,267918,267919,267920:
bz [Sat, 16 Aug 2014 14:30:46 +0000 (14:30 +0000)]
MFC r264601,264646,265766,267918,267919,267920:

 Merge if_nf10bmac(4), a driver to support an NetFPGA-10G Embedded
 CPU Ethernet Core.

 The current version operates on a simple PIO based interface connected
 to a NetFPGA-10G port.

 To avoid confusion: this driver operates on a CPU running on the FPGA,
 e.g. BERI/mips, and is not suited for the PCI host interface.

 Adjust the register layout to allow for 64bit registers in the
 future for nf10bmac(4).  Also, add support for and enable RX interrupts.

 Allow switching between 32bit and 64bit bus width data access at compile
 time by setting NF10BMAC_64BIT and using a REGWTYPE #define to set correct
 variable and return value widths.

 Adjust comments to indicate the 32 or 64bit register widths.

Relnotes: yes
Sponsored by: DARPA/AFRL

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

9 years agoMFC r263632:
bz [Sat, 16 Aug 2014 14:21:03 +0000 (14:21 +0000)]
MFC r263632:

 For BERI on NetFPGA assume HZ=100 by default.

 Remove the uart support in favour of a "jtag-uart" interface imitation
 providing a much simpler interface, directly exported to the host,
 allowing the toolchain to be shared with BERI on Altera. [1]

 Submitted by: Jong Hun HAN (jong.han cl.cam.ac.uk) [1]
Sponsored by: DARPA/AFRL

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

9 years agoMFC r264542:
bz [Sat, 16 Aug 2014 14:17:09 +0000 (14:17 +0000)]
MFC r264542:

 Use ETHER_ALIGN as argument to m_adj() to offset the beginning of packet
 rather than the magic number 2.

 While here fix a typo in a comment.

 No functional changes.

Sponsored by: DARPA/AFRL

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

9 years agoMFC r264605:
bz [Sat, 16 Aug 2014 14:14:29 +0000 (14:14 +0000)]
MFC r264605:

 Based on xlp_machdep.c and completed the list of options based on
 boot/mips/beri/loader/metadata.c allow FDT configuration to set
 command line options.
 This leads to an interesting quesiton of future interactions with loader.
 However for configurations without loader this allows bootverbose or boot
 single user to be set by compiling a new kernel, which is good enough for
 testing and debugging.

 Reviewed by: rwatson
Sponsored by: DARPA/AFRL

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

9 years agoMFC r266907:
bz [Sat, 16 Aug 2014 14:09:26 +0000 (14:09 +0000)]
MFC r266907:

 While PAWS is disabled, there are no consumers for the tcp options
 argument to tcp_twcheck();  thus mark it __unused.

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

9 years agoMFC r266620:
bz [Sat, 16 Aug 2014 14:05:31 +0000 (14:05 +0000)]
MFC r266620:

 Remove the prototpye for the static inline function
 tcp_signature_verify_input().
 The function is defined before first use already.

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

9 years agoMFC r266619:
bz [Sat, 16 Aug 2014 14:03:00 +0000 (14:03 +0000)]
MFC r266619:

 syncache_lookup() is a file local function.  Make it static and
 take it out of the public KPI; seems it was never used elsewhere.

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

9 years agoMFC r266618:
bz [Sat, 16 Aug 2014 13:58:45 +0000 (13:58 +0000)]
MFC r266618:

 Make tcp_twrespond() file local private;  this removes it from the
 public KPI; it is not used anywhere else and seems it never was.

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

9 years agoMFC r266606:
bz [Sat, 16 Aug 2014 13:55:44 +0000 (13:55 +0000)]
MFC r266606:

 Only do a ports check if this is a NAT-T SA.  Otherwise other
 lookups providing ports may get unexpected results.

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

9 years agoMFC r266597:
bz [Sat, 16 Aug 2014 13:53:05 +0000 (13:53 +0000)]
MFC r266597:

 Remove the prototypes for things that are no longer file local but were
 moved to the header file.

 Was suppoed to be MFCed with: r266596
 Pointy hat to: bz

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

9 years agoMFC r266596:
bz [Sat, 16 Aug 2014 13:50:15 +0000 (13:50 +0000)]
MFC r266596:

 Move the tcp_fields_to_host() and tcp_fields_to_net() (inline)
 functions to the tcp_var.h header file in order to avoid further
 duplication with upcoming commits.

 Reviewed by: np

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

9 years agoMFC r264539:
bz [Sat, 16 Aug 2014 13:47:04 +0000 (13:47 +0000)]
MFC r264539:

 When switching variables to flags in r243185 a few cases were missed.
 After r263152 (in head) this leaves unused variables if route(8) is
 compiled without INET support.
 Switch the remaining variable accesses to flags and remove now obsolete
 variables.

 Reviewed by: glebius

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

9 years agoMFC r261525:
bz [Sat, 16 Aug 2014 13:25:49 +0000 (13:25 +0000)]
MFC r261525:

 Print the MD5 signature information introduced in r221023 (head) in the
 TCP statistics output.

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

9 years agoMFC r259886:
bz [Sat, 16 Aug 2014 13:23:23 +0000 (13:23 +0000)]
MFC r259886:

 Bite the bullet and start removing the first compile time warnings
 by removing unsued file local functions and then unused callees.
 A lot more warnings to resolve but someone had to break the ice.

 X-Comment: I am not the new maintainer; chime in, it's ours.

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

9 years agoMFC r259916:
bz [Sat, 16 Aug 2014 13:20:44 +0000 (13:20 +0000)]
MFC r259916:

 Use feature_present(3) to determine whether to open an INET or an
 INET6 socket when needed to allow pfctl to work on noinet and noinet6
 kernels (and try to provide a fallback using AF_LINK as best effort).
 Adjust the Makefile to also respect relevant src.conf(5) options
 for compile time decisions on INET and INET6 support.

 Reviewed by: glebius (no objections)

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

9 years agoMFC r259885:
bz [Sat, 16 Aug 2014 13:11:59 +0000 (13:11 +0000)]
MFC r259885:

 As constantly reported during kernel compilation, m_buflen is unsigned so
 can never be < 0.  Remove the expression, which can never be true.

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

9 years agoMFC r259884:
bz [Sat, 16 Aug 2014 13:09:40 +0000 (13:09 +0000)]
MFC r259884:

 Correct warnings comparing unsigned variables < 0 constantly reported
 while building kernels.  All instances removed are indeed unsigned so
 the expressions could not be true.

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

9 years agoMFC r269583:
bz [Sat, 16 Aug 2014 13:06:11 +0000 (13:06 +0000)]
MFC r269583:

 Provide -o vers= support for mount_nfs.

 Our mount_nfs does use -o nfsv<2|3|4> or -2 or -3 to specify the version.
 OSX (these days), Solaris, and Linux use -o vers=<2,3,4>.

 With the upcoming autofs support we can make a lot of (entrerprisy) setups
 getting mount options from LDAP just work by providing -o vers= compatibility.

 Reviewed by: wblock, bjk (man page), rmacklem, emaste
 Sponsored by: DARPA,AFRL
PR: 192379

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

9 years agoMFC r269669:
bz [Sat, 16 Aug 2014 12:59:47 +0000 (12:59 +0000)]
MFC r269669:

 Split up sys_ktimer_getoverrun() into a sys_ and a kern_ variant
 and export the kern_ version needed by an upcoming linuxolator change.

 Sponsored by: DARPA,AFRL

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

9 years agoMFC r269909:
kib [Sat, 16 Aug 2014 08:38:53 +0000 (08:38 +0000)]
MFC r269909:
Add a knob LIBPTHREAD_BIGSTACK_MAIN, which instructs libthr to leave
the whole RLIMIT_STACK-sized region of the kernel-allocated stack as
the stack of main thread.

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

9 years agoMFC r269908:
kib [Sat, 16 Aug 2014 08:37:13 +0000 (08:37 +0000)]
MFC r269908:
Style.

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

9 years agoMFC r268924:
pfg [Sat, 16 Aug 2014 01:29:49 +0000 (01:29 +0000)]
MFC r268924:
Update fflush(3) to return success on a read-only stream.

This is done for compliance with SUSv3. The changes cause
no secondary effects in the gnulib tests (we pass them).

Obtained from: Apple Inc. (Libc 997.90.3 with changes)
Reviewed by: bde
Phabric: D440

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

9 years agoMFC r269953:
pfg [Sat, 16 Aug 2014 01:06:23 +0000 (01:06 +0000)]
MFC r269953:
Use "NO NAME" as the default unnamed label.

Microsoft recommends avoiding the use of spaces in the
string structures for FAT. Unfortunately they do just
that by default in the case of unlabeled filesystems.

Follow the default MS behavior to avoid confusion in
common tools like file(1). This was actually the
default behavior before r203868.

Obtained from: NetBSD (CVS rev. 1.39)

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

9 years agoMFC r269901:
pfg [Sat, 16 Aug 2014 01:03:51 +0000 (01:03 +0000)]
MFC r269901:
Minor style tweaks.

Obtained from: OpenBSD (CVS rev. 1.7)

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

9 years agoMFC r269695:
pfg [Sat, 16 Aug 2014 01:00:37 +0000 (01:00 +0000)]
MFC r269695:
Const-ify character string

Obtained from:  Apple Inc. (Libc 997.90.3)
MFC after: 3 days

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

9 years agoMFC r269015:
pfg [Sat, 16 Aug 2014 00:54:56 +0000 (00:54 +0000)]
MFC r269015:
fparseln(3): Update from NetBSD sources.

-fix a condition so that fparseln() doesn't report spurious empty lines
 eg after 2 comment lines, or on EOF after a single comment line
-no escape character means no escaped characters

modify the previous fix so that no pointless realloc()s are done in
the case of multiple empty continuation lines, and comment the code
to make the logics obvious.

fparseln is now part of libc in NetBSD so this changes the previous
revision numbering.

Obtained from: NetBSD (CVS Rev. 1.6-1.7)

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