]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r312498:
ngie [Sat, 11 Feb 2017 06:55:35 +0000 (06:55 +0000)]
MFC r312498:

Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This simplifies pathing in make/displayed output

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

7 years agoMFC r312497:
ngie [Sat, 11 Feb 2017 06:54:42 +0000 (06:54 +0000)]
MFC r312497:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

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

7 years agoMFC r312495:
ngie [Sat, 11 Feb 2017 06:51:53 +0000 (06:51 +0000)]
MFC r312495:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

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

7 years agoMFC r312494:
ngie [Sat, 11 Feb 2017 06:51:09 +0000 (06:51 +0000)]
MFC r312494:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

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

7 years agoMFC r312493:
ngie [Sat, 11 Feb 2017 06:50:25 +0000 (06:50 +0000)]
MFC r312493:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

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

7 years agoMFC r312491:
ngie [Sat, 11 Feb 2017 06:47:56 +0000 (06:47 +0000)]
MFC r312491:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312490:
ngie [Sat, 11 Feb 2017 06:47:07 +0000 (06:47 +0000)]
MFC r312490:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312489:
ngie [Sat, 11 Feb 2017 06:46:16 +0000 (06:46 +0000)]
MFC r312489:

Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

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

7 years agoMFC r312486:
ngie [Sat, 11 Feb 2017 06:44:16 +0000 (06:44 +0000)]
MFC r312486:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312485:
ngie [Sat, 11 Feb 2017 06:42:56 +0000 (06:42 +0000)]
MFC r312485:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312483:
ngie [Sat, 11 Feb 2017 06:41:07 +0000 (06:41 +0000)]
MFC r312483:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312482:
ngie [Sat, 11 Feb 2017 06:40:27 +0000 (06:40 +0000)]
MFC r312482:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312481:
ngie [Sat, 11 Feb 2017 06:39:47 +0000 (06:39 +0000)]
MFC r312481:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312480:
ngie [Sat, 11 Feb 2017 06:39:04 +0000 (06:39 +0000)]
MFC r312480:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312479:
ngie [Sat, 11 Feb 2017 06:38:22 +0000 (06:38 +0000)]
MFC r312479:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312477:
ngie [Sat, 11 Feb 2017 06:37:24 +0000 (06:37 +0000)]
MFC r312477:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312475:
ngie [Sat, 11 Feb 2017 06:36:12 +0000 (06:36 +0000)]
MFC r312475:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312474:
ngie [Sat, 11 Feb 2017 06:35:29 +0000 (06:35 +0000)]
MFC r312474:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312473:
ngie [Sat, 11 Feb 2017 06:33:46 +0000 (06:33 +0000)]
MFC r312473:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312472:
ngie [Sat, 11 Feb 2017 06:32:48 +0000 (06:32 +0000)]
MFC r312472:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312471:
ngie [Sat, 11 Feb 2017 06:32:05 +0000 (06:32 +0000)]
MFC r312471:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312470:
ngie [Sat, 11 Feb 2017 06:31:26 +0000 (06:31 +0000)]
MFC r312470:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312469:
ngie [Sat, 11 Feb 2017 06:30:25 +0000 (06:30 +0000)]
MFC r312469:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312468:
ngie [Sat, 11 Feb 2017 06:27:42 +0000 (06:27 +0000)]
MFC r312468:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312467:
ngie [Sat, 11 Feb 2017 06:25:47 +0000 (06:25 +0000)]
MFC r312467:

Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

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

7 years agoMFC r312466:
ngie [Sat, 11 Feb 2017 06:23:07 +0000 (06:23 +0000)]
MFC r312466:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312465:
ngie [Sat, 11 Feb 2017 06:22:29 +0000 (06:22 +0000)]
MFC r312465:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312464:
ngie [Sat, 11 Feb 2017 06:21:38 +0000 (06:21 +0000)]
MFC r312464:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312463:
ngie [Sat, 11 Feb 2017 06:19:25 +0000 (06:19 +0000)]
MFC r312463:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoUnbreak the build after ^/stable/10@r313571
ngie [Sat, 11 Feb 2017 06:17:10 +0000 (06:17 +0000)]
Unbreak the build after ^/stable/10@r313571

Update FILES per tests removed in beforementioned commit, which were
accidentally overlooked, no doubt due to conflicts after base packaging
work.

This is a direct commit to ^/stable/10

Reported by: Jenkins (FreeBSD-stable-10-amd64-build job)

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

7 years agoMFC r312462:
ngie [Sat, 11 Feb 2017 05:59:39 +0000 (05:59 +0000)]
MFC r312462:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312461:
ngie [Sat, 11 Feb 2017 05:58:20 +0000 (05:58 +0000)]
MFC r312461:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312460:
ngie [Sat, 11 Feb 2017 05:57:35 +0000 (05:57 +0000)]
MFC r312460:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312459:
ngie [Sat, 11 Feb 2017 05:56:48 +0000 (05:56 +0000)]
MFC r312459:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312458:
ngie [Sat, 11 Feb 2017 05:55:25 +0000 (05:55 +0000)]
MFC r312458:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312457:
ngie [Sat, 11 Feb 2017 05:53:13 +0000 (05:53 +0000)]
MFC r312457:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312456:
ngie [Sat, 11 Feb 2017 05:52:13 +0000 (05:52 +0000)]
MFC r312456:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312455:
ngie [Sat, 11 Feb 2017 05:47:56 +0000 (05:47 +0000)]
MFC r312455:

Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

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

7 years agoMFC r312454:
ngie [Sat, 11 Feb 2017 05:45:00 +0000 (05:45 +0000)]
MFC r312454:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312453:
ngie [Sat, 11 Feb 2017 05:43:34 +0000 (05:43 +0000)]
MFC r312453:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r312452:
ngie [Sat, 11 Feb 2017 05:41:53 +0000 (05:41 +0000)]
MFC r312452:

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

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

7 years agoMFC r310866,310868,310870,311903,313074:
mm [Sat, 11 Feb 2017 00:56:18 +0000 (00:56 +0000)]
MFC r310866,310868,310870,311903,313074:
Sync libarchive with vendor.

MFC r310866:
  PR #771: Add NFSv4 ACL support to pax and restricted pax

  NFSv4 ACL information may now be stored to and restored from tar archives.
  ACL must be non-trivial and supported by the underlying filesystem, e.g.
  natively by ZFS or by UFS with the NFSv4 ACL enable flag set.

MFC r310868:
  PR #843: Fix memory leak of struct archive_entry in cpio/cpio.c
  PR #851: Spelling fixes
  Fix two protoypes in manual page archive_read_disk.3

MFC r310870:
  Use __LA_DEPRECATED macro with functions deprecated in 379867e

MFC r311903:
  #691: Support for SCHILY.xattr extended attributes
  #854: Spelling fixes

  Multiple fixes in ACL code:
  - prefer acl_set_fd_np() to acl_set_fd()
  - if acl_set_fd_np() fails, do no fallback to acl_set_file()
  - do not warn if trying to write ACLs to a filesystem without ACL support
  - fix id handling in archive_acl_(from_to)_text*() for NFSv4 ACLs

MFC r313074:
  - support extracting NFSv4 ACLs from Solaris tar archives
  - bugfixes and optimizations in the ACL code
  - multiple fixes in the test suite
  - typo and other small bugfixes

  Security fixes:
  - cab reader: endless loop when parsing MSZIP signature (OSS-Fuzz 335)
  - LHA reader: heap-buffer-overflow in lha_read_file_header_1()
    (CVE-2017-5601)
  - LZ4 reader: null-pointer dereference in lz4_filter_read_legacy_stream()
    (OSS-Fuzz 453)
  - mtree reader: heap-buffer-overflow in detect_form() (OSS-Fuzz 421, 443)
  - WARC reader: heap-buffer-overflow in xstrpisotime() (OSS-Fuzz 382, 458)

  Memory leak fixes:
  - ACL support: free memory allocated by acl_get_qualifier()
  - disk writer: missing free in create_filesystem_object()
  - file reader: fd leak (Coverity 1016755)
  - gnutar writer: fix free in archive_write_gnutar_header()
    (Coverity 101675)
  - iso 9660 reader: missing free in parse_file_info()
    (partial Coverity 1016754)
  - program reader: missing free in __archive_read_program()
  - program writer: missing free in __archive_write_program_free()
  - xar reader: missing free in xar_cleanup()
  - xar reader: missing frees in expat_xmlattr_setup()
    (Coverity 1229979-1229981)
  - xar writer: missing free in file_free()
  - zip reader: missing free in zip_read_local_file_header()

List of all libarchive issues at OSS-Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=libarchive

Security: CVE-2017-5601

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

7 years agoMFC r313401
vangyzen [Fri, 10 Feb 2017 16:11:11 +0000 (16:11 +0000)]
MFC r313401

Fix garbage IP addresses in UDP log_in_vain messages

If multiple threads emit a UDP log_in_vain message concurrently,
or indeed call inet_ntoa() for any other reason,
the IP addresses could be garbage due to concurrent usage of a
single string buffer inside inet_ntoa().  Use inet_ntoa_r() with
two stack buffers instead.

Relnotes: yes
Sponsored by: Dell EMC

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

7 years agoMFC r308312: vidcontrol: improve error handling in vt(4) font loading
emaste [Fri, 10 Feb 2017 15:02:56 +0000 (15:02 +0000)]
MFC r308312: vidcontrol: improve error handling in vt(4) font loading

PR: 209078

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

7 years agoMFC r290101 (by hselasky):
kib [Fri, 10 Feb 2017 14:38:28 +0000 (14:38 +0000)]
MFC r290101 (by hselasky):
Build fix for i386/XBOX and pc98/GENERIC.

Reported by: ngie

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

7 years agoMFC r311925,r311968,r311969,r312008:
ngie [Fri, 10 Feb 2017 07:13:16 +0000 (07:13 +0000)]
MFC r311925,r311968,r311969,r312008:

r311925:

Import testcase updates with code contributed back to NetBSD

This also (inadvertently) contains an update to
contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases).

In collaboration with: christos@NetBSD.org

r311968:

Fix lib/libc/sys/access_test after r311925

sys/param.h needs to be #included in order for __FreeBSD_version to be checked

r311969:

Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile

This is to enable support in other testcases

Inspired by lib/msun/tests/Makefile .

r312008:

Upgrade NetBSD tests to 01.11.2017_23.20 snapshot

This contains some new testcases in /usr/tests/...:

- .../lib/libc
- .../lib/libthr
- .../lib/msun
- .../sys/kern

Tested on: amd64, i386

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

7 years agoMFC r274583: Default to use 10 seconds as nap interval instead of 1.
delphij [Fri, 10 Feb 2017 06:58:18 +0000 (06:58 +0000)]
MFC r274583: Default to use 10 seconds as nap interval instead of 1.
(the mergeinfo portion; actual code changes were committed from wrong
directory).

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

7 years agoMFC r274583: Default to use 10 seconds as nap interval instead of 1.
delphij [Fri, 10 Feb 2017 06:53:48 +0000 (06:53 +0000)]
MFC r274583: Default to use 10 seconds as nap interval instead of 1.

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

7 years agoMFC r306349:
ngie [Fri, 10 Feb 2017 06:34:52 +0000 (06:34 +0000)]
MFC r306349:
r306349 (by pfg):

hash(3): protect in-memory page when using cross-endianness.

When writing out pages in the "other endian" format, make a copy
instead of trashing the in-memory one.

Obtained from: NetBSD (CVS rev. 1.29)

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

7 years agoMFC r296944:
ngie [Fri, 10 Feb 2017 05:42:06 +0000 (05:42 +0000)]
MFC r296944:

This unbreaks ia64.LINT

r296944 (by imp):

Fix debug printf

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

7 years agoMFC r311993:
ngie [Fri, 10 Feb 2017 05:35:30 +0000 (05:35 +0000)]
MFC r311993:
r311993 (by kan):

Fix typo in r311971.

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

7 years agoMFC r286536:
ngie [Fri, 10 Feb 2017 04:28:44 +0000 (04:28 +0000)]
MFC r286536:

This unbreaks "make installworld" for me on ^/stable/10

r286536 (by imp):

cmp and cp are used by the kerberos install, so need to be imclided in
ITOOLS. They are tiny enough that I'm not making conditional: the
minuscule savings in disk space isn't worth the obfuscation of
Makefile.inc1.

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

7 years agoMFC r311229,r311244:
ngie [Fri, 10 Feb 2017 03:28:03 +0000 (03:28 +0000)]
MFC r311229,r311244:

r311229:

humanize_number_basic: don't leak buf

CID: 1251407

r311244:

mmap_prot_3, mmap_truncate, mmap_truncate_signal: don't leak fd and map

CID: 978306, 125140612881961300541

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

7 years agoMFC r311233,r311377:
ngie [Fri, 10 Feb 2017 03:22:00 +0000 (03:22 +0000)]
MFC r311233,r311377:

r311233:

Fix Coverity issues

- Initialize .sun_len before passing it to strlcpy and bind.
- Close fd on error

CID: 978283, 979581

r311377:

Redo fix for CID 979581

The previous change was flawed in terms of how it calculated the
buffer length for the sockaddr_un object. Use SUN_LEN where
appropriate and mute the Coverity complaint by using memset(.., 0, ..)
to zero out the entire structure instead of setting .sun_len to a bogus
value and strlcpy'ing in the contents of argv[1].

SUN_LEN is now being passed to bind(2) as well. For some odd reason
this wasn't flagged as a bug with Coverity.

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

7 years agoMFC r307702:
ngie [Fri, 10 Feb 2017 03:17:11 +0000 (03:17 +0000)]
MFC r307702:

