Commit 27acfd1
bpf: No need to simulate speculative domain for immediates
commit a703619 upstream.
In 801c605 ("bpf: Fix leakage of uninitialized bpf stack under
speculation") we replaced masking logic with direct loads of immediates
if the register is a known constant. Given in this case we do not apply
any masking, there is also no reason for the operation to be truncated
under the speculative domain.
Therefore, there is also zero reason for the verifier to branch-off and
simulate this case, it only needs to do it for unknown but bounded scalars.
As a side-effect, this also enables few test cases that were previously
rejected due to simulation under zero truncation.
Signed-off-by: Daniel Borkmann <[email protected]>
Reviewed-by: Piotr Krysiuk <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent c87ef24 commit 27acfd1
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5802 | 5802 | | |
5803 | 5803 | | |
5804 | 5804 | | |
| 5805 | + | |
| 5806 | + | |
| 5807 | + | |
| 5808 | + | |
5805 | 5809 | | |
5806 | | - | |
| 5810 | + | |
5807 | 5811 | | |
5808 | 5812 | | |
5809 | 5813 | | |
| |||
0 commit comments