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
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
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
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
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]
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
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
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")
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
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")
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
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
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)
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)
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]
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)
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)
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)