mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
BACKPORT: bpf: Inherit expanded/patched seen count from old aux data
[ Upstream commit d203b0fd863a2261e5d00b97f3d060c4c2a6db71 ] Instead of relying on current env->pass_cnt, use the seen count from the old aux data in adjust_insn_aux_data(), and expand it to the new range of patched instructions. This change is valid given we always expand 1:n with n>=1, so what applies to the old/original instruction needs to apply for the replacement as well. Not relying on env->pass_cnt is a prerequisite for a later change where we want to avoid marking an instruction seen when verified under speculative execution path. Change-Id: Iac36d44ca455d2445ee94d481cb6b99fdefa33dd Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: John Fastabend <[email protected]> Reviewed-by: Benedict Schlueter <[email protected]> Reviewed-by: Piotr Krysiuk <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
2557da9098
commit
69790547c4
1 changed files with 1 additions and 1 deletions
|
|
@ -10754,7 +10754,7 @@ static void adjust_insn_aux_data(struct bpf_verifier_env *env,
|
|||
{
|
||||
struct bpf_insn_aux_data *old_data = env->insn_aux_data;
|
||||
struct bpf_insn *insn = new_prog->insnsi;
|
||||
bool old_seen = old_data[off].seen;
|
||||
u32 old_seen = old_data[off].seen;
|
||||
u32 prog_len;
|
||||
int i;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue