FreeBSD/src 6d83ae1share/man/man4 Makefile, share/man/man9 Makefile

share/man/man[49]: Set PACKAGE=kernel-man

When MANSPLITPKG is disabled (which is now the default), the kernel
manpages in sections 4 and 9 are installed in the -kernel package
instead of the -kernel-man package, because bsd.man.mk doesn't add
the -man suffix.

Since we already have handling for kernel-man in generate-ucl.lua,
set PACKAGE=kernel-man to make sure they're always in the right
package.

To avoid creating -kernel-man-man when WITH_MANSPLITPKG is enabled,
add some logic to bsd.man.mk (suggested by kevans) to avoid adding
the -man suffix if the package already has a -man suffix, and while
here, ensure ${__group}PACKAGE is always defined.

MFC after:      3 seconds
Reviewed by:    des, bapt
Differential Revision:  https://reviews.freebsd.org/D52525
DeltaFile
+4-3share/mk/bsd.man.mk
+1-1share/man/man4/Makefile
+1-1share/man/man9/Makefile
+6-53 files

FreeBSD/src a75c3c2share/man/man4 Makefile

udbc(4): connect to build

Reviewed by:    thj
MFC with:       d566b6a70bcbc329e8c690464043401fa8bdd49f
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0share/man/man4/Makefile
+1-01 files

FreeBSD/src 18fd144sbin/ifconfig ifconfig.8 ifconfig.c

ifconfig: Enter jail as soon as possible

Some options (in particular, -g) are processed immediately upon being
parsed.  This will produce the wrong result in combination with -j since
we only attach to the jail after we're done parsing arguments.  Solve
this by attaching to the jail immediately when -j is encountered.  The
downside is that e.g. `ifconfig -j foo -j bar` would previously attach
to jail “bar”, whereas now it will attempt to attach to jail “foo”, and
if successful, attempt to attach to jail “bar” within jail “foo”.  This
may be considered a feature.

PR:             289134
MFC after:      1 week
Reviewed by:    zlei
Differential Revision:  https://reviews.freebsd.org/D52501
DeltaFile
+20-20sbin/ifconfig/ifconfig.8
+8-14sbin/ifconfig/ifconfig.c
+0-1sbin/ifconfig/ifconfig.h
+28-353 files

FreeBSD/src e8b5025sys/dev/sound/pcm dsp.c channel.h

sound: Honor CHN_F_NBIO

If the device is opened with O_NONBLOCK, even though we check for it in
order to set CHN_F_NBIO, the subsequent chn_reset() calls will clear all
flags, except those set in CHN_F_RESET, which does not include
CHN_F_NBIO.

Add CHN_F_NBIO to CHN_F_RESET. Additionally, because primary channels
can be reused, make sure we do not unintentionally keep CHN_F_NBIO set
if the channel is re-opened, but without O_NONBLOCK.

PR:             289441
MFC after:      2 days
Reviewed by:    christos, markj
Differential Revision:  https://reviews.freebsd.org/D52493
DeltaFile
+2-2sys/dev/sound/pcm/dsp.c
+1-1sys/dev/sound/pcm/channel.h
+3-32 files

FreeBSD/src 246d7e9sys/kern kern_jail.c, sys/security/audit audit_syscalls.c

jail: Optionally allow audit session state to be configured in a jail

Currently it is impossible for a privileged, jailed process to set audit
session state.  This can result in suprising audit event misattribution.
For example, suppose a user ssh'es into a jail and restarts a service;
normally, sshd sets audit state such that events generated by the SSH
session are attributed to the newly authenticated user, but in a jail,
the corresponding setaudit(2) call fails, so events are attributed to
the user who had started sshd in the jail (typically the user who had
started the jail itself by some means).

While this behaviour is reasonable, administrators might want to trust
the jailed sshd to reset audit state, such that the authenticated user
appears in audit logs.  Add a jail knob to enable this.  Add a simple
regression test.

