Patent ID: 11868763
Assignee: ZTE CORPORATION
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A method for implementing LINUX kernel hot patch, comprising:
modifying header instruction code of a patched function in an atomic operation mode, and jumping directly or indirectly from a patched function address to a patching function address to activate a patching function,
wherein the method further comprises:
adding fixed instruction code of X bytes before a first piece of instruction code of the patched function; wherein X is an integer greater than 4; the first piece of instruction code is the header instruction code;
modifying a first byte of the fixed instruction code into breakpoint instruction code;
executing breakpoint exception according to the breakpoint instruction code during a thread execution process;
modifying a return execution address of the breakpoint instruction code into a jump address;
modifying the breakpoint instruction code into a jump instruction.