bpf: disallow 40-bytes extra stack for bpf_fastcall patterns #7974
+2
−67
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.
Hou Tao reported an issue with bpf_fastcall patterns allowing extra stack space above MAX_BPF_STACK limit. This extra stack allowance is not integrated properly with the following verifier parts:
Here is an example of an issue with precision tracking (note stack slot -8 tracked as precise instead of -520):
This patch disables the additional allowance for the moment. Also, two test cases are removed:
Reported-by: Hou Tao [email protected]
Closes: https://lore.kernel.org/bpf/[email protected]/
Fixes: 5b5f51b ("bpf: no_caller_saved_registers attribute for helper calls")