]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMFC sa(4) and mt(1) improvements.
ken [Tue, 24 Mar 2015 14:36:10 +0000 (14:36 +0000)]
MFC sa(4) and mt(1) improvements.

This includes these changes: 279219, 279229, 279261, 279534, 279570,
280230, 280231.

In addition, bump __FreeBSD_version for the addition of the new
mtio(4) / sa(4) ioctls.

Thanks to Dan Langille, Harald Schmalzbauer and Rudolf Cejka for spending
a significant amount of time and effort testing these changes.

  ------------------------------------------------------------------------
  r279219 | ken | 2015-02-23 14:59:30 -0700 (Mon, 23 Feb 2015) | 282 lines

  Significant upgrades to sa(4) and mt(1).

  The primary focus of these changes is to modernize FreeBSD's
  tape infrastructure so that we can take advantage of some of the
  features of modern tape drives and allow support for LTFS.

  Significant changes and new features include:

   o sa(4) driver status and parameter information is now exported via an
     XML structure.  This will allow for changes and improvements later
     on that will not break userland applications.  The old MTIOCGET
     status ioctl remains, so applications using the existing interface
     will not break.

   o 'mt status' now reports drive-reported tape position information
     as well as the previously available calculated tape position
     information.  These numbers will be different at times, because
     the drive-reported block numbers are relative to BOP (Beginning
     of Partition), but the block numbers calculated previously via
     sa(4) (and still provided) are relative to the last filemark.
     Both numbers are now provided.  'mt status' now also shows the
     drive INQUIRY information, serial number and any position flags
     (BOP, EOT, etc.) provided with the tape position information.
     'mt status -v' adds information on the maximum possible I/O size,
     and the underlying values used to calculate it.

   o The extra sa(4) /dev entries (/dev/saN.[0-3]) have been removed.

     The extra devices were originally added as place holders for
     density-specific device nodes.  Some OSes (NetBSD, NetApp's OnTap
     and Solaris) have had device nodes that, when you write to them,
     will automatically select a given density for particular tape drives.

     This is a convenient way of switching densities, but it was never
     implemented in FreeBSD.  Only the device nodes were there, and that
     sometimes confused users.

     For modern tape devices, the density is generally not selectable
     (e.g. with LTO) or defaults to the highest availble density when
     the tape is rewritten from BOT (e.g. TS11X0).  So, for most users,
     density selection won't be necessary.  If they do need to select
     the density, it is easy enough to use 'mt density' to change it.

   o Protection information is now supported.  This is either a
     Reed-Solomon CRC or CRC32 that is included at the end of each block
     read and written.  On write, the tape drive verifies the CRC, and
     on read, the tape drive provides a CRC for the userland application
     to verify.

   o New, extensible tape driver parameter get/set interface.

   o Density reporting information.  For drives that support it,
     'mt getdensity' will show detailed information on what formats the
     tape drive supports, and what formats the tape drive supports.

   o Some mt(1) functionality moved into a new mt(3) library so that
     external applications can reuse the code.

   o The new mt(3) library includes helper routines to aid in parsing
     the XML output of the sa(4) driver, and build a tree of driver
     metadata.

   o Support for the MTLOAD (load a tape in the drive) and MTWEOFI
     (write filemark immediate) ioctls needed by IBM's LTFS
     implementation.

   o Improve device departure behavior for the sa(4) driver.  The previous
     implementation led to hangs when the device was open.

   o This has been tested on the following types of drives:
   IBM TS1150
   IBM TS1140
   IBM LTO-6
   IBM LTO-5
   HP LTO-2
   Seagate DDS-4
   Quantum DLT-4000
   Exabyte 8505
   Sony DDS-2

  contrib/groff/tmac/doc-syms,
  share/mk/bsd.libnames.mk,
  lib/Makefile,
   Add libmt.

  lib/libmt/Makefile,
  lib/libmt/mt.3,
  lib/libmt/mtlib.c,
  lib/libmt/mtlib.h,
   New mt(3) library that contains functions moved from mt(1) and
   new functions needed to interact with the updated sa(4) driver.

   This includes XML parser helper functions that application writers
   can use when writing code to query tape parameters.

  rescue/rescue/Makefile:
   Add -lmt to CRUNCH_LIBS.

  src/share/man/man4/mtio.4
   Clarify this man page a bit, and since it contains what is
   essentially the mtio.h header file, add new ioctls and structure
   definitions from mtio.h.

  src/share/man/man4/sa.4
   Update BUGS and maintainer section.

  sys/cam/scsi/scsi_all.c,
  sys/cam/scsi/scsi_all.h:
   Add SCSI SECURITY PROTOCOL IN/OUT CDB definitions and CDB building
   functions.

  sys/cam/scsi/scsi_sa.c
  sys/cam/scsi/scsi_sa.h
   Many tape driver changes, largely outlined above.

   Increase the sa(4) driver read/write timeout from 4 to 32
   minutes.  This is based on the recommended values for IBM LTO
   5/6 drives.  This may also avoid timeouts for other tape
   hardware that can take a long time to do retries and error
   recovery.  Longer term, a better way to handle this is to ask
   the drive for recommended timeout values using the REPORT
   SUPPORTED OPCODES command.  Modern IBM and Oracle tape drives
   at least support that command, and it would allow for more
   accurate timeout values.

   Add XML status generation.  This is done with a series of
   macros to eliminate as much duplicate code as possible.  The
   new XML-based status values are reported through the new
   MTIOCEXTGET ioctl.

   Add XML driver parameter reporting, using the new MTIOCPARAMGET
   ioctl.

   Add a new driver parameter setting interface, using the new
   MTIOCPARAMSET and MTIOCSETLIST ioctls.

   Add a new MTIOCRBLIM ioctl to get block limits information.

   Add CCB/CDB building routines scsi_locate_16, scsi_locate_10,
   and scsi_read_position_10().

   scsi_locate_10 implements the LOCATE command, as does the
   existing scsi_set_position() command.  It just supports
   additional arguments and features.  If/when we figure out a
   good way to provide backward compatibility for older
   applications using the old function API, we can just revamp
   scsi_set_position().  The same goes for
   scsi_read_position_10() and the existing scsi_read_position()
   function.

   Revamp sasetpos() to take the new mtlocate structure as an
   argument.  It now will use either scsi_locate_10() or
   scsi_locate_16(), depending upon the arguments the user
   supplies.  As before, once we change position we don't have a
   clear idea of what the current logical position of the tape
   drive is.

   For tape drives that support long form position data, we
   read the current position and store that for later reporting
   after changing the position.  This should help applications
   like Bacula speed tape access under FreeBSD once they are
   modified to support the new ioctls.

   Add a new quirk, SA_QUIRK_NO_LONG_POS, that is set for all
   drives that report SCSI-2 or older, as well as drives that
   report an Illegal Request type error for READ POSITION with
   the long format.  So we should automatically detect drives
   that don't support the long form and stop asking for it after
   an initial try.

   Add a partition number to the sa(4) softc.

   Improve device departure handling. The previous implementation
   led to hangs when the device was open.

   If an application had the sa(4) driver open, and attempted to
   close it after it went away, the cam_periph_release() call in
   saclose() would cause the periph to get destroyed because that
   was the last reference to it.  Because destroy_dev() was
   called from the sa(4) driver's cleanup routine (sacleanup()),
   and would block waiting for the close to happen, a deadlock
   would result.

   So instead of calling destroy_dev() from the cleanup routine,
   call destroy_dev_sched_cb() from saoninvalidate() and wait for
   the callback.

   Acquire a reference for devfs in saregister(), and release it
   in the new sadevgonecb() routine when all devfs devices for
   the particular sa(4) driver instance are gone.

   Add a new function, sasetupdev(), to centralize setting
   per-instance devfs device parameters instead of repeating the
   code in saregister().

   Add an open count to the softc, so we know how many
   peripheral driver references are a result of open
          sessions.

   Add the D_TRACKCLOSE flag to the cdevsw flags so
   that we get a 1:1 mapping of open to close calls
   instead of a N:1 mapping.

   This should be a no-op for everything except the
   control device, since we don't allow more than one
   open on non-control devices.

   However, since we do allow multiple opens on the
   control device, the combination of the open count
   and the D_TRACKCLOSE flag should result in an
   accurate peripheral driver reference count, and an
   accurate open count.

   The accurate open count allows us to release all
   peripheral driver references that are the result
   of open contexts once we get the callback from devfs.

  sys/sys/mtio.h:
   Add a number of new mt(4) ioctls and the requisite data
   structures.  None of the existing interfaces been removed
   or changed.

   This includes definitions for the following new ioctls:

   MTIOCRBLIM      /* get block limits */
   MTIOCEXTLOCATE /* seek to position */
   MTIOCEXTGET     /* get tape status */
   MTIOCPARAMGET /* get tape params */
   MTIOCPARAMSET /* set tape params */
   MTIOCSETLIST /* set N params */

  usr.bin/mt/Makefile:
   mt(1) now depends on libmt, libsbuf and libbsdxml.

  usr.bin/mt/mt.1:
   Document new mt(1) features and subcommands.

  usr.bin/mt/mt.c:
   Implement support for mt(1) subcommands that need to
   use getopt(3) for their arguments.

   Implement a new 'mt status' command to replace the old
   'mt status' command.  The old status command has been
   renamed 'ostatus'.

   The new status function uses the MTIOCEXTGET ioctl, and
   therefore parses the XML data to determine drive status.
   The -x argument to 'mt status' allows the user to dump out
   the raw XML reported by the kernel.

   The new status display is mostly the same as the old status
   display, except that it doesn't print the redundant density
   mode information, and it does print the current partition
   number and position flags.

   Add a new command, 'mt locate', that will supersede the
   old 'mt setspos' and 'mt sethpos' commands.  'mt locate'
   implements all of the functionality of the MTIOCEXTLOCATE
   ioctl, and allows the user to change the logical position
   of the tape drive in a number of ways.  (Partition,
   block number, file number, set mark number, end of data.)
   The immediate bit and the explicit address bits are
   implemented, but not documented in the man page.

   Add a new 'mt weofi' command to use the new MTWEOFI ioctl.
   This allows the user to ask the drive to write a filemark
   without waiting around for the operation to complete.

   Add a new 'mt getdensity' command that gets the XML-based
   tape drive density report from the sa(4) driver and displays
   it.  This uses the SCSI REPORT DENSITY SUPPORT command
   to get comprehensive information from the tape drive about
   what formats it is able to read and write.

   Add a new 'mt protect' command that allows getting and setting
   tape drive protection information.  The protection information
   is a CRC tacked on to the end of every read/write from and to
   the tape drive.

  Sponsored by: Spectra Logic
  MFC after: 1 month

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r279229 | ken | 2015-02-23 22:43:16 -0700 (Mon, 23 Feb 2015) | 5 lines

  Fix printf format warnings on sparc64 and mips.

  Sponsored by: Spectra Logic
  MFC after: 1 month

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r279261 | ken | 2015-02-24 21:30:23 -0700 (Tue, 24 Feb 2015) | 23 lines

  Fix several problems found by Coverity.

  lib/libmt/mtlib.c:
   In mt_start_element(), make sure we don't overflow the
   cur_sb array.  CID 1271325

  usr.bin/mt/mt.c:
   In main(), bzero the mt_com structure so that we aren't
   using any uninitialized stack variables.  CID 1271319

   In mt_param(), only allow one -s and one -p argument.  This
   will prevent a memory leak caused by overwriting the
   param_name and/or param_value variables.  CID 1271320 and
   CID 1271322

   To make things simpler in mt_param(), make sure there
   there is only one exit path for the function.  Make sure
   the arguments are explicitly freed.

  Sponsored by: Spectra Logic
  Pointed out by: emaste
  MFC after: 1 month

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r279534 | ken | 2015-03-02 11:09:49 -0700 (Mon, 02 Mar 2015) | 18 lines

  Change the sa(4) driver to check for long position support on
  SCSI-2 devices.

  Some older tape devices claim to be SCSI-2, but actually do support
  long position information.  (Long position information includes
  the current file mark.)  For example, the COMPAQ SuperDLT1.

  So we now only disable the check on SCSI-1 and older devices.

  sys/cam/scsi/scsi_sa.c:
   In saregister(), only disable fetching long position
   information on SCSI-1 and older drives.  Update the
   comment to explain why.

  Confirmed by: dvl
  Sponsored by: Spectra Logic
  MFC after: 3 weeks

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r279570 | ken | 2015-03-03 15:49:07 -0700 (Tue, 03 Mar 2015) | 21 lines

  Add density code for DAT-72, and notes on DAT-160.

  As it turns out, the density code for DAT-160 (0x48) is the same
  as for SDLT220.  Since the SDLT values are already in the table,
  we will leave them in place.

  Thanks to Harald Schmalzbauer for confirming the DAT-72 density code.

  lib/libmt/mtlib.c:
   Add DAT-72 density code, and commented out DAT-160 density
   code.  Explain why DAT-160 is commented out.  Add notes
   explaining where the bpi values for these formats came from.

  usr.bin/mt/mt.1:
   Add DAT-72 density code, and add a note explaining that
   the SDLTTapeI(110) density code (0x48) is the same as
   DAT-160.

  Sponsored by: Spectra Logic
  MFC after: 3 weeks

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r280230 | ken | 2015-03-18 14:52:34 -0600 (Wed, 18 Mar 2015) | 25 lines

  Fix a couple of problems in the sa(4) media type reports.

  The only drives I have discovered so far that support medium type
  reports are newer HP LTO (LTO-5 and LTO-6) drives.  IBM drives
  only support the density reports.

  sys/cam/scsi/scsi_sa.h:
   The number of possible density codes in the medium type
   report is 9, not 8.  This caused problems parsing all of
   the medium type report after this point in the structure.

  usr.bin/mt/mt.c:
   Run the density codes returned in the medium type report
   through denstostring(), just like the primary and secondary
   density codes in the density report.  This will print the
   density code in hex, and give a text description if it
   is available.

  Thanks to Rudolf Cejka for doing extensive testing with HP LTO drives
  and Bacula and discovering these problems.

  Tested by: Rudolf Cejka <cejkar at fit.vutbr.cz>
  Sponsored by: Spectra Logic
  MFC after: 4 days

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r280231 | ken | 2015-03-18 14:54:54 -0600 (Wed, 18 Mar 2015) | 16 lines

  Improve the mt(1) rblim display.

  The granularity reported by READ BLOCK LIMITS is an exponent, not a
  byte value.  So a granularity of 0 means 2^0, or 1 byte.  A
  granularity of 1 means 2^1, or 2 bytes.

  Print out the individual block limits on separate lines to improve
  readability and avoid exceeding 80 columns.

  usr.bin/mt/mt.c:
   Fix and improve the 'mt rblim' output.  Add a MT_PLURAL()
   macro so we can print "byte" or "bytes" as appropriate.

  Sponsored by: Spectra Logic
  MFC after: 4 days

  ------------------------------------------------------------------------

