HardenedBSD/hardenedbsd a906febsys/vm vm_unix.c

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+0-5sys/vm/vm_unix.c
+0-51 files

HardenedBSD/hardenedbsd 887d9e4lib/libcasper/services/cap_sysctl cap_sysctl.c cap_sysctl.3, lib/libcasper/services/cap_sysctl/tests sysctl_test.c

Merge remote-tracking branch 'origin/freebsd/current/master' into hardened/current/master

Conflicts:
        sys/vm/vm_unix.c (unresolved)

HardenedBSD/hardenedbsd 6357299sys/amd64/linux Makefile, sys/compat/freebsd32 capabilities.conf

Merge remote-tracking branch 'origin/freebsd/12-stable/master' into 
hardened/12-stable/master

Conflicts:
        sys/i386/ibcs2/ibcs2_proto.h (deleted)
        sys/i386/ibcs2/ibcs2_syscall.h (deleted)
        sys/i386/ibcs2/ibcs2_sysent.c (deleted)

HardenedBSD/hardenedbsd 55dfee9share/mk bsd.dep.mk, sys/net debugnet.c

Merge branch 'freebsd/current/master' into hardened/current/master

* freebsd/current/master:
  Fix spelling of DPSRCS.
  Fix compile issues when building a kernel without the VIMAGE option. Thanks to cem@ for 
discussing the issue which resulted in this patch.
  Add the fstat -s option to display socket information.
  Remove IS_INADDR_ANY().

HardenedBSD/hardenedbsd 4bffcbbusr.bin/clang/lld Makefile

Merge remote-tracking branch 'origin/hardened/11-stable/master' into 
hardened/11-stable/unstable

* origin/hardened/11-stable/master:
  MFC r353655:

HardenedBSD/hardenedbsd 74f7817usr.bin/clang/lld Makefile

Merge branch 'freebsd/11-stable/master' into hardened/11-stable/master

* freebsd/11-stable/master:
  MFC r353655:

HardenedBSD/hardenedbsd ad46cfbusr.bin/clang/lld Makefile

Merge branch 'freebsd/12-stable/master' into hardened/12-stable/master

* freebsd/12-stable/master:
  MFC r353655:

HardenedBSD/hardenedbsd 62cc8b8share/mk bsd.dep.mk

Fix spelling of DPSRCS.

Submitted by:   vangyzen
Sponsored by:   DellEMC
MFC after:      2 weeks

HardenedBSD/hardenedbsd 7122458sys/net debugnet.c, sys/netinet/netdump netdump_client.c

Fix compile issues when building a kernel without the VIMAGE option.
Thanks to cem@ for discussing the issue which resulted in this patch.

Reviewed by:           cem@
Sponsored by:          Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D22089

HardenedBSD/hardenedbsd 3073a2eusr.bin/fstat fstat.c fstat.1

Add the fstat -s option to display socket information.

Reviewed by:    jilles
MFC after:      1 week
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D21880

HardenedBSD/hardenedbsd 0baf65dusr.bin/procstat procstat_files.c

Remove IS_INADDR_ANY().

Requested by rgrimes@ in
https://lists.freebsd.org/pipermail/svn-src-head/2019-October/129784.html

HardenedBSD/hardenedbsd 12b595csys/contrib/dev/acpica changes.txt, sys/contrib/dev/acpica/compiler dtcompilerparser.l dtcompilerparser.y

Merge branch 'freebsd/current/master' into hardened/current/master

* freebsd/current/master:
  hw.intrbalance: Make sysctl tunable
  powerpc/booke pmap: Fix printf format type warnings
  Import ACPICA 20190816.
  Exit interpreter before initializing objects.
  Import ACPICA 20190703.
  Import ACPICA 20190509.
  Import ACPICA 20190405.
  Import ACPICA 20190329.
  Fix missing comma in array declaration.
  Import ACPICA 20190215.
  Import ACPICA 20190108.
  Import ACPICA 20181213.
  Import ACPICA 20181031.
  Import ACPICA 20181003.

HardenedBSD/hardenedbsd be36355sys/kern imgact_elf.c

HBSD: silence unused function warning in imgact_elf.c

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>

HardenedBSD/hardenedbsd 5e4aa6bsys/x86/x86 intr_machdep.c

hw.intrbalance: Make sysctl tunable

This allows specifying a boot-time preference in loader.conf.

HardenedBSD/hardenedbsd 3f5620fsys/i386/linux linux_sysvec.c

HBSD: resolve AS(L)R related merge conflict in linux_sysvec.c

Remove the unused a.out related sysentvec again.

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: shawn.webb at hardenedbsd.org

HardenedBSD/hardenedbsd 483d288sys/powerpc/booke pmap.c

powerpc/booke pmap: Fix printf format type warnings

HardenedBSD/hardenedbsd fbd307csys/compat/freebsd32 freebsd32_misc.c

HBSD: fix AS(L)R related merge conflict in freebsd32_misc.c

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: shawn.webb at hardenedbsd.org

HardenedBSD/hardenedbsd 0777ae5usr.bin/clang/lld Makefile

MFC r353655:

Ensure lld respects the WITH/WITHOUT_SHARED_TOOLCHAIN option

Traditionally, toolchain components such as cc, as, and ld have been
built as static executables.  The WITH_SHARED_TOOLCHAIN option from
src.conf(5) is meant to link these as regular executables, e.g. using
shared libraries.

The build of ld.lld did not yet check this option.  Fix the Makefile so
it will do so now.

Reported by:    Mike Cui <cuicui at gmail.com>
PR:            241257

HardenedBSD/hardenedbsd 833db94usr.bin/clang/lld Makefile

MFC r353655:

Ensure lld respects the WITH/WITHOUT_SHARED_TOOLCHAIN option

Traditionally, toolchain components such as cc, as, and ld have been
built as static executables.  The WITH_SHARED_TOOLCHAIN option from
src.conf(5) is meant to link these as regular executables, e.g. using
shared libraries.

The build of ld.lld did not yet check this option.  Fix the Makefile so
it will do so now.

Reported by:    Mike Cui <cuicui at gmail.com>
PR:            241257

HardenedBSD/hardenedbsd 1707a94sys/kern imgact_elf.c

HBSD: lower the diff against the upstream version in imgact_elf.c

In this commit restore the FreeBSD's AS(L)R code, but put them under
 #ifndef PAX_ASLR guard.

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: shawn.webb at hardenedbsd.org
DeltaFile
+94-6sys/kern/imgact_elf.c
+94-61 files

HardenedBSD/hardenedbsd 2c57671sys/kern imgact_elf.c

HBSD: resolve AS(L)R related merge conflict in sys/kern/kern_fork.c - part 2

Only inherit FreeBSD's AS(L)R related proc control flags when
HardenedBSD's ASLR isn't compiled in. And remove accidentally swept in
unused function.

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: shawn.webb at hardenedbsd.org
DeltaFile
+5-14sys/kern/imgact_elf.c
+5-141 files

HardenedBSD/hardenedbsd 51e08e7sys/kern kern_fork.c

HBSD: resolve AS(L)R related merge conflict in sys/kern/kern_fork.c

Only inherit FreeBSD's AS(L)R related proc control flags when
HardenedBSD's ASLR isn't compiled in.

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: shawn.webb at hardenedbsd.org

HardenedBSD/hardenedbsd 6d144c6sys/kern kern_procctl.c

HBSD: fix merge conflict in  sys/kern/kern_procctl.c

Instead of just blindly delete the ASLR related procctl codes put them
into #ifndef PAX_ASLR guard. This will provide better understanding why
it isn't used et all, and lowers the conflicts.

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: shawn.webb at hardenedbsd.org
DeltaFile
+30-12sys/kern/kern_procctl.c
+30-121 files

HardenedBSD/hardenedbsd 84f1fa9sys/contrib/dev/acpica changes.txt, sys/contrib/dev/acpica/compiler dtcompilerparser.l dtcompilerparser.y

Merge ACPICA 20191018.

HardenedBSD/hardenedbsd 9716c1fsys/sys proc.h

HBSD: resolve AS(L)R related merge conflict in sys/sys/proc.h

Same here as in the previous commit.

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: shawn.webb at hardenedbsd.org
DeltaFile
+0-3sys/sys/proc.h
+0-31 files

HardenedBSD/hardenedbsd 4b91d09sys/sys procctl.h

HBSD: resolve AS(L)R related merge conflict in procctl.h

I prefer to keep these constants in  sys/sys/procctl.h

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: shawn.webb at hardenedbsd.org
DeltaFile
+0-6sys/sys/procctl.h
+0-61 files

HardenedBSD/hardenedbsd e30aa44usr.bin/proccontrol proccontrol.c

HBSD: remove support for changing stackgap from proccontrol.c at the same time fix the 
merge conflict.

Blindly remove the support.

I'm still unsure that this is the right solution here. It would be
better to keep these codes in the place and enclave them into #ifdef
NOT_SUPPORTED or dynamically detect that FreeBSD's or HardenedBSD's ASLR
implementation is active or not.

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: Shawn Webb <shawn.webb at hardenedbsd.org>

HardenedBSD/hardenedbsd d3bb9afusr.sbin/pkg Makefile

HBSD: usr.sbin/pkg/Makefile add HardenedBSD.conf to CONFSNAME

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: Shawn Webb <shawn.webb at hardenedbsd.org>

HardenedBSD/hardenedbsd 8e8a1c1usr.sbin/pkg Makefile

HBSD: resolve merge conflict in usr.sbin/pkg/Makefile

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: Shawn Webb <shawn.webb at hardenedbsd.org>

HardenedBSD/hardenedbsd d3b4201share/man/man5 src.conf.5, tools/build/options WITHOUT_PIE

HBSD: fix WITHOUT_PIE description and regen src.conf.5 with make makeman

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>

HardenedBSD/hardenedbsd 8d03f05. Makefile.inc1 Makefile

HBSD MFC: Add a top-level makeman target

Abstracting away the details of how src.conf(5) is generated is arguably a
good thing; do so with a top-level makeman target.

(cherry picked from commit 4c4fb8b83e1809debe40ea006952211c1a0a01c1)

Author: kevans <kevans at FreeBSD.org>
Original-commit-date: Tue, 1 Oct 2019 15:10:35 +0000
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
DeltaFile
+4-0Makefile.inc1
+2-1Makefile
+6-12 files

HardenedBSD/hardenedbsd bf953bdusr.sbin/bsdinstall/scripts config

HBSD: fix the merge conflict in bsdinstall/scripts/config after MFC of arm64 workaround 
and restore 70eab658a8bea behaviour

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: Shawn Webb <shawn.webb at hardenedbsd.org>

HardenedBSD/hardenedbsd f4ede21share/mk bsd.lib.mk bsd.opts.mk

HBSD: resolve merge conflicts in bsd{lib,opts,prog}.mk after PIE and RETPOLINE MFC

The two knob PIE and RETPOLINE was deleted from the DEFAULT_NO option,
but I was unsure about it was the right decision. Probably it would
be better to move to the DEFAULT_YES section, but the bsd.*.mk controls
the whole system's behaviour, not just the base system's.

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
CC: Shawn Webb <shawn.webb at hardenedbsd.org>

HardenedBSD/hardenedbsd e8a413bcrypto/openssl/crypto/aes/asm bsaes-x86_64.pl aes-586.pl, secure/lib/libcrypto/amd64 aes-x86_64.S

Merge remote-tracking branch 'origin/freebsd/12-stable/master' into 
hardened/12-stable/master

 Conflicts:
        share/man/man5/src.conf.5 (not resolved)
        share/mk/bsd.lib.mk (not resolved)
        share/mk/bsd.opts.mk (not resolved)
        share/mk/bsd.prog.mk (not resolved)
        sys/compat/freebsd32/freebsd32_misc.c (not resolved)
        sys/kern/imgact_elf.c (not resolved)
        sys/kern/kern_fork.c (not resolved)
        sys/kern/kern_procctl.c (not resolved)
        sys/sys/proc.h (not resolved)
        sys/sys/procctl.h (not resolved)
        tools/build/options/WITHOUT_PIE (resolved)
        usr.bin/proccontrol/proccontrol.c (not resolved)
        usr.sbin/bsdinstall/scripts/config (not resolved)
        usr.sbin/pkg/Makefile (not resolved)

HardenedBSD/hardenedbsd 1500ed2. Makefile.inc1, stand/libsa/zfs zfs.c

Merge branch 'freebsd/current/master' into hardened/current/master

* freebsd/current/master:
  loader: zfs_fmtdev can crash when pool discovery did fail and we have no spa
  buildkernel: always add standard kernel configuration include path
  remove wmb() call from x86 cpu_reset()
  vmm: remove a wmb() call

HardenedBSD/hardenedbsd 209f4d8cddl/contrib/opensolaris/cmd/zfs zfs_main.c zfs.8, cddl/contrib/opensolaris/lib/libzfs/common libzfs_dataset.c

Merge remote-tracking branch 'origin/hardened/11-stable/master' into 
hardened/11-stable/unstable

* origin/hardened/11-stable/master:
  MFC r353037: ZFS: add bookmark renaming
  MFC r353343: zfs: remove gratuitous divergence from other openzfs flavours
  MFC r353434: man4/Makefile: fix sorting for some entries starting with 'v'
  MFC r353649: fix section number in zfs-program.8

HardenedBSD/hardenedbsd 28da2d8cddl/contrib/opensolaris/cmd/zfs zfs_main.c zfs.8, cddl/contrib/opensolaris/lib/libzfs/common libzfs_dataset.c

Merge branch 'freebsd/11-stable/master' into hardened/11-stable/master

* freebsd/11-stable/master:
  MFC r353037: ZFS: add bookmark renaming
  MFC r353343: zfs: remove gratuitous divergence from other openzfs flavours
  MFC r353434: man4/Makefile: fix sorting for some entries starting with 'v'
  MFC r353649: fix section number in zfs-program.8

HardenedBSD/hardenedbsd eb9e817sys/mips/include atomic.h

MFC r353166: add atomic_load_64 for mipsn32

HardenedBSD/hardenedbsd 5131f22cddl/contrib/opensolaris/cmd/zfs zfs_main.c zfs.8, cddl/contrib/opensolaris/lib/libzfs/common libzfs_dataset.c

MFC r353037: ZFS: add bookmark renaming

HardenedBSD/hardenedbsd 3d46329cddl/contrib/opensolaris/cmd/zfs zfs_main.c zfs.8, cddl/contrib/opensolaris/lib/libzfs/common libzfs_dataset.c

MFC r353037: ZFS: add bookmark renaming

HardenedBSD/hardenedbsd efd90e3stand/libsa/zfs zfs.c

loader: zfs_fmtdev can crash when pool discovery did fail and we have no spa

When zfs probe did fail and no spa was created, but zfs_fmtdev() is called,
we will crash while dereferencing spa (NULL pointer dereference).

MFC after:      1 week

HardenedBSD/hardenedbsd 04b72bccddl/contrib/opensolaris/lib/libzfs/common libzfs_sendrecv.c

MFC r353343: zfs: remove gratuitous divergence from other openzfs flavours

HardenedBSD/hardenedbsd fa9649ccddl/contrib/opensolaris/lib/libzfs/common libzfs_sendrecv.c

MFC r353343: zfs: remove gratuitous divergence from other openzfs flavours

HardenedBSD/hardenedbsd 83f356acddl/contrib/opensolaris/cmd/zpool zpool-features.7

MFC r353341,r353342: zfs: document large_dnode feature

HardenedBSD/hardenedbsd 79dc7a7share/man/man4 Makefile

MFC r353434: man4/Makefile: fix sorting for some entries starting with 'v'

HardenedBSD/hardenedbsd 4ea4bdeshare/man/man4 Makefile

MFC r353434: man4/Makefile: fix sorting for some entries starting with 'v'

HardenedBSD/hardenedbsd d83764fcddl/contrib/opensolaris/cmd/zfs zfs-program.8

MFC r353649: fix section number in zfs-program.8

HardenedBSD/hardenedbsd 3df8e50cddl/contrib/opensolaris/cmd/zfs zfs-program.8

MFC r353649: fix section number in zfs-program.8

HardenedBSD/hardenedbsd 9d9a7c1. Makefile.inc1

buildkernel: always add standard kernel configuration include path

This should change nothing for kernel configurations at the standard
locations in the source tree.  However, if KERNCONFDIR is used to
specify a custom location for a kernel configuration file (e.g., out of
tree), then both the custom location and the standard location, in this
order, will be used as include paths for config(8).  This will allow the
kernel configuration to include files from both locations.

Reviewed by:    bdrewery
MFC after:      16 days
Differential Revision: https://reviews.freebsd.org/D22057
DeltaFile
+2-1Makefile.inc1
+2-11 files

HardenedBSD/hardenedbsd c9402a5sys/x86/x86 cpu_machdep.c

remove wmb() call from x86 cpu_reset()

The rationale is pretty much the same as in r353747.
There is no subsequent dependent store.
The store is to the regular (TSO) memory anyway.

MFC after:      23 days