FreeBSD/src ed8b456bin/csh Makefile

csh: Remove gethost dependency on tc.const.h

gethost is a build tool built in stage 2.3, but it had a dependency on
tc.const.h, which requires target headers (that are not installed until
stage 4.1).  The build falls back to the host's headers if the target
headers don't yet exist, which may result in a build failure if the
host's headers don't match the target.

As gethost.c doesn't actually require the definitions in tc.const.h, add
a hack to skip the include of tc.const.h and remove the dependency.

PR:             283273
Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
Fixes: e754e5f36195 ("Upgrade to 6.10")
Differential Revision: https://reviews.freebsd.org/D48880
DeltaFile
+6-1bin/csh/Makefile
+6-11 files

FreeBSD/src 4c27953sys/dev/mlx5/mlx5_accel mlx5_ipsec.c

mlx5 ipsec: fix typo in the message

Sponsored by:   NVidia networking
DeltaFile
+1-1sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c
+1-11 files

FreeBSD/src 7835a4asys/net if_media.h

net: if_media fix syntax/build

Fixes:          d82c3e815a5f ("net: if_media for 100BASE-BX")
MFC after:      3 days
DeltaFile
+1-1sys/net/if_media.h
+1-11 files

FreeBSD/src 89d4096sys/dev/ixgbe ixgbe_phy.c if_ix.c

ixgbe: Add support for 1000BASE-BX SFP modules

Add support for 1Gbit BiDi modules

Signed-off-by:  Tore Amundsen <tore at amundsen.org>
MFC after:      1 week
Relnotes:       yes
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1518
DeltaFile
+19-4sys/dev/ixgbe/ixgbe_phy.c
+4-1sys/dev/ixgbe/if_ix.c
+3-1sys/dev/ixgbe/ixgbe_82599.c
+2-0sys/dev/ixgbe/ixgbe_phy.h
+2-0sys/dev/ixgbe/ixgbe_type.h
+30-65 files

FreeBSD/src c0af329secure/lib/libssh Makefile

libssh: Remove progressmeter

It is used only by scp and sftp, and already included directly in their
Makefiles.  It does not belong in libssh.

Fixes: d8b043c8d497 ("Update for 3.6.1p1; also remove Kerberos IV shims.")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48871
DeltaFile
+1-1secure/lib/libssh/Makefile
+1-11 files

FreeBSD/src d82c3e8sys/net if_media.h ieee8023ad_lacp.c

net: if_media for 100BASE-BX

Renumber 1000BASE-BX and add 100BASE-BX sequentially

I added this 1000BASE-BX in 78c63ed260fa20b3500aedfe41dc0dcae9593f51 but
did not connect it to any code yet, appologize for the churn.

MFC after:      3 days
DeltaFile
+4-1sys/net/if_media.h
+1-0sys/net/ieee8023ad_lacp.c
+5-12 files

FreeBSD/src 80d0d16sys/cam/scsi scsi_cd.c

cam/cd: The SAW_MEDIA flag duplicates VALID_MEDIA

This change mirrors what we do in da. Use only the VALID_MEDIA
flag. SAW_MEDIA was just used in one place. Transition to using
similar technique to what da uses for valid media.

We seem to handle media being ejected while we're doing I/O correctly,
both with prevent-allow and without (though the former threw some
vendor-specific errors before returning seek errors). I could only test
USB attached DVD (over ATAPI over BULK). I couldn't test it with SCSI CD
attachment, sata attached CD nor parallel ATA attached CDs because I
no longer have any of that hardware.

Differential Revision:  https://reviews.freebsd.org/D48841
Sponsored by:           Netflix
DeltaFile
+3-4sys/cam/scsi/scsi_cd.c
+3-41 files

FreeBSD/src f8de2besys/cam/scsi scsi_da.c

cam/da: Call cam_periph_invalidate on ENXIO in dadone

Use cam_periph_invalidate() instead of just setting the PACK_INVALID
flag in the da softc. It's a more appropriate and bigger hammer for this
case. PACK_INVALID is set as part of that, so remove the now-redundant
setting. This also has the side effect of short-circuiting errors for
other I/O still in the drive which is just about to fail (sometimes with
different error codes than what triggered this ENXIO).

The prior practice of just setting the PACK_INVALID flag, however, was
too ephemeral to be effective.. Since daopen would clear PACK_INVALID
after a successful open, we'd have to rediscover the error (which takes
tens of seconds) for every different geom tasting the drive. These two
factors lead to a watchdog before we could get through all the devices
if we had multiple failed drives with this syndrome. By invalidating the
periph, we fail fast enough to reboot enough to start petting the
watchdog. If we disable the watchdog, the tasting eventually completes,
but takes over an hour which is too long. As it is, it takes an extra
minute per failed drive, which is tolerable.

    [35 lines not shown]
DeltaFile
+37-22sys/cam/scsi/scsi_da.c
+37-221 files

FreeBSD/src 82fc49asys/cam/scsi scsi_da.c

cam/da: Only mark pack as valid if we know the size in daopen

Only mark the pack as 'valid' (eg clear the invalid bit) when we know
the size of the underlying drive and the periph hasn't been
invalidated. Previously, we'd unconditionally clear this bit, but
if the size isn't known, no I/O to the drive is possible.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D48688
DeltaFile
+9-2sys/cam/scsi/scsi_da.c
+9-21 files

FreeBSD/src c2de011tests/sys/vmm vmm_cred_jail.sh

vmm tests: Check for /dev/vmmctl to decide if vmm is initialized

If vmm.ko is loaded but fails initialization, it doesn't get
automatically unloaded, so the tests will not skip themselves and will
instead fail outright.

MFC after:      1 week
DeltaFile
+2-2tests/sys/vmm/vmm_cred_jail.sh
+2-21 files

FreeBSD/src 400ce62tests/sys/netinet fibs_multibind_test.c

fibs_multibind_test: Explicitly cast the checksum value

Otherwise gcc warns about the (intentionall) truncated value and raises
an error.

Fixes:  7034563f8ef3 ("tests: Add some FIB multibind test cases")
DeltaFile
+3-2tests/sys/netinet/fibs_multibind_test.c
+3-21 files

FreeBSD/src 9938f64sys/security/audit audit.c

audit/audit.c: fix typo KERNEL_PANICED->KERNEL_PANICKED

(cherry picked from commit 96dcff1a317f648886febbc15e606b4c6c45d11c)
DeltaFile
+1-1sys/security/audit/audit.c
+1-11 files

FreeBSD/src 3ba04b9sys/security/audit audit.c

audit(9): do not touch VFS if panicing

(cherry picked from commit 53ece2bea9ffa654aaa50e5ed66341160194179f)
DeltaFile
+2-1sys/security/audit/audit.c
+2-11 files

FreeBSD/src 743d6bashare/man/man4 tty.4

tty.4: correct description of header file

PR:     284596

(cherry picked from commit 8d4a464412d0bd9f214ecefa2298cbe7f85f2c0f)
DeltaFile
+1-1share/man/man4/tty.4
+1-11 files

FreeBSD/src 068de5blibexec/rtld-elf rtld.c

rtld: clear any holes in the struct utrace_rtld passed to kernel logger

PR:     284563

(cherry picked from commit e917958c36670131ab42e8f2c849b708a3216e37)
DeltaFile
+2-2libexec/rtld-elf/rtld.c
+2-21 files

FreeBSD/src 2be8b12sys/modules/usb/mtw Makefile

mtw(4) remove misplaced DEBUG_FLAGS

PR:             284639
Approved by: markj,emaste
Differential Revision:  https://reviews.freebsd.org/D48895
DeltaFile
+1-1sys/modules/usb/mtw/Makefile
+1-11 files

FreeBSD/src 4159402libexec/rc/rc.d iovctl

rc.d/iovctl: Start the iovctl service after kld.

Drivers, including those that support SR-IOV, can be loaded via kld_list
and it makes sense to process iovctl configuration files afer all
drivers have been loaded.

MFC after:      1 week
Sponsored by:   Chelsio Communications
Reviewed by:    0mp, jhb
Differential Revision:  https://reviews.freebsd.org/D47937
DeltaFile
+1-1libexec/rc/rc.d/iovctl
+1-11 files

FreeBSD/src f468366share/man/man4 Makefile

mtw.4: Fix a couple of nits

- Only install it when MK_USB is set to "yes", like we do for other USB
  NIC drivers.
- Create a hardlink named if_mtw.4, like we do for other NIC drivers.

PR:             284638
Fixes:          c14b01624261 ("mt7601U: Importing if_mtw from OpenBSD")
DeltaFile
+2-1share/man/man4/Makefile
+2-11 files

FreeBSD/src d235f19contrib/mandoc mdoc.7

mdoc.7/MANUAL STRUCTURE: add HARDWARE

FreeBSD Release infrastructure has been generating the Hardware
Compatibility Notes from this section for some decades. Make this more
obvious. This does change the upstream mdoc.7 in a minimal way to
document this, but the .Dd wasn't bumped to avoid conflicts with the
next mdoc/mandoc import.

Reported by:    bz (HARDWAREs generating compatibility notes)
Reported by:    grahamperrin (order listed in fdp-primer/man)
Reviewed by:    imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1463
DeltaFile
+7-0contrib/mandoc/mdoc.7
+7-01 files

FreeBSD/src 602be8eshare/vt/keymaps ca-multi.kbd INDEX.keymaps

keymaps: Add Canadian Mulitlingual Standard

Pull Request: https://github.com/freebsd/freebsd-src/pull/1586
DeltaFile
+142-0share/vt/keymaps/ca-multi.kbd
+3-0share/vt/keymaps/INDEX.keymaps
+1-0share/vt/keymaps/Makefile
+146-03 files

FreeBSD/src d3b1dcbsys/dev/iicbus acpi_iicbus.c

acpi_iicbus: install the address space handler by default

Signed-off-by: Ahmad Khalifa <ahmadkhalifa570 at gmail.com>

Reviewed by:    wulf
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1583
DeltaFile
+1-1sys/dev/iicbus/acpi_iicbus.c
+1-11 files

FreeBSD/src ca3c2d2usr.sbin/jls jls.8

jls.8: Reference correct manpage for libxo options

PR:             284135
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 90670e0e275c6e36fc7e14368fc4e3e7f1d3671d)
(cherry picked from commit 707adc335e946d052ddc17d1878edbb4933b0ce3)
DeltaFile
+3-3usr.sbin/jls/jls.8
+3-31 files

FreeBSD/src 02cd05bcontrib/blacklist/bin blacklistd.conf.5

blocklistd: Remove obsolete network class reference

This was a comment in a configuration example.

Reported by:    bapt
Reviewed by:    bapt, jlduran
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48810

(cherry picked from commit 513c4e20790a24526cb1c2f5a4725971a09d928a)
(cherry picked from commit 5a7daf019918ba14ee665798b266efb0f6b2bbb4)
DeltaFile
+1-1contrib/blacklist/bin/blacklistd.conf.5
+1-11 files

FreeBSD/src 5a7daf0contrib/blocklist/bin blacklistd.conf.5

blocklistd: Remove obsolete network class reference

This was a comment in a configuration example.

Reported by:    bapt
Reviewed by:    bapt, jlduran
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48810

(cherry picked from commit 513c4e20790a24526cb1c2f5a4725971a09d928a)
DeltaFile
+1-1contrib/blocklist/bin/blacklistd.conf.5
+1-11 files

FreeBSD/src 707adc3usr.sbin/jls jls.8

jls.8: Reference correct manpage for libxo options

PR:             284135
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 90670e0e275c6e36fc7e14368fc4e3e7f1d3671d)
DeltaFile
+3-3usr.sbin/jls/jls.8
+3-31 files