Sponsored by: Spectra Logic

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

9 years agoMFC r278204:
ngie [Tue, 24 Mar 2015 08:24:55 +0000 (08:24 +0000)]
MFC r278204:

Sort the entries by build knob, then MACHINE_ARCH like other areas of the tree

Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r280196:
kib [Tue, 24 Mar 2015 08:21:36 +0000 (08:21 +0000)]
MFC r280196:
Recheck that boundary is not crossed after the move to satisfy boundary
restriction.

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

9 years agoMFC r280195:
kib [Tue, 24 Mar 2015 08:18:24 +0000 (08:18 +0000)]
MFC r280195:
When inserting new entry into the address map, ensure that not only
next entry does not intersect with the tail of the new entry, but also
that previous entry is also before new entry start.

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

9 years agoMFC r271893,r271895,r272043,r278249,r278282,r278466:
ngie [Tue, 24 Mar 2015 07:43:58 +0000 (07:43 +0000)]
MFC r271893,r271895,r272043,r278249,r278282,r278466:

r271893:

Don't install /etc/rc.d/rwho unless MK_RCMDS == yes

Sponsored by: EMC / Isilon Storage Division

r271895:

Don't install /etc/rc.d/ftp-proxy unless MK_PF == yes

Sponsored by: EMC / Isilon Storage Division

