]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC r316061:
bapt [Sat, 1 Apr 2017 09:33:22 +0000 (09:33 +0000)]
MFC r316061:

Update pci_vendors to 2017-03-16

7 years agoMFC r316060:
bapt [Sat, 1 Apr 2017 09:31:20 +0000 (09:31 +0000)]
MFC r316060:

Import tzdata 2017b

7 years agoMFC: r315912 (by eugen@) and r315935
bapt [Sat, 1 Apr 2017 09:27:00 +0000 (09:27 +0000)]
MFC: r315912 (by eugen@) and r315935

Properly initialise with content of pw.conf(5) that was mistakenly ignored.
Also, respect "defaultgroup" if specified there.

Add a regression test

PR: 217934
Reported by: Victor Sudakov <vas@mpeks.tomsk.su>

7 years agoMFC r315934:
kib [Sat, 1 Apr 2017 08:40:47 +0000 (08:40 +0000)]
MFC r315934:
Avoid leaking allocated but unused context after creation race.

7 years agoMFC r315933:
kib [Sat, 1 Apr 2017 08:37:19 +0000 (08:37 +0000)]
MFC r315933:
Do not create RMRR entries for identity-mapped domains.

7 years agoMFC r315932:
kib [Sat, 1 Apr 2017 08:34:53 +0000 (08:34 +0000)]
MFC r315932:
Slight cleanup of the comment.

7 years agoMFC r315636,315876,316095:
mm [Fri, 31 Mar 2017 20:16:24 +0000 (20:16 +0000)]
MFC r315636,315876,316095:
Sync libarchive with vendor

Vendor changes/bugfixes (FreeBSD-related):
r315636:
  PR 867 (bsdcpio): show numeric uid/gid when names are not found
  PR 870 (seekable zip): accept files with valid ZIP64 EOCD headers
  PR 880 (pax): Fix handling of "size" pax header keyword
  PR 887 (crypto): Discard 3072 bytes instead of 1024 of first keystream
  OSS-Fuzz issue 806 (mtree): rework mtree_atol10 integer parser
  Break ACL read/write code into platform-specific source files

r315876:
  Store extended attributes with extattr_set_link() if no fd is provided
  Add extended attribute tests to libarchive and bsdtar
  Fix tar's test_option_acls
  Support the UF_HIDDEN file flag

r316095:
  Constify variables in several places
  Unify platform ACL code in a single source file
  Fix unused variable if compiling on FreeBSD without NFSv4 ACL support

7 years agoMFC r309551:
kib [Fri, 31 Mar 2017 15:46:47 +0000 (15:46 +0000)]
MFC r309551:
Release DMAR table after using it.

7 years agoMFC r315402:
royger [Fri, 31 Mar 2017 10:26:14 +0000 (10:26 +0000)]
MFC r315402:

x86/srat: fix parsing of APIC IDs > MAX_APIC_ID

7 years agoMFC r315892:
ed [Fri, 31 Mar 2017 08:43:07 +0000 (08:43 +0000)]
MFC r315892:

  Include <sys/systm.h> to obtain the memcpy() prototype.

  I got a report of this source file not building on Raspberry Pi. It's
  interesting that this only fails for that target and not for others.
  Again, that's no reason not to include the right headers.

PR:           217969
Reported by:  Johannes Jost Meixner

7 years agoMFC r315516
truckman [Fri, 31 Mar 2017 06:20:06 +0000 (06:20 +0000)]
MFC r315516

Change several constants used by the PIE algorithm from unsigned to signed.

 - PIE_MAX_PROB is compared to variable of int64_t and the type promotion
   rules can cause the value of that variable to be treated as unsigned.
   If the value is actually negative, then the result of the comparsion
   is incorrect, causing the algorithm to perform poorly in some
   situations.  Changing the constant to be signed cause the comparision
   to work correctly.

 - PIE_SCALE is also compared to signed values.  Fortunately they are
   also compared to zero and negative values are discarded so this is
   more of a cosmetic fix.

 - PIE_DQ_THRESHOLD is only compared to unsigned values, but it is small
   enough that the automatic promotion to unsigned is harmless.

Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au>

7 years agoMFC r316106:
ngie [Fri, 31 Mar 2017 04:51:03 +0000 (04:51 +0000)]
MFC r316106:

Don't shadow read(2) definition with `read` argument in vdev_{create,probe}

This fixes several -Wshadow warnings introduced in r192194, but now errors
with gcc 6.3.0.

7 years agoMFC r316107:
ngie [Fri, 31 Mar 2017 04:44:35 +0000 (04:44 +0000)]
MFC r316107:

Remove redundant declaration for `zfs_crc64_table`

zfssubr.c already defines this statically. Besides, zfsimpl.c defined it, but
didn't use it.

This fixes a -Wredundant-decls warning.

7 years agoMFC r316108:
ngie [Fri, 31 Mar 2017 04:43:21 +0000 (04:43 +0000)]
MFC r316108:

Remove -Wunused-but-set variable, `tail` in `ls_getdir(..)`

This variable has been unused since its inception in r40106.

7 years agoMFC r316080,r316081,r316115:
ngie [Fri, 31 Mar 2017 04:42:11 +0000 (04:42 +0000)]
MFC r316080,r316081,r316115:

