Skip to content

Properly Handle BPF_PSEUDO_CALL instructions #2

@zandi

Description

@zandi

This was first seen in a Solana Hello World program https://github.com/solana-labs/example-helloworld

It looks like the BPF_PSUEDO_CALL variant is a pc-relative call. We disassemble it correctly, but probably need to add something to the emulation step to recognize the fact that it's calling into other bpf instructions (and the target site is a function), rather than calling into a bpf helper (which is currently our assumption of all call instructions).

https://elixir.bootlin.com/linux/v5.19-rc2/source/kernel/bpf/disasm.c#L267

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions