On 30/09/2024 00:32, Alexei Starovoitov wrote:
On Sun, Sep 29, 2024 at 2:31 AM Eric Long via B4 Relay <devnull+i.hack3r.moe@xxxxxxxxxx> wrote: Looks like a hack to me. In the test you're using: void *bpf_cast_to_kern_ctx(void *obj) __ksym; but __weak is missing. Is that the reason you're hitting this issue?
No. libbpf still returns -EINVAL (from the same path) even if the prototype is marked __weak, when the patch is not applied.
(Sorry for the off-list reply)