jls: add a -c mode to check for a jail's existence
This is intended to be primarily used in scripts that want to check if
a jail exists before taking some action -- for instance, the jail(8)
test cleanup functions that want to remove the jail if it still exists.
Having a mode that limits its output for their usage is useful both
for cleaner scripts and also to avoid masking real problems.
Reviewed by: jamie
(cherry picked from commit 1d8590371049bb14a6410fa83cd03d9eca32f764)
jls: minor simplification to arg handling
It's easier to reason about the state of argc/argv if we just augment
them by optind after our getopt() loop.
No functional change, but this sets the stage for another change to add
a `-c` mode to (c)heck for the existence of a jail quietly without
the caller having to worry about spurious output.
Reviewed by: jamie
(cherry picked from commit dbaaadd4373a725950ad11e578dab61537b7c4f2)
jail: fix backfilling the "name" for jid-named jails
Using the cfparam variant of add_param() will actually copy the name and
flags from the passed-in param, which I hadn't considered. We actually
want the name/flags from the "name" param so that we can do variable
expansion against it right after that -- otherwise it cannot be found,
since variable expansion actually searches by name.
While we're here, `jls -e` was the intermediate name for `jls -c` that
never saw the light of the day. Fix our existence test.
Reviewed by: jamie
Fixes: 02944d8c49 ("jail: consistently populate the KP_JID [...]")
(cherry picked from commit b81fd3fc8b20eaad64b5c41826432124fd92d6a7)
jail: consistently populate the KP_JID and KP_NAME parameters
The gaps here, specifically, were:
- When we have to discover a running jail's jid from name, we should
populate the missing jid param
- When we populate jid/name from the config, if the name is a jid we
wouldn't populate the name; now we do both.
- When we create a jail, we should populate jid and name with whatever
details we have now that we didn't both.
As a consequence, we can cleanup a few things:
- vnet.interface and zfs.dataset can just always use the jid
- Trying to populate JNAME should always work now, where it would be
a little crashy before if you create a jail that didn't have a name
or jid on the command line
- We can simplify the just-prior JID population now that we'll keep a
stringified jid in our intparams.
This primarily fixes the below, but the issues with vnet.interface and
[6 lines not shown]
jail: tests: cleanup the commands test a bit
We shouldn't be doing setup in a head() function, as this can cause
various problems. For instance, in this case, it caused test listing
to fail in some cases if we didn't get to execute the cleanup properly
by complaining to stderr if the directory could not be created.
Switch to using atf_check for sanity checking stdout; most of these
expressions are self-explanatory and will make it clear what the problem
is.
commands.jail.conf contains a hard-coded path that we can avoid, which
is probably good to avoid weird conflicts if other tests try to copy it
and do the same. Just make a copy of our jail.conf and add the test's
$PWD to it to get a generally unique jail root.
Finally, simplify the cleanup handler a bit.
Reviewed by: jamie
[2 lines not shown]
jail: add JID, JNAME and JPATH to environment for exec.* commands
Although variable substitution is available in the jail configuration
file, the jail identifier is often not since it is dynamically
attributed at run time.
In order to facilitate scripting of exec.* commands executed on the
system, this change sets the JID, JNAME and JPATH environment variables.
These variables are not added when using exec.clean. Neither are they
for commands executed inside jails, to avoid disclosing information
about the host system.
Reviewed by: imp
(cherry picked from commit d8f021add40c321c4578da55dae52fb93c7ccb5f)
jail: tests: cosmetic-ish improvements
The new version of incrementing `jid` is a little cleaner and harder to
mess up, and also fix a nwlin omission while we're here.
These comments were dropped on D51502; ngie takes a co-author credit
so that they're not blamed for the commit message, but I can't claim
that I tweaked their suggestions.
Co-authored-by: ngie
makeman: switch over to the .lua implementation
Nobody will test it as long as it's not tied into the top-level target,
and we don't really have a good reason not to cut over to it since it
does produce identical results. Switch over but do not remove the old
sh implementation yet, just in case.
Note that this replacement is driven by a significant speedup from how
the new version is designed: tha lua version actually tries to
parallelize its data collection efforts to speed up generation.
Reviewed by: imp (previous version), emaste
Differential Revision: https://reviews.freebsd.org/D56558
linuxkpi: Implement __GFP_THISNODE in alloc_pages()
It indicates to `alloc_pages()` to allocate the pages from the current
NUMA domain. If it couldn't, it should not retry elsewhere and return
failure.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56590
dpaa2: ni: add more stats and link information
In addition to the locally generated statistics counters, dpaa2 ni
provides a larger set of counters than we currently export via
sysctl. Add (most of) the missing counters and descriptions.
Around Page 3/4 there are some things left to do if we want.
Also the manual was not clear on the descriptions of 3/0 and 3/1.
The second half of the change adds another sysctl note which exports
the link-state, speed, and capabilities set as a text-blob. This is
especially interesting in case the "ni" stops passing packets.
From what I have found in that case the (internal) link state of the
ni goes DOWN but we do not see an interrupt for a link-state change.
Being able to diagnose the state helps to (manually) fix it for now
by changing the media status to 10BaseT or none and then back to auto.
That usually brings the internal link state back UP.
PR: 279352
[4 lines not shown]
lib/msun: Replace manual checks with isnan() calls
The maximum and minimum functions, as well as nextafter and nexttoward,
were using manual NaN checks instead of the isnan() macro.
PR: 294692
Reviewed by: fuz, kargl
MFC after: 1 month
linuxkpi: Define `GFP_KERNEL_ACCOUNT` flag
This flag combines `GFP_KERNEL` and `__GFP_ACCOUNT`. The latter is also
defined in this commit. It is defined as a no-op flag as it is not
implemented.
The DRM generic code started to use it in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56587
Remove all of /usr/tests/share/examples/... when MK_EXAMPLES == no
- Remove the generated files (`file1`).
- Remove the top-level example `Kyuafile`.
MFC after: 1 week
UPDATING: Bump __FreeBSD_version to 1500508
Bump __FreeBSD_version to 1500508 for LinuxKPI to be able to track
changes to eventfd, changes for DRM 6.11, changes of LinuxKPI 802.11
based on Linux v7.0.
Sponsored by: The FreeBSD Foundation
Preen/update list for share/examples/sound under `MK_EXAMPLES`
- Update sources to match current installed files list. This involved
adding and removing some example files.
- Sort the list alphabetically so it'll be easier to spot future updates.
MFC after: 1 week
ath12k: update module Makefiles for v7.0 driver version
Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.
Handle the file changes and the extra wifi7/ subdirectory.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 5cfadb6633128dccc32b1e4f84386ad705adc721)
rtw89: fix mismerge
Due to FreeBSD-specific code it seems a code update was not applied
to the FreeBSD part during the v6.17 driver update.
Add the missing lines.
Sponsored by: The FreeBSD Foundation
Fixes: b35044b38f74c
(cherry picked from commit adb16cd389c3456cbd538b658c3c0af5145dde91)
ath11k: update module Makefiles for v7.0 driver version
Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.
Add optional support for the new cfr (channel frequency response)
file/option.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 20cf11812ac722852322f2f2994698d7a5fa8dc6)
brcm80211: update module Makefiles for v7.0 driver version
Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 634a48f3673ff8af9848846a6bff1a8c068d205d)
athk_common / ath10k: update module Makefiles for v7.0 driver version
Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 4546eb0c27f22236be8179616e1f0a3e88ddfbbe)
mt76: update module Makefile for v7.0 driver version
Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 1c50cb1d75625bea2ba928697ea1cbafa29dd245)