mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
UPSTREAM: bpf: fix precision propagation verbose logging
[ Upstream commit 34f0677e7afd3a292bc1aadda7ce8e35faedb204 ]
Fix wrong order of frame index vs register/slot index in precision
propagation verbose (level 2) output. It's wrong and very confusing as is.
Fixes: 529409ea92d5 ("bpf: propagate precision across all frames, not just the last one")
Change-Id: I6387306e6c12c1b9f786c9ff2dd47b8787ecc053
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20230313184017.4083374-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e02590b470
commit
b96833fabe
1 changed files with 2 additions and 2 deletions
|
|
@ -9559,7 +9559,7 @@ static int propagate_precision(struct bpf_verifier_env *env,
|
|||
!(state_reg->live & REG_LIVE_READ))
|
||||
continue;
|
||||
if (env->log.level & BPF_LOG_LEVEL2)
|
||||
verbose(env, "frame %d: propagating r%d\n", i, fr);
|
||||
verbose(env, "frame %d: propagating r%d\n", fr, i);
|
||||
err = mark_chain_precision_frame(env, fr, i);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
|
@ -9575,7 +9575,7 @@ static int propagate_precision(struct bpf_verifier_env *env,
|
|||
continue;
|
||||
if (env->log.level & BPF_LOG_LEVEL2)
|
||||
verbose(env, "frame %d: propagating fp%d\n",
|
||||
(-i - 1) * BPF_REG_SIZE, fr);
|
||||
fr, (-i - 1) * BPF_REG_SIZE);
|
||||
err = mark_chain_precision_stack_frame(env, fr, i);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue