]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMFC r272806: MFV r272802:
delphij [Thu, 23 Oct 2014 01:36:43 +0000 (01:36 +0000)]
MFC r272806: MFV r272802:

 - Limit ARC for zdb at 256MB.  zdb do not typically revisit data
   in the ARC.
 - Increase default max_inflight from 200 to 1000 (can be overriden
   by -I) so we can queue more I/Os when doing scrubbing.
 - Print status while loading meataslabs for leak detection.

Illumos issues:

    5169 zdb should limit its ARC size
    5170 zdb -c should create more scrub i/os by default
    5171 zdb should print status while loading metaslabs for leak detection

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

9 years agoMFC r272778:
ngie [Thu, 23 Oct 2014 01:09:01 +0000 (01:09 +0000)]
MFC r272778:

  Set the autoindent to 4 spaces with vim in BSD.tests.dist

  This will prevent vim users from accidentally checking in buggy mtree files
  (mixed tabs/spaces).

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r272917:
ngie [Thu, 23 Oct 2014 01:08:31 +0000 (01:08 +0000)]
MFC r272917:

  Add LDFLAGS to PROG_VARS so it can be overridden on a per-PROG basis

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r272053:
ngie [Thu, 23 Oct 2014 01:06:00 +0000 (01:06 +0000)]
MFC r272053:

  Have distrib-dirs, distribution, hier, hierarchy, redistribute, and reinstall
  depend on the .MAKE special target

  This will allow users to do something like the following to print out the
  results of the running the simulated make target with bmake, like some of the
  other top-level make targets in Makefile.inc1:

    % make -f Makefile.inc1 -n distribution TARGET=i386 TARGET_ARCH=i386

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r271349:
ngie [Thu, 23 Oct 2014 01:02:37 +0000 (01:02 +0000)]
MFC r271349:

  Add diagnostic printfs and disable test # 4 on i386

  Reviewed by: jmmv, rpaulo
  Phabric: D749
  PR: 191676
  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r271336:
ngie [Thu, 23 Oct 2014 01:01:58 +0000 (01:01 +0000)]
MFC r271336:

  Expand the tests structure in test_small(..) to workaround the
  "initializer not constant" warning with gcc

  Approved by: jmmv (mentor)
  Phabric: D744
  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r272055:
ngie [Thu, 23 Oct 2014 00:54:52 +0000 (00:54 +0000)]
MFC r272055:

  Improve bsd.progs.mk compatibility with bsd.prog.mk

  1. Do not install FILES/SCRIPTS multiple times if PROGS is specified; this is
     already handled via bsd.prog.mk when it's called recursively (PR: 191055,
     191955).
  2. Some variables, like BINDIR and PROGNAME, default to a value if unset
     whereas others get appended to, like CFLAGS. Add support for the former case
     (PR: 191056)
  3. Make "checkdpadd" and "clean" available targets for recursive execution.

  Reviewed by: marcel, sjg
  Phabric: D822
  PR: 191055, 191056, 191955
  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r271365:
ngie [Thu, 23 Oct 2014 00:51:52 +0000 (00:51 +0000)]
MFC r271365:

  Remove many false positives with make checkdpadd

  - Reduce DPADD and LDADD in checkdpadd to -l<foo>
  - Skip over -Wl,[es]*-group because -Wl,--end-group and
    -Wl,--start-group might be required to properly link objects (see
    usr.bin/clang/lldb as an example)

  This caveat has been present for a while with some components of
  the build. However, these false positives were made more more apparent
  after r269648.

  Phabric: D635
  Reviewed by: jmmv (an earlier version)
  PR: 192730

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

9 years agoMFC r270650 (this is what should have been committed in r273497):
ngie [Thu, 23 Oct 2014 00:43:08 +0000 (00:43 +0000)]
MFC r270650 (this is what should have been committed in r273497):

  Convert LIBCURSES to LIBNCURSES to fix "make checkdpadd"

  Also, add a missing LIBPANEL dependency for lldb

  Approved by: rpaulo (mentor)
  Suggested by: brooks
  Phabric: D675 (as part of a larger diff)
  PR: 192762

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

9 years agoMFC r270650:
ngie [Thu, 23 Oct 2014 00:40:40 +0000 (00:40 +0000)]
MFC r270650:

  Convert LIBCURSES to LIBNCURSES to fix "make checkdpadd"

  Also, add a missing LIBPANEL dependency for lldb

  Approved by: rpaulo (mentor)
  Suggested by: brooks
  Phabric: D675 (as part of a larger diff)
  PR: 192762

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

9 years agoMFC r263264 (by glebius):
ngie [Thu, 23 Oct 2014 00:39:19 +0000 (00:39 +0000)]
MFC r263264 (by glebius):

  Make talk(1) capable of displaying UTF-8 characters.

  Sponsored by: Nginx, Inc.

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

9 years agoMFC r271692:
markj [Wed, 22 Oct 2014 23:55:08 +0000 (23:55 +0000)]
MFC r271692:
Fix a typo.

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

9 years agoMFC r273088:
andrew [Wed, 22 Oct 2014 13:50:38 +0000 (13:50 +0000)]
MFC r273088:

Add support for the __aeabi_c*cmp* functions. These are similar to the
existing functions with the exception they use the condition flags to
store the result.

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

9 years agoMFC r273132:
kib [Wed, 22 Oct 2014 09:12:20 +0000 (09:12 +0000)]
MFC r273132:
Style changes for deadfs.

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

9 years agoMFC r273131:
kib [Wed, 22 Oct 2014 09:09:41 +0000 (09:09 +0000)]
MFC r273131:
When vnode bypass cannot be performed on the cdev file descriptor for
read/write/poll/ioctl, call standard vnode filedescriptor fop.

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

9 years agoMFC r273130:
kib [Wed, 22 Oct 2014 09:06:36 +0000 (09:06 +0000)]
MFC r273130:
Change the deadfs poll VOP to return POLLIN|POLLRDNORM if the caller
is interested in i/o state.  Return POLLNVAL for invalid bits, similar
to poll_no_poll().

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

9 years agoMFC r273129:
kib [Wed, 22 Oct 2014 09:04:56 +0000 (09:04 +0000)]
MFC r273129:
Implement FIODTYPE for master ptys.

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

9 years agoMFC r272573:
bryanv [Wed, 22 Oct 2014 04:09:47 +0000 (04:09 +0000)]
MFC r272573:

  Change the UMA mutex into a rwlock

  Acquire the lock in read mode when just needed to ensure the stability
  of the keg list. The UMA lock may be held for a long time (relatively
  speaking) in uma_reclaim() on machines with lots of zones/kegs. If the
  uma_timeout() would fire during that period, subsequent callouts on that
  CPU may be significantly delayed.

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

9 years agoMFC r272796:
bryanv [Wed, 22 Oct 2014 04:01:27 +0000 (04:01 +0000)]
MFC r272796:

Add M_FLOWID to M_COPYFLAGS

The M_FLOWID flag should be propagated to the new mbuf pkthdr in
m_move_pkthdr() and m_dup_pkthdr(). The new mbuf already got the
existing flowid value, but would be ignored since the flag was
not set.

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

9 years agoBump __FreeBSD_version to track SA-14:20, SA-14:21, SA-14:22,
gjb [Tue, 21 Oct 2014 21:37:53 +0000 (21:37 +0000)]
Bump __FreeBSD_version to track SA-14:20, SA-14:21, SA-14:22,
SA-14:23

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r273402:
gjb [Tue, 21 Oct 2014 21:27:13 +0000 (21:27 +0000)]
MFC r273402:
  Fix an issue where a FreeBSD virtual machine provisioned in
  the Microsoft Azure service does not recognize the second
  attached disk on the system.

PR: 194376
Insta-MFC OK: re (rodrigc)
Sponsored by: The FreeBSD Foundation

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

9 years agoFix rtsold(8) remote buffer overflow vulnerability. [SA-14:20]
delphij [Tue, 21 Oct 2014 20:20:07 +0000 (20:20 +0000)]
Fix rtsold(8) remote buffer overflow vulnerability. [SA-14:20]

Fix memory leak in sandboxed namei lookup. [SA-14:22]

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

9 years agoAdd basic UEFI boot procedure manpage
emaste [Tue, 21 Oct 2014 14:47:26 +0000 (14:47 +0000)]
Add basic UEFI boot procedure manpage

MFC of r273218 and r273235.

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

9 years agoMFC: r273034
brueffer [Tue, 21 Oct 2014 13:07:36 +0000 (13:07 +0000)]
MFC: r273034

Add one more AMD Kaveri APU device ID.

Submitted by: Remy Nonnenmacher <remy.nonnenmacher@activnetworks.com>

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

9 years agoMFC r272683:
hselasky [Tue, 21 Oct 2014 08:24:12 +0000 (08:24 +0000)]
MFC r272683:
- Fix compile warning when compiling with GCC.
- Add missed chunk in previous driver code MFC.

Sponsored by: Mellanox Technologies

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

9 years agoMFC r271926: Mention read_ahead tunables/sysctls.
mav [Tue, 21 Oct 2014 06:25:41 +0000 (06:25 +0000)]
MFC r271926:  Mention read_ahead tunables/sysctls.

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

