Fix UPS Input Load graph showing Watts on a percentage axis
## Problem
The "UPS Input Load" report has `vertical_label = 'Percentage'` but pointed `get_chart_name()` at Netdata's `upsd_<id>.load_usage` chart, whose units are Watts (`ups.realpower`, or `ups.load/100 × ups.realpower.nominal`). So the graph rendered absolute power draw (e.g. ~117W for a ~30% load on a 390W UPS) under a "Percentage" axis. This regressed in the python.d→go.d Netdata migration, which renamed the chart from `nut_<id>.load` to `load_usage` without updating the label — the migration picked the wrong sibling chart.
## Solution
Point the chart at `upsd_<id>.load_percentage` (units: percentage), which maps to the raw NUT `ups.load` variable and matches both the existing label and title. This chart is gated on the same `ups.load` variable as `load_usage`, so it's available under identical conditions, and it populates even on UPSes that don't report realpower — where `load_usage` would be empty.
[Clang][Test] Fix -Wctad-maybe-unsupported in OperatorNewDeletePointersExtractorTest.cpp (#209012)
Fix warning: `'std::set' may not intend to support class template
argument deduction [-Wctad-maybe-unsupported]`, which is error under
-Werror.
std::set{*PtrId} does implicitly deduce to std::set<EntityId>, but it
is not explicit or user-defined CATD guide. Opt-in warning
-Wctad-maybe-unsupported flags it as maybe unsafe and unintended. The
warning is enabled at
https://github.com/llvm/llvm-project/blob/9083925dadb4/llvm/cmake/modules/HandleLLVMOptions.cmake#L977
Relates to #206600.
Convert boot plugin to typesafe pattern
## Problem
The boot service was old-style dict-based code spread across three files (boot.py, boot_/format.py, boot_/boot_loader.py) that all declared the same BootService, so the framework silently merged them into a CompoundService. None of it was type-checked end to end, and every in-process consumer reached it through untyped string middleware.call('boot.*').
## Solution
- Consolidate everything into a single plugins/boot/ package using the port pattern: a lean BootService in __init__.py that delegates to plain, fully type-annotated module functions in disks.py/format.py/pool_ops.py, with @api_method(check_annotations=True) public methods and @private stubs. boot.get_state now returns a BootGetState model; internal callers use a dict state helper so nothing breaks on attribute-vs-key access.
- Register boot in main.py's ServiceContainer and have it own boot.environment as a sub-service, replacing BootServicesContainer.
- Expose the boot-pool name/disks cache through accessor functions instead of a module global. This also fixes a latent bug where libvirt/cdrom.py imported the global at module load (before setup runs), bound it to None, and so never filtered the boot pool out of CDROM path validation.
- Convert every same-process boot.* string call to typed call2/call_sync2 across sysdataset, zfs_events, disk, failover, and the zpool/audit/tunable/update/system_advanced plugins, the alert sources, and the cron/fstab makos, keeping each site's sync/async flavour.
- Keep the private update_initramfs/format models in the plugin (check_model_module requires private-method models to live there, not in the api package) and import them lazily from consumers, otherwise pulling boot/__init__ into the early service-init chain deadlocks on a partially-initialised middlewared.service.
- Add plugins/boot/ to mypy.yml.
chflags.1: Document the new UF_DONTCACHE flag
Commit 74654ba3b1b3 added and new chflags(1) flag called
"udontcache" or "dontcache". This patch documents this flag.
This is a content change.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D58181
chflags: Add a new UF_DONTCACHE flag
This internet draft (which is close to being an RFC)
specifies a new NFSv4.2 attribute which tells the NFSv4.2
client to not cache file data. (Similar to O_DIRECT, but
triggered by this attribute set on the file on the NFSv4.2
server and not by the application's open(2).)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-uncacheable-files/
This patch adds a new chflags(1) flag called UF_DONTCACHE to
implement this.
Patches for NFS and ZFS will be done separately.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D58181
[ELF,test] Modernize --retain-symbols-file tests (#209062)
Switch to llvm-readelf, compact FileCheck directives, and
split-file-style naming. Prepares for a --retain-symbols-file behavior
change.
www/wasmtime: Declare libzstd shlib dependency
The binary links libzstd.so.1 (via the zstd-sys crate, which uses
pkg-config to pick up the system libzstd by default), but the port
does not declare the runtime dependency.
Detected by poudriere stage-qa:
Warning: wasmtime-44.0.1 will be rebuilt as it misses libzstd.so.1
which no dependency provides. It is likely (silently) failing testport/
stage-qa.
Add LIB_DEPENDS=libzstd.so:archivers/zstd and bump PORTREVISION.
Reviewed by: yuri
Differential Revision: https://reviews.freebsd.org/D56853
Define a "BI_MACH_FDT" machine type. The value for this record type
is 0x46445400 ('FDT\0') and unlikely to collide with any other new
machine types that Linux/m68k might decide to allocate.
This machine type has 3 machine-type-specific bootinfo record types:
- BI_FDT_PLATFORM -- a C string providing more detail about the specific
machine / platform.
- BI_FDT_BLOB -- a data record containing a Flattened Device Tree blob.
- BI_FDT_ELF_SYMS -- a memory record pointing to the location of any
loaded ELF symbols, assumed to be contiguous with the kernel +
bootinfo data. This record is needed early, possibly before virtual
memory has been bootstrapped, so that the symbols can be preserved.
shells/nu_plugin_query: Declare libcurl shlib dependency
The binary links libcurl.so.4 (via the curl-sys crate, which uses
pkg-config to pick up the system libcurl by default), but the port
does not declare the runtime dependency.
Detected by poudriere stage-qa:
Warning: nu_plugin_query-0.112.2_1 will be rebuilt as it misses
libcurl.so.4 which no dependency provides. It is likely (silently)
failing testport/stage-qa.
Add LIB_DEPENDS=libcurl.so:ftp/curl and bump PORTREVISION. Also
reorder PLIST_FILES ahead of OPENSSLINC/OPENSSLLIB to satisfy
portclippy.
Reviewed by: yuri
Differential Revision: https://reviews.freebsd.org/D56854
Convert boot plugin to typesafe pattern
## Problem
The boot service was old-style dict-based code spread across three files (boot.py, boot_/format.py, boot_/boot_loader.py) that all declared the same BootService, so the framework silently merged them into a CompoundService. None of it was type-checked end to end, and every in-process consumer reached it through untyped string middleware.call('boot.*').
## Solution
- Consolidate everything into a single plugins/boot/ package using the port pattern: a lean BootService in __init__.py that delegates to plain, fully type-annotated module functions in disks.py/format.py/pool_ops.py, with @api_method(check_annotations=True) public methods and @private stubs. boot.get_state now returns a BootGetState model; internal callers use a dict state helper so nothing breaks on attribute-vs-key access.
- Register boot in main.py's ServiceContainer and have it own boot.environment as a sub-service, replacing BootServicesContainer.
- Expose the boot-pool name/disks cache through accessor functions instead of a module global. This also fixes a latent bug where libvirt/cdrom.py imported the global at module load (before setup runs), bound it to None, and so never filtered the boot pool out of CDROM path validation.
- Convert every same-process boot.* string call to typed call2/call_sync2 across sysdataset, zfs_events, disk, failover, and the zpool/audit/tunable/update/system_advanced plugins, the alert sources, and the cron/fstab makos, keeping each site's sync/async flavour.
- Keep the private update_initramfs/format models in the plugin (check_model_module requires private-method models to live there, not in the api package) and import them lazily from consumers, otherwise pulling boot/__init__ into the early service-init chain deadlocks on a partially-initialised middlewared.service.
- Add plugins/boot/ to mypy.yml.
[SLP] Fix miscompile from truncating signed icmp constant
getActiveBits() ignores sign, so a positive constant needing the
narrower type's top bit was truncated to a negative value. Use
getSignificantBits() for signed comparisons.
Fixes #209010
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/209061
sysv: Recheck message queue limit after malloc
que_create() allocates with M_WAIT and may sleep after sys_msgget()
checks num_ques against msgmni. The kernel lock is released while the
thread sleeps, allowing concurrent creators to pass the same check and
exceed the queue limit.
OK: mvs@
sysv: Use zero-based message queue indices
que_ix starts at one, while KERN_SYSVIPC_MSG_INFO allocates msgmni
entries and uses que_ix directly as an array index. The last permitted
queue therefore makes sysctl_sysvmsg() copy one struct msqid_ds past the
allocation, which KASAN detects.
OK: mvs@
[SCEV,GVN] Add additional ptrtoaddr tests (NFC) (#209049)
Extend test coverage with files with mixied ptrtoaddr/ptrtoint, as well
as wide pointers.
Extra test coverage for
https://github.com/llvm/llvm-project/pull/180244.
[VPlan] Handle AtomicRMW/AtomicCmpXchg/Fence in outer loop creation. (#209031)
Teach VPInstruction::getNumOperandsForOpcode about AtomicRMW,
AtomicCmpXchg and Fence, so VPlan construction over an outer loop that
still contains these operations does not crash before later legality
rejects the loop.
Fixes crashes in the added tests.
IPComp decompression must not overflow mbuf cluster.
Check after decompressing an IPComp packet, that the content fits
into a mbuf cluster. m_copyback() assumes that it can allocate a
single mbuf cluster to enlarge the mbuf chain. That means the
decompressed data must not exceed MAXMCLBYTES. Prevent panic:
m_clget: request for 67948 byte cluster.
reported by Homura Akemi, SecBuddyF, Tencent KeenLab; OK mvs@
Convert boot plugin to typesafe pattern
## Problem
The boot service was old-style dict-based code spread across three files (boot.py, boot_/format.py, boot_/boot_loader.py) that all declared the same BootService, so the framework silently merged them into a CompoundService. None of it was type-checked end to end, and every in-process consumer reached it through untyped string middleware.call('boot.*').
## Solution
- Consolidate everything into a single plugins/boot/ package using the port pattern: a lean BootService in __init__.py that delegates to plain, fully type-annotated module functions in disks.py/format.py/pool_ops.py, with @api_method(check_annotations=True) public methods and @private stubs. boot.get_state now returns a BootGetState model; internal callers use a dict state helper so nothing breaks on attribute-vs-key access.
- Register boot in main.py's ServiceContainer and have it own boot.environment as a sub-service, replacing BootServicesContainer.
- Expose the boot-pool name/disks cache through accessor functions instead of a module global. This also fixes a latent bug where libvirt/cdrom.py imported the global at module load (before setup runs), bound it to None, and so never filtered the boot pool out of CDROM path validation.
- Convert every same-process boot.* string call to typed call2/call_sync2 across sysdataset, zfs_events, disk, failover, and the zpool/audit/tunable/update/system_advanced plugins, the alert sources, and the cron/fstab makos, keeping each site's sync/async flavour.
- Keep the private update_initramfs/format models in the plugin (check_model_module requires private-method models to live there, not in the api package) and import them lazily from consumers, otherwise pulling boot/__init__ into the early service-init chain deadlocks on a partially-initialised middlewared.service.
- Add plugins/boot/ to mypy.yml.
IPsec AH must contain replay counter.
Before reading the replay counter from packet header in ah_input(),
make sure that the mbuf is long enough. Prevents panic: m_copydata:
null mbuf.
reported by Homura Akemi, SecBuddyF, Tencent KeenLab; OK mvs@
Support 8-bit PIO if the front-end indicates that it's necessary:
- In wdc_drvprobe(), if neither ATAC_CAP_DATA16 nor ATAC_CAP_DATA32
is set in the controller capabilities, then attempt to enable 8-bit
PIO on the drive. If that command fails, ignore the drive.
- In wdc_datain_pio(), if we're doing 8-bit PIO, check for ATA_DRIVE_NOSTREAM
and simulate a NOSTREAM 16-bit PIO. This is necessary because we
treat the IDENTIFY command as "special" for historical (and almost
certainly bad) reasons.
- wdc_dataout_pio() gets the same NOSTREAM shenanigans for 8-bit PIO,
although I would be surprised if it is ever requested.