From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: [PATCH bpf-next] bpf: fix a libbpf loader issue Date: Wed, 21 Nov 2018 22:23:38 +0100 Message-ID: <0ea1f1c6-d623-6034-e778-26914011d643@iogearbox.net> References: <20181121192242.1802994-1-yhs@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kernel-team@fb.com To: Yonghong Song , ast@fb.com, netdev@vger.kernel.org Return-path: Received: from www62.your-server.de ([213.133.104.62]:59246 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbeKVH7p (ORCPT ); Thu, 22 Nov 2018 02:59:45 -0500 In-Reply-To: <20181121192242.1802994-1-yhs@fb.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/21/2018 08:22 PM, Yonghong Song wrote: > Commit 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections") > added support to read .BTF.ext sections from an object file, create > and pass prog_btf_fd and func_info to the kernel. > > The program btf_fd (prog->btf_fd) is initialized to be -1 to please > zclose so we do not need special handling dur prog close. > Passing -1 to the kernel, however, will cause loading error. > Passing btf_fd 0 to the kernel if prog->btf_fd is invalid > fixed the problem. > > Fixes: 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections") > Reported-by: Andrey Ignatov > Reported-by: Emre Cantimur > Tested-by: Andrey Ignatov > Signed-off-by: Yonghong Song Applied, thanks!