From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C0694D112 for ; Thu, 4 Jul 2024 19:21:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720120917; cv=none; b=kOaoBRlWMg57gRe5+C7tLkTHyILHb/FVnLKT6SAuYoX0WJ/Cfu9KvDn1Kmp70J2Gpueorysj9DGo0Ovd2vcd0PkvzyV+6SM5yEh22poHHPdJBoL8BiY6faUGC2/gaSNGLaDjg9FBl3YwRyo4kaBuyNODwkKcdVcRJlM2TMMw0mI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720120917; c=relaxed/simple; bh=ZWq3dCZob7oWkFgyRkDztwCTvDI7Qk+J67YFOF79WFY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jtDtiQ/pNBXjA0M2iGf3bKjreVkrk1HAGsA7ltBR9yWyh+BcveXfpeNU+JSNzVS9ZWVaCy8Cn4t7T2+T5L5h6qy0i01oH6UyvOjoN/mmiiZffrQhRxlcv600u30oEWK3t1IjWO9SrHRcnXu4C0cyqR6KEhDp6OW6ji27g326Od8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HvRejw9x; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HvRejw9x" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D038C3277B; Thu, 4 Jul 2024 19:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720120916; bh=ZWq3dCZob7oWkFgyRkDztwCTvDI7Qk+J67YFOF79WFY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=HvRejw9xDR7oDmLjR9QLBrAwHiTHozJ6fZ/6Mze6oExWYD3uyujg9PyB43Ci+Mt8F Op+p49xGbmvv+vrhdwc1KWHrnXyLVSfzKAgaw56RoBZVbhgV+H0MWD8YurU4CzPzzP nr1q+/YDG0atf8/78jE+OYhAL4DFnTgkmXBizOXa+hOWW21DOyWQ6eBjuh9RypDXnF OFcNsaaEq8liLCofO6KRT4h4EA1sCcOsbrFEU0ux5KmbnHLyFy4YkeP3n5krczcte0 m5tCR1lgx1DnQOK75wm8pQc/VrXHgys4Zfw3fV5oUiwWuyab0mikvYxVVvkj2RYQnD 6crvYOvvC6QwA== Message-ID: Date: Thu, 4 Jul 2024 20:21:53 +0100 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH bpf-next 1/2] bpftool: improve skeleton backwards compat with old buggy libbpfs To: Mykyta Yatsenko , Andrii Nakryiko , bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, martin.lau@kernel.org Cc: kernel-team@meta.com References: <20240704001527.754710-1-andrii@kernel.org> <20240704001527.754710-2-andrii@kernel.org> From: Quentin Monnet Content-Language: en-GB In-Reply-To: <20240704001527.754710-2-andrii@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 04/07/2024 01:15, Andrii Nakryiko wrote: > Old versions of libbpf don't handle varying sizes of bpf_map_skeleton > struct correctly. As such, BPF skeleton generated by newest bpftool > might not be compatible with older libbpf (though only when libbpf is > used as a shared library), even though it, by design, should. > > Going forward libbpf will be fixed, plus we'll release bug fixed > versions of relevant old libbpfs, but meanwhile try to mitigate from > bpftool side by conservatively assuming older and smaller definition of > bpf_map_skeleton, if possible. Meaning, if there are no struct_ops maps. > > If there are struct_ops, then presumably user would like to have > auto-attaching logic and struct_ops map link placeholders, so use the > full bpf_map_skeleton definition in that case. > > Co-developed-by: Mykyta Yatsenko > Signed-off-by: Andrii Nakryiko Note: I don't know to what extent we enforce this, but kernel docs state that "Since Co-developed-by: denotes authorship, every Co-developed-by: must be immediately followed by a Signed-off-by: of the associated co-author". Mykyta's sign-off is missing from both patches. Other than that, the patch looks good, thanks for fixing bpftool! Acked-by: Quentin Monnet