Jiri Olsa dbe69b2998 bpf: Fix dispatcher patchable function entry to 5 bytes nop
The patchable_function_entry(5) might output 5 single nop
instructions (depends on toolchain), which will clash with
bpf_arch_text_poke check for 5 bytes nop instruction.

Adding early init call for dispatcher that checks and change
the patchable entry into expected 5 nop instruction if needed.

There's no need to take text_mutex, because we are using it
in early init call which is called at pre-smp time.

Fixes: ceea991a019c ("bpf: Move bpf_dispatcher function out of ftrace locations")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20221018075934.574415-1-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2022-10-20 18:57:51 -07:00
..
2022-10-03 16:56:40 -07:00
2022-08-10 10:40:41 -07:00
2022-10-04 13:38:03 -07:00
2022-10-04 13:38:03 -07:00
2022-10-03 13:19:53 -07:00
2022-10-03 09:48:47 -07:00
2022-10-04 13:38:03 -07:00
2022-09-23 08:51:05 -07:00
2022-10-03 17:24:22 -07:00
2022-10-03 17:24:22 -07:00
2022-10-03 17:24:22 -07:00
2022-10-03 17:11:07 -07:00