PC-BSD/trueos 0d12db2Jenkins Jenkinsfile-freenas-master

Annndddd add back in the stray {... Sigh, too tired to be doing this now :P

PC-BSD/trueos fe649abJenkins Jenkinsfile-freenas-master

Annndddd add back in the stray {... Sigh, too tired to be doing this now :P

PC-BSD/trueos b3d07c3Jenkins Jenkinsfile-freenas-master

Fix stray {

PC-BSD/trueos ed961fbJenkins Jenkinsfile-freenas-master

Fix stray {

PC-BSD/trueos 64da2faJenkins Jenkinsfile-freenas-master

Do the snapshot phase before we clean the workspace

PC-BSD/trueos 566cfd9Jenkins Jenkinsfile-freenas-master

Do the snapshot phase before we clean the workspace

PC-BSD/trueos 7ada415Jenkins/scripts snapobj.sh

Make sure to pass "$2" to prepare()

PC-BSD/trueos 1ebfc72Jenkins/scripts snapobj.sh

Make sure to pass "$2" to prepare()

PC-BSD/trueos 80e8b6fJenkins Jenkinsfile-freenas-master, Jenkins/scripts snapobj.sh

Fix stray / in snapshot creation

PC-BSD/trueos 6213d85Jenkins Jenkinsfile-freenas-master, Jenkins/scripts snapobj.sh

Fix stray / in snapshot creation

PC-BSD/trueos da1a101Jenkins Jenkinsfile-freenas-master, Jenkins/scripts snapobj.sh

Update FreeNAS PR builds, lets start using ZFS to snapshot and
rollback the /usr/obj/usr/freenas-src dataset. This will come
into play when we enable full PR builds again and avoid lots of
rebuilding of OS/Packages.

PC-BSD/trueos a7cdf5eJenkins Jenkinsfile-freenas-master, Jenkins/scripts snapobj.sh

Update FreeNAS PR builds, lets start using ZFS to snapshot and
rollback the /usr/obj/usr/freenas-src dataset. This will come
into play when we enable full PR builds again and avoid lots of
rebuilding of OS/Packages.

PC-BSD/trueos e2bcbd3. Makefile.inc1

Replace the '-' with a '.' in the PKG_VERSION string, this is to
test a theory that pkg is interpreting things after the '-' as the
actual version string, which throws off its upgrade/downgrade
messaging
DeltaFile
+3-3Makefile.inc1
+3-31 files

PC-BSD/trueos 5e26701. Makefile.inc1

Replace the '-' with a '.' in the PKG_VERSION string, this is to
test a theory that pkg is interpreting things after the '-' as the
actual version string, which throws off its upgrade/downgrade
messaging
DeltaFile
+3-3Makefile.inc1
+3-31 files

PC-BSD/trueos 7bbf607contrib/llvm/lib/Demangle ItaniumDemangle.cpp, contrib/llvm/lib/Target/X86 X86ISelLowering.cpp X86InstrAVX512.td

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

PC-BSD/trueos 14cfae9usr.sbin/bhyve pci_virtio_scsi.c bhyve.8

Allow CTL device specification in bhyve virtio-scsi.

There was a large refactoring done in CTL to allow multiple ioctl frontend
ports (and respective devices) to be created, particularly for bhyve.
Unfortunately, respective part of bhyve functionality got lost somehow from
the original virtio-scsi commit.  This change allows wanted device path to
be specified in either of two ways:
 -s 6,virtio-scsi,/dev/cam/ctl1.1
 -s 6,virtio-scsi,dev=/dev/cam/ctl2.3
If neither is specified, the default /dev/cam/ctl device is used.

While there, remove per-queue CTL device opening, which makes no sense at
this point.

Reported by:    wg
Reviewed by:    araujo
MFC after:      3 days
Sponsored by:   iXsystems, Inc.
Differential Revision:  https://reviews.freebsd.org/D18504

PC-BSD/trueos 7e31d1dsys/cddl/compat/opensolaris/kern opensolaris_policy.c, sys/fs/ext2fs ext2_vnops.c

Remove unused argument to priv_check_cred.

Patch mostly generated with cocinnelle:

@@
expression E1,E2;
@@

- priv_check_cred(E1,E2,0)
+ priv_check_cred(E1,E2)

Sponsored by:   The FreeBSD Foundation

PC-BSD/trueos d41b4eccontrib/llvm/lib/Demangle ItaniumDemangle.cpp, contrib/llvm/lib/Target/X86 X86ISelLowering.cpp X86InstrAVX512.td

Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
the upstream release_70 branch r348686 (effectively, 7.0.1 rc3).  The
release will follow very soon, but no more functional changes are
expected.

Release notes for llvm, clang and lld 7.0.0 are available here:
<http://releases.llvm.org/7.0.0/docs/ReleaseNotes.html>
<http://releases.llvm.org/7.0.0/tools/clang/docs/ReleaseNotes.html>
<http://releases.llvm.org/7.0.0/tools/lld/docs/ReleaseNotes.html>

PR:            230240, 230355
Relnotes:       yes
MFC after:      2 months

PC-BSD/trueos 2e14ce7contrib/wpa/src/ap wpa_auth_ft.c dpp_hostapd.c, contrib/wpa/src/common dpp.c qca-vendor.h

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

Sync with FreeBSD to fix CVE-2018-17160

PC-BSD/trueos e870850sys/net iflib.c

Fix !tx_abdicate error from r336560

r336560 was supposed to restore pre-r323954 behaviour when tx_abdicate is
not set (the default case). However, it appears that rather than the drainage
check being made conditional on tx_abdicate being set, it was duplicated
so it occured twice if tx_abdicate was set and once if it was not.

Now when !tx_abdicate, drainage is only checked if the doorbell isn't
pending.

Reported by:    lev
MFC after:      1 week
Sponsored by:   Limelight Networks
DeltaFile
+0-1sys/net/iflib.c
+0-11 files

PC-BSD/trueos 7120659. UPDATING ObsoleteFiles.inc

Set tentative merge date, and add UPDATING note.

PC-BSD/trueos 9be8abasys/security/audit audit.h

audi: replace open-coded TDP_AUDITREC checks with the macro

Sponsored by:   The FreeBSD Foundation

PC-BSD/trueos b598872sys/x86/x86 ucode.c

Fix the PAE kernel gcc build.

The error was caused by map_ucode() casting a vm_paddr_t to a void *.
Use a uintptr_t instead to match the caller.  Fix some style bugs while
here.

Reported by:    bde
Reviewed by:    bde
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
DeltaFile
+10-8sys/x86/x86/ucode.c
+10-81 files

PC-BSD/trueos 1b02aefsys/dev/asmc asmcvar.h asmc.c

asmc: Add Support for MacBookAir 7,1 and 7,2

PR:            226172
Submitted by:   James Wright <james.wright at jigsawdezign.com>
Reported by:    James Wright <james.wright at jigsawdezign.com>
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D18396

PC-BSD/trueos ba8523csys/kern kern_descrip.c

fd: dedup code in sys_getdtablesize

Sponsored by:   The FreeBSD Foundation

PC-BSD/trueos 5936383sys/kern kern_resource.c, sys/sys resourcevar.h

Make lim_cur inline if possible.

It is a function call only to accomodate *some* ABIs which install a hook.
They only care for 3 types of limits: DATA, STACK, VMEM

Instead of always calling the func, see at compilation time if the requested
limit is something else and just do the read if so.

Sponsored by:   The FreeBSD Foundation

PC-BSD/trueos 45f96absys/kern kern_descrip.c

fd: tidy up closing a fd

- avoid a call to knote_close in the common case
- annotate mqueue as unlikely

Sponsored by:   The FreeBSD Foundation

PC-BSD/trueos 78cf9b9sys/kern kern_descrip.c

fd: stop looking for exact freefile after allocation

If a lower fd is closed later, the lookup goes to waste. Allocation
always performs the lookup anyway.

Sponsored by:   The FreeBSD Foundation

PC-BSD/trueos 3e3733asys/arm64/acpica acpi_machdep.c

Only read the ACPI proximity tabled on arm64 when we are booting from
ACPI.

Sponsored by:   DARPA, AFRL

PC-BSD/trueos 30c4d65share/vt/keymaps uk.macbook.kbd, stand/powerpc/uboot ppc64_elf_freebsd.c

Merge ^/head r341764 through r341812.

PC-BSD/trueos 3140f98share/mk src.opts.mk

For arm and armv6, only enable LLVM target support for arm by default,
to shrink libllvm.a.

This is a workaround for "relocation truncated to fit" errors with BFD
ld 2.17.50 on arm and armv6, when linking executables against it.

The required range extensions are not yet supported by this very old
version of BFD ld.  When arm and armv6 userland can be successfully
linked by lld, this workaround can be removed.

PC-BSD/trueos 1fcf9e5sys/dev/ahci ahci_pci.c

Remove questionable initialization for ICH8M, rely on BIOS to properly
initialize the controller.

According to the datasheet, the old code checks if port 2 (P2E, 0x4) was
the only enabled port (except port 0, which was ignored by mask 0xfe),
and issue a write to the PCS register to disable all but port 0, right
before ahci_ctlr_reset.

Some other operating systems would issue a port enable to all ports, but
since the current code only does the special initialization for ICH8M,
it entirely and rely on BIOS to do the right thing (the alternative
would be https://reviews.freebsd.org/D18300?id=50922 , should we see
reports that we really need to do it).

Reviewed by:    mav
MFC after:      3 months
Differential Revision:  https://reviews.freebsd.org/D18300

PC-BSD/trueos 28de053sys/kern kern_thread.c, sys/x86/x86 mp_x86.c

Free bootstacks after AP startup.

Bootstacks are unused after APs executed sched_throw() in
init_secondary_tail() and started executing on proper idle thread
stack.  Add sysinit that detects that the idle thread for each CPU was
scheduled at least once, and free corresponding bootstack.

Slight addition of the code (~200 bytes) is compensated by the saving,
because even on typical small modern desktop CPU we leak 128K of
memory otherwise (4 pages x 8 threads).

Reviewed by:    jhb
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D18486

PC-BSD/trueos 4045451lib/libc/sys getfh.2, sys/kern vfs_syscalls.c

Remove special case handling for getfhat(fd, NULL, handle).

There is no reason for it to behave differently from openat(fd, NULL).
Also the handling did not worked because the substituted path was from
the system address space, causing EFAULT.

Submitted by:   Jack Halford <jack at gandi.net>
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D18501

PC-BSD/trueos 2918dccsys/riscv/riscv pmap.c

Remove an unused malloc(9) type.

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation

PC-BSD/trueos 32498fdsys/riscv/riscv pmap.c

Use inline tests for individual PTE bits in the RISC-V pmap.

Inline tests for PTE_* bits are easy to read and don't really require a
predicate function, and predicates which operate on a pt_entry_t are
inconvenient when working with L1 and L2 page table entries.

Reviewed by:    jhb
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D18461
DeltaFile
+20-51sys/riscv/riscv/pmap.c
+20-511 files

PC-BSD/trueos 6122d43share/vt/keymaps uk.macbook.kbd INDEX.keymaps

Add uk.macbook.kbd keymap (vt)

PR:            215185
Submitted by:   James Wright <james.wright at jigsawdezign.com>
Reported by:    James Wright <james.wright at jigsawdezign.com>
Reviewed by:    emaste (earlier version)
MFC after:      1 week
Sponsored by:   Dell EMC Isilon
Differential Revision:  https://reviews.freebsd.org/D18395

PC-BSD/trueos 5b0ef9csys/powerpc/booke locore.S

powerpc/booke: Don't get and use the load offset for TOC on APs

The code was a near exact copy of the code in startup, but it doesn't need
the complexity since the kernel is already relocated.  With
VM_MIN_KERNEL_ADDRESS as currently set to KERNBASE, this doesn't cause a
problem, because it's a zero offset.  However, when KERNBASE is changed to a
physical load address, it then has a non-zero offset, and ends up with an
invalid stack pointer, causing the AP to hang.

PC-BSD/trueos 46a4fa6libexec/rc rc.subr

rc.subr: Implement list_vars without using 'read'

'read' pessimistically read(2)s one byte at a time, which can be quite
silly for large environments in slow emulators.

In my boring user environment, truss shows that the number of read()
syscalls to source rc.subr and invoke list_vars is reduced by something like
3400 to 60.  ministat(1) shows a significant time difference of about -71%
for my environment.

Suggested by:   jilles
Discussed with: dteske, jhb, jilles
Differential Revision:  https://reviews.freebsd.org/D18481
DeltaFile
+19-7libexec/rc/rc.subr
+19-71 files

PC-BSD/trueos 934f800usr.bin/truss main.c

Validate the string size parameter passed to -s.

Use strtonum() to reject negative sizes instead of core dumping.

PR:            232206
Submitted by:   David Carlier <devnexen at gmail.com>
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D17537

PC-BSD/trueos da25748sys/mips/conf ADM5120.hints IDT.hints

Remove stray hints files.

PC-BSD/trueos 7b28e77sys/kern kern_sig.c, tests/sys/kern ptrace_test.c

Don't report stale signal information for non-signal events in ptrace_lwpinfo.

Once a signal's siginfo was copied to 'td_si' as part of the signal
exchange in issignal(), it was never cleared.  This caused future
thread events that are reported as SIGTRAP events without signal
information to report the stale siginfo in 'td_si'.  For example, if a
debugger created a new process and used SIGSTOP to stop it after
PT_ATTACH, future system call entry / exit events would set PL_FLAG_SI
with the SIGSTOP siginfo in pl_siginfo.  This broke 'catch syscall' in
current versions of gdb as it assumed PL_FLAG_SI with SIGTRAP
indicates a breakpoint or single step trap.

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D18487

PC-BSD/trueos 2243bfesbin/ipfw ipfw2.c

Rework how protocol number is tracked in rule. Save it when O_PROTO
opcode will be printed. This should solve the problem, when protocol
name is not printed in `ipfw -N show`.

Reported by:    Claudio Eichenberger <cei at yourshop.com>
MFC after:      1 week
DeltaFile
+6-10sbin/ipfw/ipfw2.c
+6-101 files

PC-BSD/trueos 4e62948sbin/ipfw ipfw2.c

Use correct size for IPv4 address in gethostbyaddr().

When u_long is 8 bytes, it returns EINVAL and 'ipfw -N show' doesn't work.

Reported by:    Claudio Eichenberger <cei at yourshop.com>
MFC after:      1 week
DeltaFile
+2-1sbin/ipfw/ipfw2.c
+2-11 files

PC-BSD/trueos 38e00d5sys/powerpc/aim aim_machdep.c, sys/powerpc/include trap.h

ppc64: handle exception 0x1500 (soft patch)

This change adds a hypervisor trap handler for exception 0x1500 (soft patch),
normalizing all VSX registers and returning.
This avoids a kernel panic due to unknown exception.

Change made with the collaboration of leonardo.bianconi_eldorado.org.br,
that found out that this is a hypervisor exception and not a supervisor one,
and fixed this in the code.

Reviewed by:    jhibbits, sbruno
Differential Revision:  https://reviews.freebsd.org/D17806

PC-BSD/trueos 13b1c7a. Makefile.inc1

Clean stale wpa dependencies and objects after r341759

The wpa update added some source files with the same name as a file in
another directory (found via .PATH in the previous version).  Having a
stale entry in a .depend file means the new file won't be built, so test
for this case and if found remove all of wpa's dependency files.

MFC with:       r341759
Sponsored by:   The FreeBSD Foundation
DeltaFile
+8-0Makefile.inc1
+8-01 files

PC-BSD/trueos 1f9b1e2sbin/ping ping.c

ping(8): add space after "<=" as per style(9).

MFC after:      1 week
X-MFC-with:     r341768
DeltaFile
+1-1sbin/ping/ping.c
+1-11 files

PC-BSD/trueos b2b1b70sys/compat/linuxkpi/common/include/asm atomic.h atomic-long.h

Remove no longer needed ifdefs in the LinuxKPI, after r341787.

Differential Revision:  https://reviews.freebsd.org/D18450
Reviewed by:           kib@
MFC after:             3 days
Sponsored by:          Mellanox Technologies

PC-BSD/trueos dd98a57sys/arm/include atomic.h, sys/mips/include atomic.h

Implement atomic_swap_xxx() for all platforms.

Differential Revision:  https://reviews.freebsd.org/D18450
Reviewed by:           kib@
MFC after:             3 days
Sponsored by:          Mellanox Technologies

PC-BSD/trueos 2d987basys/dev/rtwn/usb rtwn_usb_attach.h, sys/dev/usb usbdevs

rtwn, rsu: add more USB ids.

PR:            233638
Submitted by:   cezary.sliwa at gmail.com
MFC after:      3 days