FreeBSD/src d942e28sys/dev/mlx5/mlx5_en mlx5_en_main.c

mlx5en: Fix SIOCSIFCAPNV

In 4cc5d081d8c23, a change was introduced that manipulated
drv_ioctl_data->reqcap using IFCAP2 bits.  This was noticed
when creating a mixed lagg with mce0 and ixl0 caused the
interfaces' txcsum caps to be disabled.

Fixes: 4cc5d081d8c23
Reviewed by: glebius
Sponsored by: Netflix
MFC After: 7 days

(cherry picked from commit 36fdc42c6a4c828d334471438c4f852e4b5a25e2)
DeltaFile
+1-1sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+1-11 files

FreeBSD/src 0db4588sys/kern kern_thread.c kern_fork.c, sys/sys asan.h proc.h

thread: Simplify sanitizer integration with thread creation

fork() may allocate a new thread in one of two ways: from UMA, or cached
in a freed proc that was just allocated from UMA.  In either case, KASAN
and KMSAN need to initialize some state; in particular they need to
initialize the shadow mapping of the new thread's stack.

This is done differently between KASAN and KMSAN, which is confusing.
This patch improves things a bit:
- Add a new thread_recycle() function, which moves all kernel stack
  handling out of kern_fork.c, since it doesn't really belong there.
- Then, thread_alloc_stack() has only one local caller, so just inline
  it.
- Avoid redundant shadow stack initialization: thread_alloc()
  initializes the KMSAN shadow stack (via kmsan_thread_alloc()) even
  through vm_thread_new() already did that.
- Add kasan_thread_alloc(), for consistency with kmsan_thread_alloc().

No functional change intended.

    [6 lines not shown]
DeltaFile
+12-8sys/kern/kern_thread.c
+3-14sys/kern/kern_fork.c
+10-0sys/kern/subr_asan.c
+4-3sys/vm/vm_glue.c
+4-0sys/sys/asan.h
+1-1sys/sys/proc.h
+34-266 files

FreeBSD/src bd8c494sys/cddl/contrib/opensolaris/uts/common/dtrace dtrace.c, sys/cddl/contrib/opensolaris/uts/common/sys dtrace_impl.h

dtrace: Use size_t instead of uintptr_t to represent buffer offsets

This eases porting of DTrace to CHERI, where uintptr_t and size_t aren't
interchangeable.

No functional change intended.

Reviewed by:    Domagoj Stolfa <domagoj.stolfa at gmail.com>
MFC after:      2 weeks
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D48625

(cherry picked from commit ba9cff7aa2eb62d84bead503cd606d1586ea8388)
DeltaFile
+9-10sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+3-3sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h
+12-132 files

FreeBSD/src f34a651usr.sbin/bhyve net_backend_slirp.c

bhyve: Use a non-blocking read in slirp_recv()

When using the slirp backend with the e1000 frontend, I otherwise get
hangs in readv(), caused by the e1000 emulation not checking whether
bytes are available before trying to read them.  In particular, that
device model expects the recv callback to return 0 if no bytes are
available, and with slirp it would end up blocking forever.  The virtio
device model uses the peek_recvlen to check first, so I didn't notice
the problem when implementing the slirp backend.

Make the slirp backend more flexible to accommodate e1000.

MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D48164

(cherry picked from commit d3bdfa583044dbfb76ef777939b86bb68baebee7)
DeltaFile
+13-2usr.sbin/bhyve/net_backend_slirp.c
+13-21 files

FreeBSD/src 794283fsys/kern kern_thread.c

thread: Add a missing include of asan.h

I didn't notice this during testing because invariants-enabled kernels
implicitly include asan.h via kassert.h.

Reported by:    Lexi Winter <lexi at le-Fay.org>
Fixes:          800da341bc4a ("thread: Simplify sanitizer integration with thread creation")

(cherry picked from commit 7a7063cc54274a44192fb65c71360a5e72c171b9)
DeltaFile
+1-0sys/kern/kern_thread.c
+1-01 files