Reviewed by:    kevans, jamie
MFC after:      1 week
Sponsored by:   Modirum MDPay

    [2 lines not shown]
DeltaFile
+20-0usr.sbin/jail/tests/jail_basic_test.sh
+15-4usr.sbin/jail/jail.8
+12-1sys/kern/kern_jail.c
+0-12sys/security/audit/audit_syscalls.c
+2-1sys/sys/jail.h
+49-185 files

FreeBSD/src cd02a8asys/netinet6 ip6_input.c, tools/regression/sockets/udp_pingpong udp_pingpong.c

ip6: add SO_BINTIME support

This adds support for obtaining timestamps from IPv6 packets using the
SO_BINTIME socket option, bringing it in parity with IPv4 behavior.

Enable testing the SO_BINTIME option in the relevant (manual) regression
test.

PR:             289423
Reviewed by:    markj
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D52504
DeltaFile
+37-18sys/netinet6/ip6_input.c
+3-5tools/regression/sockets/udp_pingpong/udp_pingpong.c
+40-232 files

FreeBSD/src d566b6ashare/man/man4 udbc.4, sys/dev/usb/serial udbc.c

udbc: Add usb debug host mode driver

xhci offers a debugging interface which uses a special usb 3 cable with the D+,
D- and VBUS pairs disconnected. This interface allows a target device to
configure its xhci controller as a debugging channel which can then be used to
provide a serial link between the target and a debug host.

This change extracts the udbc host mode driver from hrs@'s xhci debug
implementation.

Reviewed by:    bcr (man page)
MFC after:      Before 15-ALPHA3 builds
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D51299
DeltaFile
+404-0sys/dev/usb/serial/udbc.c
+132-0share/man/man4/udbc.4
+9-0sys/modules/usb/udbc/Makefile
+3-4sys/modules/usb/Makefile
+548-44 files

FreeBSD/src f1b656fsys/vm vm_fault.c

vm_fault_busy_sleep(): update comment after addition of allocflags arg

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D52538
DeltaFile
+4-5sys/vm/vm_fault.c
+4-51 files

FreeBSD/src 081f0e3sys/contrib/openzfs/module/zfs vdev_raidz.c

zfs: Use the correct type for raidz_outlier_check_interval_ms

raidz_outlier_check_interval_ms has type hrtime_t, which is a long long,
which is 64 bits wide on all supported platforms.
DeltaFile
+1-1sys/contrib/openzfs/module/zfs/vdev_raidz.c
+1-11 files

FreeBSD/src 18fd3f8sys/netgraph/bluetooth/socket ng_btsocket_rfcomm.c

ng_btsocket_rfcomm: Mark a couple buffers as const in a helper function

Fixes:  680f9acc3657 ("ng_hci: Cast NG_HCI_BDADDR_ANY to const bdaddr_t *")
DeltaFile
+2-2sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
+2-21 files

FreeBSD/src 70caaebsys/net if_types.h

sys: add MBIM (mobile broadband interface module) interface type.

This is part of the upcoming USB umb(4) work.

PR:             263783
Approved by:    adrian, zlei
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48167

(cherry picked from commit 86bfbaf1002c88b5c1a6d3ed261becedb533490b)
DeltaFile
+1-0sys/net/if_types.h
+1-01 files

FreeBSD/src 7fbd362sys/dev/qat/include/common adf_accel_devices.h, sys/dev/qat/qat_hw/qat_4xxx adf_4xxx_hw_data.c adf_drv.c

qat: enable qat driver for 402xx device

Enabled qat driver support for 402xx device with
ID 0x4944/0x4945. This is an additional device supported
under the existing qat_4xxx driver. Firmwares specific to
the 402xx device are added.

Signed-off-by: Hareshx Sankar Raj <hareshx.sankar.raj at intel.com>

Relnotes:       yes
Sponsored by:   Intel Corporation
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D52488
DeltaFile
+44-14sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c
+9-6sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c
+9-6sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c
+6-0sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.h
+4-1sys/modules/qatfw/qat_4xxx/Makefile
+4-0sys/dev/qat/include/common/adf_accel_devices.h
+76-274 files not shown
+78-2810 files

FreeBSD/src 226375asys/arm/arm generic_timer.c

arm64: Fix the FEAT_WFxT check

The check was always true so would incorrectly enable the feature when
it wasn't supported.

Due to another bug this was harmless.

Sponsored by:   Arm Ltd
DeltaFile
+1-1sys/arm/arm/generic_timer.c
+1-11 files

FreeBSD/src 8fee6b9sys/arm64/arm64 identcpu.c, sys/arm64/include cpu.h

arm64: Add the new C1 CPU IDs

Add the Arm C1-Nano, C1-Pro, C1-Premium, and C1-Ultra CPUs from their
Technical Reference Manuals.

Sponsored by:   Arm Ltd
DeltaFile
+4-0sys/arm64/arm64/identcpu.c
+4-0sys/arm64/include/cpu.h
+8-02 files

FreeBSD/src 680f9acsys/netgraph/bluetooth/include ng_hci.h

ng_hci: Cast NG_HCI_BDADDR_ANY to const bdaddr_t *

This is needed to address some compiler errors cleanly, where consumer
functions want this address to be a const pointer.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    markj
Differential Revision: https://reviews.freebsd.org/D52310
DeltaFile
+1-1sys/netgraph/bluetooth/include/ng_hci.h
+1-11 files

FreeBSD/src dafd960etc/mtree BSD.usr.dist, lib/libsamplerate Makefile

libsamplerate: Define as PRIVATELIB

Fixes the following warnings:

ld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC

>>> defined in /usr/obj/usr/src/amd64.amd64/lib/libsamplerate/libsamplerate.a(samplerate.o)
>>> referenced by samplerate.c:498 (/usr/src/contrib/libsamplerate/samplerate.c:498)
>>>
>>>   samplerate.o:(src_new) in archive /usr/obj/usr/src/amd64.amd64/lib/libsamplerate/libsamplerate.a

Related discussion: https://reviews.freebsd.org/D52306

Sponsored by:   The FreeBSD Foundation
Reviewed by:    fuz
Differential Revision:  https://reviews.freebsd.org/D52307
DeltaFile
+2-0etc/mtree/BSD.usr.dist
+1-1lib/libsamplerate/Makefile
+1-1share/mk/src.libnames.mk
+4-23 files

FreeBSD/src 8e84e94sbin/pfctl pfctl.h

pfctl: remove prototypes with no matching function

Obtained from:  OpenBSD, jsg <jsg at openbsd.org>, 6768654732
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+0-2sbin/pfctl/pfctl.h
+0-21 files

FreeBSD/src d0ea3detests/sys/netpfil/pf pflog.sh

pf tests: verify rule numbers in pflog output

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+59-0tests/sys/netpfil/pf/pflog.sh
+59-01 files

FreeBSD/src 2c42aecsbin/pfctl pfctl_table.c

pfctl: ctime(3) and ctime_r(3) can fail when timestamps are way off.

Add missing error checks

Input kettenis, millert
OK millert

Obtained from:  OpenBSD, florian <florian at openbsd.org>, a7b9eedcb4
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+25-10sbin/pfctl/pfctl_table.c
+25-101 files

FreeBSD/src a66df2bsys/net pfvar.h

pf: sync_ifp doesn't exist, remove externs

Obtained from:  OpenBSD, jsg <jsg at openbsd.org>, 7ac7a88014
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+0-2sys/net/pfvar.h
+0-21 files

FreeBSD/src 5e89648tests/sys/netpfil/pf fragmentation_pass.sh

pf tests: test fragment counters

Ensure that the fragmentation counters work as expected.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+67-0tests/sys/netpfil/pf/fragmentation_pass.sh
+67-01 files

FreeBSD/src 79a0959sbin/pfctl pfctl_parser.c

pfctl: add af-to and other missing action types in print_rule()

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-1sbin/pfctl/pfctl_parser.c
+1-11 files

FreeBSD/src 0a67f60share/man/man5 pf.conf.5

pf.conf.5: hint how to set tcp timeout collectively

Hint that the tcp timeout values can be adjusted collectively via "set
optimization".

from jesper wallin
ok bluhm

Obtained from:  OpenBSD, jmc <jmc at openbsd.org>, df80715c2d
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+4-0share/man/man5/pf.conf.5
+4-01 files

FreeBSD/src 864458cshare/man/man5 pf.conf.5

pf.conf.5: document tcp.tsdiff

from jesper wallin
ok bluhm

Obtained from:  OpenBSD, jmc <jmc at openbsd.org>, 8c83d32726
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+5-2share/man/man5/pf.conf.5
+5-21 files

FreeBSD/src c00aca9lib/libpfctl libpfctl.c, sbin/pfctl pfctl_parser.c

pf: Show pf fragment reassembly counters.

Framgent count and statistics are stored in struct pf_status.  From
there pfctl(8) and systat(1) collect and show them.  Note that pfctl
-s info needs the -v switch to show fragments.

input claudio@; OK henning@

Obtained from:  OpenBSD, bluhm <bluhm at openbsd.org>, 19e99d0613
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+14-0sbin/pfctl/pfctl_parser.c
+12-0sys/netpfil/pf/pf_norm.c
+6-0sys/netpfil/pf/pf.h
+6-0sys/netpfil/pf/pf_ioctl.c
+3-0lib/libpfctl/libpfctl.c
+3-0sys/netpfil/pf/pf_nl.c
+44-03 files not shown
+50-09 files

FreeBSD/src c2d03a9sbin/pfctl pfctl_parser.c

pfctl: fix anchortypes bounds test

found by "buffer overflow 'anchortypes' 10 <= 12" smatch error
feedback and ok sashan@, ok miod@ on an earlier version

Obtained from:  OpenBSD, jsg <jsg at openbsd.org>, 730c5d0121
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+15-14sbin/pfctl/pfctl_parser.c
+15-141 files

FreeBSD/src 4894f5bsys/dev/acpica acpi.c

acpi: Fix build when `ACPI_DEBUG_OUTPUT` defined

Reviewed by:    olce
Fixes:          ce5e22b28ef6 ("acpi: Use sleep types defined in sys/power.h")
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52545
DeltaFile
+2-2sys/dev/acpica/acpi.c
+2-21 files

FreeBSD/src ef2f36blib/libsys jail.2

jail.2: Mention EPERM is returned on open directories

The manual page does not directly mention this reason for getting EPERM,
instead referring the reader to chroot(2).  We have had some questions
about it recently, in part due to a bug (fixed), and this case is not an
obvious permission/problem, so let's be more explicit.

PR:             280809
Reviewed by:    jamie
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52319
DeltaFile
+4-1lib/libsys/jail.2
+4-11 files

FreeBSD/src 7780766tools/test/stress2/misc kevent10.sh

stress2: Do not exit the test program without clearing the trace flags
Discussed with:  kib
DeltaFile
+4-4tools/test/stress2/misc/kevent10.sh
+4-41 files

FreeBSD/src deaa609lib/libjail jail.c, sys/kern kern_jail.c

jaildesc: remove desc from the sysctl parameter list

Like lastjid, desc should count as a pseudo-parameter.  The difference
lies entirely in the security.jail.param sysctls, which list all of
the jail parameters.  Since desc opens and returns a file descriptor,
it has no place in such uses as "jls all."  Like lastjid, it's still
recognized by the kernel if passed in/out, and hard-coded into libjail
so it can be recognized there.

(cherry picked from commit e75dda31c1eead9ad40580bd8fec17f2bbf55a21)
DeltaFile
+9-1lib/libjail/jail.c
+0-1sys/kern/kern_jail.c
+9-22 files