9 years agoMFC r262332 (by ivoras): Grammar fix
mav [Tue, 21 Oct 2014 06:24:15 +0000 (06:24 +0000)]
MFC r262332 (by ivoras): Grammar fix

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

9 years agoMFC r262294 (by ivoras):
mav [Tue, 21 Oct 2014 06:23:14 +0000 (06:23 +0000)]
MFC r262294 (by ivoras):
Explain how and where kern.cam.ada.write_cache can be set in practical
situations.

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

9 years agoMFC r272731:
yongari [Tue, 21 Oct 2014 04:54:37 +0000 (04:54 +0000)]
MFC r272731:
  Document newly added controller AR816x/AR817x.

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

9 years agoMFC r272730,273018:
yongari [Tue, 21 Oct 2014 04:48:49 +0000 (04:48 +0000)]
MFC r272730,273018:
  Add support for QAC AR816x/AR817x Gigabit/Fast Ethernet controllers.
  These controllers seem to have the same feature of AR813x/AR815x and
  improved RSS support(4 TX queues and 8 RX queues).  alc(4) supports
  all hardware features except RSS.  I didn't implement RX checksum
  offloading for AR816x/AR817x just because I couldn't get
  confirmation from the Vendor whether AR816x/AR817x corrected its
  predecessor's RX checksum offloading bug on fragmented packets.
  This change adds supports for the following controllers.
   o AR8161 PCIe Gigabit Ethernet controller
   o AR8162 PCIe Fast Ethernet controller
   o AR8171 PCIe Gigabit Ethernet controller
   o AR8172 PCIe Fast Ethernet controller
   o Killer E2200 Gigabit Ethernet controller

  Relnotes: yes

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

9 years agoMFC r272729,272732:
yongari [Tue, 21 Oct 2014 01:48:19 +0000 (01:48 +0000)]
MFC r272729,272732:
  Add new quirk PCI_QUIRK_MSI_INTX_BUG to pci(4).
  QAC AR816x/E2200 controller has a silicon bug that MSI interrupt
  does not assert if PCIM_CMD_INTxDIS bit of command register is set.

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

9 years agoMFC r272721:
yongari [Tue, 21 Oct 2014 01:14:56 +0000 (01:14 +0000)]
MFC r272721:
  Fix a long standing bug in MAC statistics register access.  One
  additional register was erroneously added in the MAC register set
  such that 7 TX statistics counters were wrong.

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

9 years agoFix label for the UEFI bootonly cd.
gjb [Tue, 21 Oct 2014 00:07:37 +0000 (00:07 +0000)]
Fix label for the UEFI bootonly cd.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r273204:
gjb [Tue, 21 Oct 2014 00:06:03 +0000 (00:06 +0000)]
MFC r273204:
  Add more descriptive metadata to the ISO images.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r272601: MFV r272591:
delphij [Mon, 20 Oct 2014 22:22:39 +0000 (22:22 +0000)]
MFC r272601: MFV r272591:

Use loaned ARC buffer for zfs receive to avoid copy.

Illumos issue:
    5162 zfs recv should use loaned arc buffer to avoid copy

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

9 years agoMFC r272599: MFV r272588:
delphij [Mon, 20 Oct 2014 22:18:21 +0000 (22:18 +0000)]
MFC r272599: MFV r272588:

Handle old format deadlist.

Illumos issue:
    5178 zdb -vvvvv on old-format pool fails in dump_deadlist()

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

9 years agoMFC r272598: MFV r272585:
delphij [Mon, 20 Oct 2014 22:13:50 +0000 (22:13 +0000)]
MFC r272598: MFV r272585:

Split the godfather zio into CPU number's to reduce lock
contention.

Illumos issue:
    5176 lock contention on godfather zio

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

9 years agoMFC r272584: MFV r272501:
delphij [Mon, 20 Oct 2014 22:09:30 +0000 (22:09 +0000)]
MFC r272584: MFV r272501:

Illumos issue:
    5177 remove dead code from dsl_scan.c

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

9 years agoMFC r272511: MFV r272499:
delphij [Mon, 20 Oct 2014 22:04:49 +0000 (22:04 +0000)]
MFC r272511: MFV r272499:

Illumos issue:
    5174 add sdt probe for blocked read in dbuf_read()

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

9 years agoMFC r272510: MFV r272498:
delphij [Mon, 20 Oct 2014 21:59:11 +0000 (21:59 +0000)]
MFC r272510: MFV r272498:

Add a new sysctl, vfs.zfs.vol.unmap_enabled, which allows the system
administrator to toggle whether ZFS should ignore UNMAP requests.

