On Fri, Jul 12, 2019 at 10:25:55AM -0700, Andrii Nakryiko wrote: > BTF verifier has a size resolution bug which in some circumstances leads to > invalid size resolution for, e.g., TYPEDEF modifier. This happens if we have > [1] PTR -> [2] TYPEDEF -> [3] ARRAY, in which case due to being in pointer > context ARRAY size won't be resolved (because for pointer it doesn't matter, so > it's a sink in pointer context), but it will be permanently remembered as zero > for TYPEDEF and TYPEDEF will be marked as RESOLVED. Eventually ARRAY size will > be resolved correctly, but TYPEDEF resolved_size won't be updated anymore. > This, subsequently, will lead to erroneous map creation failure, if that > TYPEDEF is specified as either key or value, as key_size/value_size won't > correspond to resolved size of TYPEDEF (kernel will believe it's zero). Thanks for the fix. Acked-by: Martin KaFai Lau <kafai@xxxxxx>