Permalink
Switch branches/tags
Nothing to show
Commits on Sep 20, 2017
  1. MFV r323792: 8602 remove unused "dp_early_sync_tasks" field from "dsl…

    avg-I committed Sep 20, 2017
    …_pool" structure
    
    
    illumos/illumos-gate@2bcb545
    illumos/illumos-gate@2bcb545
    
    https://www.illumos.org/issues/8602
      When I landed the fix for 8558, I incorrectly added the "dp_early_sync_tasks"
      field to the "dsl_pool" structure. This field is used in DelphixOS, but not in
      illumos. It was incorrectly pulled into illumos, so this bug is to remove it
      from the structure.
    
    Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>
    Author: Prakash Surya <prakash.surya@delphix.com>
    
    MFC after:	1 week
  2. MFV r323790: 8567 Inconsistent return value in zpool_read_label

    avg-I committed Sep 20, 2017
    illumos/illumos-gate@c861bfb
    illumos/illumos-gate@c861bfb
    
    https://www.illumos.org/issues/8567
      If fstat64 fails, pread64 fails, or the label is unintelligible,
      zpool_read_label will return 0. But if malloc fails, it will return -1. For
      consistency, it should always return -1 on failure or 0 on success.
    
    Reviewed by: Prakash Surya <prakash.surya@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>
    Author: Alan Somers <asomers@gmail.com>
    
    MFC after:	2 weeks
  3. In r288122, we changed vm_page_unwire() so that it returns a Boolean

    alc committed Sep 20, 2017
    indicating whether the page's wire count transitioned to zero.  Use that
    return value in zbuf_page_free() rather than checking the wire count.
    
    MFC after:	1 week
  4. Sync with amd64/arm/arm64/i386/mips pmap change r288256:

    alc committed Sep 20, 2017
    Exploit r288122 to address a cosmetic issue.  Since PV chunk pages don't
    belong to a vm object, they can't be paged out.  Since they can't be paged
    out, they are never enqueued in a paging queue.  Nonetheless, passing
    PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages
    are being enqueued in the inactive queue.  As of r288122, we can avoid
    this false impression by passing PQ_NONE.
    
    MFC after:	1 week
