Commit d3b398e
bpf: preserve constant zero when doing partial register restore
[ Upstream commit e322f0b ]
Similar to special handling of STACK_ZERO, when reading 1/2/4 bytes from
stack from slot that has register spilled into it and that register has
a constant value zero, preserve that zero and mark spilled register as
precise for that. This makes spilled const zero register and STACK_ZERO
cases equivalent in their behavior.
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231205184248.1502704-7-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Acked-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 6d40191 commit d3b398e
1 file changed
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4952 | 4952 | | |
4953 | 4953 | | |
4954 | 4954 | | |
| 4955 | + | |
| 4956 | + | |
4955 | 4957 | | |
4956 | 4958 | | |
4957 | | - | |
| 4959 | + | |
| 4960 | + | |
4958 | 4961 | | |
| 4962 | + | |
4959 | 4963 | | |
4960 | 4964 | | |
4961 | | - | |
| 4965 | + | |
| 4966 | + | |
4962 | 4967 | | |
| 4968 | + | |
4963 | 4969 | | |
4964 | 4970 | | |
4965 | 4971 | | |
4966 | 4972 | | |
4967 | 4973 | | |
4968 | 4974 | | |
4969 | | - | |
4970 | | - | |
| 4975 | + | |
| 4976 | + | |
| 4977 | + | |
| 4978 | + | |
| 4979 | + | |
| 4980 | + | |
| 4981 | + | |
| 4982 | + | |
| 4983 | + | |
| 4984 | + | |
| 4985 | + | |
| 4986 | + | |
| 4987 | + | |
4971 | 4988 | | |
4972 | 4989 | | |
4973 | 4990 | | |
| |||
0 commit comments