r316080:

Fix some localized style(9) issues and reword CAM_ERRBUF_SIZE description

The CAM_ERRBUF_SIZE description rewording fixes a typo by proxy.

r316081:

Use `sizeof(cam_errbuf)` instead of `CAM_ERRBUF_SIZE` in snprintf calls

Reindent snprintf calls' arguments to match style(9) guidelines with
respect to indentation.

r316115:

libcam: use __func__ instead of hardcoding the function name as `func_name`

Tested with: `cam_device_copy(NULL, NULL)` // ;)..

7 years agoMFC: r306686, r308953, r311462, r311529, r312438, r314611
jkim [Thu, 30 Mar 2017 20:18:34 +0000 (20:18 +0000)]
MFC: r306686, r308953, r311462, r311529, r312438, r314611

- Merge ACPICA 20170303.
- Remove '-vd' option to make iasl(8) reproducible.

Relnotes: yes

7 years agoMFC r314404:
dchagin [Thu, 30 Mar 2017 20:14:43 +0000 (20:14 +0000)]
MFC r314404:

Linux epoll return EEXIST on case when op is EPOLL_CTL_ADD, and the supplied
file descriptor fd is already registered with this epoll instance.

7 years agoMFC r314403:
dchagin [Thu, 30 Mar 2017 20:13:47 +0000 (20:13 +0000)]
MFC r314403:

Linux epoll return ENOENT error in case when op is EPOLL_CTL_MOD or
EPOLL_CTL_DEL, and fd is not registered with this epoll instance.

7 years agoMFC r314402:
dchagin [Thu, 30 Mar 2017 20:12:23 +0000 (20:12 +0000)]
MFC r314402:

FreeBSD does not have analgue for epoll EPOLLPRI event type.
So, do not set EPOLLPRI event acidently.
Also, do not set EPOLLWRNORM and EPOLLRDNORM events as epoll
do not set this events.

7 years agoMFC r314344:
dchagin [Thu, 30 Mar 2017 20:10:57 +0000 (20:10 +0000)]
MFC r314344:

Return EINVAL when an invalid file descriptor specified.

7 years agoMFC r314343:
dchagin [Thu, 30 Mar 2017 20:09:49 +0000 (20:09 +0000)]
MFC r314343:

Unify eventfd ioctl method and use it for other similar interfaces.

7 years agoMFC r314312:
dchagin [Thu, 30 Mar 2017 20:08:25 +0000 (20:08 +0000)]
MFC r314312:

Change Linux epoll_pwait syscall definition to match Linux actual one.

MFC r314313:

Regen for r314312 (Linux epoll_pwait).

MFC r314314:

Return EINVAL in case when an invalid size of signal mask specified.

7 years agoMFC r314311:
dchagin [Thu, 30 Mar 2017 20:05:16 +0000 (20:05 +0000)]
MFC r314311:

Restore signal mask in epoll_pwait.

7 years agoMFC r314309:
dchagin [Thu, 30 Mar 2017 20:04:28 +0000 (20:04 +0000)]
MFC r314309:

Return EINVAL when an invalid file descriptor is specified.

7 years agoMFC r314295:
dchagin [Thu, 30 Mar 2017 20:03:20 +0000 (20:03 +0000)]
MFC r314295:

Implement timerfd family syscalls.

7 years agoMFC r314294:
dchagin [Thu, 30 Mar 2017 20:02:19 +0000 (20:02 +0000)]
MFC r314294:

Mostly style(9) changes, replace unused eventfd_truncate()
by default invfo_truncate() method.

7 years agoMFC r314293:
dchagin [Thu, 30 Mar 2017 20:00:57 +0000 (20:00 +0000)]
MFC r314293:

Return EOVERFLOW error in case then the size of tv_sec field of struct timespec
in COMPAT_LINUX32 Linuxulator's not equal to the size of native tv_sec.

7 years agoMFC r314292:
dchagin [Thu, 30 Mar 2017 19:59:23 +0000 (19:59 +0000)]
MFC r314292:

Regen after r314291 (timerfd definition).

7 years agoMFC r314291:
dchagin [Thu, 30 Mar 2017 19:56:41 +0000 (19:56 +0000)]
MFC r314291:

Change Linuxulator timerfd syscalls definition to match actual Linux one.

7 years agoboot1.efi: can't boot from ZFS on 4kn HDD
tsoome [Thu, 30 Mar 2017 17:23:40 +0000 (17:23 +0000)]
boot1.efi: can't boot from ZFS on 4kn HDD

The boot1.efi immediate issue from PR216964 is that we are reading into
too small buffer, from UEFI spec 2.6:

The size of the Buffer in bytes. This must be a multiple of the intrinsic block size of the device.

The secondary issue is that LBA calculation does not check reminder from
division.

This fix does check the provided buffer size and if we read less than
media sector size or the read offset is not aligned to sector boundary,
we allocate bounce buffer and perform the read by single sector.

PR: 216964
Reported by: Sergey Kozlov
Reviewed by: allanjude, Sergey Kozlov
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D9870

7 years agoMFC r315732:
ed [Thu, 30 Mar 2017 15:05:49 +0000 (15:05 +0000)]
MFC r315732:

  Add forward declaration for struct vnode.

  The coredump() function provided by this header file has struct vnode *
  as an argument.

