• Marek Vavruša's avatar
    lua/bpf: implement explicit PTR[0] operation · d28957ef
    Marek Vavruša authored
    the BPF maps and pointers were previously
    implicitly dereferenced whenever an operation
    on them required a value and not a pointer.
    the upside is that accessing map element data
    didn’t require an explicit operation, the downside
    is that it wasn’t possible to get the value
    explicitly.
    
    this makes it possible to dereference any pointer
    and materialize the value in the register as long
    as it’s shorter than register width using `ptr[0]`
    element access operator.
    d28957ef
bpf.lua 49.3 KB