2018-03-15 20:28+0100, Thomas Gleixner: > On Thu, 15 Mar 2018, Radim Krčmář wrote: > > 2018-03-15 16:19+0100, Vitaly Kuznetsov: > > > This works. But hell, this is a crude hack :-) Not sure if there's a > > > cleaner way to find what needs to be patched without something like jump > > > label table ... > > > > Yeah, I can see us accidently patching parts of other instructions. :) > > > > The target instruction address can be made into a C-accessible symbol > > with the same trick that vmx_return uses -- add a .global containing the > > address of a label (not sure if a more direct approach would work). > > > > The evil in me likes it. (The good is too lazy to add a decent patching > > infrastructure for just one user.) > > Can we just use jump labels please? There is agreement that 4.17 will have > a dependency on a jump label capable compiler for x86. Luckily, it turned out that the path is very cold and should use the simple test-and-jump.