r272043:

Don't install /etc/rc.d/keyserv unless MK_OPENSSL == yes

Sponsored by: EMC / Isilon Storage Division

r278249:

Honor the following flags with the following rc.d scripts for services that can
be easily decoupled from the boot process without disrupting other services

- MK_APM && MK_ACPI: powerd
- MK_BOOTPARAMD: bootparams
- MK_FTP: ftpd
- MK_INETD: inetd
- MK_LEGACY_CONSOLE: moused, syscons
- MK_MAIL: othermta
- MK_NS_CACHING: nscd
- MK_NTP: ntpd (ntpdate is required by other services and can't be easily
                conditionalized -- yet..)
- MK_ROUTED: routed
- MK_SENDMAIL: sendmail
- MK_TIMED: timed
- MK_VI: virecover

Sponsored by: EMC / Isilon Storage Division

r278282:

Use FILES+= idiom instead of _inetd when referencing inetd rc.d script

This was a discrepancy between ^/projects/building-blocks and ^/head that I
didn't resolve before committing the change to ^/head

Pointyhat to: me
Reported by: jhb
Sponsored by: EMC / Isilon Storage Division

r278466:

Remove explicit routing/sendmail rc.d inclusion in FILES

Reported by: Guy Yur <guyyur@gmail.com>
Sponsored by: EMC / Isilon Storage Division

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

9 years agoForced commit to note that the previous commit to this file included the
ngie [Tue, 24 Mar 2015 06:59:41 +0000 (06:59 +0000)]
Forced commit to note that the previous commit to this file included the
following MFC as well:

MFC 278251:

Honor the following flags for items that can be conditionalized out of the
build/install without disrupting other dependent services (see r278249, et
al):

- MK_LOCATE
- MK_MAN
- MK_NLS
- MK_OPENSSL
- MK_PKGBOOTSTRAP
- MK_SENDMAIL

