vm_page: Retire its listq field
Over the life cycle of a vm_page, its listq field has been used for two
distinct purposes. First, linking together all of the pages allocated
to a vm_object. Recently, c8d56817b80f ("vm_object: drop memq field")
completed the elimination of this use case, using pctrie iterators in
place of iteration over the listq. Second, linking together power-of-
two-sized chunks of free pages within vm_phys. This change eliminates
that use case. In essence, this change reverts vm_phys back to using
the plinks.q field, like it did before 5cd29d0f3cda ("Improve VM page
queue scalability."), but with a twist to maintain scalability. Just
before vm_phys uses the plinks.q field, it ensures that any lazy dequeue
from a paging queue, e.g., PQ_ACTIVE, has completed. Typically, the
dequeue has completed, so vm_page_dequeue() is infrequently called by
vm_freelist_add(). The reason being that vm_phys only needs to use the
plinks.q field within the first page of any power-of-two-sized chunk,
so the rest of the pages can still have pending dequeues until the
chunk is split.
[9 lines not shown]
rtw89: prevent a NULL pointer deref in rtw89_swap_chanctx()
It is currently unclear if this is a result of the driver itself already
or the way LinuxKPI drives channels and the driver simply accepting and
acting on things it no longer should.
For now put the bandaid into place to make the driver work and pass
packets. For better resilience the check does not hurt anyway.
The moment we enter rtw89_chanctx_ops_add() the first time,
entity_map 0x00000001 has the lowest bit set and find_next_zero_bit()
will return 1. As a result the driver will try to swap chanctxs and
trip over a NULL pointer in rtw89_swap_chanctx(). See comment there
for how to (likely) trigger it.
Sponsored by: The FreeBSD Foundation
Reported by: Axel Rau (Axel.Rau Chaos1.DE) with 8852CE
MFC after: 3 days
traceroute6(8): Stop probing on networks rejected.
Stop probing after receiving ICMP6_DST_UNREACH and print
ICMP6 error code.
The behavior can be observed by tracing the route to,
for example, 2a02:ee80:4028:1126::
Discussed with: Job Snijders, Nick Hilliard
Obtained from: OpenBSD
Reviewed by: markj, jlduran
Differential Revision: https://reviews.freebsd.org/D47520
src.conf.5: regen with MITKRB5
This option doesn't actually do anything yet, but we need to update
src.conf.5 to keep CI happy.
Fixes: 290e8aaa3840 ("share/mk: Add MIT KRB5 build knob")
pctrie_lookup_node: assume parent_out != NULL
Since NULL is never passed as the parent_out parameter to
_pctrie_lookup_node, stop making the assignment to *parent_out check
parent_out for NULL first.
Reported by: alc
Reviewed by: alc
Differential Revision: https://reviews.freebsd.org/D50729
LinuxKPI: 802.11; update frag_threshold and rts_threshold
Update threshold values once we are associated.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: 802.11: fix lkpi_scan_ies_add() channel lookup
When looking up the channel we may not get a result if no flags are
passed in as net80211 channel list setup and lookup coding requires a
matching flag (band). So pass in IEEE80211_CHAN_[AG] depending on band
to increase the chances of finding a base channel and from that derive
rates, etc.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: 802.11: stop queues during key updates
When beginning key updates do stop and afterwards re-enable the tx queues
to avoid packets being passed to the driver. This is a theoretical
problem at this point but helps some cases. These functions will likely
need refinement in the future.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: 802.11: improve queue locking
Introduce an internal lkpi_ieee80211_wake_queues_locked() function
that can be used from context holding the wiphy lock.
Make linuxkpi_ieee80211_wake_queues() a wrapper with locking around
this.
Equally apply the wiphy lock to linuxkpi_ieee80211_wake_queue().
In lkpi_ieee80211_wake_queues() only wakeup the driver if the queue
is not empty; otherwise weird sideeffects can happen with some drivers.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: 802.11: adjust logging for key handling
Given there are still problems observed (at least in the Lab) adjust
crypto key handling routines and enhance logging with td_tid, jiffies.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: 802.11: place lock asserts for key operation
Since b8dfc3ecf7031 we hold the wiphy lock over any key updates.
Assert that on function entry.
Given this invariant there is no need to recheck a kay under lock now,
as the first lookup already is under the lock, so simplify the code.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
nuageinit: more package related functions
Implement package_update and package_upgrade, which allows to launch
an update of the metadata and an upgrade of the packages.
Sponsored by: OVHCloud
nuageinit: helper function to setup adduser
To carry out the userdata unit tests, you need to set up the environment in
order to skip adding the default user (nuage.adduser(default_user)
Sponsored by: OVHCloud
lualoader: rename loop variable to cleanup luacheck
This shadows an `i` used for indexing earlier in the function, and we
don't care that much about the name.
lualoader: allow graphical bits to be disabled with loader_gfx
Some people prefer the old ASCII art look and it's good to have a way
to confirm that the fallbacks still work right on systems that have a
functional framebuffer available. Add a loader_gfx loader.conf(5)
variable to disable the eager use of graphics for these use-cases.
While we're here, clean up the style in the area a little bit; the early
porting that I did to lualoader did a lot of redundant ~= nil that has
carried over into some of the later work. We can drop some of that, and
also re-organize some of these variables to improve readability.
ziaee notes that the positioning of the orb is a bit off; this is due to
a change in positioning that happened in
1b4e1171315398dec ("loader: Fix orb position") to account for the image
dimensions. This should be partially reverted to get it right; we
shouldn't assume that we can use the same shift in gfx-* definitions for
both the ASCII art and the associated image -- the {image, image_rl}
pair should be converted to something more like an fbimg or gfx table
[5 lines not shown]
qat: update API files to use SPDX identifier
API files are updated to have SPDX identifier and remove
longer form of license to ensure consistency with the
license format across all files.
Reviewed by: markj, ziaee
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D50379
qat: refactor error handling and add mutex locks
Error handling in qat driver code has been refactored.
Mutex lock handling has also been added during driver
attach and detach. Also pci_disable_busmaster() is called in
adf_detach() to ensure proper cleanup during device detachment.
Reviewed by: markj, ziaee
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D50379
qat: driver updates to improve code and fix bugs
Bug fixes and improvements are done for the qat code base
to improve code quality.
Reviewed by: markj, ziaee
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D50379
qat: reimplement cpaCyGetXXXInstances as a wrapper
Currently code from sal_instances.c and sal_crypto.c
for getting cy instances or number of instances is duplicated.
This commit replaces cpaCyGetXXXInstances implementation with
Lac_GetCyXXXInstancesByType invocation.
Reviewed by: markj, ziaee
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D50379
qat: restrict sysctl access to privileged users
Access to crucial QAT driver internals, such as
firmware counters and transport debug via
sysctl, has been limited to privileged users only.
Reviewed by: markj, ziaee
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D50379
qat: move debugfs handling to separate file
Moved handling of debugfs entries to a separate file.
In addition, it will allow to consolidate the addition of
debugfs entries to a single location in the code.
This implementation adds infrastructure to create (and remove)
debugfs entries at two different stages.
- Done when a device is probed, allows to keep debugfs entries
persistent between a transition in device state (up to down or
vice versa).
- Done after the initialization phase, allows to have debugfs
entries that are accessible only when the device is up.
In addition, moved the creation of debugfs entries for configuration
of the newly created function adf_dbgfs_init() and replace symbolic
permissions with octal permissions when creating the debugfs files.
Added sysctl oids storage for proper cleanup on device down.
[5 lines not shown]
qat: update 4xxx capabilities handling
Some capabilities were not properly fused out based on
the hardware slices. Hence updated the function accordingly.
Both PF and VF are changed.
This change also streamlines capability handling for SYM service:
- Lack of UCS slice does not mean that CIPHER capabilities are not
available.
- SYM capabilities should be considered disabled only if both
AUTH and CIPHER capabilities are not present.
- AUTH capability shouldn't disable CIPHER.
SMX slice mask for qat_4xxx is also corrected to check for
both SM3 and SM4 support.
Reviewed by: markj, ziaee
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D50379
qat: add disable safe dc mode for QAT SPR devices
Build and sysctl configuration modes are introduced for QAT SPR
devices to disable safe dc mode. A new QAT driver build option
‘QAT_DISABLE_SAFE_DC_MODE’ is required to build the QAT driver
with code that allows a request to be sent to FW to override the
‘History Buffer’ mitigation. Default QAT driver builds do not
include this ‘QAT_DISABLE_SAFE_DC_MODE’ build option. Even if the
QAT driver was built with code that allows a request to be sent to
FW to override the ‘History Buffer’ mitigation, the QAT driver must
still be configured using sysctl to request an override of the
‘History Buffer’ mitigation if desired. The default QAT driver
configuration option sysctl dev.qat.X.disable_safe_dc_mode does not
allow override of the mitigation. The new sysctl attribute
disable_safe_dc_mode is to be set to 1 for overriding the history
buffer mitigation. Firmware for qat_4xxx is updated for this change.
If this mode is enabled, decompression throughput increases but may
result in a data leak if num_user_processes is more than 1.
This option is to be enabled only if your system is not prone to
[6 lines not shown]
qat: fix typos and formatting issues
Multiple typos are corrected across the source code.
Formatting corrections are done to improve code quality
and maintainability. Some files which did not have proper
Copyright license are updated.
Reviewed by: markj, ziaee
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D50379