I was looking at latest changes since 5.11 to powerpc64 BPF JIT and found the following commit:
commit 20ccb004bad659c186f9091015a956da220d615d
Author: Naveen N. Rao <email address hidden>
Date: Wed Jun 9 14:30:24 2021 +0530
powerpc/bpf: Use bctrl for making function calls
blrl corrupts the link stack. Instead use bctrl when making function
calls from BPF programs.
Reported-by: Anton Blanchard <email address hidden>
Signed-off-by: Naveen N. Rao <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
Link: https://<email address hidden>
Though the link stack is unarchitected, that is, it should be transparent to the user aside from branch prediction performance, perhaps there is a bug in the implementation. Considering we have only observed this on POWER8 and with different stack traces, I wouldn't discard the possibility.
As this is not present on 5.13 either, I am building a test kernel with a backport so it can be tested.
I was looking at latest changes since 5.11 to powerpc64 BPF JIT and found the following commit:
commit 20ccb004bad659c 186f9091015a956 da220d615d
Author: Naveen N. Rao <email address hidden>
Date: Wed Jun 9 14:30:24 2021 +0530
powerpc/bpf: Use bctrl for making function calls
blrl corrupts the link stack. Instead use bctrl when making function
calls from BPF programs.
Reported-by: Anton Blanchard <email address hidden>
Signed-off-by: Naveen N. Rao <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
Link: https://<email address hidden>
Though the link stack is unarchitected, that is, it should be transparent to the user aside from branch prediction performance, perhaps there is a bug in the implementation. Considering we have only observed this on POWER8 and with different stack traces, I wouldn't discard the possibility.
As this is not present on 5.13 either, I am building a test kernel with a backport so it can be tested.
Cascardo.