And what's next now? Maxim mentioned in this thread you should sort of formally approve(?) a global feature, have you had a look at it yet?
I should emphasize that this code can substitute the -fentry for arm64 for the purpose of kernel live patching that was discussed in the beginning, as well as for some other architectures, plus the yet-to-be-discovered use cases as a general instrumentation. In other words, it could save some work in the future :-) Torsten