[....] LD init/built-in.o LD .tmp_vmlinux1 kernel/built-in.o(.kprobes.text+0xa3): In function `get_insn_slot': : undefined reference to `module_alloc' kernel/built-in.o(.kprobes.text+0x1f3): In function `free_insn_slot': : undefined reference to `module_free' ---------------------------------------- module_alloc() and module_free() functions are only compiled in when CONFIG_MODULES are enabled. So if CONFIG_MODULES are disabled we get the above compile error while building the kernel. Solution: Since Kprobes is of no use if CONFIG_MODULES are disabled, so make CONFIG_KPROBES depends on CONFIG_MODULES and we will not have above compile problem.
Created attachment 862 [details] Making CONFIG_KPROBES depends on CONFIG_MODULES As per Ananth's suggestion, I am making kprobes depend on CONFIG_MODULES. Please let me know if this is Okay.
Looks good go me!
This fix is in the mainline... closing