BPF List
 help / color / mirror / Atom feed
* Calling kfuncs in modules - BTF mismatch?
@ 2022-11-11 14:21 Toke Høiland-Jørgensen
  2022-11-11 18:08 ` Lorenzo Bianconi
  0 siblings, 1 reply; 10+ messages in thread
From: Toke Høiland-Jørgensen @ 2022-11-11 14:21 UTC (permalink / raw)
  To: Lorenzo Bianconi, Kumar Kartikeya Dwivedi, Andrii Nakryiko; +Cc: bpf, Jiri Benc

Hi everyone

There seems to be some issue with BTF mismatch when trying to run the
bpf_ct_set_nat_info() kfunc from a module. I was under the impression
that this is supposed to work, so is there some kind of BTF dedup issue
here or something?

Steps to reproduce:

1. Compile kernel with nf_conntrack built-in and run selftests;
   './test_progs -a bpf_nf' works

2. Change the kernel config so nf_conntrack is build as a module

3. Start the test kernel and manually modprobe nf_conntrack and nf_nat

4. Run ./test_progs -a bpf_nf; this now fails with an error like:

kernel function bpf_ct_set_nat_info args#0 expected pointer to STRUCT nf_conn___init but R1 has a pointer to STRUCT nf_conn___init

Anyone has any ideas what's going on here, and how to fix it?

-Toke


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-12-01 13:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-11 14:21 Calling kfuncs in modules - BTF mismatch? Toke Høiland-Jørgensen
2022-11-11 18:08 ` Lorenzo Bianconi
2022-11-13 18:04   ` Toke Høiland-Jørgensen
2022-11-29 15:00     ` Artem Savkov
2022-11-29 20:12       ` Toke Høiland-Jørgensen
2022-12-01  1:09         ` Andrii Nakryiko
2022-12-01 13:51           ` Artem Savkov
2022-11-29 16:21     ` Alan Maguire
2022-11-29 19:41       ` Arnaldo Carvalho de Melo
2022-11-29 20:12       ` Toke Høiland-Jørgensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox