FreeBSD/src bd481f1stand/defaults loader.conf.5

loader.conf.5: Add reference to kern.msgbufsize

When booting with boot_verbose, you want a larger msgbuf size. Add a
poitner to its tuneable.

Suggested by:           John De Boskey (Ages ago)
Sponsored by:           Netflix
DeltaFile
+4-1stand/defaults/loader.conf.5
+4-11 files

FreeBSD/src 4ec251alibexec/rc/rc.d serial

rc.d/serial: Remove removed drivers.

Cyclades and digiboard drivers were removed in 2017 and 2016
respectively. There's no need for these anymore.

Sponsored by:           Netflix
Reviewed by:            kevans, emaste
Differential Revision:  https://reviews.freebsd.org/D52315
DeltaFile
+0-9libexec/rc/rc.d/serial
+0-91 files

FreeBSD/src ffe00a0libexec/rc/rc.d serial

rc.d/serial: Kill dtrwait

The dtrwait wait functionality was dropped in the TTY MPSAFE rewrite for
FreeBSD 8. Remove referneces to it here. Also, the sysctl was renamed
for drainwait, so use the new name. Given the 16 years between this
event and somebody noticing, I strongly suspect this file can just be
removed.

Sponsored by:           Netflix
Reviewed by:            kevans, emaste
Differential Revision:  https://reviews.freebsd.org/D52316
DeltaFile
+2-2libexec/rc/rc.d/serial
+2-21 files

FreeBSD/src 4b4cf0dsbin/comcontrol comcontrol.c comcontrol.8, sys/sys ttycom.h

tty: Retire zombie dtrwait

Nothing uses dtrwait anymore. This was elimianted with the tty mpsafe
rewrite for FreeBSD 8. Only these zombie symbols and functionality
remain. GC them. Add comcontrol to the list things to remove in 16.0.

Sponsored by:           Netflix
Reviewed by:            kevans, emaste
Differential Revision:  https://reviews.freebsd.org/D52317
DeltaFile
+4-26sbin/comcontrol/comcontrol.c
+7-11sbin/comcontrol/comcontrol.8
+2-2sys/sys/ttycom.h
+13-393 files

FreeBSD/src bceb9c2sys/dev/bge if_bge.c, sys/dev/bxe bxe.c

IfAPI: Retire if_etherbpfmtap() and if_bpfmtap()

Summary:
These came in the original DrvAPI commits in 2014, and are obsoleted by
bpf_mtap_if() and ether_bpf_mtap_if().  The `_if` suffix, rather than
prefix, conveys that it's operating on the bpf of the interface, instead
than the interface itself.

Reviewed by:    glebius
Sponsored by:   Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D41146

(cherry picked from commit 2a3716432d209c5fef1eb1a719f4c1914e7c8b5a)
DeltaFile
+0-12sys/net/if.c
+2-2sys/dev/bxe/bxe.c
+1-1sys/dev/bge/if_bge.c
+1-1sys/dev/dwc/if_dwc.c
+1-1sys/dev/eqos/if_eqos.c
+1-1sys/dev/fxp/if_fxp.c
+6-185 files not shown
+10-2411 files

FreeBSD/src d106408sys/fs/nfsclient nfs_clvnops.c

nfs client: switch nfs_advlock() to use exclusive vnode lock

(cherry picked from commit fe53e046cd9ce9c95a118ac0374e94336f16a37f)
DeltaFile
+1-6sys/fs/nfsclient/nfs_clvnops.c
+1-61 files

FreeBSD/src 5a308afsys/vm vm_fault.c vm_extern.h

vm/vm_fault.c: rename vm_fault_hold_pages_e() to vm_fault_hold_pages()

Suggested by:   imp
Reviewed by:    alc, imp
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D52348
DeltaFile
+2-2sys/vm/vm_fault.c
+1-1sys/vm/vm_extern.h
+3-32 files

FreeBSD/src ea15fe2sys/netpfil/pf pf_ioctl.c

pf: fix memory leak in legacy getstate calls

If we fail to copy the data out we didn't free the temporary allocation.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+6-2sys/netpfil/pf/pf_ioctl.c
+6-21 files

FreeBSD/src 275ff85sys/net pfvar.h, sys/netpfil/pf pf_ruleset.c pf_ioctl.c

pf: fix struct pf_krule_global leak

Make sure we free all of the trees we allocated when we free the ruleset.
Found by 'kldunload pf' after a test run, now that the allocation is done from a
pf-specific malloc type.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+6-0sys/netpfil/pf/pf_ruleset.c
+1-1sys/netpfil/pf/pf_ioctl.c
+1-0sys/net/pfvar.h
+8-13 files

FreeBSD/src 44cc3b2sys/netpfil/pf pf_ioctl.c

pf: free struct pf_krule_global with pf_rule_tree_free()

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+2-2sys/netpfil/pf/pf_ioctl.c
+2-21 files

FreeBSD/src aa790afsys/netpfil/pf pf.c

pf(4) when doing af-to translation for ICMP protocol sends packets
with TTL field to zero. To fix it function pf_test_state_icmp()
must initialize ttl field in pf_pdesc structure for inner packet.

feedback from bluhm@

OK bluhm@

Obtained from:  OpenBSD, sashan <sashan at openbsd.org>, 0d48c46cfe
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+2-0sys/netpfil/pf/pf.c
+2-01 files

FreeBSD/src 5af7499sys/netpfil/pf pf.c

pf: remove unused variables

We never actually use action or reason in pf_state_key_addr_setup(), so just
pass NULL to pf_pull_hdr().

No functional change.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+4-3sys/netpfil/pf/pf.c
+4-31 files

FreeBSD/src ddd3915sys/net pfvar.h, sys/netpfil/pf pf_ioctl.c if_pfsync.c

pf: Introduce M_PF type for pf(4) related memory allocations.

Currently used M_TEMP and M_IFADDR types are unreasonable for that purpose.
This dedicated statistics simplify the future pf(4) unlocking work by decreasing
search area of possible memory leaks.

ok bluhm sashan

FreeBSD note: The unlocking work has already been done in FreeBSD, but it's
still useful to have all pf malloc() allocations be accounted to pf, not the
generic 'temp' bucket.

Obtained from:  OpenBSD, mvs <mvs at openbsd.org>, 062cda8b8d
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+85-84sys/netpfil/pf/pf_ioctl.c
+4-4sys/netpfil/pf/if_pfsync.c
+2-2sys/netpfil/pf/pf_nl.c
+2-2sys/netpfil/pf/pf_ruleset.c
+1-0sys/net/pfvar.h
+94-925 files

FreeBSD/src d64ba46sbin/pfctl pfctl_parser.c

pfctl: Rewrite some ugly for loops

This fixes a few KNF issues and ugly line wrapping by using a local
version of nitems(); fix two bsearch() on top.

ok claudio

FreeBSD note: we already used nitems(), but now pick up the use of size_t over
unsigned int.

Obtained from:  OpenBSD, tb <tb at openbsd.org>, 3d49904c6e
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+4-4sbin/pfctl/pfctl_parser.c
+4-41 files

FreeBSD/src 932ec59lib/libpfctl libpfctl.c libpfctl.h, sbin/pfctl parse.y

pf: fix ICMP type/code representation

internal representation of icmp type/code in pfctl(8)/pf(4) does not
fit into u_int8_t. Issue has been noticed and kindly reported by
amalinin _at_ bh0.amt.ru via bugs@.

OK bluhm@

Obtained from:  OpenBSD, sashan <sashan at openbsd.org>, 1fdb608f55
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+5-2sys/netpfil/pf/pf_nv.c
+6-0sys/netpfil/pf/pf_nl.c
+4-2lib/libpfctl/libpfctl.c
+2-2lib/libpfctl/libpfctl.h
+2-2sbin/pfctl/parse.y
+2-2sys/net/pfvar.h
+21-101 files not shown
+23-107 files

FreeBSD/src 67082c7sys/netpfil/pf pf.c, tests/sys/netpfil/pf igmp.py

pf: should be enforcing TTL=1 to packets sent to 224.0.0.1 only.

Issue found and kindly reported by Luca Di Gregorio <lucdig _at_ gmail>

OK bluhm@

Obtained from:  OpenBSD, sashan <sashan at openbsd.org>, 58feb3ffc6
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+6-3sys/netpfil/pf/pf.c
+6-0tests/sys/netpfil/pf/igmp.py
+12-32 files

FreeBSD/src 5240eabshare/man/man4 epair.4, sys/net if_epair.c

Revert "epair: add support for checksum offloading"

This reverts commit e4ea162509e400340a2bc3e755071a92f3465e2d.

