Conversation

Jarkko Sakkinen

Edited 26 days ago
Do rustc eBPF branches unroll loops if they have const limit known by compiler?

I'm just thinking of theory of running tpm2_protocol inside eBPF filter i.e., is it possible and how much effort it would take it realize.

would be just a cool demo

it has lot of characteristics i.e. no-alloc (fully in-stack) and test program compiles without cargo with just rustc.

#linux #kernel #ebpf #rust #tpm
0
0
1
@devcoffee there's no need to access tpm i'd just like to know if i can run the parser inside eBPF
1
0
0

Jarkko Sakkinen

Edited 25 days ago
I actually would have to test run it which I might do. It does have fixed-limited loops which I would imagine eBPF compiler to be able to unroll but other than that I'm not sure if there are backward jumps in tpm2_protocol. I'll try this some day :-)

Obviously it will fail when if I deploy it to filter but it is still interesting to see how and where.
0
0
0