Integrate contrib/netbsd-tests/fs/tmpfs into the FreeBSD test suite
as tests/sys/fs

These testcases exercise tmpfs support

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

7 years agoMFC r309774,r309778,r309779,r309780:
ngie [Fri, 10 Feb 2017 03:04:42 +0000 (03:04 +0000)]
MFC r309774,r309778,r309779,r309780:

r309774:

Only run mdconfig -d -u 3 if /dev/md3 exists on the system

This will prevent "cleanup failures" (exit code != 0 returned) when
tmpfs is not loaded

r309778:

Make test_unmount usable in cleanup subroutines

- Duplicate test_unmount to _test_unmount
- Remove atf_check calls
- Call _test_unmount from test_unmount, checking the exit code
  at the end, and returning it to maintain the test_unmount
  "contract"

r309779:

- Ignore errors from umount
- Use _test_unmount instead of test_unmount in cleanup

r309780:

Use _test_unmount instead of test_unmount in cleanup to avoid
false positives with atf_check when tmpfs is not loaded, etc

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

7 years agoMFC r309373:
ngie [Fri, 10 Feb 2017 02:57:37 +0000 (02:57 +0000)]
MFC r309373:
r309373 (by bdrewery):

Fix setrlimit_test:setrlimit_memlock when the system has exceeded vm.max_wired.

This uses the same fix as r294894 did for the mlock test.  The code from
that commit is moved into a common object file which PROGS supports
building first.

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

7 years agoMFC r307701:
ngie [Fri, 10 Feb 2017 02:55:33 +0000 (02:55 +0000)]
MFC r307701:

Expect tests/sys/fs/tmpfs/link_test:kqueue to fail

It fails with: "dir/b did not receive NOTE_LINK"

Also, add needed cleanup logic to cleanup the mountpoint after the fact

PR: 213662

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

7 years agoMFC r307553,r307583:
ngie [Fri, 10 Feb 2017 02:53:16 +0000 (02:53 +0000)]
MFC r307553,r307583:

r307553 (by br):

Skip test on MIPS as it modifies TLS pointer in set_mcontext().

Discussed with: kib

r307583 (by br):

Skip test on FreeBSD only. So test can be upstreamed to NetBSD.

Requested by: ngie

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

7 years agoMFC r307190,r307196,r307204,r307205:
ngie [Fri, 10 Feb 2017 02:51:53 +0000 (02:51 +0000)]
MFC r307190,r307196,r307204,r307205:

r307190:

Skip :uchg on FreeBSD

Unfortunately removing files with uchg set always succeeds with root on
FreeBSD. Unfortunately running the test as an unprivileged user isn't doable
because mounting tmpfs requires root

PR: 212861

r307196:

Port contrib/netbsd-tests/fs/tmpfs/h_tools.c to FreeBSD

- Add inttypes.h #include for PRId64 macro
- Use FreeBSD's copy of getfh(2), which doesn't include a `fh_size` parameter.
  Use sizeof(fhandle_t) instead as the size of fhp is always fixed as
  fhandle_t, unlike NetBSD's copy of fhp, which is void*.

r307204:

Expect :large to fail on FreeBSD

FreeBSD doesn't appear to validate large -o size values like
NetBSD does

PR: 212862

r307205:

Change atf_skip call to atf_expect_fail to make it clear that a failure is
expected

PR: 212861
Suggested by: jmmv

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

7 years agoMFC r306784:
ngie [Fri, 10 Feb 2017 02:48:24 +0000 (02:48 +0000)]
MFC r306784:
r306784 (by emaste):

Add test for a musl libc memmem bug

With a short needle (aka little) musl's memmem could read past the end
of the haystack (aka big). This was fixed in musl commit c718f9f.

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

7 years agoMFC r306038:
ngie [Fri, 10 Feb 2017 02:47:32 +0000 (02:47 +0000)]
MFC r306038:

Port vnd_test to FreeBSD

Use mdmfs/mdconfig instead of vndconfig/newfs. vndconfig doesn't exist on FreeBSD.

TODO: need to parameterize out the md(4) device as it's currently hardcoded to "3"
(in both the FreeBSD and NetBSD cases).

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

7 years agoMFC r303840:
ngie [Fri, 10 Feb 2017 02:44:09 +0000 (02:44 +0000)]
MFC r303840:
r303840 (by jhb):

Add timer_settime tests using SIGEV_THREAD.

Note that these tests should work fine on NetBSD and other systems as
SIGEV_THREAD is POSIX.

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

7 years agoMFC r301753:
ngie [Fri, 10 Feb 2017 02:41:33 +0000 (02:41 +0000)]
MFC r301753:

Fix up r274061

Detect /usr/share/dict/words the "right way" by using require.files instead of
the hacked up attempt in the dict(..) function, which didn't work properly on
systems where MK_DICT == no.

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

7 years agoMFC r288444:
ngie [Fri, 10 Feb 2017 02:37:42 +0000 (02:37 +0000)]
MFC r288444:

This change has no functional impact on ^/stable/10 because arm64 isn't
supported on 10.x, but it is being done to ease additional backports in
this test

r288444 (by andrew):

Pass 8 arguments to makecontext on arm64 as this is all we support.

Obtained from: EuroBSDCon Devsummit

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

7 years agoMFC r305468:
ngie [Fri, 10 Feb 2017 02:29:39 +0000 (02:29 +0000)]
MFC r305468:

Port contrib/netbsd-tests/kernel/kqueue/... as tests/sys/kqueue/...

proc2_test must be skipped because the invariant tested
(`ke.fflags & NOTE_TRACKERR`) doesn't pass.

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

7 years agoRemove EVFILT_PROCDESC block
ngie [Fri, 10 Feb 2017 02:29:09 +0000 (02:29 +0000)]
Remove EVFILT_PROCDESC block

This reapplies the patch that was done in ^/stable/10@r297977

This is a direct commit to ^/stable/10

Sponsored by: Dell EMC Isilon

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

7 years agoMFC r304797,r305467:
ngie [Fri, 10 Feb 2017 02:21:57 +0000 (02:21 +0000)]
MFC r304797,r305467:

r304797 (by jmmv):

Make use of Kyua's work directories.

Change the vnode tests to use the current directory when creating temporary
files, which we can assume is a volatile work directory, and then make the
kqueue_test.sh driver _not_ abandon the directory created by Kyua.

This makes the various kqueue tests independent of each other, and ensures
the temporary file is cleaned up on failure.

Problem spotted by asomers@ when reviewing D4254.

r305467:

Move tests/sys/kqueue/... to tests/sys/kqueue/libkqueue/...

This is being done to clearly distinguish the libkqueue tests
from the (soon to be imported) NetBSD tests.

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

7 years agoRecord mergeinfo for r288682 and r288683 (items that should never be MFCed)
ngie [Fri, 10 Feb 2017 01:59:35 +0000 (01:59 +0000)]
Record mergeinfo for r288682 and r288683 (items that should never be MFCed)

No net change

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

7 years agoExpect :raw to fail with a SIGSEGV on ^/stable/10
ngie [Fri, 10 Feb 2017 01:26:49 +0000 (01:26 +0000)]
Expect :raw to fail with a SIGSEGV on ^/stable/10

I haven't fully dug into why this happens, but it happens
deterministically on ^/stable/10, but not on ^/stable/11 or
^/head

PR: 216954
Sponsored by: Dell EMC Isilon

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

7 years agoMFC r305358,r305449,r305451,r306367,r306397,r309474:
ngie [Fri, 10 Feb 2017 01:13:12 +0000 (01:13 +0000)]
MFC r305358,r305449,r305451,r306367,r306397,r309474:

This also contains a merge of ^/projects/netbsd-tests-update-12@r304035 .
This change never hit ^/head because bin/cat's behavior was changed (on ^/head)
to match NetBSD.

PR: 210607

r305358:

Update contrib/netbsd-tests with new content from NetBSD

This updates the snapshot from 09/30/2014 to 08/11/2016

This brings in a number of new testcases from upstream, most
notably:

- bin/cat
- lib/libc
- lib/msun
- lib/libthr
- usr.bin/sort

lib/libc/tests/stdio/open_memstream_test.c was moved to
lib/libc/tests/stdio/open_memstream2_test.c to accomodate
the new open_memstream test from NetBSD.

Tested on: amd64 (VMware fusion VM; various bare metal platforms); i386 (VMware fusion VM); make tinderbox

r305449:

Install h_db to unbreak some of the lib/libc/db testcases after
r305358

r305451:

Fix lib/libc/rpc test assumptions added in r305358

- Require root in the tcp/udp subtests (it's needed on FreeBSD when
  registering services).
- Skip the tests if service registration fails.

r306367 (by br):

Allow up to 6 arguments only on MIPS.

r306397 (by br):

Use right piece of code for FreeBSD.

r309474:

Don't build :strvis_locale if VIS_NOLOCALE is undefined

The copy of contrib/libc-vis on ^/stable/10 doesn't contain all of the features
in the ^/stable/11 // ^/head version, including VIS_NOLOCALE. The risk is lower
in conditionally running the test instead of backporting the newer version of
libc-vis

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

7 years agoMFC r296586:
ngie [Thu, 9 Feb 2017 22:57:56 +0000 (22:57 +0000)]
MFC r296586:
r296586 (by bdrewery):

Fix and connect setjmp test.

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

7 years agoMFC r289172,r290254:
ngie [Thu, 9 Feb 2017 22:49:48 +0000 (22:49 +0000)]
MFC r289172,r290254:

r289172:

Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)

- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity

r290254:

Remove unused variable (SRCDIR)

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

7 years agoMFC r274138,r274149:
ngie [Thu, 9 Feb 2017 22:14:17 +0000 (22:14 +0000)]
MFC r274138,r274149:

r274138 (by des):

Hook up OpenPAM's own unit tests to the build.

r274149 (by markj):

Create a directory for the PAM tests.

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

7 years agoMFC r258903,r264487,r271699,r288415:
ngie [Thu, 9 Feb 2017 22:04:56 +0000 (22:04 +0000)]
MFC r258903,r264487,r271699,r288415:

r258903 (by markj):

Enable some previously-disabled DTrace tests for umod, ufunc and usym. They
expect the installed ksh binary to be named "ksh", which is not the case
when it's installed on FreeBSD via the shells/ksh93 port. Allow for it to be
"ksh93" as well so that the tests can actually pass.

r264487 (by markj):

Replace a few Solarisisms with their corresponding FreeBSDisms to make a few
printf tests pass.

r271699 (by markj):

Implement a workaround to allow this test program to be compiled with clang.
It seems that if a pragma is used to define a weak alias for a local
function, the pragma must appear after the function is defined.

PR: 193056

r288415 (by markj):

MFV r288408:
6266 harden dtrace_difo_chunksize() with respect to malicious DIF

illumos/illumos-gate@395c7a3dcfc66b8b671dc4b3c4a2f0ca26449922

Author: Bryan Cantrill <bryan@joyent.com>

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

7 years agoMFC r277912,r278738,r279418,r280835,r288416:
ngie [Thu, 9 Feb 2017 21:54:18 +0000 (21:54 +0000)]
MFC r277912,r278738,r279418,r280835,r288416:

r277912 (by markj):

Include required headers in DTrace test programs.

r278738 (by markj):

Tweak the fds test program so that it actually compiles. Also use 0 instead
of -1 for the bogus ioctl command so that dmesg doesn't get spammed with
sign extension warnings when the test program runs.

r279418 (by markj):

Add infrastructure to integrate the DTrace test suite with Kyua.

For each test category, we generate a script containing ATF test cases for
the tests under that category. Each test case simply runs dtest.pl (the
upstream test harness) with the corresponding test files. The exclude.sh
script is used to record info about tests which should be skipped or are
expected to fail; it is used to generate atf_skip and atf_expect_fail calls.
The genmakefiles.sh script can be used to regenerate the test makefiles when
new tests are brought it from upstream.

The test suite is currently not connected to the build as there is a small
number of lingering test issues which still need to be worked out. In the
meantime however, the test suite can be easily built and installed
manually from cddl/usr.sbin/dtrace/tests.

r280835 (by markj):

Replace dtest.pl, the upstream DTrace test suite harness, with a shell
script. This reimplementation is much simpler than dtest.pl and is more
amenable to being run under Kyua - dtest.pl writes error output to a
temporary directory that is deleted when the run finishes, making it hard
to debug test failures. This change also removes the test suite's dependency
on perl.

r288416 (by markj):

Update DTrace test makefiles after r288415.

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

7 years agoRecord r286620 and r286638 as having been MFCed
ngie [Thu, 9 Feb 2017 21:37:36 +0000 (21:37 +0000)]
Record r286620 and r286638 as having been MFCed

No net change

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

7 years agoMFC r276527:
ngie [Thu, 9 Feb 2017 21:29:18 +0000 (21:29 +0000)]
MFC r276527:

Don't install h_raw if dealing with clang 3.5.0+ to unbreak the tests2 Jenkins
job

The h_raw application doesn't do proper bounds checking without the option
being supplied via the build, which means that it doesn't throw signals and
fail as expected

PR: 196430

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

7 years agoMFC r277648:
ngie [Thu, 9 Feb 2017 21:26:14 +0000 (21:26 +0000)]
MFC r277648:
r277648 (by jilles):

Enable utimensat tests from NetBSD.

As with other tests from c063, a required #include <sys/stat.h> was missing.

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

7 years agoMFC r283584:
ngie [Thu, 9 Feb 2017 21:23:41 +0000 (21:23 +0000)]
MFC r283584:

Relnotes: yes

r283584 (by emaste):

memmem(3): empty little string matches the beginning of the big string

This function originated in glibc, and this matches their behaviour
(and NetBSD, OpenBSD, and musl).

An empty big string (arg "l") is handled by the existing
l_len < s_len test.

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

7 years agoMFC r279154,r279397:
ngie [Thu, 9 Feb 2017 21:19:24 +0000 (21:19 +0000)]
MFC r279154,r279397:

r279154 (by jilles):

nice(): Correct return value and [EPERM] error.

PR: 189821
Obtained from: NetBSD
Relnotes: yes

r279397 (by jilles):

nice(): Put back old return value, keeping [EPERM] error.

Commit r279154 changed the API and ABI significantly, and {NZERO} is still
wrong.

Also, preserve errno on success instead of setting it to 0.

PR: 189821
Relnotes: yes

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

7 years agoMFC r305483,r306030,r306031,r306033,r306036:
ngie [Thu, 9 Feb 2017 21:12:26 +0000 (21:12 +0000)]
MFC r305483,r306030,r306031,r306033,r306036:

r305483:

Fix tests/sys/kqueue NetBSD tests on 32-bit platforms by using proper
format specifier for pointers when printing them out with printf(3)

Pointyhat to: ngie

r306030:

Port vnode_leak_test:main to FreeBSD

Use a simpler way of dumping kern.maxvnodes, i.e. `sysctl -n kern.maxvnodes`

The awk filtering method employed in NetBSD doesn't work on FreeBSD

r306031:

Port contrib/netbsd-tests/fs/h_funcs.subr to FreeBSD

Use kldstat -m to determine whether or not a filesystem is loaded. This works
well with tmpfs, ufs, and zfs

r306033:

Port sizes_test and statvfs_test to FreeBSD

Similar to r306030, use a simpler method for getting the value of
`hw.pagesize`, i.e. `sysctl -n hw.pagesize`. The awk filtering method doesn't
work on FreeBSD

r306036:

Port to mknod_test and readdir_test to FreeBSD

The `mknod <file> p` command doesn't exist on FreeBSD, like on NetBSD. Use
mkfifo instead to create named pipes (FIFOs).

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

7 years agoMFC r313109:
kib [Thu, 9 Feb 2017 04:45:18 +0000 (04:45 +0000)]
MFC r313109:
Use ANSI definitions for some i386 functions.

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

7 years agoMFC r312791:
cy [Thu, 9 Feb 2017 02:08:42 +0000 (02:08 +0000)]
MFC r312791:

Use normal KNF cuddling of elses.

Reported by: bde

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

7 years agoMFC r312767: Partially workaround ASMedia HBA error recovery.
mav [Wed, 8 Feb 2017 16:07:59 +0000 (16:07 +0000)]
MFC r312767: Partially workaround ASMedia HBA error recovery.

Taking closer look on my ASM1062 I found that it has bunch of issues around
error recovery: reported wrong CCS, failed commands reported as completed,
READ LOG EXT times out after NCQ error.  This patch workarounds first two
problems, that were making ATAPI devices close to unusable on these HBAs.

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

7 years agoMFC r312750: Add Timeout and Protect mode page description from MMC-6.
mav [Wed, 8 Feb 2017 16:01:14 +0000 (16:01 +0000)]
MFC r312750: Add Timeout and Protect mode page description from MMC-6.

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

7 years agoMFC r312777, r312780:
cy [Wed, 8 Feb 2017 13:37:57 +0000 (13:37 +0000)]
MFC r312777, r312780:

Issue an error message when an incorrect flush argument is encountered
(and style fixup).

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

7 years agoMFC r304142: ensure stripe size is non-zero multiple of 4096
rpokala [Wed, 8 Feb 2017 08:37:43 +0000 (08:37 +0000)]
MFC r304142: ensure stripe size is non-zero multiple of 4096

Ensure that the sector size is a multiple of 4096 to avoid creating
unaligned partitions when the actual sector size is hidden from us.

NOTE: This change was MFCed to stable/11 months ago as as r304448; I'm just
MFCing it back one more stream.

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

7 years agoMFC r312392:
ngie [Wed, 8 Feb 2017 08:35:05 +0000 (08:35 +0000)]
MFC r312392:

Use SRCTOP instead of .CURDIR-relative path in .PATH directive

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

7 years agoMFC r312544
rstone [Tue, 7 Feb 2017 15:12:27 +0000 (15:12 +0000)]
MFC r312544

  Fix reference to free memory in ixgbe/if_media.c

  When ixgbe receives an interrupt indicating that a new optical module
  may have been inserted, it discards all of its current media types
  by calling ifmedia_removeall() and then creates a new set of media
  types for the supported media on the new module.  However,
  ifmedia_removeall() was maintaining a pointer to whatever the
  current media type was before the call to ifmedia_removealL().
  The result of this was that any attempt to read the current media
  type of the interface (e.g. via ifconfig) would return potentially
  garbage data from free memory (or if one were particularly unlucky
  on an architecture that does not malloc() from a direct map, page
  fault the kernel).

  Fix this by NULL'ing out the current media field in if_media.c,
  and have ixgbe update the current media type after recreating
  them.

  Submitted by: Matt Joras <matt.joras AT gmail DOT com>
  Reviewed by:  sbruno, erj
  MFC after:    1 week
  Sponsored by: Dell EMC Isilon
  Differential Revision:        https://reviews.freebsd.org/D9164

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

7 years agoMFC r313249:
kib [Tue, 7 Feb 2017 08:33:46 +0000 (08:33 +0000)]
MFC r313249:
Style, use tab after #define.

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

7 years agoMFC r312694: Make CTL ramdisk backend a real RAM disk.
mav [Tue, 7 Feb 2017 01:58:02 +0000 (01:58 +0000)]
MFC r312694: Make CTL ramdisk backend a real RAM disk.

If "capacity" LU option is set, ramdisk backend now implements featured
thin provisioned disk, storing data in malloc(9) allocated memory blocks
of pblocksize bytes (default PAGE_SIZE or 4KB).  Additionally ~0.2% of LU
size is used for indirection tree (bigger pblocksize reduce the overhead).
Backend supports all unmap and anchor operations.  If configured capacity
is overflowed, proper error conditions are reported.

If "capacity" LU option is not set, the backend operates mostly the same
as before without allocating real storage: writes go to nowhere, reads
return zeroes, reporting that all LBAs are unmapped.

This backend is still mostly oriented on testing and benchmarking (it is
still a volatile RAM disk), but now it should allow to run real FS tests,
not only simple dumb dd.

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

7 years agoMFC r312603: Add initial support for CTL module unloading.
mav [Tue, 7 Feb 2017 01:56:26 +0000 (01:56 +0000)]
MFC r312603: Add initial support for CTL module unloading.

It is only a first step and not perfect, but better then nothing.
The main blocker is CAM target frontend, that can not be unloaded,
since CAM does not have mechanism to unregister periph driver now.

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

7 years agoMFC r312348: Remove writing 'residual' field of struct ctl_scsiio.
mav [Tue, 7 Feb 2017 01:44:18 +0000 (01:44 +0000)]
MFC r312348: Remove writing 'residual' field of struct ctl_scsiio.

This field has no practical use and never readed.  Initiators already
receive respective residual size from frontends.  Removed field had
different semantics, which looks useless, and was never passed through
by any frontend.

While there, fix kern_data_resid field support in case of HA, missed in
r312291.

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

7 years agoMFC r312291, r312669:
mav [Tue, 7 Feb 2017 01:42:53 +0000 (01:42 +0000)]
MFC r312291, r312669:
Make CTL frontends report kern_data_resid for under-/overruns.

It seems like kern_data_resid was never really implemented.  This change
finally does it.  Now frontends update this field while transferring data,
while CTL/backends getting it can more flexibly handle the result.
At this point behavior should not change significantly, still reporting
errors on write overrun, but that may be changed later, if we decide so.

CAM target frontend still does not properly handle overruns due to CAM API
limitations.  We may need to add some fields to struct ccb_accept_tio to
pass information about initiator requested transfer size(s).

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

7 years agoMFC r312343: Improve error message on duplicate iSCSI port.
mav [Tue, 7 Feb 2017 01:39:25 +0000 (01:39 +0000)]
MFC r312343: Improve error message on duplicate iSCSI port.

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

7 years agoMFC r312982:
cy [Mon, 6 Feb 2017 13:32:22 +0000 (13:32 +0000)]
MFC r312982:

Correct comment grammar and make it easier to understand.

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

7 years agoMFC r312663: When creating record file, use umask 077 instead of the default.
delphij [Mon, 6 Feb 2017 05:34:47 +0000 (05:34 +0000)]
MFC r312663: When creating record file, use umask 077 instead of the default.

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

7 years agoMFC r312667:
pfg [Mon, 6 Feb 2017 05:27:05 +0000 (05:27 +0000)]
MFC r312667:
sort - Don't live-loop threads.

Worker threads now use a pthread_cond_t to wait for work instead of
burning the cpu up.

Obtained from: DragonflyBSD (07774aea0ccf64a48fcfad8899e3bf7c8f18277a)

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

7 years agoMFC r312664: Always initialize 'c'.
delphij [Mon, 6 Feb 2017 05:24:17 +0000 (05:24 +0000)]
MFC r312664: Always initialize 'c'.

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