kp reports failures related to pf tests. Revert until we
understand what is going wrong.
DeltaFile
+2-59sys/net/if_epair.c
+1-23share/man/man4/epair.4
+3-822 files

FreeBSD/src 60d5a42sys/kern uipc_usrreq.c, tests/sys/kern unix_stream.c

unix/stream: fix EVFILT_WRITE after we did shutdown(2)

When fixing bug 286692, the change eafe5967ac558, that fixed a case when
peer side does close(), also had regressed a case when our side does
shutdown(SHUT_WR).  These actually are two independent code paths, and the
eafe5967ac558 shouldn't have touched the second block.  The removal of
'kn->kn_flags |= EV_EOF' was incorrect and the statement on original
behavior in the commit message was also incorrect.

Do not add back so_error setting, since I failed to find a test case that
would return anything but 0 in kevent.fflags when run on stable/14.

This was found with help of https://github.com/tokio-rs/mio.  Add a test
case into our test suite for that.

Fixes:  eafe5967ac558de142d91660e18e9238289890e3

Reviewed by:            markj
Differential Revision:  https://reviews.freebsd.org/D52327
DeltaFile
+24-0tests/sys/kern/unix_stream.c
+1-3sys/kern/uipc_usrreq.c
+25-32 files

FreeBSD/src 3296fdasys/arm64/conf std.arm64

arm64: enable bloating kernel with ext errors strings

