bpf: Inherit expanded/patched seen count from old aux data
stable inclusion from stable-5.10.46 commit e9d271731d21647f8f9e9a261582cf47b868589a bugzilla: 168323 CVE: NA -------------------------------- [ Upstream commit d203b0fd ] 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. Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net> Reviewed-by: NJohn Fastabend <john.fastabend@gmail.com> Reviewed-by: NBenedict Schlueter <benedict.schlueter@rub.de> Reviewed-by: NPiotr Krysiuk <piotras@gmail.com> Acked-by: NAlexei Starovoitov <ast@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录