PC-BSD/trueos 4576d56usr.sbin/pkg FreeBSD.conf.latest FreeBSD.conf.quarterly

Disable FreeBSD.conf pkg repos

PC-BSD/trueos 591ee58libexec/rc/rc.d Makefile zfsbe

Always enable rc.d ZFS scripts

PC-BSD/trueos 6c3bfa8libexec/rc/rc.d Makefile zvol

Always enable rc.d ZFS scripts

PC-BSD/trueos 3202a11libexec/rc/rc.d Makefile zfs

Always enable rc.d ZFS scripts

PC-BSD/trueos 5b350d1bin/csh Makefile, bin/sh Makefile

Disable hard-link creation of /.cshrc and /.profile, treat them
as two files, so that pkg doesn't barf on hard-link create failures
when upgrading

PC-BSD/trueos f2c81aabin/csh Makefile, bin/sh Makefile

Disable hard-link creation of /.cshrc and /.profile, treat them
as two files, so that pkg doesn't barf on hard-link create failures
when upgrading

PC-BSD/trueos 4433f6abin/csh Makefile, bin/sh Makefile

Disable hard-link creation of /.cshrc and /.profile, treat them
as two files, so that pkg doesn't barf on hard-link create failures
when upgrading

PC-BSD/trueos c9d3945sys/dev/de if_de.c, sys/dev/fe if_fe.c

Merge pull request #321 from trueos/fbsdm-update-20190520

Fbsdm update 20190520

PC-BSD/trueos 3039902usr.sbin/bsdinstall/scripts zfsboot auto

Merge branch 'freebsd/master' into fbsdm-update-20190520

PC-BSD/trueos b420ad3sys/dev/de if_de.c, sys/dev/fe if_fe.c

Merge branch 'master' of https://github.com/freebsd/freebsd into fbsdm-update-20190520

PC-BSD/trueos cb9788erelease/powerpc hfs-boot.bz2.uu generate-hfs.sh

Update loader size on powerpc isos

Summary:
loader has grown to the point it's overflowing the existing 307200 bytes
allocated to it in the HFS boot partition on the isos.

Bump the space reservation up to 500k.

Submitted by:   Brandon Bergren
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D20301

PC-BSD/trueos d864978sys/dev/ksyms ksyms.c

ksyms: Fixup symbols for powerpc in the kernel, not just modules

Summary:
PowerPC kernels are fully position independent, just like kernel modules.
The same fixups that are done for modules therefore need to be done to the
kernel, else symbol resolution in, e.g., DTrace, cannot resolve the kernel
symbols, so only addresses in the kernel are printed, while kernel module
symbols are printed.

Test Plan:
Run lockstat on powerpc64.  Note symbols are resolved for kernel and
modules.

Reviewed By: markj
Differential Revision: https://reviews.freebsd.org/D20316

PC-BSD/trueos 250e158sys/dev/led led.c, sys/dev/mfi mfi_disk.c

Extract eventfilter declarations to sys/_eventfilter.h

This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"
in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header
pollution substantially.

EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c
files into appropriate headers (e.g., sys/proc.h, powernv/opal.h).

As a side effect of reduced header pollution, many .c files and headers no
longer contain needed definitions.  The remainder of the patch addresses
adding appropriate includes to fix those files.

LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by
sys/mutex.h since r326106 (but silently protected by header pollution prior
to this change).

No functional change (intended).  Of course, any out of tree modules that
relied on header pollution for sys/eventhandler.h, sys/lock.h, or
sys/mutex.h inclusion need to be fixed.  __FreeBSD_version has been bumped.

PC-BSD/trueos 89c7714sys/net route.c if.c

Fix rt_ifa selection during loopback route insertion process.
  Currently such routes are added with a link-level IFA, which is
  plain wrong. Only after the insertion they get fixed by the special
  link_rtrequest() ifa handler. This behaviour complicates routing code
  and makes ifa selection more complex.
Streamline this process by explicitly moving link_rtrequest() logic
  to the pre-insertion rt_getifa_fib() ifa selector. Avoid calling all
  this logic in the loopback route case by explicitly specifying
  proper rt_ifa inside the ifa_maintain_loopback_route().ยง

MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D20076
DeltaFile
+43-8sys/net/route.c
+11-35sys/net/if.c
+54-432 files

PC-BSD/trueos 633b042lib/libsecureboot vepcr.c verify_file.c, lib/libsecureboot/h libsecureboot.h

libsecureboot: allow control of when pseudo pcr is updated

During boot we only want to measure things which *must*
be verified - this should provide more deterministic ordering.

Reviewed by:    stevek
MFC after:      1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D20297

PC-BSD/trueos d8da000lib/libsecureboot/openpgp opgp_key.c opgp_sig.c

load_key_buf do not free data from dearmor

The data returned by dearmor is referenced by the key
leave it alone!

Reviewed by:    stevek
MFC after:      2 days

PC-BSD/trueos 00c7e0elib/libomp Makefile, tools/build/mk OptionalObsoleteFiles.inc

To avoid unnecessarily modifying ports, add a -lgomp symlink, since GCC
does not ship a -lomp symlink.  Also update OptionalObsoleteFiles for
this, and add 32-bit variants while here.

Submitted by:   jbeich
PR:            237975
MFC after:      3 days

PC-BSD/trueos 51cab7ctools/build/mk OptionalObsoleteFiles.inc

Fix OptionalObsoleteFiles copy/paste mistake from r345236, which
connected libomp to the build.  The comparison should not have been
against ${MK_OPENSSH}, but against ${MK_OPENMP}, obviously.

MFC after:      3 days

PC-BSD/trueos a4f7eabsys/dev/usb usb_fdt_support.c, sys/dev/usb/net if_smsc.c

Merge branch 'master' of https://github.com/freebsd/freebsd into trueos/master

PC-BSD/trueos 724fce5sys/netinet sctp_usrreq.c

Allow sending on demand SCTP HEARTBEATS only in the ESTABLISHED state.
This issue was found by running syzkaller.

MFC after:             3 days

PC-BSD/trueos 5681405sys/netinet sctputil.c sctp_usrreq.c

Improve input validation for the IPPROTO_SCTP level socket options
SCTP_CONNECT_X and SCTP_CONNECT_X_DELAYED.

Some issues where found by running syzkaller.

MFC after:             3 days

PC-BSD/trueos 051d65csys/conf files, sys/dev/usb usb_fdt_support.c usb_fdt_support.h

Add common support functions for USB devices configured via FDT data.

FDT data is sometimes used to configure usb devices which are hardwired into
an embedded system. Because the devices are instantiated by the usb
enumeration process rather than by ofwbus iterating through the fdt data, it
is somewhat difficult for a usb driver to locate fdt data that belongs to
it. In the past, various ad-hoc methods have been used, which can lead to
errors such applying configuration that should apply only to a hardwired
device onto a similar device attached by the user at runtime. For example,
if the user adds an ethernet device that uses the same driver as the builtin
ethernet, both devices might end up with the same MAC address.

These changes add a new usb_fdt_get_node() helper function that a driver can
use to locate FDT data that belongs to a single unique instance of the
device. This function locates the proper FDT data using the mechanism
detailed in the standard "usb-device.txt" binding document [1].

There is also a new usb_fdt_get_mac_addr() function, used to retrieve the
mac address for a given device instance from the fdt data. It uses
usb_fdt_get_node() to locate the right node in the FDT data, and attempts to
obtain the mac-address or local-mac-address property (in that order, the
same as linux does it).

The existing if_smsc driver is modified to use the new functions, both as an
example and for testing the new functions. Rpi and rpi2 boards use this

    [6 lines not shown]

PC-BSD/trueos 8023339sys/compat/lindebugfs lindebugfs.c, sys/modules Makefile

LinuxKPI: Finalize move of lindebugfs from ports to base.

The source file was moved to base earlier and also improved upon,
but never compiled in. This patch will:
- Make a module in sys/modules
- Make lindebugfs depend on linuxkpi (for seq_file)
- Check if read/write functions are set before calling, DRM drivers
  don't always set both of them.

Reviewed by:    hps
Approved by:    imp (mentor), hps
MFC after:      1 week

PC-BSD/trueos 8b9a164sys/x86/x86 identcpu.c

Add missing setting of hv_base to the leaf that we used.
Correct setting hv_high to use regs[0], not leaf.

PC-BSD/trueos 23bce35sys/amd64/linux linux_ptrace.c, sys/compat/linux linux_misc.c linux_misc.h

Implement PTRACE_O_TRACESYSGOOD.  This makes Linux strace(1) work.

Reviewed by:    dchagin
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D20200

PC-BSD/trueos 7217903sys/compat/linux linux_socket.c

Linux send() call returns EAGAIN instead of ENOTCONN in case when the
socket is non-blocking and connect() is not finished yet.

Initial patch developed by Steven Hartland in 2008 and adopted by me.

PR:            129169
Reported by:    smh@
MFC after:      2 weeks

PC-BSD/trueos 312be56sys/kern vfs_subr.c

Fix rw->ro remount when there is a text vnode mapping.

Reported and tested by: hrs
Sponsored by:   The FreeBSD Foundation
MFC after:      16 days

PC-BSD/trueos 4743d82share/man/man4 nvd.4 nvme.4

nvd.4: Reference nda(4)

Fix a totally minor typo in nvme.4 while here.

PC-BSD/trueos 3642b65share/man/man4 nvme.4

Add note about nvd / nda selection.

Noticed by: cem@
DeltaFile
+33-1share/man/man4/nvme.4
+33-11 files

PC-BSD/trueos 9675b25sys/amd64/vmm x86.c

Expose the MD_CLEAR capability used by Intel MDS mitigations to guests.

Submitted by:   Patrick Mooney <pmooney at pfmooney.com>
Reviewed by:    kib
Tested by:      Patrick on SmartOS with Linux and Windows guests
Obtained from:  Joyent
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D20296

PC-BSD/trueos 979311dlibexec/rc rc.conf, sbin/ifconfig ifconfig.8

Change ed(4), ep(4), and fxp(4) examples to em(4).

ed(4) and ep(4) have been removed. fxp(4) remains popular in older
systems, but isn't as future proof as em(4).

Reviewed by:    bz, jhb
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D20311

PC-BSD/trueos b78c816. UPDATING

Add note to UPDATING for users of mergemaster after the move of master.passwd
and group in r347638.

Approved by:    allanjude (mentor)
DeltaFile
+6-0UPDATING
+6-01 files

PC-BSD/trueos 05da83fusr.sbin/bhyve virtio.c

bhyve virtio needs barriers

Under certain tight race conditions, we found that the lack of a memory
barrier in bhyve's virtio handling causes it to miss a NO_NOTIFY state
transition on block devices, resulting in guest stall. The investigation
is recorded in OS-7613. As part of the examination into bhyve's use of
barriers, one other section was found to be problematic, but only on
non-x86 ISAs with less strict memory ordering. That was addressed in
this patch as well, although it was not at all a problem on x86.

PR:            231117
Submitted by:   Patrick Mooney <patrick.mooney at joyent.com>
Reviewed by:    jhb, kib, rgrimes
Approved by:    jhb
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D19501

PC-BSD/trueos 6ddc0bbtools/build beinstall.sh

Update beinstall to use the mergemaster/etcupdate from the source tree instead
of the installed one.

Approved by:    will (mentor)
Differential Revision:  https://reviews.freebsd.org/D20291
DeltaFile
+10-11tools/build/beinstall.sh
+10-111 files

PC-BSD/trueos fd1567dsys/amd64/amd64 pmap.c machdep.c

Make lock-less delayed invalidation operational very early.

Apparently, there is more code trying to call pmap_remove() early,
mostly to free preloaded memory.  Instead of moving all deallocations
to the point where a scheduler is initialized, add missed setup of
thread0 di init at hammer_time().

The code in pmap_delayed_invl_start_u() is modified to not ever take
the thread lock if the thread priority is less or equal to PVM.  Since
thread0 starts at priority 0, and then is reset to PVM at
proc0_init(), this eliminates taking the thread lock during early
boot.

While there, fix off by one in comparision of the base priority.

Reported and tested by: bcran (previous version)
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      29 days

PC-BSD/trueos 4dc9dadsys/powerpc/aim mmu_oea64.c

powerpc: Fix moea64 pmap from 347952

vm_paddr_t is only 32 bits on AIM32 (currently), causing a build failure with
the shifting.

MFC after:      2 weeks
MFC with:       r347952

PC-BSD/trueos 218681estand/defaults loader.conf, stand/lua brand-trueos.lua Makefile

Restore OpenRC default and Branding for TrueOS

PC-BSD/trueos 9771568sys/kern subr_vmem.c

Update the DIAGNOSTIC-only vmem_check_sanity() after r347949.

Cursor tags are special and shouldn't be subject to the existing checks.

Reported by:    kib, David Wolfskill
MFC with:       r347949
DeltaFile
+10-0sys/kern/subr_vmem.c
+10-01 files

PC-BSD/trueos a322989cddl/contrib/opensolaris/cmd/zfs zfs_main.c

MFV/ZoL: `zfs userspace` ignored all unresolved UIDs after the first

zfsonlinux/zfs at 88cfff182432e4d1c24c877f33b47ee6cf109eee

zfs_main: fix `zfs userspace` squashing unresolved entries

The `zfs userspace` squashes all entries with unresolved numeric
values into a single output entry due to the comparsion always
made by the string name which is empty in case of unresolved IDs.

Fix this by falling to a numerical comparison when either one
of string values is not found. This then compares any numerical
values after all with a name resolved.

Signed-off-by: Pavel Boldin <boldin.pavel at gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>

Reported by:    clusteradm
Obtained from:  ZFS-on-Linux
MFC after:      3 days

PC-BSD/trueos 3fc6101sys/powerpc/aim mmu_oea64.c

powerpc64/pmap: NUMA-ize the page pv lock pool to reduce contention

It was found during building llvm that the page pv lock pool was seeing very
high contention.  Since the pmap is already NUMA aware, it was surmised that
the domains were referencing similar pages in the different domains.  This
reduces contention to the point of noise in a lockstat(8) run (~51% down to
under 5%), reducing build times by up to 20%.

This doesn't do a perfect domain alignment, just a best-guess based on
hardware available, that the domain is roughly specified in the upper bits
of the PA.  Trying to be more clever would more than likely result in
reduced performance just on the work needed.

MFC after:      2 weeks

PC-BSD/trueos 43a786bsys/vm memguard.c

Use M_NEXTFIT in memguard(9).

memguard(9) wants to avoid reuse of freed addresses for as long as
possible.  Previously it maintained a racily updated cursor which was
passed to vmem_xalloc(9) as the minimum address.  However, vmem will
not in general return the lowest free address in the arena, so this
trick only really works until the cursor has wrapped around the first
time.

Reported by:    alc
Reviewed by:    alc
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D17227
DeltaFile
+34-49sys/vm/memguard.c
+34-491 files

PC-BSD/trueos 7d39a49share/man/man9 vmem.9, sys/kern subr_vmem.c

Implement the M_NEXTFIT allocation strategy for vmem(9).

This is described in the vmem paper: "directs vmem to use the next free
segment after the one previously allocated."  The implementation adds a
new boundary tag type, M_CURSOR, which is linked into the segment list
and precedes the segment following the previous M_NEXTFIT allocation.
The cursor is used to locate the next free segment satisfying the
allocation constraints.

This implementation isn't O(1) since busy tags aren't coalesced, and we
may potentially scan the entire segment list during an M_NEXTFIT
allocation.

Reviewed by:    alc
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D17226

PC-BSD/trueos 1214634sbin/fdisk fdisk.c, sys/sys/disk mbr.h

Add DragonFly's partition number to fdisk(8) and diskmbr.h

This change doesn't make any attempt to add support for these slices to the
relevent GEOM classes.  Just register the number in fdisk and the canonical
list of kernel macros (diskmbr.h).

Obtained from:  DragonFlyBSD (794d80aa519b394b3174f20776a) (small subset of)

PC-BSD/trueos a2f4dfbsys/kern imgact_elf.c

Grammar fixes for r347690.

Submitted by:   alc
MFC after:      3 days

PC-BSD/trueos 47a17ecsys/dev/netmap if_ptnet.c

netmap: align if_ptnet to the changes introduced by r347233

This removes non-functional SCTP checksum offload support.
More information in the log message of r347233.

MFC after:      2 weeks

PC-BSD/trueos 2635d60sys/cddl/dev/dtrace/powerpc dtrace_isa.c dtrace_asm.S

powerpc/dtrace: Actually fix stack traces

Fix stack unwinding such that requesting N stack frames in lockstat will
actually give you N frames, not anywhere from 0-3 as had been before.

lockstat prints the mutex function instead of the caller as the reported
locker, but the stack frame is detailed enough to find the real caller.

MFC after:      2 weeks

PC-BSD/trueos ce45f7ccontrib/dhcpcd/src dhcp6.c dhcp.c

Clean import of OpenRC and DHCPCD into fresh FreeBSD head

PC-BSD/trueos 8a5976bsys/dev/veriexec verified_exec.c veriexec_ioctl.h, sys/security/mac_veriexec veriexec_metadata.c mac_veriexec.h

Add a new ioctl for the larger params struct that includes the label.

We need to make the find_veriexec_file() function available publicly, so
rename it to mac_veriexec_metadata_find_file_info() and make it non-static.

Bump the version of the veriexec device interface so user space will know
the labelized version of fingerprint loading is available.

Approved by:    sjg
Obtained from:  Juniper Networks, Inc.
Differential Revision:  https://reviews.freebsd.org/D20295

PC-BSD/trueos a19d3aasys/dev/veriexec verified_exec.c veriexec_ioctl.h

Add command to get version of the ioctl interface for the veriexec device.

Obtained from:  Juniper Networks, Inc.
MFC after:      1 week

PC-BSD/trueos e038f81share/man/man4 ae.4

Remove the notice that ae(4) will be removed in FreeBSD 13.