7 years agoMFC r303018:
ae [Thu, 30 Mar 2017 14:20:27 +0000 (14:20 +0000)]
MFC r303018:
  Add named dynamic states support to ipfw(4).

  The keep-state, limit and check-state now will have additional argument
  flowname. This flowname will be assigned to dynamic rule by keep-state
  or limit opcode. And then can be matched by check-state opcode or
  O_PROBE_STATE internal opcode. To reduce possible breakage and to maximize
  compatibility with old rulesets default flowname introduced.
  It will be assigned to the rules when user has omitted state name in
  keep-state and check-state opcodes. Also if name is ambiguous (can be
  evaluated as rule opcode) it will be replaced to default.

  Reviewed by: julian
  Obtained from: Yandex LLC
  Relnotes: yes
  Sponsored by: Yandex LLC
  Differential Revision: https://reviews.freebsd.org/D6674

MFC r304087:
  Do not warn about ambiguous state name when we inspect a comment token.

MFC r304089:
  Add an ability to attach comment to check-state rules.

MFC r310727 (by marius):
  Fix a bug in r272840; given that the optlen parameter of setsockopt(2)
  is a 32-bit socklen_t, do_get3() passes the kernel to access the wrong
  32-bit half on big-endian LP64 machines when simply casting the 64-bit
  size_t optlen to a socklen_t pointer.
  While at it and given that the intention of do_get3() apparently is to
  hide/wrap the fact that socket options are used for communication with
  ipfw(4), change the optlen parameter of do_set3() to be of type size_t
  and as such more appropriate than uintptr_t, too.

MFC r315305:
  Change the syntax of ipfw's named states.

  Since the state name is an optional argument, it often can conflict
  with other options. To avoid ambiguity now the state name must be
  prefixed with a colon.

Sponsored by: Yandex LLC

7 years agoMFC: 314547, 314770, 314828, 314891, 314956, 314962, 315235
dexuan [Thu, 30 Mar 2017 12:41:21 +0000 (12:41 +0000)]
MFC: 314547, 314770, 314828, 314891, 314956, 314962, 315235

r314547
    loader.efi: reduce the size of the staging area if necessary

    The loader assumes physical memory in [2MB, 2MB + EFI_STAGING_SIZE)
    is Conventional Memory, but actually it may not, e.g. in the case
    of Hyper-V Generation-2 VM (i.e. UEFI VM) running on Windows
    Server 2012 R2 host, there is a BootServiceData memory block at
    the address 47.449MB and the memory is not writable.

    Without the patch, the loader will crash in efi_copy_finish():
    see PR 211746.

    The patch verifies the end of the staging area, and reduces its
    size if necessary. This way, the loader will not try to write into
    the BootServiceData memory any longer.

    Thank Marcel Moolenaar for helping me on this issue!

    The patch also allocates the staging area in the first 1GB memory.
    See the comment in the patch for this.

    PR: 211746
    Reviewed by: marcel, kib, sephe
    Approved by: sephe (mentor)
    Sponsored by: Microsoft
    Differential Revision: https://reviews.freebsd.org/D9686

r314770
    loader.efi: fix recent UEFI-boot regression on physical machines

    This patch fixes my recent patch
    "loader.efi: reduce the size of the staging area if necessary", which
    causes EFI-boot failure on physical machines since Mar 2:
    on the host there is a 1MB LoaderData memory range, which splits
    the big Conventional Memory range into a small one (15MB) and a
    big one: the small one is too small to hold the staging area.

    We can actually use the LoaderData range safely, because when
    amd64_tramp -> efi_copy_finish() starts to run, we're almost at
    the very end of the efi loader code and we're going to "return"
    to the kernel entry, so we're pretty sure we won't access any loader
    data any more.

    For people who are interested in the details: please see
    https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746#c22

    PS, some people also reported the regression happened to FreeBSD VM
    running on Bhyve in EFI mode. This patch should resolve it too,
    though I don't have such a setup to test.

    Reviewed by: sephe
    Approved by: sephe (mentor)
    Sponsored by: Microsoft
    Differential Revision: https://reviews.freebsd.org/D9904

r314828
    loader.efi: fix an off-by-one bug in efi_verify_staging_size()

    Also remove the warning message: it may not be unusual to see
    the memory range containing 2MB is not of EfiConventionalMemory.

    Sponsored by: Microsoft

r314891
    loader.efi: finally fix the off-by-one bug in efi_verify_staging_size()

    r314828(loader.efi: fix an off-by-one bug in efi_verify_staging_size())
    doesn't really fix the bug and this patch adds the missing part.

    It's a shame that I didn't make everything correct at the very beginning...

    Sponsored by: Microsoft

r314956
    loader.efi: only reduce the size of the staging area on Hyper-V

    Doing this on physical hosts turns out to be problematic, e.g. see comment
    24 and 28 in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746.

    To fix the real underlying issue correctly & thoroughly, IMO we need
    a relocatable kernel, but that would require a lot of complicated long
    term work:  https://reviews.freebsd.org/D9686?id=25414#inline-56969

    For now, let's only apply efi_verify_staging_size() to VMs running on
    Hyper-V, and restore the old behavior on physical machines since that
    has been working for people for a long period of time, though that's
    potentially unsafe...

    Sponsored by: Microsoft

r314962
    loader.efi: only include the machine/ header files on x86

    The 2 files may not exist on other archs like aarch64 and hence we
    can have a build failure there.

    Reported by: lwhsu
    Sponsored by: Microsoft

r315235
    loader.efi: use stricter check for Hyper-V

    Some other hypervisors like Xen can pretend to be Hyper-V but obviously
    they can't implement all Hyper-V features. Let's make sure we're genuine
    Hyper-V here.

    Also fix some minor coding style issues.

    PR: 211746
    Sponsored by: Microsoft

PR: 211746

7 years agoMFC r315776:
ngie [Thu, 30 Mar 2017 06:20:24 +0000 (06:20 +0000)]
MFC r315776:

Rename tests from <foo> to <foo>_test to match the FreeBSD test suite
naming scheme

usr.bin/diff/diff_test was renamed to usr.bin/diff/netbsd_diff_test
to avoid collisions with the renamed FreeBSD test.

7 years agoMFC r315798:
ngie [Thu, 30 Mar 2017 06:14:32 +0000 (06:14 +0000)]
MFC r315798:

DB_COMMAND(9): fix mandoc markup

Start new sentences on new lines.

7 years agoMFC r316050,r316051:
ngie [Thu, 30 Mar 2017 06:13:39 +0000 (06:13 +0000)]
MFC r316050,r316051:

r316050:

ctld: sort #includes per style(9)

- Only include sys/types.h or sys/param.h, not both.
- Sort alphabetically.

r316051:

ctldadm: sort #includes per style(9)

- Only include sys/types.h or sys/param.h, not both.
- Sort alphabetically.

7 years agoRegenerate src.conf(5)
ngie [Thu, 30 Mar 2017 06:11:56 +0000 (06:11 +0000)]
Regenerate src.conf(5)

Differential Revision: Dell EMC Isilon

7 years agoMFC r315764,r315765:
ngie [Thu, 30 Mar 2017 06:09:39 +0000 (06:09 +0000)]
MFC r315764,r315765:

r315764:

Add a WITHOUT_IPSEC_SUPPORT option description for src.conf(5)

This is a follow up commit to r313330.

r315765:

Fix mdoc(7) warning: new sentences should start on new lines

7 years agoMFC r315762:
ngie [Thu, 30 Mar 2017 06:07:36 +0000 (06:07 +0000)]
MFC r315762:

rc.conf(5): fix a .Xr call for chroot(8)

Add the missing section number to the .Xr call.

7 years agoMFC r315795:
ngie [Thu, 30 Mar 2017 06:06:47 +0000 (06:06 +0000)]
MFC r315795:

alq(9): fix mandoc markup

Start new sentence on a new line.

7 years agoMFC r315803:
ngie [Thu, 30 Mar 2017 06:05:30 +0000 (06:05 +0000)]
MFC r315803:

memguard(9): fix igor/manlint warnings

- Expand a contraction [1].
- Add a missing section number when referring to uma(9) with .Xr .

7 years agoMFC r315790:
ngie [Thu, 30 Mar 2017 06:04:13 +0000 (06:04 +0000)]
MFC r315790:

tuning(7): fix SEE ALSO section sorting

dummynet(4) should come before eventtimers(4)

7 years agoMFC r315788:
ngie [Thu, 30 Mar 2017 06:02:48 +0000 (06:02 +0000)]
MFC r315788:

build(7): sort SEE ALSO section

tests(7) should be grouped in the man section 7 group, not the section 8 group.

7 years agoMFC r315802:
ngie [Thu, 30 Mar 2017 06:00:36 +0000 (06:00 +0000)]
MFC r315802:

ifnet(9): fix some igor/manlint warnings

- Fix typos (queueing -> queuing) [1].
- Add missing section number for polling .Xr reference [2].

7 years agoMFC r315804:
ngie [Thu, 30 Mar 2017 05:58:31 +0000 (05:58 +0000)]
MFC r315804:

PCI_IOV_*INIT(9): fix make manlint warnings

Add missing section number when referring to PCI_IOV_*INIT(9) with .Xr
from the other corresponding manpage.

7 years agoMFC r315772:
ngie [Thu, 30 Mar 2017 05:54:22 +0000 (05:54 +0000)]
MFC r315772:

tmpfs(5): fix mdoc warnings

- Delete trailing whitespace
- Sort SEE ALSO order: mmap(2)'s Xr should come before nmount(2)'s Xr.

7 years agoMFC r315789:
ngie [Thu, 30 Mar 2017 05:50:36 +0000 (05:50 +0000)]
MFC r315789:

tests(7): fix mdoc warning

Continue sentence in "Configuring the tests" on a new line.

7 years agoMFC r316049:
ngie [Thu, 30 Mar 2017 05:49:23 +0000 (05:49 +0000)]
MFC r316049:

Allow WARNS to be overridden by the end-user

7 years agoBackport mlx4{en,ib}(4) from ^/head
ngie [Thu, 30 Mar 2017 05:47:18 +0000 (05:47 +0000)]
Backport mlx4{en,ib}(4) from ^/head

MFCing other pieces would be very structurally disruptive. This just
brings back the manpages so they can be used by end-users and to ease
future backports.

svn:mergeinfo omitted, in part because this is a direct commit to
^/stable/11.

Sponsored by: Dell EMC Isilon

7 years agoRevert r316226 (I used the wrong commit message)
ngie [Thu, 30 Mar 2017 05:44:54 +0000 (05:44 +0000)]
Revert r316226 (I used the wrong commit message)

Pointyhat to: ngie

7 years agoMFC r315797:
ngie [Thu, 30 Mar 2017 05:43:18 +0000 (05:43 +0000)]
MFC r315797:

buf_ring(9): fix mandoc markup

Remove spurious trailing comma after `buf_ring_peek` in the NAME
section.

7 years agoMFC r315759,r315761:
ngie [Thu, 30 Mar 2017 05:41:27 +0000 (05:41 +0000)]
MFC r315759,r315761:

r315759 (by gjb):

Add mlx5en(4) to the hardware page. [1]
Belatedly bump copyright years after several changes.

r315761:

Add cxgbe(4), ixl(4), and mlx4en(4) to the hardware release notes

7 years agoMFC r315759,r315761:
ngie [Thu, 30 Mar 2017 05:22:02 +0000 (05:22 +0000)]
MFC r315759,r315761:

r315759 (by gjb):

Add mlx5en(4) to the hardware page. [1]
Belatedly bump copyright years after several changes.

r315761:

Add cxgbe(4), ixl(4), and mlx4en(4) to the hardware release notes

7 years agoMFC r316053:
ngie [Thu, 30 Mar 2017 05:18:28 +0000 (05:18 +0000)]
MFC r316053:

pthread_mutex_consistent: sort SEE ALSO by reference name

7 years agoMFC r315774:
ngie [Thu, 30 Mar 2017 05:17:27 +0000 (05:17 +0000)]
MFC r315774:

mount.conf(8): fix a .Xr call

Add the missing section number for devfs(5)

7 years agoMFC r315796:
ngie [Thu, 30 Mar 2017 05:16:41 +0000 (05:16 +0000)]
MFC r315796:

bus_alloc_resource(9): fix mandoc markup

Add missing comma after `.Nm bus_alloc_resource_any` in NAME section.

7 years agoMFC r314372:
ngie [Thu, 30 Mar 2017 05:14:52 +0000 (05:14 +0000)]
MFC r314372:

Use "build" instead of "all" when building ports modules

"all" in ports currently means "stage the ports", which requires root today,
and brings to light other potential issues, like ENAMETOOLONG with staged
directories (bug 161481, etc).

This fixes buildkernel for me when run as a non-root user, assuming all
of the prerequisites have been installed beforehand and are up-to-date.

Discussed with: swills (IRC)

7 years agoMFC r315734:
ngie [Thu, 30 Mar 2017 05:13:47 +0000 (05:13 +0000)]
MFC r315734:

style(9): sort #includes

7 years agoMFC: 313176, 313177, 313359
gnn [Thu, 30 Mar 2017 02:50:21 +0000 (02:50 +0000)]
MFC: 313176, 313177, 313359

Replace the implementation of DTrace's RAND subroutine for generating
low-quality random numbers with a modern implementation (xoroshiro128+)
that is capable of generating better quality randomness without compromising performance.

Submitted by: Graeme Jenkinson

7 years agoMFC: 311225, 311243, 313045
gnn [Thu, 30 Mar 2017 02:38:30 +0000 (02:38 +0000)]
MFC: 311225, 311243, 313045

Fix DTrace TCP tracepoints to not use mtod() as it is both unnecessary and
dangerous.  Those wanting data from an mbuf should use DTrace itself to get
the data.

Add an mbuf to ipinfo_t translator to finish cleanup of mbuf passing to TCP probes.

7 years agoMFC r309192
sevan [Thu, 30 Mar 2017 02:03:34 +0000 (02:03 +0000)]
MFC r309192

Fix null dereference when running out of nodes during rename.

PR:             212370
Submitted by:   Sascha Wildner <swildner AT gmail>
Reviewed by:    bcr (mentor)
Approved by:    bapt
Obtained from:  NetBSD
Differential Revision:  https://reviews.freebsd.org/D8643

7 years agoMFC r312692
sevan [Thu, 30 Mar 2017 01:52:02 +0000 (01:52 +0000)]
MFC r312692

Improve wording when describing -mmin.
PR: 215922
Submitted by: danielsh AT apache DOT org
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D9313

7 years agoMFC r316022,r316023:
jamie [Thu, 30 Mar 2017 01:37:34 +0000 (01:37 +0000)]
MFC r316022,r316023:

  Fix hexadecimal escape codes in jail.conf(5).

PR: 218154
Submitted by: Masahiro Konishi <mkonishi@sea.plala.or.jp>

7 years agoMFC 309552
sevan [Thu, 30 Mar 2017 01:30:27 +0000 (01:30 +0000)]
MFC 309552

Adjust formatting highlighted by igor.

PR: 214683
Submitted by: Anindya Mukherjee <anindya49 AT hotmail DOT com>
Reviewed by: jilles
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8591

7 years agoMFC 312684
sevan [Thu, 30 Mar 2017 01:18:58 +0000 (01:18 +0000)]
MFC 312684

Extend manual to cover more commands and options.