Illumos issue:
    5149 zvols need a way to ignore DKIOCFREE

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

9 years agoMFC r272507: MFV r272496:
delphij [Mon, 20 Oct 2014 21:53:51 +0000 (21:53 +0000)]
MFC r272507: MFV r272496:

Add tunable for number of metaslabs per vdev
(vfs.zfs.vdev.metaslabs_per_vdev).  The default remains
at 200.

Illumos issue:
    5161 add tunable for number of metaslabs per vdev

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

9 years agoMFC r272504: MFV r272494:
delphij [Mon, 20 Oct 2014 18:58:45 +0000 (18:58 +0000)]
MFC r272504: MFV r272494:

Make space_map_truncate() always do space_map_reallocate().  Without
this, setting space_map_max_blksz would cause panic for existing pool,
as dmu_objset_set_blocksize would fail if the object have multiple blocks.

Illumos issues:
   5164 space_map_max_blksz causes panic, does not work
   5165 zdb fails assertion when run on pool with recently-enabled
spacemap_histogram feature

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

9 years agoMFC r272884:
delphij [Mon, 20 Oct 2014 18:53:54 +0000 (18:53 +0000)]
MFC r272884:

accept(2) may and can return EAGAIN, document it.

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

9 years agoMFH (r273273): Merge upstream r825: fix line continuation in whitespace
des [Mon, 20 Oct 2014 08:59:30 +0000 (08:59 +0000)]
MFH (r273273): Merge upstream r825: fix line continuation in whitespace

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

9 years agoMFC r273072: Add LBPERE mode bit definition.
mav [Mon, 20 Oct 2014 08:09:36 +0000 (08:09 +0000)]
MFC r273072:  Add LBPERE mode bit definition.

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

9 years agoMFC r273046:
mav [Mon, 20 Oct 2014 08:08:43 +0000 (08:08 +0000)]
MFC r273046:
Don't confuse frontend with zero length data moves, just return immediately.

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

9 years agoMFC r273038: Add support for READ DEFECT DATA (10/12) commands.
mav [Mon, 20 Oct 2014 08:07:29 +0000 (08:07 +0000)]
MFC r273038:  Add support for READ DEFECT DATA (10/12) commands.

SPC-4 r2 allows to return empty defect list if the list is not supported.
We don't reallu support defect data lists, but this suppresses some errors.

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

9 years agoMFC r273029:
mav [Mon, 20 Oct 2014 08:06:17 +0000 (08:06 +0000)]
MFC r273029:
Report physical block size for file-backed LUNs, using vattr.va_blocksize.

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

9 years agoMFC r273008: Remove stale comments.
mav [Mon, 20 Oct 2014 08:04:46 +0000 (08:04 +0000)]
MFC r273008: Remove stale comments.

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

9 years agoMFC r272978: Improve and document `ctladm portlist` subcommand.
mav [Mon, 20 Oct 2014 08:03:23 +0000 (08:03 +0000)]
MFC r272978: Improve and document `ctladm portlist` subcommand.

Make this subcommand less FC-specific, reporting target and port addresses
in more generic way.  Also make it report list of connected initiators in
unified way, working for both FC and iSCSI, and potentially others.

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

9 years agoMFC r272947: Give physical and virtual ports numbers some more meaning.
mav [Mon, 20 Oct 2014 07:59:29 +0000 (07:59 +0000)]
MFC r272947: Give physical and virtual ports numbers some more meaning.

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

9 years agoMFC r272939: Shorten frontend name.
mav [Mon, 20 Oct 2014 07:58:01 +0000 (07:58 +0000)]
MFC r272939:  Shorten frontend name.

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

9 years agoMFC r272938: Filter out duplicate AC_PATH_REGISTERED async events.
mav [Mon, 20 Oct 2014 07:57:07 +0000 (07:57 +0000)]
MFC r272938:  Filter out duplicate AC_PATH_REGISTERED async events.

Queued async events handling in CAM opened race, that may lead to duplicate
AC_PATH_REGISTERED events delivery during boot.  That was not happening
before r272935 because the driver was initialized later.  After that change
it started create duplicate ports in CTL.

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

9 years agoMFC r272935: Mark CTL frontend's CAM driver as CAM_PERIPH_DRV_EARLY.
mav [Mon, 20 Oct 2014 07:52:48 +0000 (07:52 +0000)]
MFC r272935:  Mark CTL frontend's CAM driver as CAM_PERIPH_DRV_EARLY.

Target mode operation does not depend on the initiator mode scan process.
This change allows the target driver to attach earlier and receive some
async events (like AC_CONTRACT) that could be lost otherwise.

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

9 years agoMFC r272911:
mav [Mon, 20 Oct 2014 07:41:37 +0000 (07:41 +0000)]
MFC r272911:
Make ctld start even if some LUNs are unable to open backing storage.

Such LUNs will be visible to initiators, but return "not ready" status
on media access commands.  If backing storage become available later,
`ctladm modify ...` or `service ctld reload` can trigger its reopen.

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

9 years agoMFC r272893:
mav [Mon, 20 Oct 2014 07:38:36 +0000 (07:38 +0000)]
MFC r272893:
Store persistent reservation keys as uint64_t instead of uint8_t[8].

This allows to simplify the code and save 512KB of RAM per LUN (8%)
by removing no longer needed "registered" keys flags.

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

9 years agoMFC r272812: Make iSCSI connection close somewhat less aggressive.
mav [Mon, 20 Oct 2014 07:35:46 +0000 (07:35 +0000)]
MFC r272812: Make iSCSI connection close somewhat less aggressive.

It allows to push out some final data from the send queue to the socket
before its close.  In particular, it increases chances for logout response
to be delivered to the initiator.

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

9 years agoMFC r272748:
mav [Mon, 20 Oct 2014 07:34:37 +0000 (07:34 +0000)]
MFC r272748:
Implement software (mode page) and hardware (config) write protection.

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

9 years agoMFC r272734:
mav [Mon, 20 Oct 2014 07:33:41 +0000 (07:33 +0000)]
MFC r272734:
Add support for WRITE ATOMIC (16) command and report SBC-4 compliance.

Atomic writes are only supported for ZVOLs in "dev" mode.  In other cases
atomicity can not be guarantied and so the command is blocked.

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

9 years agoMFC r272613:
mav [Mon, 20 Oct 2014 07:32:33 +0000 (07:32 +0000)]
MFC r272613:
Add support for MaxBurstLength and Expected Data transfer Length parameters.

Before this change target could send R2T request for write transfer of any
size, that could violate iSCSI RFC, which allows initiator to limit maximum
R2T size by negotiating MaxBurstLength connection parameter.

Also report an error in case of write underflow, when initiator provides
less data than initiator expects.  Previously in such case our target
sent R2T request for non-existing data, violating the RFC, and confusing
some initiators.  SCSI specs don't explicitly define how write underflows
should be handled and there are different oppinions, but reporting error
is hopefully better then violating iSCSI RFC with unpredictable results.

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

9 years agoMFC r272597: Fix length of Extended INQUIRY Data VPD page.
mav [Mon, 20 Oct 2014 07:31:23 +0000 (07:31 +0000)]
MFC r272597: Fix length of Extended INQUIRY Data VPD page.

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

9 years agoMFC r271718 (by bdrewery): Correct a comment
mav [Mon, 20 Oct 2014 07:29:43 +0000 (07:29 +0000)]
MFC r271718 (by bdrewery): Correct a comment

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

9 years agoMFC r271395 (by trasz):
mav [Mon, 20 Oct 2014 07:28:18 +0000 (07:28 +0000)]
MFC r271395 (by trasz):
Make sure we handle less than zero timeouts in iSCSI initiator and target
in a reasonable way.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r271073:
yongari [Mon, 20 Oct 2014 07:25:57 +0000 (07:25 +0000)]
MFC r271073:
  Do not blindly announce 1000baseT half-duplex capability in
  autonegotiation.  Some controllers like cgem(4) do not support
  half-duplex at gigabit speeds.

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

9 years agoMFC r271975:
rpaulo [Mon, 20 Oct 2014 04:42:28 +0000 (04:42 +0000)]
MFC r271975:
 Improvements to asmc(4):

 1. changed the code so that 2**16 keys are supported
 2. changed the number of possible fans in a system from 2 to 6
 3. added write support for some fan sysctls
 4. added a new sysctl which shows the ID of the fan
 5. added four more apple models with their temperature keys
 6. changed the maxnumber of temperature keys from 36 to 80
 7. replaced several fixed buf sizes to sizeof buf

 Obtained from:      Denis Ahrens denis at h3q.com

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

9 years agoMFC r273219: Do nothing in vt_upgrade if there is no vt driver
emaste [Mon, 20 Oct 2014 01:01:55 +0000 (01:01 +0000)]
MFC r273219: Do nothing in vt_upgrade if there is no vt driver

  Previously, if no drivers attached at boot we would panic with
  "vtbuf_fill_locked begin.tp_row 0 must be < screen height 0".

PR: 192248

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

9 years agoMFC r273178: Update vt(4) for UEFI defaults and special keys
emaste [Mon, 20 Oct 2014 00:22:08 +0000 (00:22 +0000)]
MFC r273178: Update vt(4) for UEFI defaults and special keys

  vt(4) is the default console for UEFI boot [1], and the bitmapped
  kern.vt.spclkeys sysctl has been replaced with individual kern.vt.kbd_*
  enable sysctls.

PR: 193710

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

9 years agoMFC r272562,r272678,r272679
ache [Sun, 19 Oct 2014 21:16:24 +0000 (21:16 +0000)]
MFC r272562,r272678,r272679

1) Fix the case we have less arguments for format string than we expected.
2) Return error on unsupported format specs.
(both according to POSIX)
3) For %Z format, understand "UTC" name too.

PR:     93197

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

9 years agoMFC r273285:
hrs [Sun, 19 Oct 2014 20:54:04 +0000 (20:54 +0000)]
MFC r273285:

- Honer MK_KERBEROS for Heimdal rc.d scripts.
- Add rc.c/kerberos to OLD_FILES.

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

9 years agoRestore ABI compatibility with 10.0-RELEASE, so that stable/10 users can use
antoine [Sun, 19 Oct 2014 12:11:25 +0000 (12:11 +0000)]
Restore ABI compatibility with 10.0-RELEASE, so that stable/10 users can use
official freebsd packages

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

9 years agoMFC 273168:
tuexen [Sun, 19 Oct 2014 11:31:23 +0000 (11:31 +0000)]
MFC 273168:

Fix the reported streams in a SCTP_STREAM_RESET_EVENT, if a
sent incoming stream reset request was responded with failed
or denied.
Thanks to Peter Bostroem from Google for reporting the issue.

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

9 years agoMFC r273143: Remove setting BIO_DONE flag for BIOs that have done() method.
mav [Sun, 19 Oct 2014 08:47:27 +0000 (08:47 +0000)]
MFC r273143: Remove setting BIO_DONE flag for BIOs that have done() method.

This fixes use-after-free, caused by geom_disk, completing same BIO twice
to save extra allocation, and getting BIO_DONE set after the first.

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

9 years agoMFC r272958, r273006:
pfg [Sat, 18 Oct 2014 19:22:59 +0000 (19:22 +0000)]
MFC r272958, r273006:

ddb: space/tab fixes and ANSI-fy function declarations.

No functional change.

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

9 years agoMFC r272952:
kib [Sat, 18 Oct 2014 15:31:53 +0000 (15:31 +0000)]
MFC r272952:
Do not set IN_ACCESS flag for read-only mounts.

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

9 years agoMFC r272534:
kib [Sat, 18 Oct 2014 15:28:01 +0000 (15:28 +0000)]
MFC r272534:
Add IO_RANGELOCKED flag for vn_rdwr(9), which specifies that vnode is
not locked, but range is.

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

9 years agoMFC r273135:
hselasky [Sat, 18 Oct 2014 07:07:34 +0000 (07:07 +0000)]
MFC r273135:
Update the OFED Linux compatibility layer and
Mellanox hardware driver(s):

- Properly name an inclusion guard
- Fix compile warnings regarding unsigned enums
- Add two new sysctl nodes
- Remove all empty linux header files
- Make an error printout more verbose
- Use "mod_delayed_work()" instead of
  cancelling and starting a timeout.
- Implement more Linux scatterlist
  functions.

Sponsored by: Mellanox Technologies

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

9 years agoMFC r273112: Set the DROP_EN bit before the RX queue is brought up and active.
adrian [Sat, 18 Oct 2014 01:02:30 +0000 (01:02 +0000)]
MFC r273112: Set the DROP_EN bit before the RX queue is brought up and active.

He noticed issues setting this bit in SRRCTL after the queue was up,
so doing it from the sysctl handler isn't enough and may not actually
work correctly.

This commit doesn't remove the sysctl path or try to change its
behaviour.  I'll talk with others about how to finish fixing that
before I tackle that.

PR:           kern/194311
Submitted by: luigi
MFC after:    3 days
Sponsored by: Norse Corp, Inc

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

9 years agoMFC 268369,268817,272771,272772:
jhb [Fri, 17 Oct 2014 20:03:01 +0000 (20:03 +0000)]
MFC 268369,268817,272771,272772:
Rewrite timeout(9) to be callout(9)-centric instead.  Move the description
of timeout(9) to the end and mark it prominently as deprecated.  Document
somewhat how times are specified for the 'sbt' variants.  Better explain
how using callout_init_*() to associate a lock with a callout resolves
common races.

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

9 years agoMFC 272668:
jhb [Fri, 17 Oct 2014 19:55:12 +0000 (19:55 +0000)]
MFC 272668:
Properly set the timeout in a query_state.  The global query_timeout
configuration value is an integer count of seconds, it is not a timeval.
Using memcpy() to copy a timeval from it put garbage into the tv_usec
field.

PR: 194025

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

9 years agoMFC 272449:
jhb [Fri, 17 Oct 2014 19:28:21 +0000 (19:28 +0000)]
MFC 272449:
Require p_cansched() for changing a process' protection status via
procctl() rather than p_cansee().

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

9 years agoMFC r257302 by rea:
emaste [Fri, 17 Oct 2014 16:23:36 +0000 (16:23 +0000)]
MFC r257302 by rea:

  binutils/bfd: fix printf-like format strings for "bfd *" arguments

  There is a special format argument '%B' that directly handles values
  of type 'bfd *', they must be used instead of '%s'.  Manifestations
  of this bug can be seen in ld(1) error messages, for example,
    http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html
    http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html

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

9 years agoMFC 272182:
jhb [Fri, 17 Oct 2014 15:29:47 +0000 (15:29 +0000)]
MFC 272182:
Don't panic if a resource is allocated twice.  Instead, print a warning and
fail the allocation request.  Allocations of "reserved" resources such as
PCI BARs already fail the request instead of panic'ing in this case.

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

9 years agoMFC r273093, r273096:
gjb [Thu, 16 Oct 2014 23:16:26 +0000 (23:16 +0000)]
MFC r273093, r273096:

r273093:
  Merge the following from ^/projects/release-vmimage:
  r272436, r272437, r272792:

  r272436:
    Remove the first argument to panic(), which was initially
    intended to be the exit code, however when a non-zero exit
    code was returned to release/Makefile, this would prevent
    any remaining (and possibly successful) stages from being
    attempted.

  r272437:

    If the vm-base target fails, prevent the vm-image target
    from being run since it cannot possibly succeed.

  r272792:

    Add /usr/local/bin and /usr/local/sbin to PATH, needed
    if third-party software needs to use utilities outside
    of the base system during post-install stages (indexinfo
    is one culprit).

r273096:
  Merge the following from ^/projects/release-vmimage:
  r273076, r273077, r273079, r273095:

  r273076:
    Add a separate make(1) target to release/Makefile to
    build FreeBSD virtual machine disk images for use on
    the Microsoft Azure service.

    For now, this target is not directly connected to the
    build, however can be manually invoked.

    The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh,
    which does the heavy lifting to produce proper VHDs.
    mk-azure.sh uses a configuration file, defaulting to
    tools/azure.conf if otherwise unset.

  r273077:
    Clear VM_RC_LIST.

  r273079:
    Fix signal list to trigger umount(8).

  r273095:
    Output an informational message when mkimg(1) runs, so it
    does not appear that the process has stopped while waiting
    for a 'y/n' response when waagent is deprovisioned.

Relnotes: yes
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r272583: MFV r272500:
delphij [Thu, 16 Oct 2014 22:44:30 +0000 (22:44 +0000)]
MFC r272583: MFV r272500:

Don't inherit flags other than DS_FLAG_CI_DATASET and DS_FLAG_INCONSISTENT
when cloning.  This prevents DS_FLAG_DEFER_DESTROY being inherited from a
clone that is marked for deferred destroy, which causes snapshots of the
clone being destroyed when getting a hold or clone.

Illumos issue:
    5150 zfs clone of a defer_destroy snapshot causes strangeness

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

9 years agoMFC r272527:
delphij [Thu, 16 Oct 2014 22:40:22 +0000 (22:40 +0000)]
MFC r272527:

Don't make nested definition for range_seg_cache.

Reported by: ian

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

9 years agoMFC r272506: MFV r272495:
delphij [Thu, 16 Oct 2014 22:33:09 +0000 (22:33 +0000)]
MFC r272506: MFV r272495:

In arc_kmem_reap_now(), reap range_seg_cache too to reclaim memory in
response of memory pressure.

Illumos issue:
    5163 arc should reap range_seg_cache

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

9 years agoMFV r273060:
delphij [Thu, 16 Oct 2014 22:12:23 +0000 (22:12 +0000)]
MFV r273060:

Use write_psize instead of write_asize when doing vdev_space_update.
Without this change the accounting of L2ARC usage would be wrong and
give 16EB free space because the number became negative and overflows.

Obtained from:  FreeNAS (issue #6239)

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

9 years agoMerge r272385 by melifaro from head:
glebius [Thu, 16 Oct 2014 20:46:02 +0000 (20:46 +0000)]
Merge r272385 by melifaro from head:
  Free radix mask entries on main radix destroy.
  This is temporary commit to be merged to 10.
  Other approach (like hash table) should be used
  to store different masks.

PR:             194078

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

9 years agoMerge r272358 from head:
glebius [Thu, 16 Oct 2014 20:43:12 +0000 (20:43 +0000)]
Merge r272358 from head:
  Use rn_detachhead() instead of direct free(9) for radix tables.

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

9 years agoMFC r273158:
smh [Thu, 16 Oct 2014 08:33:11 +0000 (08:33 +0000)]
MFC r273158:
Prevent ZFS leaking pool free space

Early MFC approved by re@

Approved by: re@ (glebius)
Sponsored by: Multiplay

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

9 years agoMFC: r272718
jkim [Wed, 15 Oct 2014 20:04:21 +0000 (20:04 +0000)]
MFC: r272718

Make kern.nswbuf tunable from loader.

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

9 years agoMFC: r273144, r273146
jkim [Wed, 15 Oct 2014 19:59:43 +0000 (19:59 +0000)]
MFC: r273144, r273146

Merge OpenSSL 1.0.1j.

Relnotes: yes

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

9 years agoMFC 271721:
jhb [Wed, 15 Oct 2014 19:27:14 +0000 (19:27 +0000)]
MFC 271721:
Explicitly specify MAP_SHARED when mapping the stats file descriptor.

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

9 years agoMFC r272761:
kib [Wed, 15 Oct 2014 14:07:24 +0000 (14:07 +0000)]
MFC r272761:
Add an argument to the x86 pmap_invalidate_cache_range() to request
forced invalidation of the cache range regardless of the presence of
self-snoop feature.

MFC r272943:
MFi386 r272761.

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

9 years agoMFC r272070:
kib [Wed, 15 Oct 2014 13:39:00 +0000 (13:39 +0000)]
MFC r272070:
Expand the libthr(3) manpage to document knobs accepted by libthr.so
and explain some internal working of the library, neccessary to
understand the knobs effects.

MFC r272153 (by pluknet):
Fix description of mutex acquisition.

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

9 years agoMFC r272069:
kib [Wed, 15 Oct 2014 13:36:01 +0000 (13:36 +0000)]
MFC r272069:
Switch the defaults to not split the RLIMIT_STACK-sized initial thread
stack into the stacks of the created threads.  Add knob
LIBPTHREAD_SPLITSTACK_MAIN to restore the older behaviour.

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

9 years agoMFC r272756: Properly report 12Gbps connection rate.
mav [Wed, 15 Oct 2014 08:03:12 +0000 (08:03 +0000)]
MFC r272756:  Properly report 12Gbps connection rate.

Reviewed by: kadesai, slm

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

9 years agoMFC r272749:
ae [Wed, 15 Oct 2014 04:34:07 +0000 (04:34 +0000)]
MFC r272749:
  Fix comment.

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

9 years agoMFC r267851:
pfg [Tue, 14 Oct 2014 23:16:52 +0000 (23:16 +0000)]
MFC r267851:

Continue the crusade towards a dev_clone()-free kernel, removing its
usage from dtrace. The dtrace code already uses cdevpriv(9) since FreeBSD
8, so this change is quite harmless.

Originally by: davide
Reviewed by: markj

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

9 years agoMFC r269023,r272503,r272505,r272523,r272567,r272569,r272574
mjg [Tue, 14 Oct 2014 21:19:23 +0000 (21:19 +0000)]
MFC r269023,r272503,r272505,r272523,r272567,r272569,r272574

Prepare fget_unlocked for reading fd table only once.

Some capsicum functions accept fdp + fd and lookup fde based on that.
Add variants which accept fde.

===============================

Add sequence counters with memory barriers.

Current implementation is somewhat simplistic and hackish,
will be improved later after possible memory barrier overhaul.

===============================

Plug capability races.

fp and appropriate capability lookups were not atomic, which could result in
improper capabilities being checked.

This could result either in protection bypass or in a spurious ENOTCAPABLE.

Make fp + capability check atomic with the help of sequence counters.

===============================

Put and #ifdef _KERNEL around the #include for opt_capsicum.h to
hopefully allow the build to finish after r272505.

===============================

filedesc: fix up breakage introduced in 272505

Include sequence counter supports incoditionally [1]. This fixes reprted build
problems with e.g. nvidia driver due to missing opt_capsicum.h.

Replace fishy looking sizeof with offsetof. Make fde_seq the last member in
order to simplify calculations.

===============================

Keep struct filedescent comments within 80-char limit.

===============================

seq_t needs to be visible to userspace

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