<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Dec 4, 2025 at 11:12 AM Y Song <<a href="mailto:ys114321@gmail.com">ys114321@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Dec 4, 2025 at 10:35 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
><br>
> OK, let's see if I understand this correctly:<br>
><br>
> 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.<br>
><br>
> And those calls are injected without any kind of fixup/remapping between function arguments to the injected function and function arguments to the original.<br>
><br>
> 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?)<br>
<br>
Currently we do not really validate BPF program arguments and rely on<br>
users to check vmlinux BTF to find the signature.<br></blockquote><div><br></div><div>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?<br><br>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?</div></div></div>