ahc(4)/ahd(4): target mode: cancel outstanding AIOs and INOTs
When disabling a lun there can still be outstanding AIOs and INOTs, when
this happens previously the lun would just fail to disable and trying to
re-use the lun would break the card.
isp(4) in target mode does the same thing when disabling a lun, in
testing this allows re-starting of ctld(8) with connected initiators and
allows initiators to gracefully resume afterwards.
Signed-off-by: HP van Braam <hp at tmm.cx>
Reviewed by: imp, mav
Pull Request: https://github.com/freebsd/freebsd-src/pull/1190
ahc(4) clean up old Linux defines
Linux removed theirs starting in 2018 in commit:
"scsi: aic7xxx: Fix build using bare-metal toolchain"
Also remove now-useless sys/cdefs.h includes
Signed-off-by: HP van Braam <hp at tmm.cx>
Reviewed by: imp, mav, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1189
pow,powf(3),__ieee754_rem_pio2(f): Avoid negative integer left shift UB
A compiler clever enough to know that z is positive with a non-zero
biased exponent could, for example, optimize away the scalbnf(z,n) in
pow() because behavior for left shift of negative values is undefined.
`n` is negative when y*log2(|x|) < -0.5. i.e. |x^y| < sqrt(0.5)
The intended behavior for operator<< in this code is to shift the two's
complement representation of the first operand.
In the pow() functions, the result is added to the IEEE 754 exponent of
z = 2^y'. n may be negative enough to underflow the biased IEEE 754
exponent below zero, which is manifested in the sign bit of j
(which would correspond to the IEEE 754 sign bit).
The conversion from uint32_t to int32_t for out-of-int32_t-range values
is implementation defined. The assumed behavior of interpreting the
uint32_t value as a two's complement representation of a signed value
is already assumed in many parts of the code, such as uses of
[9 lines not shown]
libc printf_render_errno(): do not use strerror()
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D44916
__vprintf(): switch from strerror() to strerror_rl()
This eliminates the use of non-thread-safe function in printf*() family,
and make the call locale-aware. Also, it stops obliterating the
strerror() static buffer, which aligns with the POSIX requirement that
implementations must behave as if no standard-mandated functions call
strerror().
PR: 278556
Reported by: Jonathan Gruber <jonathan.gruber.jg at gmail.com>
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D44916
Remove the MK_NVME build option
The drivers and utilities are now built and installed unconditionally.
Reviewed by: imp, emaste
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D44843
nvmecontrol: Always build instead of being conditional on WITH_NVME
This now builds fine on all platforms so always include it similar
to other tools such as camcontrol.
Reviewed by: imp, emaste
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D44842
camcontrol: Enable WITH_NVME unconditionally
MK_NVME is no longer marked broken for any platforms, so just include
support for it always as we do for ATA and SCSI.
Reviewed by: emaste
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D44841
Cirrus-CI: switch to llvm18 by default
As of commit 439352ac8257 Clang/LLVM 18 is the default in-tree compiler.
Follow suit in with the external toolchain package used by Cirrus-CI.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit e8b7c78c1b38d0486ff12993c0529a201030bd07)
Use MOVED_LIBS for usr/lib/libcxxrt.so.1 ObsoleteFiles.inc entry
Otherwise, the "make delete-old-libs" mechanism also deletes 32-bit
copies, such as in /usr/lib32.
Reported by: Josef 'Jeff' Sipek <jeffpc at josefsipek.net>
Fixes: 911a6479e18b
nfsserver: Default to nfs_reserved_port_only="YES"
This setting causes the NFS server to check that all RPCs are sent from
a privileged (<= 1023) port, rejecting those that are not. This
slightly raises the bar for a user with network access to an
unauthenticated NFS server to access exported NFS filesystems.
Users that use traditional NFS clients (e.g., those provided by FreeBSD
or Linux) should not see any difference, assuming that unprivileged
filesystem mounting is disallowed.
Note that the setting is per-VNET, so may be overridden in VNET jails
without affecting the rest of the system.
Discussed with: freebsd-arch@
Reviewed by: rmacklem, bz, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44906
sigqueue(2): add impl-specific flag __SIGQUEUE_TID
The flag allows the pid argument to designate a thread from the calling
process. The flag value is carved from the high bit of the signal
number, which slightly changes the ABI of syscall.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D44867
kern_thr.c: normalize includes
Remove extra sys/param.h, provided by sys/systm.h.
Order the rest alphabetically.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D44867
kern_thread.c: remove unneeded include of sys/param.h
Handled by sys/systm.h already.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D44867
Support ARP for 802 networks
This is used by 802.3 Ethernet. (Also be used by 802.4 Token Bus and
802.5 Token Ring, but we don't support those.)
This was accidentally removed along with FDDI support in commit
0437c8e3b198, presumably because comments implied it was used only by
FDDI or Token Ring.
Fixes: 0437c8e3b198 ("Remove support for FDDI networks.")
Reviewed-by: emaste
Signed-off-by: Denny Page <dennypage at me.com>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1166
L2ARC: Cleanup buffer re-compression
When compressed ARC is disabled, we may have to re-compress when
writing into L2ARC. If doing so we can't fit it into the original
physical size, we should just fail immediately, since even if it
may still fit into allocation size, its checksum will never match.
While there, refactor the code similar to other compression places
without using abd_return_buf_copy().
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Motin <mav at FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16038