Chase commit 8e8d3068dcbe ("amd64 GENERIC: enable bloating kernel with
ext errors strings") from amd64.  In general we would like to keep
GENERIC kernel options in sync between the Tier-1 architectures.

PR:             289236
Reviewed by:    andrew
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52342
DeltaFile
+1-0sys/arm64/conf/std.arm64
+1-01 files

FreeBSD/src 1645974usr.sbin/ctld ctld.hh iscsi.hh

ctld: Add missing initializers for several class members

These fields all need to be explicitly initialized with zeroes.  Prior
to the conversion to C++ these fields were zeroed by calloc().

This worked for me in earlier testing as my test boxes had
MALLOC_PRODUCTION enabled in make.conf.

PR:             289115
Reported by:    Slawa Olhovchenkov <slw zxy.spb.ru>
Fixes:          eb0dc901a541 ("ctld: Convert struct auth_group to a C++ class")
Fixes:          6acc7afa34aa ("ctld: Convert struct port to a hierarchy of C++ classes")
Fixes:          2bb9180bb5d0 ("ctld: Convert struct target to a C++ class")
Fixes:          ed076901ec80 ("ctld: Convert struct ctld_connection to a C++ class")
Sponsored by:   Chelsio Communications
DeltaFile
+3-3usr.sbin/ctld/ctld.hh
+1-1usr.sbin/ctld/iscsi.hh
+4-42 files

FreeBSD/src 45488e9usr.bin/mandoc Makefile

mandoc: Install mandoc.db.5

Reviewed by:    ziaee, bapt
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D52343
DeltaFile
+1-1usr.bin/mandoc/Makefile
+1-11 files

FreeBSD/src 5eb80bflibexec/rc/rc.d syscons moused

moused,syscons: Avoid warning if system has no /dev/ttyv*

A VM had no virtual terminals and emitted a warning on boot
`eval: cannot open /dev/ttyv*: No such file or directory`.

Break the loop in this case to avoid the warning.

PR:             289173
Reviewed by:    jlduran
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52344
DeltaFile
+2-0libexec/rc/rc.d/syscons
+1-0libexec/rc/rc.d/moused
+3-02 files

FreeBSD/src dd747d7stand/common disk.c, stand/kboot/kboot hostdisk.c

Revert "stand: Use calloc instead of malloc for initialization of filesystem devsw"

This reverts commit dfafdbdfc3e9db8b878283bcbef35f5d8d37dae8. There's no
author, and also problems with it. I'll redo it.

Sponsored by:           Netflix
DeltaFile
+1-1stand/common/disk.c
+1-1stand/kboot/kboot/hostdisk.c
+1-1stand/libofw/devicename.c
+1-1stand/libsa/dev.c
+1-1stand/libsa/zfs/zfs.c
+1-1stand/uboot/devicename.c
+6-66 files

FreeBSD/src 8ebb3decontrib/jemalloc configure.ac Makefile.in, contrib/jemalloc/bin jeprof.in

jemalloc: Remove bogus merge conflict markers

The merge markers were added, it seems, in one of my rebases. The HEAD
entry is the merged code, as far as I can tell, and is what should be in
the base. None of these files are used during the build.

Noticed by:             jhb
Sponsored by:           Netflix
DeltaFile
+0-5,629contrib/jemalloc/bin/jeprof.in
+0-3,542contrib/jemalloc/doc/jemalloc.xml.in
+0-2,410contrib/jemalloc/configure.ac
+0-1,829contrib/jemalloc/build-aux/config.sub
+0-1,466contrib/jemalloc/build-aux/config.guess
+0-627contrib/jemalloc/Makefile.in
+0-15,50312 files not shown
+0-18,03918 files

FreeBSD/src 6ec3144tests/sys/kern coredump_phnum_test.sh

tests: xfail readelf phdr count test w/LLVM binutils

LLVM readelf does not (yet) support phdr counts that overflow 16 bits.
Temporarily xfail this test until fixed; see upstream issue 132216 for
more details https://github.com/llvm/llvm-project/issues/132216.

PR:             285547
Reported by:    markj
Reviewed by:    dim, markj
Sponsored by:   The FreeBSD Foundation
Fixes: 1cae7121c667 ("Enable LLVM_BINUTILS by default")
Differential Revision: https://reviews.freebsd.org/D49561

(cherry picked from commit 5df8159d56a681e388a2fff1c1c24a4830b741d6)
DeltaFile
+5-0tests/sys/kern/coredump_phnum_test.sh
+5-01 files

FreeBSD/src b197d2abin/sh Makefile

sh: Fix non-NO_ROOT installconfig

When building without NO_ROOT, ${TAG_ARGS} is not set, which means we
pass ",config" as an install(1) argument.  Only add the config tag if
${TAG_ARGS} is defined to begin with.

Fixes:  aa730a66bc74 ("sh: Add config tag to /.profile")
Reported by:    bz
DeltaFile
+1-1bin/sh/Makefile
+1-11 files

FreeBSD/src 8b86235sys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: only change dtim_period once assoc

At least iwlwifi(4) seems to expect us to be assoc when seeing
BSS_CHANGED_BEACON_INFO as it will stop session protection and
update the beacon filter amongst other things.  Check for the vif
to be assoc before applying any dtim_period updates.  See comment
for more details on the entire flow.

MFC after:      3 days
DeltaFile
+19-1sys/compat/linuxkpi/common/src/linux_80211.c
+19-11 files

FreeBSD/src 00c9ebbsys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: counting beacons for debug only when assoc

Simplify the logic and only count beacons when we are assoc, given
we only do this for debugging purposes of beacon/connection loss.

Fixes:  bdfe17f129db0
MFC after:      3 days
DeltaFile
+8-2sys/compat/linuxkpi/common/src/linux_80211.c
+8-21 files

FreeBSD/src 0533923sys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: use IEEE80211_FEXT_AMPDU_OFFLOAD

Set IEEE80211_FEXT_AMPDU_OFFLOAD if the driver/firmware does AMPDU[-TX]
offload and net80211 should stay out of the way.

Later use IEEE80211_CONF_AMPDU_OFFLOAD() (the IEEE80211_FEXT_AMPDU_OFFLOAD
net80211 flag) rather than the LinuxKPI check to clear AMPDU-RX if we do
not support crypto offload.  This may seem odd at first as AMPDU-RX is
mandatory but we would not be able to get anything working if we would
let net80211 do a (*ic_ampdu_rx_start)() call.

Some of this is neccessary until we have the code for all drivers (rtw8x
use further interfaces) sorted.

Sponsored by:   The FreeBSD Foundation (originally)
MFC after:      3 days
Fixes:          ac2c7271b7c26
DeltaFile
+9-5sys/compat/linuxkpi/common/src/linux_80211.c
+9-51 files

FreeBSD/src 405cfeesys/dev/usb/controller xhci.c xhcireg.h

xhci: Parse and print extended capabilities

Parse out and display xhci controller extended capabilities. This gives
us a mechanism to pick these up when the controller attaches. The print
helps users and developer know the availability of features in the wild.

This change will let developers know from dmesg that a controller
supports USB debugging.

Reviewed by:    aokblast
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51255
DeltaFile
+85-0sys/dev/usb/controller/xhci.c
+5-0sys/dev/usb/controller/xhcireg.h
+90-02 files