Fair enough, you get a compiler warning: kernel/trace/trace_kprobe.c: In function ‘validate_probe_symbol’: kernel/trace/trace_kprobe.c:810:23: error: implicit declaration of function ‘find_module’; did you mean init_module’? [-Wimplicit-function-declaration] 810 | mod = find_module(modname); | ^~~~~~~~~~~ | init_module kernel/trace/trace_kprobe.c:810:21: error: assignment to ‘struct module *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 810 | mod = find_module(modname); | but there is no find_module symbol when CONFIG_MODULES is disabled.
A patch to fix this was queued for the next 6.10.y release