On Fri, Sep 30, 2022 at 1:01 AM Owayss Kabtoul <owayssk@xxxxxxxxx> wrote: > > Hello John. > > The "minimal" program in question is the one from: > https://github.com/libbpf/libbpf-bootstrap/blob/bc186797086bee39769e3f24bcccf292a94cdcb7/examples/c/minimal.c > Please don't top-post in kernel mailing lists, reply inline instead. > > On Fri, Sep 30, 2022 at 4:11 AM John Fastabend <john.fastabend@xxxxxxxxx> wrote: > > > > Owayss Kabtoul wrote: > > > Hello. > > > > > > I have built libbpf from source (a7c0f7e). When running any of the > > > provided examples, the bpf syscall fails with "Invalid argument": > > > > > > ``` > > > $ sudo strace ./minimal > > > > Could you post the minimal C code. Its likely easier to read than > > trying to parse the strace output. Sure we could probably figure > > it out from strace but lets go the easier route. > > > > Caveat I didn't bother to try and read the strace. > > :) I did bother a bit, it looks like maps are created, and trivial SOCKET_FILTER prog is created successfully as well. So BPF is at least minimally enabled. But do check CONFIG_BPF_EVENTS=y in your kernel config, it seems to be the requirement for bpf_trace_printk() BPF helper used from bpf_printk() macro. > > Thanks, > > John