On Fri, Sep 2, 2022 at 5:50 AM Kumar Kartikeya Dwivedi memxor@gmail.com wrote:
On Thu, 1 Sept 2022 at 18:48, Benjamin Tissoires benjamin.tissoires@redhat.com wrote:
[...] If the above is correct, then yes, it would make sense to me to have 2 distinct functions: one to check for the args types only (does the function definition in the problem matches BTF), and one to check for its use. Behind the scenes, btf_check_subprog_arg_match() calls btf_check_func_arg_match() which is the one function with entangled arguments type checking and actually assessing that the values provided are correct.
I can try to split that btf_check_func_arg_match() into 2 distinct functions, though I am not sure I'll get it right.
FYI, I've already split them into separate functions in my tree because it had become super ugly at this point with all the new support and I refactored it to add the linked list helpers support using kfuncs (which requires some special handling for the args), so I think you can just leave it with a "processing_call" check in for your series for now.
great, thanks a lot. Actually, writing the patch today with the "processing_call" was really easy now that I have turned the problem in my head a lot yesterday.
I am about to send v10 with the reviews addressed.
Cheers, Benjamin