Either due to a race, or to the privilege restrictions, it is not
guaranteed that kern.files returned file information for all pcbs
read from net.inet.<proto>.pcblist. In this case the file rbtree does
not return the matching file by data address, and code must avoid
dereferencing NULL.
PR: 279875
Reviewed by: asomers
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D46050
This was missed in b8730c11a3 ("include: ssp: fix the build [...]"),
but <ssp/wchar.h> also had a bare `inline` in use. Swap it over to
__ssp_inline as well.
Reported by: netchild
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
IERS is the canonical source of leap-seconds. IANA, NIST and USNO obtain
their leap-second updates from IERS.
This resolves an issue for IPv6-only hosts as IERS is not accessible
via IPv6, requiring IPv6-only host to rely on some other source,
above.
From this point forward we should fetch the file from IERS, the
organization responsible for deciding when to insert leap-seconds.
PR: 279413
Obtained from: https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
Discussed with: imp
MFC after: 1 day
Allocate to a simple poiter, use that everywhere, then return it at the
end. The code looks cleaner.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D46043
Intersting/relevant changes since bmake-20240625
ChangeLog since bmake-20240625
2024-07-13 Simon J Gerraty <sjg@beast.crufty.net>
* cleanup redundant differences from NetBSD make
o parse.c: no longer uses mmap
o var.c: check __STDC_VERSION__ not __STDC__
2024-07-12 Simon J Gerraty <sjg@beast.crufty.net>
* Apply some patches from NetBSD pkgsrc to reduce divergence
o meta.c: requires sys/select.h if available
o var.c: ensure SIZE_MAX has a value
o util.c: ensure SA_RESTART is defined
* configure.in: use *ksh* rather than just *ksh to match
ksh shell specification.
* unit-tests/Makefile: expand BROKEN_TESTS for ksh and
mksh in particular
2024-07-11 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20240711
Merge with NetBSD make, pick up
o compat.c: allow Compat_RunCommand to also handle very long
commands by writing to a temp file when needed.
o main.c: extract the temp file logic recently added to Cmd_Exec
to Cmd_Argv so it can be leveraged by Compat_RunCommand.
2024-07-09 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20240709
Merge with NetBSD make, pick up
o error out on parse/evaluation errors in shell commands
o var.c: error out on syntax errors in ':M' and ':N' modifiers
2024-07-07 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20240707
Merge with NetBSD make, pick up
o only generate code for cleanup functions in CLEANUP mode
o hash.c: don't track hash table chain lengths during lookup
unless debugging
o main.c: move initialization of variable scopes to targ.c
o var.c: remove Var_End as it is now unnecessary
2024-07-06 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20240706
Merge with NetBSD make, pick up
o reduce lint comments about ARGSUSED
o cond.c: error out on conditions containing the operators '&' and '|'
o str.c: error out on a matching malformed matching pattern '[['
o var.c: in error messages, distinguish parsing from evaluating
in error messages for anonymous variables, log the value
error out on unclosed expressions during parse time
2024-07-04 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20240704
Merge with NetBSD make, pick up
o add more context information to error messages
o main.c: on error, print the targets to be made
add detailed exit status to message for failed sub-commands
o var.c: error out on the "Bad modifier" error message
2024-07-01 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20240701
Merge with NetBSD make, pick up
o var.c: add :tt for Title case
2024-06-30 Simon J Gerraty <sjg@beast.crufty.net>
* configure.in: 20240630 further refine check for whether
TZ=Europe/Berlin works
* VERSION (_MAKE_VERSION): 20240630
Merge with NetBSD make, pick up
o job.c: reduce use of UNCONST
o main.c: add detailed exit status to message for failed sub-commands
o var.c: error out on some more syntax errors
add more context to "returned non-zero status" message
We support all the C++ standards to some degree. However, pre C++11
standard support has been disappearing upstream, so also add a note
about -pedantic-errors might not work for earlier standards. Add note
about __cplusplus values.
Sponsored by: Netflix
I was testing this in several trees, and this chunk was in the tree I
tested. I didn't detect the mismerge before the commit...
Fixes: 6f1dd6071a
Sponsored by: Netflix
Make nvme_qpair_manual_complete_request take dnr as well as a
print_on_error action. Make the status word computation common between
it and nvme_qpair_manual_complete_tracker. And print the error when
we are cancelling the I/O on failure, but not when we're filtering
the I/O after we've failed. Make it private again to nvme_qpair.c.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D46049
When the drive is failed, we can't send passthrough commands to the
card, so fail them right away. Rearrange the comments to reflect the
current failure paths in the driver.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D46048
When we init the iosched instance, require clients to provide a schedule
function. We have almost, but not quite everything to know when it is
safe to schedule new I/O. The periph drivers, however, have all the
information, so make them do it when the I/O Scheduler needs to maybe
schedule I/O for rate limiting, etc. and use it to do that.
Sponsored by: Netflix
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D46038
Log outlier latency events to devd. In addition to counting, this will
allow analysis of whether the problem is confined to a specific block
range, or if it's a more general problem.
Sponsored by: Netflix
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D46036
The disk is nice to have at times, especially when you need the sector
size. At present, the only plans for this are related to logging.
Sponsored by: Netflix
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D46035
Pass the struct bio * down to the stats collection routines. This allows
us to collect better stats and report more details.
Sponsored by: Netflix
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D46034
Add kern.cam.DEV.UNIT.iosched.too_long (to count I/Os taking too long)
and kern.cam.DEV.UNIT.bad_latency (to set this threshold, defaults to
500ms). Each class of I/O (read, write, trim) has its own counters and
thresholds.
Sponsored by: Netflix
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D46033
For some reason execenv::exec() isn't successfully marked noreturn
(rlibby reports that virtual functions can't be noreturn), but calling
methods are so gcc rightly complains. Work around this by adding
explicit __builtin_unreachable() calls.
Reviewed by: imp, markj
Fixes: 257e70f1d5 kyua: Add FreeBSD Jail execution environment support
Differential Revision: https://reviews.freebsd.org/D46041
11da791920 switched Leap-seconds source from IANA to IERS, as IERS
is the canonoical source. The problem ist that IERS is not accessible
from IPv6 only networks. To work around this we must add IANA back in
order to provide IPv6-only users a source for leap-seconds fetch.
PR: 279413
Fixes: 11da791920
MFC after: 3 days
The FW_ASYREQ ioctl accepts a struct fw_asyreq object as its argument,
meaning that the kernel always copies in the full structure in
sys_ioctl before passing the request down to the driver. However,
fwcontrol was allocating smaller objects that contained only the
request header and a variable-sized payload. This means that the
kernel copy in sys_ioctl was reading off the end of this buffer. On
current architectures this happened to be ok, but it is UB.
Instead, allocate a full structure.
Reported by: GCC 14 -Walloc-size
Reviewed by: rlibby, brooks
Differential Revision: https://reviews.freebsd.org/D46014
GCC 14 defines __has_extension(c_atomic) but does not support
__c11_atomic_*, so require __clang__ for the CLANG_ATOMICS case.
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D46001
* Convert t4_uld_list to an array. There will be at most 3 items in the
list and it's simpler to track them in an array with a fixed slot for
each ULD.
* There is no need to refcount ULDs so stop doing that.
* Add uld_ prefix to all members of uld_info.
* Rename async_event to uld_stop to match its actual purpose. Call it
for all ULDs and not just ULD_IWARP.
Reviewed by: jhb
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D46029
Do not assume that the table starts at index 0 and is typically 4K in
size. The only thing the driver needs to verify is that its use of
F_SYNC_WR doesn't collide with the L2T hwidx range.
Reviewed by: jhb
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D46028
Final CPL means the tid is done in the hardware and other resources
associated with it can be freed right away. There is no need to wait
for the kernel to detach the toepcb.
Reviewed by: jhb
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D45991
The kernel used to call tod_pcb_detach when entering TIME_WAIT but that
seems to have changed, likely with the TIME_WAIT overhaul in the kernel
some time ago. Catch up by having the driver perform the detach.
The hardware does not handle TIME_WAIT so it's important to detach and
let the kernel arm the 2MSL timer to deal with it.
Reported by: Sony Arpita Das @ Chelsio
Reviewed by: jhb
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D45990
There's no clang 19 that we support, so remove that from the list.
Also, jhb will soon commit gcc 14 support, so add it while I'm here so I
don't forget later.
Submited by: jhb
Sponsored by: Netflix
A recent change dropped the only use of fls64() in axgbe, so drop its
definition.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D46030
Drop an implementation of __rounddown_pow_of_two, which triggers
Coverity warnings, and use the libkern implementation of
rounddown_pow_of_two instead.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D46022
The internal KATO is stored in milliseconds, so convert the command
line argument (given in seconds) to milliseconds before passing to
nvmf_connect().
Sponsored by: Chelsio Communications
All architectures define PCI_RES_BUS unconditionally now that only
NEW_PCIB is supported, so we no longer need the legacy code.
Reviewed by: jhb, andrew
Differential Revision: https://reviews.freebsd.org/D32955
All architectures enable NEW_PCIB in DEFAULTS (arm being the most recent
to do so in 121be55599 (arm: Set NEW_PCIB in DEFAULTS rather than a
subset of kernel configs")), so it's time we removed the legacy code
that no longer sees much testing and has a significant maintenance
burden.
Reviewed by: jhb, andrew, emaste
Differential Revision: https://reviews.freebsd.org/D32954
A new Kyua concept is added -- "execution environment". A test can be
configured to be run within a specific environment. The test case
lifecycle is extended respectively:
- execenv init (creates a jail or does nothing for default
execenv="host")
- test exec
- cleanup exec (optional)
- execenv cleanup (removes a jail or does nothing for default
execenv="host")
The following new functionality is provided, from bottom to top:
1 ATF based tests
- The new "execenv" metadata property can be set to explicitly ask for
an execution environment: "host" or "jail". If it's not defined, as
all existing tests do, then it implicitly means "host".
- The new "execenv.jail.params" metadata property can be optionally
defined to ask Kyua to use specific jail(8) parameters during creation
of a temporary jail. An example is "vnet allow.raw_sockets".
Kyua implicitly adds "children.max" to "execenv_jail_params"
parameters with the maximum possible value. A test case can override
it.
2 Kyuafile
- The same new metadata properties can be defined on Kyuafile level:
"execenv" and "execenv_jail_params".
- Note that historically ATF uses dotted style of metadata naming, while
Kyua uses underscore style. Hence "execenv.jail.params" vs.
"execenv_jail_params".
3 kyua.conf, kyua CLI
- The new "execenvs" engine configuration variable can be set to a list
of execution environments to run only tests designed for. Tests of not
listed environments are skipped.
- By default, this variable lists all execution environments supported
by a Kyua binary, e.g. execenvs="host jail".
- This variable can be changed via "kyua.conf" or via kyua CLI's "-v"
parameter. For example, "kyua -v execenvs=host test" will run only
host-based tests and skip jail-based ones.
- Current value of this variable can be examined with "kyua config".
[markj] This feature has not landed upstream yet.
See the discussion in https://github.com/freebsd/kyua/pull/224 .
Having the ability to automatically jail tests allows many network tests
to run in parallel, giving a drastic speedup. So, let's import the
feature and start using it in main.
Signed-off-by: Igor Ostapenko <pm@igoro.pro>
Reviewed by: markj, kp
Tested by: markj, kp
MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D45865
Notable upstream pull request merges:
#16209 --multi-- icp: rip out everything we don't use
#1623020c8bdd85 FreeBSD: Update use of UMA-related symbols in
arc_available_memory
#16242121a2d335 FreeBSD: unregister mountroot eventhandler on unload
#162585de3ac223 vdev_open: clear async fault flag after reopen
#16270436731276 zvol: Fix suspend lock leaks
#16273c87cb22ba head_errlog: fix use-after-free
#16284f72e081fb FreeBSD: Use a statement expression to implement
SET_ERROR()
#16300a10faf5ce FreeBSD: Use the new freeuio() helper to free dynamically
allocated UIOs
#16302a7fc4c85e zstd: don't call zstd_mempool_reap if there are no buffers
#16334dc91e7452 zdb: dump ZAP_FLAG_UINT64_KEY ZAPs properly
Obtained from: OpenZFS
OpenZFS commit: 1147a27978