ebpf-verifier
ebpf-verifier copied to clipboard
EBPF_ARGUMENT_TYPE_PTR_TO_MAP_VALUE should permit values from other maps
LLVM suggests the following work around when variables exceed the stack size:
error: <unknown>:0:0: in function bpf_openat_parser i32 (%struct.bpf_raw_tracepoint_args*): Looks like the BPF stack limit of 512 bytes is exceeded. Please move large on stack variables into BPF per-cpu array map.
</unknown>
A common pattern to work around the 512-byte stack limit is to use a map as temporary storage. It should be permissible to insert the value from map1 into map 2.
This currently fails as EBPF_ARGUMENT_TYPE_PTR_TO_MAP_VALUE is limited to stack or packet memory and doesn't permit a suitable large readable value from another map.