Commits on Sep 19, 2017
  1. Define CPU_XSCALE_CORE3 when relevant.

    cognet committed Sep 19, 2017
    It was lost when cpuconf.h was deobirted.
  2. Make the nfsrpc_layoutget() function a static.

    rmacklem committed Sep 19, 2017
    Make the NFSv4 pNFS client function nfsrpc_layoutget() a static, since it
    is only used in sys/fs/nfsclient/nfs_clrpcops.c.
    This prepares the code for future patches that add Flex File layout
    support.
  3. Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval

    davidcs committed Sep 19, 2017
    MFC after:5 days
  4. Update minidump template for version 5.4.66

    davidcs committed Sep 19, 2017
    MFC after:5 days
  5. Add a new function called nfsm_uiombuflist(), similar to nfsm_uiombuf().

    rmacklem committed Sep 19, 2017
    This patch adds a new function called nfsm_uiombuflist(), which is
    similar to nfsm_uiombuf(), but doesn't not use the fields in
    struct nfsrv_descript. This new function will be used by the pNFS client
    for writing to mirrors using Flex Files layout.
    The function is not yet called anywhere.
    Also, get rid of #ifndef APPLE, which is ancient cruft left over from
    the Mac OSX port of the NFSv4 client.
  6. Simplify nfsrpc_layoutreturn() args.

    rmacklem committed Sep 19, 2017
    Simplify nfsrpc_layoutreturn() args. in preparation for the addition
    of Flex File layout support, since File layout uses a 0 length field.
    Flex Files does use a longer field, but that will be added in a
    subsequent commit.
  7. Fix indentation for r323068

    jpaetzel committed Sep 19, 2017
    PR:	220170
    Reported by:	lidl
    MFC after:	3 days
    Pointyhat to:	jpaetzel
  8. i81342 is little endian, not big endian.

    cognet committed Sep 19, 2017
  9. Fix a warning.

    tuexen committed Sep 19, 2017
    MFC after:	1 week
  10. Simplify nfsrpc_layoutcommit() args.

    rmacklem committed Sep 19, 2017
    Simplify nfsrpc_layoutcommit() args. in preparation for the addition
    of Flex File layout support, since it also uses a 0 length field.
  11. Avoid an overflow when computing the staleness.

    tuexen committed Sep 19, 2017
    This issue was found by running libfuzz on the userland stack.
    
    MFC after:	1 week
  12. Do not do torn writes to active LDTs.

    kostikbel committed Sep 19, 2017
    Care must be taken when updating the active LDT, since parallel
    threads might try to load a segment descriptor which is currently
    updated. Since the results are undefined, this cannot be ignored by
    claiming to be an application race.
    
    Reviewed by:	jhb
    Sponsored by:	The FreeBSD Foundation
    MFC after:	2 weeks
    Differential revision:	https://reviews.freebsd.org/D12413
  13. Do not vrele() covered vnode under the mp mutex.

    kostikbel committed Sep 19, 2017
    If vrele() changes the hold count to zero, it needs to acquire the
    vnode lock.
    
    Sponsored by:	The FreeBSD Foundation
    Discussed with:	avg
    X-MFC with:	r323578
  14. For unlinked files, do not msync(2) or sync on the vnode deactivation.

    kostikbel committed Sep 19, 2017
    One consequence of the patch is that msyncing unlinked file mappings
    no longer reduces the amount of the dirty memory in the system, but I
    do not think that there are users of msync(2) that utilize it for such
    side-effect.
    
    Reported and tested by:	tjil
    PR:	222356
    Reviewed by:	alc
    Sponsored by:	The FreeBSD Foundation
    MFC after:	2 weeks
    Differential revision:	https://reviews.freebsd.org/D12411
  15. Add myself and mentorship status to committers files.

    eugen committed Sep 19, 2017
    This was not done right when I got my ports bit, so do them both in one commit:
    
    my ports mentors were az@ and vsevolod@ and my src mentors are avg@ and mav@
    
    Approved by:	avg (mentor)
  16. Provide an articulate example of how to properly delete partitions and

    danfe committed Sep 19, 2017
    partitioning scheme.
    
    Users often get confused and frustrated when trying to delete partition
    table and getting ``Device busy'' error because they forgot (or did not
    ever know that they have) to delete all its partitions first, and while
    the manual page mentions this briefly, it does not stress it out enough.
    
    Approved by:		ae, manpages (bjk)
    PR (as inspiration):	196102
    Differential Revision:	https://reviews.freebsd.org/D12336
  17. Remove a no longer used variable.

    tuexen committed Sep 19, 2017
    Reported by:	Felix Weinrank
    MFC after:	1 week
  18. hyperv/hn: Incease max supported MTU

    sephe committed Sep 19, 2017
    MFC after:	1 week
    Sponsored by:	Microsoft
    Differential Revision:	https://reviews.freebsd.org/D12365
  19. hyperv/hn: Fix MTU setting

    sephe committed Sep 19, 2017
    - Add size of an ethernet header to the value configured to NVS.  This
      does not seem to have any effects if MTU is 1500, but fix hypervisor
      side's setting if MTU > 1500.
    - Override the MTU setting according to the view from the hypervisor
      side.
    
    MFC after:	1 week
    Sponsored by:	Microsoft
    Differential Revision:	https://reviews.freebsd.org/D12352
  20. hyperv/hn: Apply VF's RSS setting

    sephe committed Sep 19, 2017
    Since in Azure SYN and SYN|ACK go through the synthetic parts while the
    rest of the same TCP flow goes through the VF, apply VF's RSS settings
    to synthetic parts to have a consistent hash value/type for the same TCP
    flow.
    
    MFC after:	1 week
    Sponsored by:	Microsoft
    Differential Revision:	https://reviews.freebsd.org/D12333
Commits on Sep 18, 2017
  1. Enable support for lookaside crypto operations by default.

    bsdjhb committed Sep 18, 2017
    This permits ccr(4) to be used with the default firmware configuration
    file.
    
    Discussed with:	np
    Sponsored by:	Chelsio Communications
  2. Add UFS_LINK_MAX for the UFS-specific limit on link counts.

    bsdjhb committed Sep 18, 2017
    ino64 expanded nlink_t to 64 bits, but the on-disk format for UFS is still
    limited to 16 bits.  This is a nop currently but will matter if LINK_MAX is
    increased in the future.
    
    Reviewed by:	kib
    Sponsored by:	Chelsio Communications
  3. Fix handling of the segment registers on i386.

    kostikbel committed Sep 18, 2017
    Suppose that userspace is executing with the non-standard segment
    descriptors.  Then, until exception or interrupt handler executed
    SET_KERNEL_SEGS, kernel is still executing with user %ds, %es and %fs.
    If an interrupt occurs in this window, the interrupt handler is
    executed unsafely, relying on usability of the usermode registers.  If
    the interrupt results in the context switch on return, the
    contamination of the kernel state spreads to the thread we switched
    to.  As result, kernel data accesses might fault or, if only the base
    is changed, completely messed up.
    
    More, if the user segment was allocated in LDT, another thread might
    mark the descriptor as invalid before doreti code tried to reload
    them.  In this case kernel panics.
    
    The issue exists for all exception entry points which use trap gate,
    and thus do not automatically disable interrupts on entry, and for
    lcall_handler.
    
    Fix is two-fold: first, we need to disable interrupts for all kernel
    entries, changing the IDT descriptor types from trap gate to interrupt
    gate.  Interrupts are re-enabled not earlier than the kernel segments
    are loaded into the segment registers.  Second, we only load the
    segment registers from the trap frame when returning to usermode.  For
    the later, all interrupt return paths must happen through the doreti
    common code.
    
    There is no way to disable interrupts on call gate, which is the
    supposed mode of servicing for lcall $7,$0 syscalls.  Change the LDT
    descriptor 0 into a code segment type and point it to the userspace
    trampoline which redirects the syscall to int $0x80.
    
    All the measures make the segment register handling similar to that of
    amd64.  We do not apply amd64 optimizations of not reloading segment
    registers on return from the syscall.
    
    Reported by:	Maxime Villard <max@m00nbsd.net>
    Tested by:	pho (the non-lcall part)
    Reviewed by:	jhb
    Sponsored by:	The FreeBSD Foundation
    MFC after:	2 weeks
    Differential revision:	https://reviews.freebsd.org/D12402
  4. Add kern.features flag for MMCCAM

    kibab committed Sep 18, 2017
    kern.features.mmcam will be present and equal to 1 if the kernel has been
    compiled with option MMCCAM.
    This will help sdio-related userland tools to fail-fast if running on the kernel
    without MMCCAM enabled.
    
    Approved by:	imp (mentor)
    Differential Revision:	https://reviews.freebsd.org/D12386
  5. Make basic Broadcom I/O space reading functions work

    kibab committed Sep 18, 2017
    It's now possible to use Broadcom functions to read the I/O registers of
    SDIO card. The functions were copied from the BSD-licensed Broadcom Linux driver
    as-is. To make it possible, a small Linux compatibility layer was introduced.
    
    Currently the card responds with the correct version number ("magic")
    when reading the corresponding address.
    
    Approved by:	imp (mentor)
    Differential Revision:	https://reviews.freebsd.org/D12111
  6. Don't use an apostrophe in a possesive pronoun.

    cschuber committed Sep 18, 2017
    MFC after:	3 days
  7. linsysfs: quiet gcc -Wformat after r323692

    rlibby committed Sep 18, 2017
    Reviewed by:	cem
    Sponsored by:	Dell EMC Isilon
  8. Hide a normal probe warning message under bootverbose, similar to atkbdc

    scottl committed Sep 18, 2017
    Sponsored by:	Netflix
  9. linsysfs(5): Fix two unrelated issues

    cemeyer committed Sep 18, 2017
    1. Swap the order of device_get_ivars with device_get_devclass and devclass
       name validation.  This bug was introduced in r323692.
    
    2. Error check device_get_children and free the returned list.  This bug was
       introduced in the original linsysfs commit.
    
    Reported by:	Oleg V. Nauman <oleg AT theweb.org.ua>, hselasky (1); hselasky (2)
    Reviewed by:	hselasky
    Sponsored by:	Dell EMC Isilon
    Differential Revision:	https://reviews.freebsd.org/D12407
  10. Revert tcpdump to using the source manpage instead of having a copy h…

    gordon committed Sep 18, 2017
    …ere.
    
    This helps future maintainability of tcpdump so we don't forget to update
    the manpage (like we have previously).
    
    Stolen from:	usr.bin/file/Makefile
    Reviewed by:	jilles
    Approved by:	delphij (mentor)
    MFC after:	1 week
    Differential Revision:	https://reviews.freebsd.org/D12403
  11. loader: biosmem allocate heap just below 4GB

    tsoome committed Sep 18, 2017
    The current biosmem code is walking bios smap entries and looking for smap
    entry just below 4GB line, if there is such entry, its base and size is set
    for heap base and size. Instead of entry base, we should use last HEAP_MIN
    (currently 64MB) bytes just below 4GB, to make maximum space for kernel and
    modules.
    
    The problem was revealed on ASUS B350M-A system board, an AMD Ryzen 3 1200 CPU
    
    memory map:
    
    SMAP type=01 base=0000000000000000 len=000000000009d400 attr=01
    SMAP type=02 base=000000000009d400 len=0000000000002c00 attr=01
    SMAP type=02 base=00000000000e0000 len=0000000000020000 attr=01
    SMAP type=01 base=0000000000100000 len=0000000009c00000 attr=01
    SMAP type=02 base=0000000009d00000 len=0000000000300000 attr=01
    SMAP type=01 base=000000000a000000 len=00000000be69b000 attr=01
    SMAP type=03 base=00000000c869b000 len=0000000000016000 attr=01
    SMAP type=01 base=00000000c86b1000 len=00000000124e7000 attr=01
    SMAP type=02 base=00000000dab98000 len=0000000000138000 attr=01
    SMAP type=03 base=00000000dacd0000 len=0000000000008000 attr=01
    SMAP type=01 base=00000000dacd8000 len=0000000000100000 attr=01
    SMAP type=04 base=00000000dadd8000 len=00000000003b3000 attr=01
    SMAP type=02 base=00000000db18b000 len=0000000000d42000 attr=01
    SMAP type=01 base=00000000dbecd000 len=0000000002133000 attr=01
    SMAP type=01 base=0000000100000000 len=000000011f380000 attr=01
    SMAP type=02 base=00000000de000000 len=0000000002000000 attr=01
    SMAP type=02 base=00000000f8000000 len=0000000004000000 attr=01
    SMAP type=02 base=00000000fdf00000 len=0000000000100000 attr=01
    SMAP type=02 base=00000000fea00000 len=0000000000010000 attr=01
    SMAP type=02 base=00000000feb80000 len=0000000000082000 attr=01
    SMAP type=02 base=00000000fec10000 len=0000000000001000 attr=01
    SMAP type=02 base=00000000fec30000 len=0000000000001000 attr=01
    SMAP type=02 base=00000000fed00000 len=0000000000001000 attr=01
    SMAP type=02 base=00000000fed40000 len=0000000000005000 attr=01
    SMAP type=02 base=00000000fed80000 len=0000000000010000 attr=01
    SMAP type=02 base=00000000fedc2000 len=000000000000e000 attr=01
    SMAP type=02 base=00000000fedd4000 len=0000000000002000 attr=01
    SMAP type=02 base=00000000fee00000 len=0000000000100000 attr=01
    SMAP type=02 base=00000000ff000000 len=0000000001000000 attr=01
    
    Reviewed by:	imp
    Differential Revision:	https://reviews.freebsd.org/D12368