On Thu, Dec 4, 2025 at 11:12 AM Y Song <[email protected]> wrote: > On Thu, Dec 4, 2025 at 10:35 AM David Blaikie <[email protected]> wrote: > > > > OK, let's see if I understand this correctly: > > > > BPF lets users write functions and have calls to those functions > injected at the start of some other function's implementation/when that > other function is called. > > > > And those calls are injected without any kind of fixup/remapping between > function arguments to the injected function and function arguments to the > original. > > > > You're currently proposing adding the lowered signature to DWARF in some > way, so that users can write the injected function in terms of the lowered > signature, and BPF can validate that they match? (so the user has to write > the injected function to match the lowered signature - and if optimizations > change they have to change their code?) > > Currently we do not really validate BPF program arguments and rely on > users to check vmlinux BTF to find the signature. >
OK, so there's a human step here - you want the lowered/optimized signature in the DWARF, so a tool can print it out in a dump/report of some kind, that the user reads and then uses to write the callback with the correct lowered signature? That seems like a real stretch for DWARF... - some other tool could tell users what the lowered signature was & users could use that to determine what signature to write, perhaps? Or are there other uses/needs for the lowered signature?
-- Dwarf-discuss mailing list [email protected] https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss
