Commit Graph

6 Commits

Author SHA1 Message Date
79c8a1e194 Core: Reject an unknown map type instead of silently emitting a hash map
process_bpf_map logged a warning and fell back to process_hash_map for any map
type it did not recognise. That turns a typo into an object file that compiles
cleanly, carries the wrong BPF_MAP_TYPE, skips the intended map type's
parameter validation entirely, and is only rejected once it reaches the kernel
-- as tests/passing_tests/ringbuf.py was, with 'failed to create: -EINVAL'.

A warning was not enough to surface it either: the test framework only fails a
test on logging.ERROR records.

Raise instead, naming the registered map types so the fix is obvious:

    ValueError: Unknown map type 'RingBuf' returned by 'm'.
    Known map types: HashMap, PerfEventArray, RingBuffer

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 17:07:32 +05:30
19b42b9a19 Allocate hashmap lookup return vars based on the value type of said hashmap 2025-11-19 04:09:51 +05:30
cbddc0aa96 Introduce MapSymbol to propagate map type info in map_sym_tab 2025-11-12 13:16:23 +05:30
8650297866 make type checks viable 2025-10-02 00:51:23 +05:30
8d5067996f format chore and pre commit hook addition 2025-10-01 00:41:00 +05:30
2e005f6eb5 Create MapProcessorRegistry to add more maps 2025-09-30 19:08:56 +05:30