PC-BSD/trueos c7fad43. README.md

TRUEOS-1: Fix Badge URL

Fixes broken build bage
DeltaFile
+1-1README.md
+1-11 files

PC-BSD/trueos 546305a. Jenkinsfile

Minor spacing changes to fix THD-2
DeltaFile
+6-0Jenkinsfile
+6-01 files

PC-BSD/trueos 9461515usr.sbin/sendmail/confs Makefile

Remove /etc/mail/aliases -> /etc/aliases link for now

PC-BSD/trueos 053b124usr.sbin/sendmail/confs Makefile

Fix build of sendmail confs

PC-BSD/trueos 11dfed7usr.sbin/sendmail Makefile, usr.sbin/sendmail/confs Makefile

Add confs subdir to sendmail, this should ensure that the files
of /etc/mail get created and included in the OS-sendmail base package
going forward

This fixes #226

PC-BSD/trueos f20e4e4sys/arm64/rockchip/clk rk3399_cru.c rk3399_pmucru.c, sys/dev/sfxge/common efx_regs_mcdi.h ef10_nic.c

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

PC-BSD/trueos 14f44afusr.sbin/sendmail/confs Makefile

Remove /etc/mail/aliases -> /etc/aliases link for now

PC-BSD/trueos 335ff57sys/arm64/rockchip/clk rk3399_cru.c rk3399_pmucru.c, sys/dev/sfxge/common efx_regs_mcdi.h ef10_nic.c

Merge pull request #232 from miwi-fbsd/trueos-master

Sync with FreeBSD

PC-BSD/trueos 4f60ddfrelease/manifests trueos-snapshot.json

Add sysup depend to runtime in TrueOS Snapshots

PC-BSD/trueos 358b5abusr.sbin/sendmail Makefile, usr.sbin/sendmail/confs Makefile

Merge pull request #230 from trueos/fix-226

Add confs subdir to sendmail, this should ensure that the files

PC-BSD/trueos d78da71sys/arm64/rockchip/clk rk3399_cru.c rk3399_pmucru.c, sys/dev/sfxge/common efx_regs_mcdi.h ef10_nic.c

Merge remote-tracking branch 'freebsd/master' into trueos-master

PC-BSD/trueos d07109acontrib/ipfilter ip_fil.c

As part of the general cleanup of the ipfilter code, special cases
are committed separately to document fixing them separately from
the general cleanup. In this case we don't want to hide the utter
brokenness of what is being fixed.

Clean up a discombobulated block of #if's, with one block unreachable.
ip_fil.c is used in ipftest which is used to dry-run test ipfilter
rules in userspace without loading them in the kernel. The call to
(*ifp->if_output) matches that in the FreeBSD kernel.

Further testing and work will be required to make ipftest fully
functional.

MFC after:      1 week

PC-BSD/trueos ef04723sys/powerpc/ofw openpic_ofw.c, sys/powerpc/powermac cpcht.c pmu.c

Sprinkle EARLY_DRIVER_MODULE around the tree

Mark some buses as BUS_PASS_BUS, and some resources as BUS_PASS_RESOURCE.
This also decouples some resource attachment orderings from being races by
device tree ordering, instead relying on the bus pass to provide the
ordering.

This was originally intended to support multipass suspend/resume, but it's
also needed on PowerMacs when using fdt, as the device tree seems to get
created in reverse of the OFW tree.
Reviewed by:    nwhitehorn (long ago)
Differential Revision:  https://reviews.freebsd.org/D918

PC-BSD/trueos ff5a548sys/powerpc/booke pmap.c

powerpc: preload_addr_relocate is no longer necessary for booke

The same behavior was moved to machdep.c, paired with AIM's relocation,
making this redundant.  With this, it's now possible to boot FreeBSD with
ubldr on a uboot Book-E platform, even with a
KERNBASE != VM_MIN_KERNEL_ADDRESS.

PC-BSD/trueos c46a2c7lib/libarchive config_freebsd.h Makefile

Revert r340997 at the request of multiple users.
- breaks ports-mgmt/pkg build for mips64, powerpc64 and i386 for some users.

--- pkg-static ---
/usr/lib/liblzma.a(stream_encoder_mt.o): In function `mythread_cond_init':
/usr/local/poudriere/jails/ppc64/usr/src/contrib/xz/src/common/mythread.h:230:
undefined reference to `pthread_condattr_init'

Reported by:    jhibbits zeising

PC-BSD/trueos 060a1f4tools/KSE/ksetest kse_threads_test.c kse_asm.S, tools/KSE/rr rr.c kse_asm.S

Remove test for KSE (removed in 2008).

Approved by:    julian

PC-BSD/trueos ff1fac3sys/kern init_main.c

Remove a needlessly clever hack to start init with sys_exec().

Construct a struct image_args with the help of new exec_args_*() helper
functions and call kern_execve().

The previous code mapped a page in userspace, copied arguments out
to it one at a time, and then constructed a struct execve_args all so
that sys_execve() can call exec_copyin_args() to copy the data back in
to a struct image_args.

Opencode the part of pre_execve()/post_execve() that releases a
reference to the initial vmspace. We don't need to stop threads like
they do.

Reviewed by:    kib, jhb (prior version)
Obtained from:  CheriBSD
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D15469
DeltaFile
+45-52sys/kern/init_main.c
+45-521 files

PC-BSD/trueos fec90e1lib/libprocstat libprocstat.c libprocstat.h, usr.bin/fstat fstat.c

Print type designator 'D' for the KF_TYPE_DEV files.

No type-specific data is provided by the kernel.

Sponsored by:   Mellanox Technologies
MFC after:      1 week

PC-BSD/trueos abd55a4sys/compat/linuxkpi/common/src linux_compat.c, sys/sys user.h

Improve procstat reporting for the linux cdev file descriptors.

If there is a vnode attached to the linux file, use it to fill
kinfo_file.  Otherwise, report a new KF_TYPE_DEV file type, without
supplying any type-specific information.

KF_TYPE_DEV is supposed to be used by most devfs-specific file types.

Sponsored by:   Mellanox Technologies
MFC after:      1 week

PC-BSD/trueos 4d06bcbrelease/amd64 mkisoimages.sh

mkisoimages.sh: don't use -p flag when copying loader.efi to msdosfs.

This fixes 'cdrom' target in the case when world was built by user,
and not root.

Reviewed by:    imp
Differential revision:  https://reviews.freebsd.org/D18414

PC-BSD/trueos 408e59flib/libthr/thread thr_private.h

Remove declarations of syscalls not used in libthr.

Reviewed by:    kib
Sponsored by:   DARPA, AFRL

PC-BSD/trueos 0c5a747usr.sbin/sendmail/confs Makefile

Fix build of sendmail confs

PC-BSD/trueos 067a9a7usr.sbin/sendmail Makefile, usr.sbin/sendmail/confs Makefile

Add confs subdir to sendmail, this should ensure that the files
of /etc/mail get created and included in the OS-sendmail base package
going forward

This fixes #226

PC-BSD/trueos b5e1761sys/kern sys_process.c

Add a missing definition for the !COMPAT_FREEBSD32 case.

Reported by:    jenkins
MFC with:       r341442
Sponsored by:   The FreeBSD Foundation

PC-BSD/trueos 53d55c9sys/amd64/amd64 machdep.c, sys/arm/arm machdep_kdb.c

Plug memory disclosures via ptrace(2).

On some architectures, the structures returned by PT_GET*REGS were not
fully populated and could contain uninitialized stack memory.  The same
issue existed with the register files in procfs.

Reported by:    Thomas Barabosch, Fraunhofer FKIE
Reviewed by:    kib
MFC after:      3 days
Security:       kernel stack memory disclosure
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D18421

PC-BSD/trueos afa4092libexec/rtld-elf rtld.c rtld.h

Some fixes for LD_BIND_NOW + ifuncs.

- Do not perform ifunc relocations together with other PLT relocations
  in PLT.  Instead, do it during an additional pass over the init
  list, so that ifuncs are resolved in the order of dso
  dependencies. This allows the ifuncs resolvers to call into depended
  libs.  Init list now includes all objects instead of only objects
  with init/fini callables.
- Disable relro protection around bind_now ifunc relocations.

I considered calling ifunc resolvers of dso after initializers of all
dependencies are processed, and decided that this is wrong/should not
be supported. The order now is normal relocations for all
objects->ifunc resolution in init order->initializers, where each step
does complete pass over all loaded objects before moving to the next
step.

Reported, tested and reviewed by:       emaste
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D18400

PC-BSD/trueos f60daffbin/pkill pkill.1

Clarify that /dev/kmem is not used.
Move cross ref to right place while here.

Submitted by:   kib
MFC after:      7 days
DeltaFile
+8-1bin/pkill/pkill.1
+8-11 files

PC-BSD/trueos f76ddeflibexec/rtld-elf rtld.c

Provide naive but self-contained implementations of memset(3) and
bzero(3) for rtld.

This again reduces rtld dependency on libc, and in future, avoid ifunc
relocations when the functions are converted to ifuncs in libc.

Reported by:    mjg
Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D18400

PC-BSD/trueos 046dbd9sys/cddl/contrib/opensolaris/uts/common/fs/zfs zfs_ioctl.c spa.c

zfs: we can boot from dataset with large_dnode enabled

loader has been supporting large_dnode for some time, no need to block the
feature for boot dataset.

Reviewed by:    avg
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D18391

PC-BSD/trueos 8519e5brelease/manifests trueos-snapshot.json

Merge pull request #229 from trueos/miwi-fbsd-patch-2

- Fix json

PC-BSD/trueos 026545brelease/manifests trueos-snapshot.json

- Fix json

PC-BSD/trueos 8525381stand/i386/kgzldr crt.s crt.S, stand/i386/mbr mbr.S mbr.s

stand/i386: rename .s to .S to use Clang IAS

As part of the migration away from obsolete binutils we want to retire
GNU as.  Most assembly files used on amd64 have a .S extension and
(via rules in share/mk/bsd.suffixes.mk) are assembled with Clang's
Integrated Assembler (IAS).  Rename files in stand/i386 to .S to use
the integrated assembler.

Clang's IAS supports the defsym option (via -Wa,) but only with one
dash, not two.  As both -defsym and --defsym are accepted by GNU as,
use the former.

PR:            233611
Reviewed by:    tsoome
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D18369

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

- Fix json 

pointy hat: miwi

PC-BSD/trueos 7fc12d1release/packages runtime-development.ucl

Don't run compiler-bootstrap any further on -development-
package installation

PC-BSD/trueos 228422drelease/packages runtime-development.ucl

Don't run compiler-bootstrap any further on -development-
package installation

PC-BSD/trueos 644a988bin/pkill pkill.1

Note these tools use kvm(3) and not procfs as in Solaris.

Obtained from:  NetBSD
MFC after:      7 days
DeltaFile
+7-1bin/pkill/pkill.1
+7-11 files

PC-BSD/trueos 3a431fastand defs.mk

Move inclusion of src.opts.mk later.

src.opts.mk includes bsd.own.mk. This in turn defines CTFCONVERT_CMD
depending on the MK_CTF value. We then set MK_CTF to no, which has no
real effect. The solution is to set all the MK_foo values before
including src.opts.mk.

This should stop the cdboot binary from exploding in size for releases
built WITH_CTF=yes in src.conf.

Sponsored by: Netflix
DeltaFile
+8-4stand/defs.mk
+8-41 files

PC-BSD/trueos b706d3cshare/man/man4 netmap.4

netmap(4): improve man page

Reviewed by:    bcr
Differential Revision:  https://reviews.freebsd.org/D18057
DeltaFile
+78-57share/man/man4/netmap.4
+78-571 files

PC-BSD/trueos 4b8684blib/libc Makefile, lib/libthr Makefile

disable BIND_NOW in libc, libthr, and rtld

An issue remains with BIND_NOW and processes using threads.  For now,
restore libc's BIND_NOW disable, and also disable BIND_NOW in rtld and
libthr.

A patch is in review (D18400) that likely fixes this issue, but just
disable BIND_NOW pending further testing after it is committed.

PR:            233333
Sponsored by:   The FreeBSD Foundation

PC-BSD/trueos 39c9c74release/manifests trueos-snapshot.json

Merge pull request #227 from trueos/miwi-fbsd-patch-1

Optimizing

PC-BSD/trueos e293711share/man/man7 build.7

Use less misleading directory name.

MFC after:      2 weeks
Sponsored by:   DARPA, AFRL

PC-BSD/trueos 657dcfbshare/mk src.opts.mk

Disable the BSD CRT code on powerpc and sparc64, they need extra crt*.o
files that haven't been implemented.

Reported by:    sbruno
MFC with:       r339738
Sponsored by:   DARPA, AFRL

PC-BSD/trueos b1bbabbsys/powerpc/powerpc machdep.c

powerpc: Check for a fdt in the metadata if it doesn't already exist

It's possible the fdt pointer was passed in via the metadata, as is done in
ubldr.  Check for the fdt here, instead of working with a NULL fdt, and
panicking.

PC-BSD/trueos 06ae22csys/powerpc/booke booke_machdep.c

powerpc/booke: Check for the metadata address by physical address

The metadata pointer will almost never be at or above 'btext', as btext is a
relocated symbol, so will be based at VM_MIN_KERNEL_ADDRESS, not at
KERNBASE.  Check the address against kernload, where the kernel is
physically loaded.

PC-BSD/trueos a4a2c96stand/i386/common bootargs.h, stand/i386/gptboot gptboot.c

Eliminate duplicated code and struct member definitions in the handoff
of args data between gptboot/zfsboot and loader(8).

Despite what seems like a lot of changes here, there are no actual
changes in behavior, or in the data layout in the structures involved.
This is just eliminating identical code pasted into multiple locations.

In detail, the changes are...

- Move struct zfs_boot_args definition from libsa/zfs/libzfs.h to
  i386/common/bootargs.h because it is specific to x86 booting and the
  handoff between zfsboot and loader, and has no relation to the zfs
  library code in general.

- The geli_boot_args and zfs_boot_args structs both contain an identical
  set of member variables containing geli information.  Extract this out
  to a new geli_boot_data struct, and embed it in the arg-passing structs.

- Provide new routines geli_import_boot_data() and geli_export_boot_data()
  that can be shared between gptboot, zfsboot, and loader instead of
  pasting identical code into several different .c files.

- Remove some checks for a NULL pointer that can never be true because the
  pointer being tested was set using pointer math (kargs + 1) and that can
  never result in NULL in this code.

PC-BSD/trueos 2b14b2fsbin/nvmecontrol logpage.c

Fix typo in comment

Sponsored by: Netflix

PC-BSD/trueos 028de8bsbin/nvmecontrol wdc.c

Delete the undocumented alias 'wds'.

This was a typo for wdc. Eliminate it since it was in error. People
should use either 'wdc' or 'hgst' for the vendor from now on. 'hgst'
works for all versions this functionality is present for.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18403

PC-BSD/trueos 39e02c8sbin/nvmecontrol intel.c logpage.c

Move Intel specific log pages to intel.c

Move the Intel specific log pages (including the one that samsung
implements) to intel.c. Add comment to the samsung vendor that it will
be going away soon.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18403

PC-BSD/trueos 32a1fe0sbin/nvmecontrol nvmecontrol.c ns.c

Usage cleanup pt 2

Eliminage redundant spaces and nvmecontrol at start of all the usage
strings. Update the usage printing code to add them back when
presenting to the user. Allow multi-line usage messages and print
proper leading spaces for lines starting with a space.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18403

PC-BSD/trueos 7b1468fsbin/nvmecontrol ns.c identify.c

Usage cleanup pt 1

Provide a usage() function that takes a struct nvme_function pointer
and produces a usage mssage. Eliminate all now-redundant usage
functions. Propigate the new argument through the program as needed.
Use common routine to print usage.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18403