Skip to content

Improve program patching for context accesses #8

@qmonnet

Description

@qmonnet

I pushed a branch called patch_prog that introduces a new module (patch) that proposes a function attempting to patch an eBPF program generated with clang, in order to make it compatible with rbpf.

The function is a dumb heuristic and is nowhere close to what happens in the kernel. See comments in the source code (module patch) for details. Implementing a more efficient algorithm does not look trivial (code in the kernel is GPL and we cannot reuse it).

I only tested it on a single example. If anyone has time to play with it and provide suggestions or feedback, that would be very welcome. Will try to update this issue if I can obtain better results.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions