security/py-biscuit-auth: Convert build to use PEP 517 and rename to PyPI name
* Rename port to PyPI name according to Python policy
* Move build completely to PEP 517
* Bump consumers: www/bunkerweb/Makefile
* Simplify Python discovery; the build frontend will pass the interpreter
New name: security/py-biscuit-python
Co-authored-by: Jochen Neumeister <joneum at FreeBSD.org>
PR: 297823
Approved by: joneum (maintainer)
Differential Revision: https://reviews.freebsd.org/D59133
i2c/sensor/w83793g: Fix unused function warning
w83793g_writereg is unused so silence it.
Fixes: cd3cc6e910c0f ("i2c/sensors: Add driver for W83793 hardware monitor")
install: Fix two bugs in stdin code
* Fix case where the source is - and the target exists.
* Only call chflags() (to remove flags that might prevent us from
replacing an existing target) in the exists case; otherwise,
to_sb.st_flags is uninitialized.
* Rename the source file in the stdin test case.
* Extend null and stdin test cases to cover the case where the
target already exists.
PR: 297681
MFC after: 1 week
Fixes: d34870708db9 ("install: Allow installing stdin")
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D59144
(cherry picked from commit a5ff4125cf08a83f7e67f498e423f3e354144327)
build: Use -f when copying sources
If one of the source files we copy is non-writeable, cp will create a
non-writeable copy. If the original is later modified, cp will fail to
overwrite the copy since it is not writeable. Using cp -f ensures the
copy always succeeds, as long as the object directory is writeable.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
(cherry picked from commit 336b6d11922ac3d080de50f789d40ff95b540cdf)
kern/sched: Hide scheduler selection from C++
The scheduler selection interface uses names that are reserved words in
C++, causing problems for downstream projects that use C++ in the
kernel. Work around this by hiding the interface from C++ compilers
until we can come up with a better solution.
Fixes: ce38acee8d0b ("Add kern/sched_shim.c")
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: siderop1_netapp.com, imp, kib
Differential Revision: https://reviews.freebsd.org/D58991
(cherry picked from commit f2366851616083f923e8101363802678a03dc0b9)
build: Use -f when copying sources
If one of the source files we copy is non-writeable, cp will create a
non-writeable copy. If the original is later modified, cp will fail to
overwrite the copy since it is not writeable. Using cp -f ensures the
copy always succeeds, as long as the object directory is writeable.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
(cherry picked from commit 336b6d11922ac3d080de50f789d40ff95b540cdf)
install: Fix two bugs in stdin code
* Fix case where the source is - and the target exists.
* Only call chflags() (to remove flags that might prevent us from
replacing an existing target) in the exists case; otherwise,
to_sb.st_flags is uninitialized.
* Rename the source file in the stdin test case.
* Extend null and stdin test cases to cover the case where the
target already exists.
PR: 297681
MFC after: 1 week
Fixes: d34870708db9 ("install: Allow installing stdin")
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D59144
(cherry picked from commit a5ff4125cf08a83f7e67f498e423f3e354144327)
yes: Avoid static initialization
Our buffer is half a megabyte, but we are only initializing the first
two bytes. Switching from static to dynamic initialization moves it
from .data to .bss, greatly reducing the size of the binary.
Fixes: cf74b63d61b4 ("yes: Completely overengineer")
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D58890
(cherry picked from commit 557ba0c2a5138ce026c0ea9cb02f374f97378b7c)
bnxt: Add led(4) identification support
Query the firmware for the LEDs on each physical port and expose
/dev/led/bnxt* only when alternate blinking is supported. Configure
every LED in the advertised group for identification and restore its
default firmware state before a function reset.
This follows the DPDK and Linux bnxt HWRM identification paths.
Reviewed against: DPDK, Linux
Reviewed by: Sumit Saxena <sumit.saxena at broadcom.com>
Sponsored by: BBOX.io
(cherry picked from commit 98b5640786f874949e441bee7c4ad5740cd6a649)
bnxt: Add led(4) identification support
Query the firmware for the LEDs on each physical port and expose
/dev/led/bnxt* only when alternate blinking is supported. Configure
every LED in the advertised group for identification and restore its
default firmware state before a function reset.
This follows the DPDK and Linux bnxt HWRM identification paths.
Reviewed against: DPDK, Linux
Reviewed by: Sumit Saxena <sumit.saxena at broadcom.com>
Sponsored by: BBOX.io
(cherry picked from commit 98b5640786f874949e441bee7c4ad5740cd6a649)
ufshci: handle a recovery reset before the SIM attach
When the first start attempt fails early, the recovery reset
runs the start sequence again without a SIM. That pass still
looked up the WLUN, so it dereferenced a NULL SIM and panicked.
Attach the SIM whenever it does not exist yet. Also make the
WLUN lookup return NULL when there is no SIM.
Reviewed by: imp (mentor)
Sponsored by: Samsung Electronics
Differential Revision: https://reviews.freebsd.org/D58947
ufshci: build valid fake responses for manual completion
The manual completion wrote the fake response to the wrong
descriptor for task management slots. It also left the task tag
at zero, which tripped the task tag check under INVARIANTS.
Write the fake response where the completion path reads it.
Copy the task tag from the request.
Reviewed by: imp (mentor)
Sponsored by: Samsung Electronics
Differential Revision: https://reviews.freebsd.org/D58946
ufshci: reject new requests on a failed controller
A failed controller accepted new requests, but nothing ever
completed them, so the caller waited forever. The admin retry
path could also resubmit a request to a dead queue.
Reject new submits and admin retries on a failed controller.
The submit check runs under the queue lock, so it cannot race
with the queue walk in the fail path.
Reviewed by: imp (mentor)
Sponsored by: Samsung Electronics
Differential Revision: https://reviews.freebsd.org/D58948
ufshci: run the controller fail path only once
Two threads could run ufshci_ctrlr_fail() at the same time.
Each one walked the queues and completed the same trackers
again, which caused a double free and a panic.
Turn is_failed into an atomic gate, so only the first caller
walks the queues. The reset task now returns early on a failed
controller instead of re-enabling it.
Reviewed by: imp (mentor)
Sponsored by: Samsung Electronics
Differential Revision: https://reviews.freebsd.org/D58944
ufshci: claim trackers before failing them
ufshci_req_queue_fail() drops the queue lock to complete each
tracker. In that window the completion path could complete the
same tracker again.
Claim the slot before dropping the lock, so the completion scan
skips it. Reserved slots are left to their submit thread, which
completes them itself. The manual request completion helper
lost its only caller, so drop it.
Reviewed by: imp (mentor)
Sponsored by: Samsung Electronics
Differential Revision: https://reviews.freebsd.org/D58945
acpi_pci: Inherit PF locality for SR-IOV VFs
SR-IOV VFs are instantiated from their PF and intentionally do not
receive an ACPI handle by matching their runtime BDF. Consequently,
ACPI locality queries for a VF fall back to the upstream bus. This is
usually sufficient, but loses a _PXM supplied specifically for the PF.
Use the PCI core's owning-PF accessor for BUS_GET_DOMAIN and
BUS_GET_CPUS requests made for a VF. This preserves the VF's lack of
an ACPI handle while allowing its CPU and NUMA placement to follow the
PF.
Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59062
acpi_pci: Do not match SR-IOV VFs to ACPI devices
SR-IOV VFs are instantiated dynamically from their PF rather than
enumerated from ACPI. A VF's runtime slot and function can match an
unrelated _ADR below the bridge. acpi_pci_save_handle() stores that
handle in the VF's devinfo before acpi_pci_update_device() runs.
If the handle is already bound to another device_t whose parent is not
acpi0, acpi_pci_update_device() panics under INVARIANTS. Without
INVARIANTS, the VF retains the unrelated handle, so subsequent ACPI
lookups, including NUMA and power-management operations, can act on the
wrong namespace node.
Skip ACPI namespace matching for VFs.
Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59061