Additional flags need to be handled in etc/Makefile, but it requires
refactoring the relevant scripts in etc/rc.d/*

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r278135,r278202:
ngie [Tue, 24 Mar 2015 06:55:08 +0000 (06:55 +0000)]
MFC r278135,r278202:

r278135 (by amdmi3):

- Remove more files when MK_USB == no

Reviewed by: ngie
Approved by: ngie
Differential Revision: D1600

r278202:

Clean up more usb related files when MK_USB == no when dealing with
manpages, libraries, and binaries

Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC of 280413,tzdata10:
edwin [Tue, 24 Mar 2015 06:05:52 +0000 (06:05 +0000)]
MFC of 280413,tzdata10:

Release 2015b - 2015-03-19 23:28:11 -0700

  Changes affecting future time stamps

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

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

  Changes affecting past time stamps

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

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

  Changes affecting time zone abbreviations

    Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD".
    (Thanks to Hank W.)

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

9 years agoMFC r280307:
pfg [Tue, 24 Mar 2015 01:31:02 +0000 (01:31 +0000)]
MFC r280307:
bsdgrep: fix regression in the -f option since r268799

Caused by an incomplete merge from NetBSD.

PR: 198725

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

9 years agoMFC r275163: ANSIfy b64_pton
emaste [Mon, 23 Mar 2015 20:51:35 +0000 (20:51 +0000)]
MFC r275163: ANSIfy b64_pton

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

9 years agoMFC r275060: Fix b64_pton output buffer overrun test for exact-sized buffer
emaste [Mon, 23 Mar 2015 20:50:28 +0000 (20:50 +0000)]
MFC r275060: Fix b64_pton output buffer overrun test for exact-sized buffer

  b64_pton would sometimes erroneously fail to decode a base64 string into
  a precisely sized buffer. The overflow check was a little too greedy.

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

9 years agoMFC r277948:
pfg [Mon, 23 Mar 2015 20:00:35 +0000 (20:00 +0000)]
MFC r277948:
msun: use previously ignored "in" value.

This fixes evaluation of exceptional values in scalblnl().
While here, simplify the code as suggested by Bruce Evans.

Reported by: clang static analyzer

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

9 years agoMFC r279037:
pfg [Mon, 23 Mar 2015 19:50:21 +0000 (19:50 +0000)]
MFC r279037:
dbm_delete(3): correct man page to match current behaviour.

"The dbm_store() and dbm_delete() functions shall return 0 when they
succeed and a negative value when they fail."

Reference:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html

PR: 42422
Suggested by: delphij

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

9 years agoMFC r279186:
pfg [Mon, 23 Mar 2015 19:44:18 +0000 (19:44 +0000)]
MFC r279186:
setmode(3): Make sure that setmode sets errno on failure.

Our man page already documented this partially but now
we provide more consistent behavior.

PR: 136669
Obtained from: NetBSD (CVS rev. 1.31, 1.33)
Relnotes: yes

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

9 years agoMFC revisions 274068, 274119, 279624:
dteske [Mon, 23 Mar 2015 19:12:55 +0000 (19:12 +0000)]
MFC revisions 274068, 274119, 279624:
r274068: Add key+=append syntax to sysrc(8)
r279624: Add key-=remove syntax
r274119: Add EXAMPLES-section entries for new syntax

Reviewed by: shurd (r274068)
Thanks to: seanc
Relnotes: sysrc(8) now supports key+=append and key-=remove

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

9 years agoMFC r279957, r280017: Add DSM TRIM command support for virtual AHCI disks.
mav [Mon, 23 Mar 2015 14:36:53 +0000 (14:36 +0000)]
MFC r279957, r280017: Add DSM TRIM command support for virtual AHCI disks.

It works only for virtual disks backed by ZVOLs and raw devices supporting
BIO_DELETE.  Virtual disks backed by files won't report this capability.

Relnotes: yes

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

9 years agoMFC r277487:
kib [Mon, 23 Mar 2015 13:38:33 +0000 (13:38 +0000)]
MFC r277487:
An update for the i915 GPU driver, which brings the code up to Linux
commit 4d93914ae3db4a897ead4b.

MFC r277959 (by adrian):
Fix backlight for ivybridge based laptops (and whatever else comes through
this codepath.)

MFC r278146:
Do not attach to the unsupported chipsets, unless magic tunable is
frobbed.

MFC r278147, r278148:
Fix sign for the error code returned from the driver-specific code.

MFC r278152:
Do not access gmbus_ports array past its end.

MFC r278159 (by emaste):
Remove duplicate intel_fbc_enabled prototype.

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

9 years agoMFC r280293: Add missing variable initialization.
mav [Mon, 23 Mar 2015 11:48:25 +0000 (11:48 +0000)]
MFC r280293: Add missing variable initialization.

Reported by: Coverity
CID: 1288938

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

9 years agoDefeat race with texinfo tools built with make bootstrap-tools
ngie [Sun, 22 Mar 2015 22:00:29 +0000 (22:00 +0000)]
Defeat race with texinfo tools built with make bootstrap-tools

This is a direct commit to stable/10 because texinfo has been removed from
head

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

9 years agoMFC r279919: Using parent DMA tag in drm_pci_alloc(). This can allow
jah [Sun, 22 Mar 2015 18:32:37 +0000 (18:32 +0000)]
MFC r279919: Using parent DMA tag in drm_pci_alloc(). This can allow
drm2 devices to work with Intel DMAR enabled for the system, as long as
DMAR is disabled for the drm2 device.

Reviewed by: kib (mentor)

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

9 years agoMFC r279842, r279875
scottl [Sun, 22 Mar 2015 12:49:57 +0000 (12:49 +0000)]
MFC r279842, r279875

Implement basic reporting of cpuset info via the -S option

Obtained from: Netflix, Inc.

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

9 years agoMFC r280253:
kib [Sun, 22 Mar 2015 09:12:44 +0000 (09:12 +0000)]
MFC r280253:
Fix syntax error.

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

9 years agoRemove dependency between usr.bin/m4 and lib/libohash
ngie [Sun, 22 Mar 2015 08:47:35 +0000 (08:47 +0000)]
Remove dependency between usr.bin/m4 and lib/libohash

libohash doesn't exist on stable/10 (only head)

Not sure why my make buildworld didn't catch any issues

This is a direct commit to stable/10 as a followup to r280340

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

9 years agoMFC r279197,r279198:
ngie [Sun, 22 Mar 2015 08:42:44 +0000 (08:42 +0000)]
MFC r279197,r279198:

r279197:

Parallelize building bootstrap-tools

Differential Revision: https://reviews.freebsd.org/D1901
Reviewed by: ian
No serious objections from: imp

r279198:

Fill in missing dependencies for dtrace related tools so the bootstrap-tools
compiles properly on older hosts

Pointyhat to: me

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

9 years agoMFC r278888:
ngie [Sun, 22 Mar 2015 05:54:48 +0000 (05:54 +0000)]
MFC r278888:

Some minor style(9) fixes (whitespace + comment)

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

9 years agoMFC r279980:
dim [Sat, 21 Mar 2015 19:20:15 +0000 (19:20 +0000)]
MFC r279980:

Allow relative pathnames in SRCS, so as to enable building software
which includes more than one file with the same name, in different
directories.

For example, setting:

SRCS+= foo/foo.c bar/foo.c baz/foo.c

will now create separate objdirs 'foo', 'bar' and 'baz' for each of the
sources in the list, and use those objdirs for the corresponding object
files.

Reviewed by: brooks, imp
Differential Revision: https://reviews.freebsd.org/D1984

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

9 years agoMFC r279390:
kib [Sat, 21 Mar 2015 01:39:44 +0000 (01:39 +0000)]
MFC r279390:
Change umtx_lock to be the sleepable mutex.

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

9 years agoMFC: r280297
jkim [Fri, 20 Mar 2015 21:54:45 +0000 (21:54 +0000)]
MFC: r280297

Merge OpenSSL 1.0.1m.

Relnotes: yes

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

9 years agoMFC r279963: Fix SATA Gen3 speed constants.
mav [Fri, 20 Mar 2015 08:28:11 +0000 (08:28 +0000)]
MFC r279963: Fix SATA Gen3 speed constants.

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

9 years agoFix issues with original SA-15:06.openssl commit:
delphij [Fri, 20 Mar 2015 07:11:20 +0000 (07:11 +0000)]
Fix issues with original SA-15:06.openssl commit:

 - Revert a portion of ASN1 change per suggested by OpenBSD
   and OpenSSL developers.  The change was removed from the
   formal OpenSSL release and does not solve security issue.
 - Properly fix CVE-2015-0209 and CVE-2015-0288.

Pointy hat to: delphij

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

9 years agoMFC r278655:
markj [Thu, 19 Mar 2015 23:13:19 +0000 (23:13 +0000)]
MFC r278655:
Add support for decoding multibyte NOPs.

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

9 years agoMFC r279896:
markj [Thu, 19 Mar 2015 23:07:04 +0000 (23:07 +0000)]
MFC r279896:
Document m_collapse().

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

9 years agoFix multiple OpenSSL vulnerabilities.
delphij [Thu, 19 Mar 2015 17:40:43 +0000 (17:40 +0000)]
Fix multiple OpenSSL vulnerabilities.

Security: FreeBSD-SA-15:06.openssl
Security: CVE-2015-0209
Security: CVE-2015-0286
Security: CVE-2015-0287
Security: CVE-2015-0288
Security: CVE-2015-0289
Security: CVE-2015-0293

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

9 years agoMFC r269854:
ae [Thu, 19 Mar 2015 14:09:27 +0000 (14:09 +0000)]
MFC r269854:
  Remove duplicate entry.

MFC r279935:
  Add GUID and alias for Apple Core Storage partition.

  PR: 196241

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

9 years agoMerge r263233 from HEAD to stable/10:
rwatson [Thu, 19 Mar 2015 13:37:36 +0000 (13:37 +0000)]
Merge r263233 from HEAD to stable/10:

  Update kernel inclusions of capability.h to use capsicum.h instead; some
  further refinement is required as some device drivers intended to be
  portable over FreeBSD versions rely on __FreeBSD_version to decide whether
  to include capability.h.

Sponsored by: Google, Inc.

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

9 years agoMFC r279920:
ae [Thu, 19 Mar 2015 13:10:09 +0000 (13:10 +0000)]
MFC r279920:
  Add if_input_default() method, that will be used for if_input
  initialization, when no input method specified before if_attach().

  This prevents panics when if_input() method called directly e.g.
  from bpf(4) code.

  PR: 192426

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

9 years agoMFC 278327:
jhb [Thu, 19 Mar 2015 13:08:17 +0000 (13:08 +0000)]
MFC 278327:
Change ktrdump to use the more standard -M/-N flags to specify the path
to a crash dump and kernel, respectively.  The existing -m/-e flags are
still supported for backwards compatiblity but are no longer documented.

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

9 years agoMFC r279910:
ae [Thu, 19 Mar 2015 12:49:55 +0000 (12:49 +0000)]
MFC r279910:
  Reset mbuf pointer to NULL in fastroute case to indicate that mbuf was
  consumed by filter. This fixes several panics due to accessing to mbuf
  after free.

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

9 years agoMerge an applicable subset of r263234 from HEAD to stable/10:
rwatson [Thu, 19 Mar 2015 12:32:48 +0000 (12:32 +0000)]
Merge an applicable subset of r263234 from HEAD to stable/10:

  Update most userspace consumers of capability.h to use capsicum.h instead.

  auditdistd is not updated as I will make the change upstream and then do a
  vendor import sometime in the next week or two.

Note that a significant fraction does not apply, as FreeBSD 10 doesn't
contain a Capsicumised ping, casperd, libcasper, etc.  When these features
are merged, the capsicum.h change will need to be merged with them.

Sponsored by: Google, Inc.

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

9 years agoMerge r263842 from HEAD to stable/10:
rwatson [Thu, 19 Mar 2015 11:24:07 +0000 (11:24 +0000)]
Merge r263842 from HEAD to stable/10:

  Update system man pages for s/capability.h/capsicum.h/.

Sponsored by: Google, Inc.

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

9 years agoBump __FreeBSD_version to 1001511 reflecting the capability.h -> capsicum.h
rwatson [Thu, 19 Mar 2015 11:20:12 +0000 (11:20 +0000)]
Bump __FreeBSD_version to 1001511 reflecting the capability.h -> capsicum.h
rename.

Sponsored by: Google, Inc.

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

9 years agoMFC r279658, r279673, r279675:
mav [Thu, 19 Mar 2015 09:56:38 +0000 (09:56 +0000)]
MFC r279658, r279673, r279675:
Implement cache flush for ahci-hd and for virtio-blk over device.

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

9 years agoMFC r279654: Report logical/physical sector sizes for virtual SATA disk.
mav [Thu, 19 Mar 2015 09:54:48 +0000 (09:54 +0000)]
MFC r279654: Report logical/physical sector sizes for virtual SATA disk.

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

9 years agoMFC r279651, r279652, r279657:
mav [Thu, 19 Mar 2015 09:53:00 +0000 (09:53 +0000)]
MFC r279651, r279652, r279657:
Add support for TOPOLOGY feature of virtio block device.

Passing through physical block size/offset from underlying storage allows
guest to manage proper data and I/O alignment to improve performance.

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

9 years agoMFC r279642: Reenable VIRTIO_BLK_F_TOPOLOGY feature.
mav [Thu, 19 Mar 2015 09:47:57 +0000 (09:47 +0000)]
MFC r279642: Reenable VIRTIO_BLK_F_TOPOLOGY feature.

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

9 years agoMerge r263232 from head to stable/10:
rwatson [Wed, 18 Mar 2015 15:20:08 +0000 (15:20 +0000)]
Merge r263232 from head to stable/10:

  Rename capability.h to capsicum.h: the original name conflicts with the
  draft POSIX.1e capability.h used on some systems (e.g., Linux).  On
  FreeBSD, leave a wrapper header so that current code continues to compile.

  We will eventually want to deprecate the old header as the presence of a
  capability.h may be confusing some configure scripts.

  Suggested by:   David Drysdale <drysdale at google.com>
  Discussed on:   cl-capsicum-discuss
  MFC after:      3 weeks

Sponsored by: Google, Inc.

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

9 years agoMFC r280125:
markj [Wed, 18 Mar 2015 02:29:51 +0000 (02:29 +0000)]
MFC r280125:
Add a missing format string argument.

PR: 197391

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

9 years agoMFC r279783, r279785:
marck [Sun, 15 Mar 2015 19:33:40 +0000 (19:33 +0000)]
MFC  r279783, r279785:

Reword phrase a bit to decrease possible misleading meaning.

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

9 years agoMFC r279936:
kib [Sun, 15 Mar 2015 18:42:19 +0000 (18:42 +0000)]
MFC r279936:
Remove write-only variable.

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

9 years agoMFC r279764:
kib [Sun, 15 Mar 2015 18:40:06 +0000 (18:40 +0000)]
MFC r279764:
Fix function name in the panic message.

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

9 years agoMFC r279779: env: Fix crash when -S string is not empty but no operand
jilles [Sun, 15 Mar 2015 11:43:51 +0000 (11:43 +0000)]
MFC r279779: env: Fix crash when -S string is not empty but no operand
follows.

split_spaces() set argc in main() incorrectly, which caused trouble for
getopt().

Examples:
  env -S '\c'
  env -S -i

PR: 197769

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

9 years agoMFC r279016:
ed [Sun, 15 Mar 2015 09:15:11 +0000 (09:15 +0000)]
MFC r279016:

  Make syslogd work in case shutdown() is POSIX-ly correct.

  On POSIX conformant systems, shutdown() should return ENOTCONN when not
  connected. We attempted to fix this once (kern/84761), but this change
  got backed out because it 'breaks code' (r150155).

  I just reapplied the patch and indeed, syslogd fails on startup. Make it
  easier to re-enable this change in the future by paching up syslogd to
  do the right thing.

Sponsored by: Nuxi

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

9 years agoMFC r279865:
hselasky [Sun, 15 Mar 2015 09:05:26 +0000 (09:05 +0000)]
MFC r279865:
Ensure setting promiscious mode when a network interface is up, is
always non-blocking by not locking a SX type of mutex.

Sponsored by: Mellanox Technologies

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

9 years agoMFC r279722: env: Fix testsuite for additional variables set by sh.
jilles [Sat, 14 Mar 2015 20:40:04 +0000 (20:40 +0000)]
MFC r279722: env: Fix testsuite for additional variables set by sh.

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

9 years agoMFC r279735:
ae [Sat, 14 Mar 2015 14:38:25 +0000 (14:38 +0000)]
MFC r279735:
  Remove extra '&'. sin6 is already a pointer.

PR: 195011

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

9 years agoMFC r279730:
ae [Sat, 14 Mar 2015 14:35:07 +0000 (14:35 +0000)]
MFC r279730:
  lla_lookup() can directly call llentry_free() for static entries
  and the last one requires to hold afdata's wlock.

PR: 197096

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

9 years agoMFC r270571 (by dumbbell):
kib [Sat, 14 Mar 2015 11:36:47 +0000 (11:36 +0000)]
MFC r270571 (by dumbbell):
drm/i915: Add opt_acpi.h and acpi_if.h to the source files

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

9 years agoMFC r279401:
kib [Sat, 14 Mar 2015 08:42:40 +0000 (08:42 +0000)]
MFC r279401:
Some fixes for fdescfs lookup code Do not ever return doomed vnode from.
lookup. Reuse the vn_vget_ino_gen() helper to handle parallel unmounts .

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

9 years agoMFC 270516:
jhb [Fri, 13 Mar 2015 18:38:02 +0000 (18:38 +0000)]
MFC 270516:
i915 driver - enable opregion handle; program CADL.

add opregion handling for drm2 - which exposes some ACPI video configuration
pieces that some Lenovo laptop models use to flesh out which video device
to speak to.  This enables the brightness control in ACPI to work these models.

The CADL bits are also important - it's used to figure out which ACPI
events to hook the brightness buttons into.  It doesn't yet seem to work
for me, but it does for the OP.

PR: 190186, 198551
Submitted by: Henry Hu <henry.hu.sh@gmail.com>

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

9 years agoMFC 278682:
jhb [Fri, 13 Mar 2015 17:45:34 +0000 (17:45 +0000)]
MFC 278682:
Make the extra dependencies in DPADD be dependencies of PROG_FULL and
SHLIB_NAME_FULL so that the full binary is relinked when a dependency
changes.  Right now the existing full binary is left as-is and only
the objcopy to remove debug symbols is run.

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

9 years agoMFC r279366:
delphij [Fri, 13 Mar 2015 01:18:46 +0000 (01:18 +0000)]
MFC r279366:

Set altroot if the user have specified it via -o altroot.

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

9 years agoMFC r278729
sjg [Thu, 12 Mar 2015 17:07:45 +0000 (17:07 +0000)]
MFC r278729

sbspace: size of bleft, mleft must match sockbuf fields to avoid
overflow on amd64

Submitted by:   anshukla@juniper.net
Obtained from:  Juniper Networks

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

9 years agoMFC r272566:
kib [Thu, 12 Mar 2015 16:05:52 +0000 (16:05 +0000)]
MFC r272566:
Convert -1 from sbuf_bcat() to ENOMEM.

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

9 years agoMFC 278292:
jhb [Thu, 12 Mar 2015 15:48:25 +0000 (15:48 +0000)]
MFC 278292:
Add the device ID for the AMT serial port on my Thinkpad T400.

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

9 years agoMFC 277713:
jhb [Thu, 12 Mar 2015 15:08:23 +0000 (15:08 +0000)]
MFC 277713:
If the boot-time memory test is enabled, output a dot ('.') for
each GB of RAM tested so people watching the console can see that
the machine is making progress and not hung.

PR: 196650

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

9 years agoMFC r271146,271201,271207,271261,271457,272606,277100,277126,278034,279320,
mav [Thu, 12 Mar 2015 13:40:02 +0000 (13:40 +0000)]
MFC r271146,271201,271207,271261,271457,272606,277100,277126,278034,279320,
279573:  Sync AHCI driver with HEAD.

Due to code reorganization in r271146 and many previous reordered merges it
is problematic to merge those revisions separately.

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

9 years agoMFC r270833 (by imp):
mav [Thu, 12 Mar 2015 13:16:05 +0000 (13:16 +0000)]
MFC r270833 (by imp):
We were returning 20 bytes as the FIS size to send, but only
initializing 16. Initialize all 20 so we don't send garbage in the
Auxiliary register. The SATA standard mandates a 5 dword length for
the Host to Device FIS.

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

9 years agoMFC r279588:
ae [Thu, 12 Mar 2015 09:04:19 +0000 (09:04 +0000)]
MFC r279588:
  Fix deadlock in IPv6 PCB code.

  When several threads are trying to send datagram to the same destination,
  but fragmentation is disabled and datagram size exceeds link MTU,
  ip6_output() calls pfctlinput2(PRC_MSGSIZE). It does notify all
  sockets wanted to know MTU to this destination. And since all threads
  hold PCB lock while sending, taking the lock for each PCB in the
  in6_pcbnotify() leads to deadlock.

  RFC 3542 p.11.3 suggests notify all application wanted to receive
  IPV6_PATHMTU ancillary data for each ICMPv6 packet too big message.
  But it doesn't require this, when we don't receive ICMPv6 message.

  Change ip6_notify_pmtu() function to be able use it directly from
  ip6_output() to notify only one socket, and to notify all sockets
  when ICMPv6 packet too big message received.

MFC r279684:
  tcp6_ctlinput() doesn't pass MTU value to in6_pcbnotify().
  Check cmdarg isn't NULL before dereference, this check was in the
  ip6_notify_pmtu() before r279588.

PR: 197059
Sponsored by: Yandex LLC

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

9 years agoMFC r271889, 272799, 272800, 274976
scottl [Thu, 12 Mar 2015 07:07:41 +0000 (07:07 +0000)]
MFC r271889, 272799, 272800, 274976
This brings in bus_get_domain() and the related reporting via devinfo,
dmesg, and sysctl.

Obtained from: adrian, jhb
Sponsored by: Netflix, Inc.

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

9 years agoMFC r279802: Don't specify a function name in the example SDT(9) probe.
markj [Thu, 12 Mar 2015 01:03:04 +0000 (01:03 +0000)]
MFC r279802: Don't specify a function name in the example SDT(9) probe.

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

9 years agoMFC r279591: Add example configuration for FibreChannel ports.
mav [Wed, 11 Mar 2015 09:54:03 +0000 (09:54 +0000)]
MFC r279591: Add example configuration for FibreChannel ports.

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

9 years agoMFC r279590: If target name starts with "naa.", set it as WWNN for CTL port.
mav [Wed, 11 Mar 2015 09:52:54 +0000 (09:52 +0000)]
MFC r279590: If target name starts with "naa.", set it as WWNN for CTL port.

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

9 years agoMFC r279589: Fix handling of queued text and logout requests.
mav [Wed, 11 Mar 2015 09:51:53 +0000 (09:51 +0000)]
MFC r279589: Fix handling of queued text and logout requests.

While it may have little sense, text and logout requests can be queued.
If they are, they consume cmdsn, so we should increment our conn_cmdsn.

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

9 years agoMFC r279278: Replace constant with proper sizeof().
mav [Wed, 11 Mar 2015 09:50:31 +0000 (09:50 +0000)]
MFC r279278: Replace constant with proper sizeof().

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

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

9 years agoMFC r279275: Fix potential NULL dereference.
mav [Wed, 11 Mar 2015 09:49:06 +0000 (09:49 +0000)]
MFC r279275: Fix potential NULL dereference.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

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

9 years agoMFC r279757:
dim [Wed, 11 Mar 2015 07:22:13 +0000 (07:22 +0000)]
MFC r279757:

Pull in r228344 from upstream libc++ trunk (by Eric Fiselier):

  Get tests running with warnings. Fix warnings in headers and tests

This fixes a number of -Wunused-local-typedef warnings in libc++ headers.

MFC r279758:

Fix another -Wunused-local-typedef warning in libc++, in include/__tree.

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

9 years agoMFC r278848: symlink(7): Mention chflagsat() (can take AT_SYMLINK_NOFOLLOW).
jilles [Tue, 10 Mar 2015 22:23:56 +0000 (22:23 +0000)]
MFC r278848: symlink(7): Mention chflagsat() (can take AT_SYMLINK_NOFOLLOW).

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

9 years agoMFC 277712:
jhb [Tue, 10 Mar 2015 14:18:26 +0000 (14:18 +0000)]
MFC 277712:
Change the default VFS timestamp precision from seconds to microseconds.

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

9 years agoMFC r279598:
dim [Sun, 8 Mar 2015 22:50:45 +0000 (22:50 +0000)]
MFC r279598:

When compiling boot2 with gcc on i386 and pc98, only use the custom flag
-mno-align-long-strings when compiling with base gcc.  This is checked
by comparing the version number against 4.2.1, which is not exactly
right, but good enough.  (There is no other way to check whether we are
using the non-standard gcc in base, as far as I know.)

Reported by: rodrigc

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

9 years agoMFC r265829 (by imp):
dim [Sun, 8 Mar 2015 22:39:01 +0000 (22:39 +0000)]
MFC r265829 (by imp):
  Support, to the extent we generate proper command lines, compiling
  with clang 3.3. Useful for test building -current on a -stable system
  in individual directories. Potentially useful if we ever want to
  support, say, gcc 4.8 or 4.9's new warnings when building with an
  external toolchain (but such support not yet committed). Document
  the bsd.compiler.mk interface.

MFC r266587 (by imp):
  Allow CC to not actually exist. During the ports INDEX run, all the
  Makefiles are evaluated without building things. In a normal build,
  the prerequisites would be built, and CC would be an actual thing. In
  an INDEX build, though, they don't exists. Redirect stderr to get rid
  of annoying messages, and assume that the compiler version is 0 if the
  actual compiler can't tell us. Do this in preference to guessing based
  on numbers because gcc410 might be 4.10, or 4.1.0 and without
  carefully crafted special knowledge we differentiate between them
  easily (also ming-gcc has no clues at all). Elsewhere, don't trust
  the compiler version if it is 0.

MFC r273405 (by bapt):
  When using an external toolchain note that gcc 4.8+ supports C++11

  Submitted by: imp

MFC r275557 (by ngie):
  Fix typos in comments and wrap to <80 columns

MFC r275588 (by ngie):
  ${CC} --version doesn't need to be queried if both COMPILER_TYPE and
  COMPILER_VERSION are known

MFC r275589 (by ngie):
  The previous commit should have been a logical or not a logical "and"

  Pointyhat to: me

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

9 years agoMFC r271927:
trasz [Sat, 7 Mar 2015 20:00:26 +0000 (20:00 +0000)]
MFC r271927:

Turns out -1 is a perfectly valid error number, ERESTART.  Remove useless
code written under assumption that it wasn't.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r277172:
trasz [Sat, 7 Mar 2015 19:52:14 +0000 (19:52 +0000)]
MFC r277172:

Improve wording.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r277175:
trasz [Sat, 7 Mar 2015 19:49:02 +0000 (19:49 +0000)]
MFC r277175:

Mention /net in hier(7).

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r277799:
trasz [Sat, 7 Mar 2015 19:46:47 +0000 (19:46 +0000)]
MFC r277799:

Fix sysctl name.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r277834:
trasz [Sat, 7 Mar 2015 19:45:07 +0000 (19:45 +0000)]
MFC r277834:

When there are no automounted filesystems, autounmountd(8) should wait
for filesystem event, instead of looping on a timeout.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r275756:
trasz [Sat, 7 Mar 2015 19:41:58 +0000 (19:41 +0000)]
MFC r275756:

Fix bug that made automount(8) never unmount stale autofs(5) mounts,
ie mounts for entries that were there in auto_master(5), and then
got removed.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r275755:
trasz [Sat, 7 Mar 2015 19:39:16 +0000 (19:39 +0000)]
MFC r275755:

Fix spurious "child process X terminated with exit status 1" messages
from automountd(8).

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r274859:
trasz [Sat, 7 Mar 2015 19:36:06 +0000 (19:36 +0000)]
MFC r274859:

Implement "automount -c".

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r273127:
trasz [Sat, 7 Mar 2015 19:32:19 +0000 (19:32 +0000)]
MFC r273127:

Make automountd(8) inform autofs(4) whether directory being handled can
have wildcards.  This makes it possible for autofs(4) to avoid requesting
automountd(8) action on access to nonexistent nodes - unless wildcards
are actually used.

Note that this change breaks ABI for automountd(8).

MFC r278521:

Restore ABI compatibility, broken in r273127.  Note that while this fixes
ABI with 10.1, it breaks ABI for 11-CURRENT, so rebuild of automountd(8)
is neccessary.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r279587:
hselasky [Sat, 7 Mar 2015 18:48:00 +0000 (18:48 +0000)]
MFC r279587:
Define PTR_ALIGN() macro which will be needed coming Mellanox driver
releases.

Sponsored by: Mellanox Technologies

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

9 years agoMFC r278866:
hselasky [Sat, 7 Mar 2015 18:39:15 +0000 (18:39 +0000)]
MFC r278866:
Define standard formatting strings to print GIDs
in a separate header file.

Sponsored by: Mellanox Technologies

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

9 years agoMFC r279584:
hselasky [Sat, 7 Mar 2015 18:33:28 +0000 (18:33 +0000)]
MFC r279584:
Updates for the Mellanox ethernet driver

> List of fixes:
  * use correct format for GID printouts
  * double array indexing
  * spelling in printouts
  * void pointer arithmetic
  * allow more receive rings
  * correct maximum number of transmit rings
  * use "const" instead of "static" for constants
  * check for invalid VLAN tags
  * check for lack of IRQ resources
> Added more hardware specific defines
> Added more verbose printouts of firmware status codes

Sponsored by: Mellanox Technologies

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

9 years agoMFC: r279364
jkim [Fri, 6 Mar 2015 22:31:35 +0000 (22:31 +0000)]
MFC: r279364

Use realpath(3) to properly expand $ORIGIN to its absolute path.

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

9 years agoMFC of 279706,tzdata10:
edwin [Fri, 6 Mar 2015 21:56:44 +0000 (21:56 +0000)]
MFC of 279706,tzdata10:

Release 2015a - 2015-01-29

Changes affecting future time stamps

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

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

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

  Changes affecting past time stamps

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

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

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

9 years agoMFC r279563:
hselasky [Fri, 6 Mar 2015 16:08:10 +0000 (16:08 +0000)]
MFC r279563:
Add quirk for USB 3.0 controllers which don't support 64-bit DMA.

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

9 years agoMFH: r279050
brueffer [Fri, 6 Mar 2015 11:25:10 +0000 (11:25 +0000)]
MFH: r279050

Apply mdoc style.

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

9 years agoMFC r279362:
kib [Fri, 6 Mar 2015 09:22:05 +0000 (09:22 +0000)]
MFC r279362:
The VNASSERT in vflush() FORCECLOSE case is trying to panic early to
prevent errors from yanking devices out from under filesystems.  Only
care about special vnodes on devfs, special nodes on other kinds of
filesystems do not have special properties.

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

9 years agoMFC r279544:
hselasky [Thu, 5 Mar 2015 10:18:03 +0000 (10:18 +0000)]
MFC r279544:
Add quirk to disable 64-bit XHCI DMA after r276717.

Requested by: Gary Jennejohn <gljennjohn@gmail.com>

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

9 years agoMFC r279324:
ae [Thu, 5 Mar 2015 10:08:37 +0000 (10:08 +0000)]
MFC r279324:
  When gpart(8) is trying automatically determine the first available
  block of free space after existing partition, take into account
  provider's stripeoffset, since the result will be adjusted to this
  value.

  PR: 197989

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

9 years agoMFC r279210:
hselasky [Thu, 5 Mar 2015 10:04:34 +0000 (10:04 +0000)]
MFC r279210:
Add support for the DWC OTG v2 chipset found in the STM32F4 series of
processors. Make sure we pullup the data lines in device mode when we
power on the port.

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