Fix capabilities plugin on kernels before 6.3 - #2017
Merged
ikelos merged 1 commit intoAug 19, 2026
Merged
Conversation
kernel_cap_t only handles the 6.3+ layout and raised for everything else. Before 6.3 the same name exists as a typedef of kernel_cap_struct, whose implementation already decodes the two-element cap array, so fall back to it instead of raising.
ikelos
approved these changes
Aug 18, 2026
ikelos
left a comment
Member
There was a problem hiding this comment.
Looks reasonable, if the tests pass we'll merge it, thanks! 5:)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
linux.capabilitiesaborts on any image whose symbols carrykernel_cap_tin the pre-6.3 layout:kernel_cap_twas added for the 6.3 rework (#985), where the struct became{ u64 val; }. Before 6.3 the same name exists as a typedef ofkernel_cap_structwith a two-element__u32 cap[], andsymbols/linux/__init__.py:61maps that name to the subclass regardless. The subclass only handlesval, so it raises even thoughkernel_cap_struct.get_capabilities()decodes the old layout correctly.Falling back to the parent keeps the error path intact. It still raises the same exception when
capis missing or has an unexpected length (extensions/__init__.py:2310and:2328).All three Debian ISFs used by the test workflow carry the old layout:
On linux-sample-1.bin the exit code goes from 1 to 0 and the plugin lists 133 tasks instead of none.
test_linux_generic_capabilitiesno longer takes its early-return path for this image, so its assertions actually run now.ruff checkandruff format --checkclean.test/plugins/linux/linux.py41 passed.