ANN: a different eBPF assembler

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

 



In recent weeks I've been developing an eBPF assembler, implemented in Python.  It can be found at https://github.com/solarflarecom/ebpf_asm and it consumes an Intel-like syntax very different to that consumed by LLVM or emitted by the kernel verifier's disassembler.

To quote from the 'Rationale' section of the readme:

> It's great that you can write eBPF programs in C and then compile them with clang/LLVM. But clang's really rather big, and sometimes you don't have room for a gigantic toolchain — and your program is really small and simple. For such a case, writing the program directly in assembly is a feasible alternative.
>
> I chose the Intel syntax because my ability to read assembly code is directly proportional to how much it resembles Z80. If you dislike that as much as I dislike AT&T-syntax x86 assembly, this may not be the tool for you.
>
My personal use case for this was developing directed tests for a driver XDP implementation.  There may be others.

-Ed




[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux