FreeBSD/src 2e2699ctools/test/stress2/misc tmpfs26.sh tmpfs28.sh

stress2: Added new tmpfs test scenarios
DeltaFile
+179-0tools/test/stress2/misc/tmpfs26.sh
+61-0tools/test/stress2/misc/tmpfs28.sh
+49-0tools/test/stress2/misc/tmpfs27.sh
+289-03 files

FreeBSD/src 949190csys/netinet udp_usrreq.c

udp: Prefer memcpy() over bcopy()

The variable b[] is on the stack, thus cannot overlap with ipov, which
points to the heap area, so prefer memcpy() over memmove(), aka bcopy().

No functional change intended.

Reviewed by:    cc, rrs, cy, #transport, #network
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47713
DeltaFile
+2-2sys/netinet/udp_usrreq.c
+2-21 files

FreeBSD/src 1811fa6share/man/man4 Makefile

Install pvscsi man page

This was lost during the initial introduction of the pvscsi driver [1].
Later the driver was enabled on arm64 [2], so also install the man page
on arm64.

1. 052e12a5084f Add the pvscsi driver to the tree
2. 375d797b8191 Enable pvscsi and vmx in arm64 GENERIC

Reviewed by:    emaste, Alexander Ziaee <concussious.bugzilla_runbox.com> (manpages)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47712
DeltaFile
+2-0share/man/man4/Makefile
+2-01 files

FreeBSD/src 4de4f81share/man/man4 Makefile

Install vmx man page also on arm64

Fixes:          375d797b8191 Enable pvscsi and vmx in arm64 GENERIC
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47711
DeltaFile
+2-2share/man/man4/Makefile
+2-21 files

FreeBSD/src 1a5dc6esys/netpfil/pf pf_table.c

pf: Set cleared time when zeroing stats for table addresses

Reviewed by:            kp
Approved by:            kp (mentor)
Sponsored by:           InnoGames GmbH
Differential Revision:  https://reviews.freebsd.org/D47697
DeltaFile
+1-1sys/netpfil/pf/pf_table.c
+1-11 files

FreeBSD/src 9f9cf83sys/netpfil/pf pf.c

pf: Use a single pointer to state in pf_src_connlimit()

There's no need for a double pointer, the function pf_src_connlimit()
does not modify the state.

Reviewed by:            kp
Approved by:            kp (mentor)
Sponsored by:           InnoGames GmbH
Differential Revision:  https://reviews.freebsd.org/D47758
DeltaFile
+23-23sys/netpfil/pf/pf.c
+23-231 files

FreeBSD/src 4566664sys/kern vfs_subr.c

Speed up syncer shutdown

When shutting down, the syncer kernel deamon needs to iterate over all
32 of its queues, pausing for 1/4 of second each time waiting for essentially
nothing.  Bump the SYNCER_SHUTDOWN_SPEEDUP so that it takes just a second to
iterate.  It will still wait for another second afterwards; that bit is left
unchanged.

Reviewed By:    kib
Differential Revision:  https://reviews.freebsd.org/D47647
DeltaFile
+3-2sys/kern/vfs_subr.c
+3-21 files

FreeBSD/src 5c15094sys/dev/cxgbe t4_iov.c t4_main.c

cxgbe(4): Update the board names of the T6 OCP cards.

MFC after:      1 week
Sponsored by:   Chelsio Communications
DeltaFile
+3-3sys/dev/cxgbe/t4_iov.c
+3-3sys/dev/cxgbe/t4_main.c
+3-3sys/dev/cxgbe/t4_vf.c
+9-93 files

FreeBSD/src edfcccesys/powerpc/powerpc intr_machdep.c

powerpc: Remove unnecessary prototype.

This crept in with the interrupt rework back in 2019.
DeltaFile
+0-1sys/powerpc/powerpc/intr_machdep.c
+0-11 files

FreeBSD/src 700f7e7sys/powerpc/powerpc intr_machdep.c

powerpc: Get rid of interrupt subterfuge for IPIs

Instead of playing games with the interrupt event structure after the
fact when setting up IPIs, do the work in the interrupt initializer.
DeltaFile
+20-12sys/powerpc/powerpc/intr_machdep.c
+20-121 files

FreeBSD/src b872bb7usr.sbin/syslogd/tests syslogd_test.sh

syslogd: Split up basic test case

The basic case previously tested if messages are correctly logged over
UNIX, INET, and INET6 transport. This single case can be split up into
three separate cases to decrease code complexity and offer more granular
results.

Both INET and INET6 cases will be skipped if the kernel does not
support the corresponding transport.

Reviewed by:    zlei, markj
Differential Revision:  https://reviews.freebsd.org/D47650
DeltaFile
+61-24usr.sbin/syslogd/tests/syslogd_test.sh
+61-241 files

FreeBSD/src 8b63477usr.sbin/syslogd/tests syslogd_test.sh Makefile

syslogd: Add host forwarding test

Test communication between hosts by setting up two syslogd instances,
each binded to their own addresses, and sending a message from one to
the other. The tests passes if the message was delivered and logged
successfully.

This required some tweaking to the syslogd start and stop routines so
they could handle launching multiple syslogd instances with different
runtime files.

Run the tests in jails with an isolated VNET so they don't fail due to
an address bind collision in the host's VNET.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D47649
DeltaFile
+106-19usr.sbin/syslogd/tests/syslogd_test.sh
+4-0usr.sbin/syslogd/tests/Makefile
+110-192 files

FreeBSD/src 4ecbee2usr.sbin/syslogd syslogd.c syslogd_cap_config.c

syslogd: Open forwarding socket descriptors

Previously, when forwarding a message to a remote address, the target's
addrinfo was saved at config-parse-time. When message-deliver-time came,
the message's addrinfo was passed into sendmsg(2) and delivered by the
first available inet socket.

Passing an addrinfo into sendmsg(2) is prohibited in Capsicum capability
mode, so sockets are now opened and connected to their remote peers at
config-parse-time when executing outside of the capability sandbox.

These connected socket descriptors are saved and passed into sendmsg(2),
allowing forwarding to be performed inside of the capability sandbox.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D47104
DeltaFile
+99-46usr.sbin/syslogd/syslogd.c
+14-21usr.sbin/syslogd/syslogd_cap_config.c
+2-1usr.sbin/syslogd/syslogd.h
+115-683 files

FreeBSD/src d2d180fusr.sbin/syslogd syslogd.c syslogd.h

syslogd: Watch for dead pipe processes

For each new pipe process, add its process descriptor into the kqueue
with the EVFILT_PROCDESC filter and NOTE_EXIT event. When the pipe
process exits, the main kqueue loop will catch this, logging exit errors
and cleaning up the pipe process' filed node.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D41477
DeltaFile
+80-15usr.sbin/syslogd/syslogd.c
+1-0usr.sbin/syslogd/syslogd.h
+81-152 files

FreeBSD/src 897240cusr.sbin/syslogd syslogd.c syslogd_cap.h

syslogd: Enter capability mode

Create syslogd_cap_enter() function, which puts syslogd in capability
mode and opens necessary libcasper channels for resource acquisition.
The `syslogd.casper` and `system.net` services are used.

Substitute capability-mode-unfriendly functions with their libcasper
`cap_` equivalents.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D41467
DeltaFile
+58-9usr.sbin/syslogd/syslogd.c
+2-0usr.sbin/syslogd/syslogd_cap.h
+60-92 files

FreeBSD/src 24f4019usr.sbin/syslogd syslogd.c

syslogd: Block timezone updating in capability mode

Do not update local timezone data upon reload when syslogd is compiled
with libcasper support. Timezone files are pre-fetched using the
caph_cache_tzdata() function before entering capability mode. Attempts
to re-fetch these files will result in a capability violation.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D41466
DeltaFile
+6-0usr.sbin/syslogd/syslogd.c
+6-01 files

FreeBSD/src 61a29ecusr.sbin/syslogd syslogd_cap_log.c syslogd.c

syslogd: Log messages using libcasper

Some logging operations require access to external resources to
complete. Logging to F_WALL requires on-demand access to the user
accounting database. Logging to F_CONSOLE requires access to the
console. Logging to F_PIPE prompts execution of a command outside
of capability mode.

These operations cannot be performed in capability mode, so the
"p_open", "ttymsg", and "wallmsg" commands may be sent to libcasper to
circumvent these limitations.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D41465
DeltaFile
+211-0usr.sbin/syslogd/syslogd_cap_log.c
+37-40usr.sbin/syslogd/syslogd.c
+33-1usr.sbin/syslogd/syslogd_cap_config.c
+25-0usr.sbin/syslogd/syslogd_cap.h
+15-0usr.sbin/syslogd/syslogd.h
+7-1usr.sbin/syslogd/syslogd_cap.c
+328-421 files not shown
+330-437 files

FreeBSD/src 2567168usr.sbin/syslogd syslogd_cap_config.c syslogd.c

syslogd: Refresh configuration using libcasper

When a SIGHUP signal is sent to syslogd, the configuration is reparsed,
leading to new resource acquisition.

If syslogd is running in capability mode and a SIGHUP is received, new
resources cannot be acquired. To mitigate this issue, libcasper is used
to parse the configuration.

The libcasper process runs outside of capability mode and is capable of
parsing syslogd's configuration and obtaining new resources. These
resources are then sent to the syslogd process via nvlist.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D41464
DeltaFile
+296-0usr.sbin/syslogd/syslogd_cap_config.c
+105-129usr.sbin/syslogd/syslogd.c
+12-3usr.sbin/syslogd/syslogd.h
+14-0usr.sbin/syslogd/syslogd_cap.h
+7-2usr.sbin/syslogd/syslogd_cap.c
+2-1usr.sbin/syslogd/Makefile
+436-1356 files

FreeBSD/src ad60789usr.sbin/syslogd syslogd.c syslogd.h

syslogd: Use anonymous union in struct filed

Do not use macros to access unioned struct members. Use an anonymous
union and access union member names directly.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D41703
DeltaFile
+47-50usr.sbin/syslogd/syslogd.c
+3-9usr.sbin/syslogd/syslogd.h
+50-592 files

FreeBSD/src 9646878usr.sbin/syslogd syslogd.h syslogd.c

syslogd: Create syslogd libcasper service

Once in capability mode, resource acquisition is not possible. To
mitigate this, introduce a libcasper service that is responsible for
fetching and returning new, requested resources to syslogd.

Some resources must be packed into an nvlist to be properly transferred
between syslogd and the libcasper process. The filed_to_nvlist() and
nvlist_to_filed() functions are included to ease the packing process for
filed structures.

Two additional syslogd.h and syslogd_cap.h header files are included
with shared declarations.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D41463
DeltaFile
+179-0usr.sbin/syslogd/syslogd.h
+2-116usr.sbin/syslogd/syslogd.c
+52-0usr.sbin/syslogd/syslogd_cap.h
+49-0usr.sbin/syslogd/syslogd_cap.c
+5-0usr.sbin/syslogd/Makefile
+287-1165 files

FreeBSD/src 06a98fecontrib/nvi/common mem.h log.c

nvi: Replace Clang-only __builtin_is_aligned with C code (#124)

We should use alignof in the future.

Obtained from: https://github.com/lichray/nvi2/commit/25c4d7db4ea638a31ac458b733a3b67b0a0ff634
DeltaFile
+12-0contrib/nvi/common/mem.h
+1-1contrib/nvi/common/log.c
+13-12 files

FreeBSD/src 56ef9c8contrib/nvi/common log.c

nvi: use memmove to realign buffers

Replace a rather convoluted realignment algorithm with memmove().  In
addition to being hard to understand, the code would read beyond the end
of the input buffer in certain conditions (found on CheriBSD).

Sponsored by:   DARPA
Pull Request:   https://github.com/lichray/nvi2/pull/122
DeltaFile
+5-17contrib/nvi/common/log.c
+5-171 files

FreeBSD/src c0faaa1share/man/man3 intro.3

intro(3): remove profiling libs

We no longer have libc_p.a or libm_p.a.

Fixes: 3750ccefb862 ("Retire MK_PROFILE infrastructure")
Sponsored by: The FreeBSD Foundation
DeltaFile
+1-5share/man/man3/intro.3
+1-51 files

FreeBSD/src f08dfd8etc/mtree BSD.tests.dist

mtree: Add missing entries in BSD.tests.dist

Reviewed by:    emaste, christos
Approved by:    emaste (mentor)
Fixes:  95eb4b873b6a ("sound tests: Add sndstat nvlist ATF test")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47724
DeltaFile
+2-0etc/mtree/BSD.tests.dist
+2-01 files

FreeBSD/src 4b8e65detc/mtree BSD.tests.dist

mtree: Fix BSD.tests.dist sorting

Reviewed by:    imp
Approved by:    emaste (mentor)
Fixes:  60d717baf214 ("ctl: add some ATF tests for READ BUFFER")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47719
DeltaFile
+4-4etc/mtree/BSD.tests.dist
+4-41 files

FreeBSD/src 45d108esys/netpfil/pf pf.c

pf_route6(): one more __sdt_used annotation

Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1sys/netpfil/pf/pf.c
+1-11 files

FreeBSD/src adc02d5usr.bin/perror perror.c

perror(1): Capsicumise

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by:    markj, oshogbo
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1492
DeltaFile
+7-0usr.bin/perror/perror.c
+7-01 files

FreeBSD/src 0963af5usr.bin/perror perror.c

perror: style nits
DeltaFile
+3-3usr.bin/perror/perror.c
+3-31 files

FreeBSD/src 4dd6597usr.bin/perror perror.c

perror(1): Replace magic exit codes with standard macros

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by:    markj, oshogbo
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1492
DeltaFile
+4-4usr.bin/perror/perror.c
+4-41 files

FreeBSD/src 82e9f8cusr.bin/perror perror.c

perror(1): Reorder headers alphabetically to meet style(9) compliance

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by:    markj, oshogbo
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1492
DeltaFile
+4-3usr.bin/perror/perror.c
+4-31 files