Closed patnebe closed 1 month ago
We might want to look into the kernel test errors,
FWIW, the error seemed to be related to the unavailability of the hrtimer_start_range_ns
kprobe (or maybe kprobes in general on the VM?). Perhaps some kernel flag is missing(?). So instead of spending time figuring out how to get that to work, I decided to hook the BPF feature detection program to a tracepoint instead. The main reason is that we already rely on tracepoints and currently don't use kprobes anywhere else.
another thing we could do was moving all this code that is pretty much self-contained (and potentially) reusable to a top level crate similarly to how
lightswitch-proto
is implemented. What do you think?
That sounds reasonable. Maybe lightswitch_sys_probe
would be a good name for this crate? Open to suggestions :)
FWIW, the error seemed to be related to the unavailability of the hrtimer_start_range_ns kprobe (or maybe kprobes in general on the VM?). Perhaps some kernel flag is missing(?). So instead of spending time figuring out how to get that to work, I decided to hook the BPF feature detection program to a tracepoint instead. The main reason is that we already rely on tracepoints and currently don't use kprobes anywhere else.
Makes sense!
That sounds reasonable. Maybe lightswitch_sys_probe would be a good name for this crate? Open to suggestions :)
What about lightswitch-features-probing
/ lightswitch-capabilities
or something like this? -sys
is typically used for C bindings
Context
Changes
procfs
andtracefs
are mounted.tracepoints
,perf_events
, and a few bpf helpers.Test Plan