FreeBSD/src e425d43. Makefile.inc1

Makefile.inc1: Avoid including cwd in path

Buildworld failed when objcopy tried to overwrite itself, with `objcopy:
open objcopy failed: Text file busy`.  The PATH ended up with `::`,
effectively including the current directory, and we found the wrong
objcopy.

PR:             261215
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit ac7ed266dc73a1d55f2bc1e90bfce3c93757e8b4)
DeltaFile
+4-1Makefile.inc1
+4-11 files

FreeBSD/src 9225533. UPDATING, sys/amd64/conf GENERIC

sys: Rename BLOAT_KERNEL_WITH_EXTERR to EXTERR_STRINGS

There's no need for an implied value judgement.

Suggested by:   jhb
Reviewed by:    kib, jhb
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52351
DeltaFile
+4-0UPDATING
+1-1sys/amd64/conf/GENERIC
+1-1sys/arm64/conf/std.arm64
+1-1sys/conf/options
+1-1sys/sys/exterrvar.h
+8-45 files

FreeBSD/src 1ff48c6bin/sh/tests/execution func1.0, tools/regression/bpf/bpf_filter Makefile

tests: Update for jemalloc's option parsing

MALLOC_OPTIONS=J -> MALLOC_CONF=junk:true

PR:             287357
Reviewed by:    markj
Event:          Kitchener-Waterloo Hackathon 202506
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50910

(cherry picked from commit 4f33d073003ccd91390709e14e5c1bf1f0c1c85c)
DeltaFile
+2-2bin/sh/tests/execution/func1.0
+1-1tools/regression/bpf/bpf_filter/Makefile
+3-32 files

FreeBSD/src 96743bfsbin/reboot boot_i386.8

boot_i386.8: Mention this is legacy

Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49704

(cherry picked from commit b8437cbae173308180fbaddc6a74bfb6f8c4410b)
DeltaFile
+3-5sbin/reboot/boot_i386.8
+3-51 files

FreeBSD/src 4b8eebeusr.sbin/tcpdump/tcpdump Makefile

tcpdump: don't create unused version.c

The version now comes from the PACKAGE_VERSION macro.

Fixes:          0a7e5f1f02aa ("tcpdump: Update to 4.99.5")
Reviewed by:    jrm, emaste
Differential Revision:  https://reviews.freebsd.org/D52334
DeltaFile
+3-8usr.sbin/tcpdump/tcpdump/Makefile
+3-81 files

FreeBSD/src 9f67000usr.sbin/tcpdump/tcpdump Makefile

tcpdump: drop no-op LBL_ALIGN macro

This macro was replaced by a collection of architecture ifdefs in
tcpdump 4.99.4 so defining it does nothing.

Fixes:          51a183021fce3 ("Import tcpdump 4.99.4")
Reviewed by:    jrm, emaste
Differential Revision:  https://reviews.freebsd.org/D52333
DeltaFile
+0-3usr.sbin/tcpdump/tcpdump/Makefile
+0-31 files

FreeBSD/src d376524usr.sbin/tcpdump Makefile.inc

tcpdump: get BINDIR from usr.sbin/Makefile.inc [NFC]

Reviewed by:    jrm, emaste
Differential Revision:  https://reviews.freebsd.org/D52332
DeltaFile
+2-2usr.sbin/tcpdump/Makefile.inc
+2-21 files

FreeBSD/src bc222e9sys/compat/linuxkpi/common/include/linux skbuff.h

LinuxKPI: skbuff: no longer use IEEE80211_DEBUG to turn on debug

A port using linux(kpi) header files but not using skbuffs is hitting
the case that it cannot find opt_wlan.h.  Give up to the idea that
skbuff.h is only used by wireless drivers (or in-tree) and that
IEEE80211_DEBUG (via opt_lwan.h) could autmatically compile in debug
support.

It is likely time to add a LINUXKPI_DEBUG knob in the near future
(also for linuxkpi_debug or linuxkpi_debug_rcu).

PR:             289268
MFC after:      3 days
DeltaFile
+6-8sys/compat/linuxkpi/common/include/linux/skbuff.h
+6-81 files

FreeBSD/src 11f1dd1sys/kern init_main.c

init_main: Fix logging the subsystem of pre-loaded kernel modules

The pre-load, aka linker_preload() runs at the order of SI_SUB_KLD, but
a pre-loaded module may have SYSINITs that have startup order prior to
SI_SUB_KLD, e.g. TUNABLE_INT() / TUNABLE_LONG(), hence it is possible
that we run into abnormal orders.

Without this change, the subsystem of the pre-loaded kernel modules
will be melted into previous one. That is mostly harmless but confusing.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47904
DeltaFile
+1-1sys/kern/init_main.c
+1-11 files

FreeBSD/src 512d3c3tests/sys/net/if_ovpn utils.subr if_ovpn.sh

if_ovpn tests: skip float and linklocal test on < 2.7

Earlier versions (than 2.7.0) do not support float notifications or link-local
addresses. Skip the relevant tests there.

PR:             289150
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D52234
DeltaFile
+19-0tests/sys/net/if_ovpn/utils.subr
+2-0tests/sys/net/if_ovpn/if_ovpn.sh
+21-02 files

FreeBSD/src 245f2abbin/timeout/tests timeout_test.sh

timeout(1): add license header to unit test

Requested by:   kevans
DeltaFile
+2-0bin/timeout/tests/timeout_test.sh
+2-01 files

FreeBSD/src 4919869share/man/man4 vtnet.4

vtnet.4: remove stray line

Reported by:    Timo Völker
Fixes:          ac87d70563f8 ("vtnet.4: improve existing descriptions and add missing ones")
MFC after:      3 days
Sponsored by:   Netflix, Inc.
DeltaFile
+1-2share/man/man4/vtnet.4
+1-21 files

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_ruleset.c
+2-2sys/netpfil/pf/pf_nl.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