On 06/05/2020 23:18, Andrii Nakryiko wrote:
On Wed, May 6, 2020 at 12:28 PM Mikko Ylinen
<mikko.ylinen@xxxxxxxxxxxxxxx> wrote:
The error seems to come from register_fentry() but I don't yet have
good logs what goes wrong.
Ok, this is actually useful. It's still few possibilities, but most
seem to be related to ftrace subsystem. So here's portion of my
Kconfig with FTRACE settings, see if you have some of those disabled
and try to enable them, it might help. For instance, if you don't have
a 5-byte preample in kernel functions (not sure which setting turns
this on), bpf_arch_text_poke would also return EBUSY. Some of
ftrace-specific code returns EBUSY in multiple places as well. So I'd
start with trying to enable a lot of FTRACE stuff first:
With the following config changes:
-# CONFIG_FUNCTION_TRACER is not set
+CONFIG_FUNCTION_TRACER=y
+CONFIG_FUNCTION_GRAPH_TRACER=y
+CONFIG_DYNAMIC_FTRACE=y
+CONFIG_DYNAMIC_FTRACE_WITH_REGS=y
+CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y
+# CONFIG_FUNCTION_PROFILER is not set
# ./test_progs -t fentry_fexit
#13 fentry_fexit:OK
Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED
# ./test_progs -t test_lsm
#70 test_lsm:OK
Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED
Thanks!
Perhaps there could be a check whether the operation
is supported and if not,-ENOTSUPP is returned?
-- Mikko