I cannot enable `HAVE_KPROBES_ON_FTRACE` - Kernel compile
from SpongeB0B@programming.dev to linux@lemmy.ml on 09 Dec 2024 17:49
https://programming.dev/post/22654357

Hi,

I have a great piece of software, that apparently need HAVE_KPROBES_ON_FTRACE

To config the kernel option I’m using :

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig

The Kernel is Linux/arm64 6.6.63

When I’m doing a search inside menuconfig i get:

Symbol: HAVE_KPROBES_ON_FTRACE [=n]
Type  : bool
Defined at arch/Kconfig:223


Symbol: KPROBES_ON_FTRACE [=n]
Type  : bool
Defined at arch/Kconfig:117
 Depends on: KPROBES [=y] && HAVE_KPROBES_ON_FTRACE [=n] && DYNAMIC_FTRACE_WITH_REGS [=n]

But I found it no where in the menu… and if I add it mannuly in the .config file, then make some more other adapations in menuconfig my manual entry disappear…

Any ideas ?

Maybe HAVE_KPROBES_ON_FTRACE is not supported in 6.6.63 ?

Thanks

#linux

threaded - newest

themoken@startrek.website on 09 Dec 2024 21:39 next collapse

It’s possible that it’s not supported on your arch.

SpongeB0B@programming.dev on 10 Jan 2025 15:22 collapse

Thanks, how can we verify this ?

themoken@startrek.website on 11 Jan 2025 06:49 collapse

Basically just start with what you’re aiming to enable and work backwards (as you’ve started to do). With judicious use of grep find out where that symbol is defined. If it’s in arch configs for other arches but not your own, it’s probably that.

There may be better tools out there to do this, but in my experience just sleuthing it out a bit will answer your question. The Kconfig system can be complex, but the files are pretty readable.

SteveTech@programming.dev on 09 Dec 2024 22:03 collapse

The options that start with HAVE_ usually depend on the arch or compiler. I don’t believe it’s possible to enable manually without modifying the source itself.

SpongeB0B@programming.dev on 10 Jan 2025 15:27 collapse

Thanks @SteveTech@programming.dev

I suppose the file linux/arch/Kconfig is the base the menuconfig to know which option is available ? right ?

Thanks.

SteveTech@programming.dev on 11 Jan 2025 23:19 collapse

Yes, but it doesn’t look like KPROBES_ON_FTRACE is supported on arm64. I did find this patch though which implements it: …kernel.org/…/20191218140622.57bbaca5@xhacker.deb…

If you don’t know how to apply a patch, you can either paste the link into b4, or download the mbox and apply it with git am.