PR:             203406
Submitted by:   Fehmi Noyan Isi (fnoyanisi AT yahoo DOT com)
Approved by:    wblock (mentor)
Differential Revision:   https://reviews.freebsd.org/D8691

7 years agoMFC 315964
sevan [Thu, 30 Mar 2017 00:58:04 +0000 (00:58 +0000)]
MFC 315964
ftp.microsoft.com is dead and the document was not archived, point to the full
protocol spec document instead.
Fix spelling mistake flagged by igor.
Rephrase bad sentence flagged by igor.

Approved by:  bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D10111

7 years agoMFC r315545: Remove hackish code delaying ATIOs to unknown virtual port.
mav [Wed, 29 Mar 2017 16:16:39 +0000 (16:16 +0000)]
MFC r315545: Remove hackish code delaying ATIOs to unknown virtual port.

Since we support RQSTYPE_RPT_ID_ACQ, that functionality is only useful
in loop mode, which probably doesn't worth having this hack in 2017.

7 years agoMFC r315536: Move <= 23xx PDB workaround to generic code.
mav [Wed, 29 Mar 2017 16:15:18 +0000 (16:15 +0000)]
MFC r315536: Move <= 23xx PDB workaround to generic code.

It is chip-specific and has nothing to do with platform.

7 years agoMFC r315534: Remove some dead stuff.
mav [Wed, 29 Mar 2017 16:14:04 +0000 (16:14 +0000)]
MFC r315534: Remove some dead stuff.

7 years agoMFC r315533: Move 24xx RQSTYPE_NOTIFY handling to generic code.
mav [Wed, 29 Mar 2017 16:12:41 +0000 (16:12 +0000)]
MFC r315533: Move 24xx RQSTYPE_NOTIFY handling to generic code.

This code has nothing to do with specific platform.

7 years agoMFC r315507: Reorganize RQSTYPE_NOTIFY handling for chips <= 23xx.
mav [Wed, 29 Mar 2017 16:10:34 +0000 (16:10 +0000)]
MFC r315507: Reorganize RQSTYPE_NOTIFY handling for chips <= 23xx.

There were two copies of the code: one in generic code was half-broken, and
another in platform code was never called.  Leave only one in generic code
and working.

7 years agoMFC r315489: Move RQSTYPE_ABTS_RCVD parsing into generic code.
mav [Wed, 29 Mar 2017 16:03:33 +0000 (16:03 +0000)]
MFC r315489: Move RQSTYPE_ABTS_RCVD parsing into generic code.

7 years agoMFC r315488: Extend nt_lun to full 8 byte.
mav [Wed, 29 Mar 2017 16:02:19 +0000 (16:02 +0000)]
MFC r315488: Extend nt_lun to full 8 byte.

7 years agoMFC r315485: Remove dead remnants of SPI target.
mav [Wed, 29 Mar 2017 15:57:50 +0000 (15:57 +0000)]
MFC r315485: Remove dead remnants of SPI target.

7 years agoMFC r315482: Use isp_target_put_entry() in places where it can be.
mav [Wed, 29 Mar 2017 15:56:25 +0000 (15:56 +0000)]
MFC r315482: Use isp_target_put_entry() in places where it can be.

This unifies the code and removes some duplication.

7 years agoMFC r315478: Do some notify acks cleanup.
mav [Wed, 29 Mar 2017 15:45:04 +0000 (15:45 +0000)]
MFC r315478: Do some notify acks cleanup.

ISPASYNC_TARGET_NOTIFY_ACK makes no sense without argument.

7 years agoMFC r315327: Remove not very useful ATIO/INOT stats.
mav [Wed, 29 Mar 2017 15:43:51 +0000 (15:43 +0000)]
MFC r315327: Remove not very useful ATIO/INOT stats.

While there polish respective debug logging.

7 years agoMFC r315307: Refactor interrupt handling.
mav [Wed, 29 Mar 2017 15:42:35 +0000 (15:42 +0000)]
MFC r315307: Refactor interrupt handling.

Instead of single isp_intr() function doing all possible magic, introduce
four different functions to handle mailbox operation completions, async
events, response and ATIO queues.  The goal is to isolate different code
paths to make code more readable, and to make easier support for multiple
interrupt vectors.  Even oldest hardware in many cases can identify what
code path it should run on interrupt.  Contemporary hardware can assign
them to different interrupt vectors.

7 years agoMFC r315303: Fix panic when SIM dereferenced before allocation.
mav [Wed, 29 Mar 2017 15:40:45 +0000 (15:40 +0000)]
MFC r315303: Fix panic when SIM dereferenced before allocation.

7 years agoMFC r315298: Fix ancient bug from r84597, which broke 23xx after r315234.
mav [Wed, 29 Mar 2017 15:39:13 +0000 (15:39 +0000)]
MFC r315298: Fix ancient bug from r84597, which broke 23xx after r315234.

7 years agoMFC r314870: Add mechanism to unload CAM periph drivers.
mav [Wed, 29 Mar 2017 15:25:34 +0000 (15:25 +0000)]
MFC r314870: Add mechanism to unload CAM periph drivers.

For now it allows to unload CTL kernel module if there are no target-capable
SIMs in CAM.  As next step full teardown of CAM targets can be implemented.

7 years agoMFC r315711: Fix printing bits above first eight.
mav [Wed, 29 Mar 2017 14:57:41 +0000 (14:57 +0000)]
MFC r315711: Fix printing bits above first eight.

7 years agoMFC r315331:
kib [Wed, 29 Mar 2017 11:03:08 +0000 (11:03 +0000)]
MFC r315331:
Implement LD_BIND_NOT knob for rtld.

MFC r315337:
Disable LD_BIND_NOT for setugid processes.

MFC r315429 (by jilles):
Document that LD_BIND_NOT is unset for setugid processes.

7 years agoMFC r309068 (by jhb):
kib [Wed, 29 Mar 2017 10:59:46 +0000 (10:59 +0000)]
MFC r309068 (by jhb):
Fix _mips_rtld_bind() to handle ELF filters.

7 years agoMFC r315738:
ngie [Wed, 29 Mar 2017 08:01:38 +0000 (08:01 +0000)]
MFC r315738:

Document some more 10GbE+ network drivers in loader.conf

- if_cxgbe
- if_ixl
- if_ixlv
- sfxge

7 years agoMFC r315699:
ngie [Wed, 29 Mar 2017 08:00:13 +0000 (08:00 +0000)]
MFC r315699:

Print out name of non-dynamic sysctl in sysctl_remove_oid_locked

This will provide a slightly better smoking gun than just stating
"can't remove non-dynamic nodes!" when calling sysctl_ctx_free(9)
and sysctl_remove_{name,oid}(9) with a non-dynamic (likely
static) sysctl.

7 years agoMFC r315697:
ngie [Wed, 29 Mar 2017 07:30:59 +0000 (07:30 +0000)]
MFC r315697:

libkvm: fix warning issues post-r291406

- Fix -Wunused warnings with *_native detection handlers by marking `kd`
  __unused, except with arm/mips, where a slightly more complicated scheme
  is required to handle the native case vs the non-native case.
- Fix -Wmissing-variable-declarations warnings by marking struct kvm_arch
  objects static.

Tested with: WIP test code (D10024) // kgdb7121 (i386 crash/kernel on amd64)

7 years agoMFC r315201, r315920, r315921, r315922, r316008, and r316062.
np [Wed, 29 Mar 2017 02:20:07 +0000 (02:20 +0000)]
MFC r315201, r315920, r315921, r315922, r316008, and r316062.

r315201:
cxgbe(4):  Fix an always-true assertion (reported by PVS-Studio).

sys/dev/cxgbe/t4_main.c: PVS-Studio: Expression is Always True (CWE-571) (3)

r315920:
cxgbe/iw_cxgbe: c4iw_connect should always returns a -ve errno on failure.

r315921:

cxgbe/iw_cxgbe: alloc_ep expects a gfp_t, and it's always ok to sleep during
alloc_ep.

r315922:
cxgbe/iw_cxgbe: allocations that use GFP_KERNEL (which is M_WAITOK on
FreeBSD) cannot fail.

r316008:
cxgbe/iw_cxgbe: Remove unused code.

r316062:
cxgbe/iw_cxgbe: Defer the handling of error CQEs and RDMA_TERMINATE to
the thread that deals with socket state changes.  This eliminates
various bad races with the ithread.

7 years agoMFC r315280 r315287
vangyzen [Wed, 29 Mar 2017 01:21:48 +0000 (01:21 +0000)]
MFC r315280 r315287

When the RTC is adjusted, reevaluate absolute sleep times based on the RTC

POSIX 2008 says this about clock_settime(2):

    If the value of the CLOCK_REALTIME clock is set via clock_settime(),
    the new value of the clock shall be used to determine the time
    of expiration for absolute time services based upon the
    CLOCK_REALTIME clock.  This applies to the time at which armed
    absolute timers expire.  If the absolute time requested at the
    invocation of such a time service is before the new value of
    the clock, the time service shall expire immediately as if the
    clock had reached the requested time normally.

    Setting the value of the CLOCK_REALTIME clock via clock_settime()
    shall have no effect on threads that are blocked waiting for
    a relative time service based upon this clock, including the
    nanosleep() function; nor on the expiration of relative timers
    based upon this clock.  Consequently, these time services shall
    expire when the requested relative interval elapses, independently
    of the new or old value of the clock.

When the real-time clock is adjusted, such as by clock_settime(3),
wake any threads sleeping until an absolute real-clock time.
Such a sleep is indicated by a non-zero td_rtcgen.  The sleep functions
will set that field to zero and return zero to tell the caller
to reevaluate its sleep duration based on the new value of the clock.

At present, this affects the following functions:

    pthread_cond_timedwait(3)
    pthread_mutex_timedlock(3)
    pthread_rwlock_timedrdlock(3)
    pthread_rwlock_timedwrlock(3)
    sem_timedwait(3)
    sem_clockwait_np(3)

I'm working on adding clock_nanosleep(2), which will also be affected.

Reported by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Relnotes: yes
Sponsored by: Dell EMC

7 years agoMFC r315640
vangyzen [Tue, 28 Mar 2017 13:39:04 +0000 (13:39 +0000)]
MFC r315640

Port the getaddrinfo(1) utility from NetBSD.

PR: 183148
Submitted by: Lohith Bellad <lohithbsd@gmail.com>
Obtained from: NetBSD
Relnotes: yes
Sponsored by: Dell EMC

7 years agoMFC r315242: Fix late and noauto with geli swap
amdmi3 [Tue, 28 Mar 2017 10:43:19 +0000 (10:43 +0000)]
MFC r315242: Fix late and noauto with geli swap

With the following in /etc/fstab:

/dev/gpt/swap.eli none swap sw,late 0 0

swap will not be enabled, with `swapon -aL' complaining:

swapon: Invalid option: late

This happens because swap_on_geli_args() which parses geli arguments
out of all mount options does not expect late or noauto among them.
Fix this by explicitly allowing these arguments.

Reviewed by: jilles
Approved by: jilles
Differential Revision: D9835

7 years agoMFC r315279: Remove some dead/broken code paths around async handling
mav [Tue, 28 Mar 2017 10:25:56 +0000 (10:25 +0000)]
MFC r315279: Remove some dead/broken code paths around async handling

7 years agoMFC r315273: Remove tangled isp_mbox_continue() mechanism.
mav [Tue, 28 Mar 2017 10:24:41 +0000 (10:24 +0000)]
MFC r315273: Remove tangled isp_mbox_continue() mechanism.

It was implemented to reduce context switches when uploading firmware to
card's RAM.  But this mechanism is not used last 10 years since all mbox
operations are now polled, and it was never used for cards produced in
last 15 years.  Newer cards can use DMA to upload firmware.

7 years agoMFC r315236: Remove dangerous and questionable isp_mboxcmd_qnw() call.
mav [Tue, 28 Mar 2017 10:23:32 +0000 (10:23 +0000)]
MFC r315236: Remove dangerous and questionable isp_mboxcmd_qnw() call.

7 years agoMFC r315234: Improvements around attach, reset and detach.
mav [Tue, 28 Mar 2017 10:11:00 +0000 (10:11 +0000)]
MFC r315234: Improvements around attach, reset and detach.

This change fixes DMA resource leak on driver unload.  Also it removes
DMA resources allocation for hardcoded number of requests before fetching
the real number from firmware.  Also it prepares ground for more flexible
IRQs allocation according to firmware capabilities.

7 years agoMFC r313436,r313437,r313438,r314587,r315687:
ngie [Tue, 28 Mar 2017 06:13:21 +0000 (06:13 +0000)]
MFC r313436,r313437,r313438,r314587,r315687:

r313436:

Clarify #includes for hexdump(3) vs sbuf_hexdump(9)

hexdump(3) only requires libutil.h, whereas sbuf_hexdump(9) requires
sys/types.h (for ssize_t) and sys/sbuf.h

r313437:

Create link from hexdump(3) to sbuf_hexdump(9) as the manpage describes
sbuf_hexdump(9)'s behavior

r313438:

Clean up trailing and leading whitespace for variables to make it
consistent with the rest of the file and style.Makefile(9) a bit
more

r314587:

Correct MLINKS for sbuf_hexdump(9)

sbuf_hexdump(9) should be linked to sbuf(9), not hexdump(3). Another
review will be posted to deduplicate the sbuf_hexdump reference in
in hexdump(3) or at the very least make the information less duplicative.

r315687:

Document sbuf_hexdump(9) in just sbuf(9)

- Remove duplicate references to sbuf_hexdump(9) from hexdump(3).
  sbuf_hexdump(9) already pointed back to hexdump(3) for implementation
  details.
- Refer to sbuf_hexdump(9) instead of sbuf(9) for completeness

7 years agoMFC r315281:
kib [Tue, 28 Mar 2017 06:07:59 +0000 (06:07 +0000)]
MFC r315281:
Use atop() instead of OFF_TO_IDX() for convertion of addresses or
addresses offsets, as intended.

MFC r315580 (by alc):
Simplify the logic for clipping the range returned by the pager to fit
within the map entry.
Use atop() rather than OFF_TO_IDX() on addresses.

7 years agoMFC r315686,r315688:
ngie [Tue, 28 Mar 2017 06:03:43 +0000 (06:03 +0000)]
MFC r315686,r315688:

r315686:

kvm_geterr: handle `kd` == NULL in a deterministic/graceful manner

Return a NUL string instead of just working by accident with kvm_geterr(3)
when MALLOC_PRODUCTION is disabled (I didn't confirm the MALLOC_PRODUCTION
being enabled path).

Document the new explicit return behavior for kvm_geterr(3), as well
as the previous implicit behavior, i.e., the buffer attached to
returned via kvm_geterr(3) would be empty if a previous error hadn't been
stored in `kd`.

r315688:

kvm_write: fix -Wcast-qual warning in pointer arithmetic argument

Cast buf to `const char *` when doing arithmetic operation to match
`cp`'s type [1].

7 years agoMFC r315871: MFV r315791: ntp 4.2.8p10.
delphij [Tue, 28 Mar 2017 04:48:17 +0000 (04:48 +0000)]
MFC r315871: MFV r315791: ntp 4.2.8p10.

7 years agoMFC r315639:
ngie [Mon, 27 Mar 2017 18:31:00 +0000 (18:31 +0000)]
MFC r315639:

libcam: NULL out freed `ccb.cdm.matches` and `ccb.cdm.patterns` pointers

This is being done to avoid potential double frees with the values.