On Thu, 2024-10-10 at 13:30 -0700, Eduard Zingerman wrote: [...] > The logic of this patch looks correct, however I find it cumbersome. > The only place where access to dynptr key is allowed is 'case ARG_PTR_TO_MAP_KEY' > in check_func_arg(), a lot of places are modified to facilitate this. > It seems that logic would be easier to follow if there would be a > dedicated function to check dynptr key constraints, called only for > the 'case ARG_PTR_TO_MAP_KEY'. This would als make 'struct dynptr_key_state' > unnecessary as this state would be tracked inside such function. > Wdyt? Just realized that change to check_stack_range_initialized would still be necessary, as it forbids dynptr access at the moment. Unfortunate.