HardenedBSD/src 00b5225share/mk src.opts.mk bsd.opts.mk

HBSD: Resolve merge conflicts

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+0-4share/mk/src.opts.mk
+0-4share/mk/bsd.opts.mk
+0-82 files

HardenedBSD/src 2d2e068contrib/kyua/doc kyua-test.1.in, lib/libsys ioctl.2

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

Conflicts:
        share/mk/bsd.opts.mk (unresolved)
        share/mk/src.opts.mk (unresolved)
DeltaFile
+4-4share/man/man5/src.conf.5
+3-3tools/build/options/WITH_REPRODUCIBLE_PATHS
+5-0share/mk/bsd.opts.mk
+4-1lib/libsys/ioctl.2
+3-0share/mk/src.opts.mk
+1-1contrib/kyua/doc/kyua-test.1.in
+20-95 files not shown
+25-1411 files

HardenedBSD/src 2b5f033sys/compat/linuxkpi/common/include/linux compiler.h, sys/sys cdefs.h

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+13-0sys/sys/cdefs.h
+2-0sys/compat/linuxkpi/common/include/linux/compiler.h
+15-02 files

HardenedBSD/src 85e0cdesys/sys cdefs.h

cdefs: Add __deprecated1 which accepts a message as an argument

This message will be included in any warning issued by the compiler
for use of the deprecated function.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D47701

(cherry picked from commit 6da04bcff9efedeae7d4046553002b9e3b2bc24f)
DeltaFile
+1-0sys/sys/cdefs.h
+1-01 files

HardenedBSD/src 4ff445dsys/compat/linuxkpi/common/include/linux compiler.h, sys/sys cdefs.h

cdefs: Add __deprecated

Add __deprecated decorator. This is for a deprecated interface. copystr
is tagged with this today in copy(9), but don't actually provide it or
use it. copystr is a #define so adding it will have to wait.

