Re: [PATCH v2 bpf-next 1/8] bpf: Add gen_epilogue to bpf_verifier_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/21/24 5:38 PM, Eduard Zingerman wrote:
On Wed, 2024-08-21 at 17:34 -0700, Alexei Starovoitov wrote:

[...]

Something like
insn_0
...
r1 = 0
if rX == .. goto insn_0

this jmp will be rewritten to point to newly added *(u64*)(r10 - ..) = r1

so at run time it will overwrite that slot with zero and
epilogue will read zero from it instead of ctx.

That's exactly what I tried on paper and jmp target was just moving down.

Thanks for bringing this up. I will try a test case to confirm.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux