PC-BSD/trueos 5185f0eusr.bin/ldap aldap.c ber.c

Import OpenBSD ldap client

Things to do:

- Need to convert pledge() to capsicum
- Add ldap to Makefiles to build and install
- Track work going on in OpenBSD
- Bring in OpenBSD sys/cdefs for the __dead macro

PC-BSD/trueos 5bed2f3release/manifests trueos-stable.json

Backport the options change to trueos-stable so we can
use PULSE with minecraft and friends

PC-BSD/trueos 7e9b6ebrelease trueos-manifest.json

For the PR builder manifest, add archivers/cabextract as our test
port to ensure that packages build / install into the ISO without
being included as a dist package

PC-BSD/trueos 6d172a8release release-trueos.sh, release/manifests trueos-master.json

Fix an issue where the essential packages check wasn't causing the build
to abort properly if it failed.

While here, set x11/sddm as essential and also enable PULSE for openal-soft
which fixes minecraft recording with obsstudio

PC-BSD/trueos a78c8bcetc/init.d ntpd

Don't need the provide ntpd line in init.d script. Fixes some
annoying warnings about it being a virtual service
DeltaFile
+0-1etc/init.d/ntpd
+0-11 files

PC-BSD/trueos e50a6berelease release-trueos.sh

Merge pull request #114 from trueos/fix-install-iso

When parsing iso-install-packages we need to mount_nullfs and use theā€¦

PC-BSD/trueos 1d9ef2crelease release-trueos.sh

When parsing iso-install-packages we need to mount_nullfs and use the packages
from the full-repo, not the subset.

This fixes #105

PC-BSD/trueos f85aa1c. README.md

Merge pull request #112 from trueos/readme.md-patch

Update date of latest freebsd pull in readme.md
DeltaFile
+1-1README.md
+1-11 files

PC-BSD/trueos ab5a212. README.md

Update date of latest freebsd pull in readme.md
DeltaFile
+1-1README.md
+1-11 files

PC-BSD/trueos 8febe53drivers/gpu/drm/amd/include/asic_reg/bif bif_5_1_sh_mask.h, drivers/gpu/drm/amd/include/asic_reg/dce dce_11_2_sh_mask.h dce_11_0_sh_mask.h

Merge pull request #110 from trueos/fbsd-update-20180706

Fbsd update 20180706

PC-BSD/trueos a7cf097usr.sbin/bhyve bhyverun.c mevent_test.c

- Improve bhyve exit(3) error code.

The bhyve(8) exit status indicates how the VM was terminated:
        0       rebooted
        1       powered off
        2       halted
        3       triple fault

The problem is when we have wrappers around bhyve that parses the exit error code and gets 
an exit(1) for an error but inteprets it as "powered off".
So to mitigate this issue and makes it less error prone for third part applications, I 
have replaced exit(3) with value 1 to err(3) with a proper exit error from sysexits(3).

TEST PLAN
As an example without patch:

1) "Could not open backing file":
root at mp03:/ # bhyve -A -H -P -c 3 -m 8098M -s 0:0,hostbridge -s 31,lpc -l com1,/dev/nmdm1A 
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -s 
29,fbuf,tcp=10.20.21.2:6032,w=800,h=600 -s 30,xhci,tablet -s 4,virtio-blk,/dev/la/la -s 
5,virtio-net,tap10,mac=00:a0:98:2c:d5:9f FreeBSD
bhyve: Could not open backing file: /dev/la/la: No such file or directory
Could not open backing file: No such file or directory
root at mp03:/ # echo $?
1

    [34 lines not shown]

PC-BSD/trueos 329f5ccdrivers/gpu/drm/amd/include/asic_reg/bif bif_5_1_sh_mask.h, drivers/gpu/drm/amd/include/asic_reg/dce dce_11_2_sh_mask.h dce_11_0_sh_mask.h

Merge branch 'master' of https://github.com/freebsd/freebsd into fbsd-update-20180706

PC-BSD/trueos e2e3a73release/manifests trueos-snapshot.json

Merge pull request #109 from trueos/autoinstall-fix

Fixing extra s added in port name in manifest. 

PC-BSD/trueos d3ecce8release/manifests trueos-snapshot.json

Fixing extra s added in port name in manifest. Breaking snapshot build.
oops...

PC-BSD/trueos 7bc32bcrelease rc.local

Merge pull request #108 from trueos/autoinstall-fix

Fixing trueosconf autoinstall
DeltaFile
+1-1release/rc.local
+1-11 files

PC-BSD/trueos 17b18bfrelease rc.local

fixing autoinstall. Turns out glabel status first column is right aligned
DeltaFile
+1-1release/rc.local
+1-11 files

PC-BSD/trueos c99b0bbsys/dev/psci psci.c

psci: Add \n at the end of printf

Add a \n at the end of the printf if no PSCI function was found otherwise
it mess up the console log.

PC-BSD/trueos 5a73059sys/kern kern_environment.c subr_hints.c

kern_environment: Fix SYSINIT ordering

The dynamic environment was being initialized at SI_SUB_KMEM, SI_ORDER_ANY.
I added the hint-merging at SI_SUB_KMEM, SI_ORDER_ANY as well in r335998 -
this can only work by coincidence.

Re-do both to operate at SI_SUB_KMEM + 1, SI_ORDER_FIRST and SI_ORDER_SECOND
respectively to be safe. It's sufficiently obfuscated away as to when in
SU_SUB_KMEM malloc will be available, and the dynamic environment cannot be
relied upon there anyways since it's initialized at SI_ORDER_ANY.

Reported by:    bde
Discussed with: bde
X-MFC-With: r335998

PC-BSD/trueos 9f70292usr.bin/cpuset cpuset.1

Missed a bit of doc change from r335921.

PR:            229266

PC-BSD/trueos 48d632bshare/misc committers-src.dot, usr.bin/calendar/calendars calendar.freebsd

Adding myself to committers-src.dot and calendar.freebsd

Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D16154

PC-BSD/trueos c4d0432sys/netinet sctp_sysctl.c

One more 32-bit fix for r335979.

Reported by:    tuexen

PC-BSD/trueos 6f3ae81sys/mips/conf DIR-825B1

Remove duplicate configuration values as they are already defined in
std.AR_MIPS_BASE

PC-BSD/trueos 3ac162dusr.bin/top display.c

r336028 changed next_msg to a char * from char [] of fixed size.  Change
2nd argument of vsnprintf() to get the strlen of next_msg so that the
appropriate size is used.

Found with gcc.

/usr.bin/top/display.c: In function 'new_message':
/usr.bin/top/display.c:963:31: error:
argument to 'sizeof' in 'vsnprintf' call is the same expression as the
destination; did you mean to provide an explicit length?
[-Werror=sizeof-pointer-memaccess]
     vsnprintf(next_msg, sizeof(next_msg), msgfmt, args);

Reviewed by:    daichi

PC-BSD/trueos 41f6591sys/vm vm_map.c

Save a call to pmap_remove() if entry cannot have any pages mapped.

Due to the way rtld creates mappings for the shared objects, each dso
causes unmap of at least three guard map entries.  For instance, in
the buildworld load, this change reduces the amount of pmap_remove()
calls by 1/5.

Profiled by:    alc
Reviewed by:    alc, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D16148
DeltaFile
+8-1sys/vm/vm_map.c
+8-11 files

PC-BSD/trueos 5e151a5sys/vm vm_map.c

Style: no need for braces around single-line then clause.

Reviewed by:    alc, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D16148
DeltaFile
+1-2sys/vm/vm_map.c
+1-21 files

PC-BSD/trueos da197b8usr.bin/top display.c machine.c

Changed to eliminate the upper limit of command length displayed
by "-a" and expand to match terminal width

Reviewed by:    eadler
Approved by:    gnn (mentor)
Differential Revision:  https://reviews.freebsd.org/D16083

PC-BSD/trueos f736de5gnu/usr.bin/binutils/libbfd bfd.h

Teach binutils that arm64 is a 64bit architecture. This is needed to cross
build from arm64 to other architectures that use binutils.

Sponsored by:   ABT Systems Ltd

PC-BSD/trueos e5a56eblib/libnv Makefile, usr.sbin/config Makefile

config(8): Fix broken ABI

r336019 introduced ${SRCTOP}/sys to the include paths in order to pull in a
new sys/{c,}nv.h. This is wrong, because the build tree's ABI isn't
guaranteed to match what's running on the host system.

Fix instead by removing -I${SRCTOP}/sys and installing the libnv headers
with `make -C lib/libnv includes`... this may or may not get re-worked in
the future so that a userland lib isn't installing includes from sys/.

Reported by:    bdrewery

PC-BSD/trueos 147a9bbsys/amd64/include atomic.h, sys/i386/include atomic.h

Make sure kernel modules built by default are portable between UP and
SMP systems by extending defined(SMP) to include defined(KLD_MODULE).

This is a regression issue after r335873 .

Discussed with:        mmacy@
Sponsored by:          Mellanox Technologies

PC-BSD/trueos c835431sys/amd64/include counter.h

counter(9): unbreak amd64 following r336020

Apply temporary fix to counter until daylight hours.
The fact that the assembly for counter_u64_add relied on the sizeof(struct pcpu) was
the basis for the otherwise arbitrary offset never came up in D15933.
critical_{enter,exit} is now inline so the only real added overhead is the
added (mostly false) conditional branch in exit.

PC-BSD/trueos 8baf738sys/kern uipc_usrreq.c kern_descrip.c, sys/netinet in_pcb.c

Correct breakage on 32-bit platforms from r335979.

PC-BSD/trueos e56aff4sys/dev/hwpmc hwpmc_logging.c

hwpmc: remove hacks to work around incorrect pc_domain

PC-BSD/trueos 0b0f54esys/kern subr_epoch.c, sys/sys epoch_private.h

epoch(9): simplify initialization

replace manual NUMA aware allocation with a pcpu zone

PC-BSD/trueos ff20311sys/i386/include counter.h, sys/kern subr_counter.c

Back pcpu zone with domain correct pages

- Change pcpu zone consumers to use a stride size of PAGE_SIZE.
  (defined as UMA_PCPU_ALLOC_SIZE to make future identification easier)

- Allocate page from the correct domain for a given cpu.

- Don't initialize pc_domain to non-zero value if NUMA is not defined
  There are some misconceptions surrounding this field. It is the
  _VM_ NUMA domain and should only ever correspond to valid domain
  values as understood by the VM.

The former slab size of sizeof(struct pcpu) was somewhat arbitrary.
The new value is PAGE_SIZE because that's the smallest granularity
which the VM can allocate a slab for a given domain. If you have
fewer than PAGE_SIZE/8 counters on your system there will be some
memory wasted, but this is obviously something where you want the
cache line to be coming from the correct domain.

Reviewed by: jeff
Sponsored by: Limelight Networks
Differential Revision:  https://reviews.freebsd.org/D15933

PC-BSD/trueos d6f6a2a. Makefile.inc1, usr.sbin/config mkmakefile.c Makefile

config(8): De-dupe hint/env vars within a single file

r335653 flipped the order in which hints/env files are concatenated to match
the order in which vars are processed by the kernel. This is the other
hammer to drop.

Use nv(9) to de-dupe entries within a single `hint` or `env` file, using the
latest value specified for a key. This leaves some duplicates if a variable
is specified in multiple hint/env files or via `envvar` in a kernel config,
but the reversed order of concatenation (from r335653) makes this a
non-issue as the latest-specified version will be seen first.

This change also silently rewrote hint bits to use the same sanitization
process that ian@ wrote for r335642. To the kernel, hints and env vars are
basically the same thing through early boot, then get merged into the
dynamic environment once kmem becomes available and the dynamic environment
is created. They should be subjected to the same restrictions.

libnv has been added to -legacy for the time being to support the build of
config(8) with the new cnvlist API.

Tested with:    universe (11 host & 12 host)
MFC after:      1 month

PC-BSD/trueos 107a344include/rpcsvc rquota.x, lib/libutil quotafile.c

This exposes ZFS user and group quotas via the normal
quatactl(2) mechanism.  (Read-only at this point, however.)
In particular, this is to allow rpc.rquotad query quotas
for NFS mounts, allowing users to see their quotas on the
hosts using the datasets.

The changes specifically:

* Add new RPC entry points for querying quotas.
* Changes the library routines to allow non-UFS quotas.
* Changes rquotad to check for quotas on mounted filesystems,
rather than being limited to entries in /etc/fstab
* Lastly, adds a VFS entry-point for ZFS to query quotas.

Note that this makes one unavoidable behavioural change: if quotas
are enabled, then they can be queried, as opposed to the current
method of checking for quotas being specified in fstab.  (With
ZFS, if there are user or group quotas, they're used, always.)

Reviewed by:    delphij, mav
Approved by:    mav
Sponsored by:   iXsystems Inc
Differential Revision:  https://reviews.freebsd.org/D15886

PC-BSD/trueos 14ae1c4sys/dev/ath if_ath.c

ath(4): Fix typo in debugging code

PR:            229548
Submitted by:   David Binderman <dcb314 AT hotmail.com>

PC-BSD/trueos 3015145. Makefile.inc1, usr.sbin/config mkmakefile.c Makefile

Revert r336011,r336012 until I can competently test

PC-BSD/trueos b01f6a7. Makefile.inc1, usr.sbin/config Makefile mkmakefile.c

Fix build after r336011

Add libnv to bootstrap-tools, use ${SRCTOP}/sys headers.

PC-BSD/trueos 8980b27usr.sbin/config mkmakefile.c Makefile

config(8): De-dupe hint/env vars within a single file

r335653 flipped the order in which hints/env files are concatenated to match
the order in which vars are processed by the kernel. This is the other
hammer to drop.

Use nv(9) to de-dupe entries within a single `hint` or `env` file, using the
latest value specified for a key. This leaves some duplicates if a variable
is specified in multiple hint/env files or via `envvar` in a kernel config,
but the reversed order of concatenation (from r335653) makes this a
non-issue as the latest-specified version will be seen first.

This change also silently rewrote hint bits to use the same sanitization
process that ian@ wrote for r335642. To the kernel, hints and env vars are
basically the same thing through early boot, then get merged into the
dynamic environment once kmem becomes available and the dynamic environment
is created. They should be subjected to the same restrictions.

MFC after:      1 month

PC-BSD/trueos caf6998sys/amd64/amd64 pmap.c, sys/i386/i386 pmap.c

Extend r335969 to superpages.

It is possible that a fictitious unmanaged userspace mapping of
superpage is created on x86, e.g. by pmap_object_init_pt(), with the
physical address outside the vm_page_array[] coverage.

Noted and reviewed by:  alc
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D16085

PC-BSD/trueos ed085cdsys/riscv/riscv machdep.c

riscv:  Remove unused variable "code"

gcc found that the variabl "code", while being assigned a value, isn't
be used for anything.

Reviewed by:    br
Differential Revision:  https://reviews.freebsd.org/D16114

PC-BSD/trueos 288402csys/amd64/amd64 pmap.c, sys/i386/i386 pmap.c

Revert r335999 to re-commit with the correct error message.

PC-BSD/trueos ae591a4share/man/man9 dpcpu.9, sys/kern kern_tc.c

Create a new macro for static DPCPU data.

On arm64 (and possible other architectures) we are unable to use static
DPCPU data in kernel modules. This is because the compiler will generate
PC-relative accesses, however the runtime-linker expects to be able to
relocate these.

In preparation to fix this create two macros depending on if the data is
global or static.

Reviewed by:    bz, emaste, markj
Sponsored by:   ABT Systems Ltd
Differential Revision:  https://reviews.freebsd.org/D16140

PC-BSD/trueos e459b7bsys/mips/conf AR71XX_BASE

Remove redundant device ar71xx_wdog which is now included from
std.AR_MIPS_BASE

PC-BSD/trueos c3e04b4sys/mips/conf std.AR_MIPS_BASE

Remove redundant AH_DEBUG_ALQ.

PC-BSD/trueos 8d923desys/conf files files.mips, sys/mips/conf std.MALTA

Make ZSTD a real option via ZSTDIO.

It looks like the intent was to allow ZSTD support to be
compiled into the kernel with options ZSTDIO. But it doesn't look
like that was ever implemented or I'm missing how to do it.

I did a cursory audit of kernel config files and made a decision to
enable ZSTDIO in riscv GENERIC and mips MALTA configurations.  All other
kernel configurations already had this option in their kernel configs
but they didn't do anything useful as the feature was declared as
"standard" prior to this.

Reviewed by:    cem allanjude
Differential Revision:  https://reviews.freebsd.org/D16007

PC-BSD/trueos 784ef2fsys/kern kern_clock.c

Split up deadlkres() to make it more readable in anticipation of
further changes adding another level of indentation.

Some of the logic got simplified with the break out functions.
There should be no functional changes.

Reviewed by:    kib
Sponsored by:   iXsystems, Inc.
Differential Revision:         https://reviews.freebsd.org/D15914
DeltaFile
+73-79sys/kern/kern_clock.c
+73-791 files

PC-BSD/trueos e2ea71fusr.bin/netstat inet.c unix.c, usr.sbin/tcpdrop tcpdrop.c

Work around lame warnings in ancient gcc on 32-bit platforms.

Fixes r335979.

PC-BSD/trueos fefcdefsys/vm vm_page.c

Copyout(9) on 4/4 i386 needs correct vm_page_array[].

On the 4/4 i386, copyout(9) may need to call pmap_extract_and_hold()
on arbitrary userspace mapping.  If the mapping is backed by the
non-managed cdev pager or by the sg pager, on dense configs we might
access arbitrary element of vm_page_array[], in particular, not
corresponding to a page from the memory segment.  Initialize such pages
as fictitious with the corresponding physical address.

Reported by:    bde
Reviewed by:    alc, markj (previous version)
Sponsored by:   The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D16085
DeltaFile
+10-0sys/vm/vm_page.c
+10-01 files