Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 C1BDD11CB7 for ; Tue, 15 Aug 2023 15:48:23 +0000 (UTC) Received: from out-26.mta0.migadu.com (out-26.mta0.migadu.com [IPv6:2001:41d0:1004:224b::1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52D9819BF for ; Tue, 15 Aug 2023 08:48:10 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1692114488; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d6ff+5HkDo1buXu0AUWuXbsUie/nqbNVjdcTgFD9Nnk=; b=ILWuSZM8S8QycOG3+h7/WX86YK315y6KWhkFe3WLD/5q0UjSRL2uKZg9jfbMa6w82Y+8Ko mf5zhBWVz3SfJ5UclWEYsJpAYyUYu751lJ/sIH2ZYsr5BJpIvzHFbx53QyeCWS8EaUeWCc uvZRSQ1LOPQ/mqCAc4q7/ke/2CaSp7M= Date: Tue, 15 Aug 2023 08:48:02 -0700 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-To: yonghong.song@linux.dev Subject: Re: Can eBPF programs call kfuncs of out-of-tree modules? Content-Language: en-US To: Shuyi Cheng , bpf References: <45060ec9-d68a-dc6c-908d-649394f48dcb@linux.alibaba.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yonghong Song In-Reply-To: <45060ec9-d68a-dc6c-908d-649394f48dcb@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On 8/15/23 3:01 AM, Shuyi Cheng wrote: > Hello. > > Recently we found that eBPF can call kernel functions, but we don’t know > whether it is possible to call register_btf_kfunc_id_set in the > out-of-tree module, and enable eBPF programs of types such as kprobe and > tracepoint to call functions defined in out-of-tree modules. Never tried but I think it is possible. register_btf_kfunc_id_set() can be used in modules. btf.c:EXPORT_SYMBOL_GPL(register_btf_kfunc_id_set); > > Thanks in advance! >