Missing spillable types#12729
Open
eddyz87 wants to merge 3 commits into
Open
Conversation
…ling
Track spills for the following register types precisely:
- PTR_TO_TP_BUFFER
- PTR_TO_INSN
- CONST_PTR_TO_DYNPTR
--- b4-submit-tracking ---
{
"series": {
"revision": 1,
"change-id": "20260707-missing-spillable-types-4cd9350dc3d7",
"prefixes": ["bpf-next"]
}
}
…ling The verifier loses precision when simulating stack spills for the following register types: - PTR_TO_TP_BUFFER - PTR_TO_INSN - CONST_PTR_TO_DYNPTR These types are not allow-listed in the is_spillable_regtype(), because of that check_stack_write_fixed_off() takes the branch that marks the slots STACK_MISC. There are no technical reasons for this limititation. This commit replaces an explicit list of pointer types in is_spillable_regtype() with explicit list of non-pointer types. The function is renamed to is_pointer_regtype() for clarity. Reported-by: Andrii Nakryiko <andrii.nakryiko@gmail.com> Suggested-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
c167a5e to
cf89f5e
Compare
A few selftests checking that the verifier represents spills for the following pointer types w/o losing precision: - PTR_TO_INSN - PTR_TO_TP_BUFFER - CONST_PTR_TO_DYNPTR Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
cf89f5e to
abd86d0
Compare
386cc3c to
ded8f8a
Compare
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.
No description provided.