LinuxKPI was defining this away completely in compiler.h. Since this is
shared between Linux KPI consumers and OpenZFS, if it's already defined,
use the FreeBSD sys/cdefs.h version, otherwise define it away. For
OpenZFS this will retain it, while for Linux KPI it will tend to drop it
(I think always, but I didn't look at everything).

Sponsored by:           Netflix
Reviewed by:            jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D46137

(cherry picked from commit 16672453f12586703f1c51d909bd1900691bf884)
DeltaFile
+2-0sys/compat/linuxkpi/common/include/linux/compiler.h
+1-0sys/sys/cdefs.h
+3-02 files

HardenedBSD/src c4290c3sys/sys cdefs.h

sys/cdefs.h: add __noexcept and __noexcept_if

These macros provide the C++11 noexcept and noexcept(...) keywords if
we're compiling in a C++11 environment.  Otherwise, they expand to an
empty string.

This will be used to add the required noexcept specifier to several libc
functions as required in C++11.

MFC after:      2 weeks

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1085

(cherry picked from commit 02b0d4b688cc4deb14cb6e7534a2a4958e48b753)
DeltaFile
+11-0sys/sys/cdefs.h
+11-01 files

HardenedBSD/src 8e95158share/man/man5 src.conf.5, tools/build/options WITH_REPRODUCIBLE_PATHS

Fix typo in tools/build/options/WITH_REPRODUCIBLE_PATHS

Fixes:          faeaa25f5624
DeltaFile
+4-4share/man/man5/src.conf.5
+3-3tools/build/options/WITH_REPRODUCIBLE_PATHS
+7-72 files

HardenedBSD/src 660416fshare/mk bsd.opts.mk src.opts.mk

Move MK_REPRODUCIBLE_PATHS to bsd.opts.mk

In commit faeaa25f5624 MK_REPRODUCIBLE_PATHS was introduced, but some
ports that include bsd.debug.mk then started to fail with:

    make: /usr/share/mk/bsd.debug.mk:19: Variable "MK_REPRODUCIBLE_PATHS" is undefined
            in /usr/share/mk/bsd.lib.mk:525
            in /wrkdirs/usr/ports/devel/libsysinfo/work/libsysinfo-0.0.3/Makefile:16
    make: Fatal errors encountered -- cannot continue

This is because bsd.debug.mk includes bsd.opts.mk, not src.opts.mk. Move
the MK_REPRODUCIBLE_PATHS option to bsd.opts.mk to fix this.

Reviewed by:    imp, emaste
Fixes:          faeaa25f5624
DeltaFile
+1-0share/mk/bsd.opts.mk
+0-1share/mk/src.opts.mk
+1-12 files

HardenedBSD/src bbaa7d6contrib/kyua/doc kyua-db-exec.1.in kyua-db-migrate.1.in

kyua manuals: Correct --results-file short form

PR:             290647
Ref:            kyua/cli/common.cpp#104
MFC after:      3 days
Reviewed by:    ziaee
Closes:         https://github.com/freebsd/kyua/issues/267
DeltaFile
+1-1contrib/kyua/doc/kyua-db-exec.1.in
+1-1contrib/kyua/doc/kyua-db-migrate.1.in
+1-1contrib/kyua/doc/kyua-report-html.1.in
+1-1contrib/kyua/doc/kyua-report-junit.1.in
+1-1contrib/kyua/doc/kyua-report.1.in
+1-1contrib/kyua/doc/kyua-test.1.in
+6-66 files

HardenedBSD/src 4a28869usr.sbin/unbound/daemon Makefile

HBSD: Disable SafeStack for the Unbound daemon

When Unbound is built with SafeStack, attempts to kill the running
daemon process with SIGTERM does not kill the process. Instead, the
daemon stops responding.

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
Reported-by:    @northboot
issue:          #110
MFC-to:         15-STABLE
(cherry picked from commit ee472934f961f24a1c4dee56e7bd8dbb0e50ce13)
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+1-0usr.sbin/unbound/daemon/Makefile
+1-01 files

HardenedBSD/src e2afbc4lib/libsys ioctl.2

ioctl.2: Mention EACCES

ioctls can fail with EACCES, see sys/kern/tty.c

PR:                     239504
MFC after:              3 days
Reviewed by:            ziaee
Reported by:            Brennan Vincent <brennan at umanwizard.com>
Differential Revision:  https://reviews.freebsd.org/D49072
DeltaFile
+4-1lib/libsys/ioctl.2
+4-11 files

HardenedBSD/src d42db81lib/geom/part geom_part.c, lib/libc/gen uexterr_format.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+72-14lib/libc/stdlib/Makefile.inc
+79-6sys/compat/linuxkpi/common/src/linux_80211.c
+64-7lib/libc/gen/uexterr_format.c
+40-29lib/geom/part/geom_part.c
+68-0lib/libc/stdlib/tdestroy.c
+65-0lib/libc/tests/stdlib/tsearch_test.c
+388-5626 files not shown
+571-9132 files

HardenedBSD/src f7c490alib/geom/part geom_part.c, lib/libc/stdlib Makefile.inc tdestroy.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+72-14lib/libc/stdlib/Makefile.inc
+40-29lib/geom/part/geom_part.c
+68-0lib/libc/stdlib/tdestroy.c
+65-0lib/libc/tests/stdlib/tsearch_test.c
+23-2lib/libc/stdlib/tsearch.3
+6-1share/man/man4/cpuctl.4
+274-469 files not shown
+289-5215 files

HardenedBSD/src 5a0dc64sys/dev/dpaa2 dpaa2_ni.c, usr.sbin/bhyve bhyve_config.5 bhyve.8

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+45-7sys/dev/dpaa2/dpaa2_ni.c
+17-12usr.sbin/bhyve/bhyve_config.5
+2-1usr.sbin/bhyve/bhyve.8
+64-203 files

HardenedBSD/src 9197a68sys/dev/dpaa2 dpaa2_ni.c, sys/dev/netmap netmap_mem2.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+45-7sys/dev/dpaa2/dpaa2_ni.c
+19-15sys/dev/netmap/netmap_mem2.c
+27-6sys/netpfil/pf/pf_ioctl.c
+31-0tests/sys/kern/inotify_test.c
+17-12usr.sbin/bhyve/bhyve_config.5
+9-6sys/netpfil/pf/if_pfsync.c
+148-4610 files not shown
+173-6916 files

HardenedBSD/src 9cfd75asys/kern vfs_bio.c

bio: Fix KASAN invalid access report in biodone

Do not touch the bio fields after calling the bio_done callback. The bio
might have been freed after the callback returns.

Fixes:  725f4b108d54
Reported by:    kp, markj
DeltaFile
+0-2sys/kern/vfs_bio.c
+0-21 files

HardenedBSD/src 108f057usr.sbin/bhyve bhyve_config.5 bhyve.8

bhyve: Document that MAC address has to be unicast

bhyve accepts any MAC address even foreign as long it is a unicast one.

Reviewed by:    ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54372

(cherry picked from commit e1bfd541c7cdee1e184cacb2ea3bbebb3a500dfb)
DeltaFile
+8-4usr.sbin/bhyve/bhyve_config.5
+2-1usr.sbin/bhyve/bhyve.8
+10-52 files

HardenedBSD/src c847ea5usr.sbin/bhyve bhyve_config.5

bhyve_config.5: Fix consistency and terms in manpage

Correct inconsistent spelling of terms and duplication.

Reviewed by:    ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54370

(cherry picked from commit 66604463e737f4754ae6268171031ceefc226837)
DeltaFile
+9-8usr.sbin/bhyve/bhyve_config.5
+9-81 files

HardenedBSD/src ad6381ashare/man/man4 linprocfs.4

linprocfs.4: Improve docs around pid/self entries

Mark <pid> as a placeholder and document that self is a symlink to a directory.

PR:             283080
Reviewed by:    ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54358

(cherry picked from commit 0d31189cbce4de142a43b65037beb7bf8c09cf26)
DeltaFile
+4-4share/man/man4/linprocfs.4
+4-41 files

HardenedBSD/src 980c44dusr.sbin/bhyve bhyve_config.5 bhyve.8

bhyve: Document that MAC address has to be unicast

bhyve accepts any MAC address even foreign as long it is a unicast one.

Reviewed by:    ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54372

(cherry picked from commit e1bfd541c7cdee1e184cacb2ea3bbebb3a500dfb)
DeltaFile
+8-4usr.sbin/bhyve/bhyve_config.5
+2-1usr.sbin/bhyve/bhyve.8
+10-52 files

HardenedBSD/src 919cb70usr.sbin/bhyve bhyve_config.5

bhyve_config.5: Fix consistency and terms in manpage

Correct inconsistent spelling of terms and duplication.

Reviewed by:    ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54370

(cherry picked from commit 66604463e737f4754ae6268171031ceefc226837)
DeltaFile
+9-8usr.sbin/bhyve/bhyve_config.5
+9-81 files

HardenedBSD/src 23b83bfsys/dev/dpaa2 dpaa2_ni.c

dpaa2: Setup interface caps on attach

39d4094173f9 ("epair: add support for checksum offloading") revealed
that HW checksum offloading is not enabled when the dpaa2_ni driver
is attached despite being declared and enabled on the dpni interface.

I modified dpaa2_ni_setup_if_caps to take into account both IPv4 and
IPv6 checksum offloading capabilities and added a call to re-configure
interface capabilities on attach to fix it.

Reviewed by:    bz
Fixes:          39d4094173f9 ("epair: add support for checksum offloading")
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D53436

(cherry picked from commit a731cb93a66271713d6ea197946e4a307e5b0837)
DeltaFile
+45-7sys/dev/dpaa2/dpaa2_ni.c
+45-71 files

HardenedBSD/src 22f8973sys/dev/dpaa2 dpaa2_ni.c

dpaa2: Setup interface caps on attach

39d4094173f9 ("epair: add support for checksum offloading") revealed
that HW checksum offloading is not enabled when the dpaa2_ni driver
is attached despite being declared and enabled on the dpni interface.

I modified dpaa2_ni_setup_if_caps to take into account both IPv4 and
IPv6 checksum offloading capabilities and added a call to re-configure
interface capabilities on attach to fix it.

Reviewed by:    bz
Fixes:          39d4094173f9 ("epair: add support for checksum offloading")
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D53436

(cherry picked from commit a731cb93a66271713d6ea197946e4a307e5b0837)
DeltaFile
+45-7sys/dev/dpaa2/dpaa2_ni.c
+45-71 files

HardenedBSD/src c6bd2aashare/man/man4 cpuctl.4

cpuctl.4: Formatting nits

+ Align ioctl list + Pad code examples + Tag spdx license identifier

MFC after:      3 days
DeltaFile
+6-1share/man/man4/cpuctl.4
+6-11 files

HardenedBSD/src c4bd487share/man/man4 genet.4

genet.4: Only for AArch64 + tag spdx

MFC after:      3 days
DeltaFile
+4-1share/man/man4/genet.4
+4-11 files

HardenedBSD/src b8c99e7include search.h, lib/libc/stdlib tdestroy.c Makefile.inc

libc: add glibc-compatible tdestroy(3)

The function clears the whole tree.

Relnotes:       yes
Reviewed by:    alc, emaste
Discussed with: dougm
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54365
DeltaFile
+68-0lib/libc/stdlib/tdestroy.c
+1-0include/search.h
+1-0lib/libc/stdlib/Makefile.inc
+1-0lib/libc/stdlib/Symbol.map
+71-04 files

HardenedBSD/src 04a664dlib/libc/stdlib Makefile.inc

libc/stdlib/Makefile: one line for each source file name

Reviewed by:    alc, emaste
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54365
DeltaFile
+69-13lib/libc/stdlib/Makefile.inc
+69-131 files

HardenedBSD/src b0d4b05lib/libc/stdlib tsearch.3 Makefile.inc

tdestroy(3) man page

Reviewed by:    alc, emaste, ziaee
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54365
DeltaFile
+23-2lib/libc/stdlib/tsearch.3
+2-1lib/libc/stdlib/Makefile.inc
+25-32 files

HardenedBSD/src 3204c09lib/libc/tests/stdlib tsearch_test.c

tdestroy(3): add tests

Reviewed by:    alc, emaste
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54365
DeltaFile
+65-0lib/libc/tests/stdlib/tsearch_test.c
+65-01 files

HardenedBSD/src 5a2ddb5sys/vm vm_mmap.c

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+2-14sys/vm/vm_mmap.c
+2-141 files