发明名称 Method, apparatus and storage medium for dynamically patching function
摘要 A method, apparatus and a storage medium for dynamically patching a function are provided. The method includes that: N long jump instructions at initial instructions of a modified patched function are restored to original instructions of the patched function according to a pre-tag of a currently running task, wherein N is an integer more than or equal to 3; and when the currently running task quits running, the N original instructions at the start of the initial instructions are modified into the long jump instructions in order to dynamically patch the function. By adopting the method, the N long jump instructions at the initial instructions of the modified patched function are restored as needed to the original instructions of the patched function during task running, and then, when the task quits running, the N original instructions at the start of the initial instructions are modified into the long jump instructions, so that replacement for the patched function is completed, dynamical patching for the function is realized, and the problem that a modified system may be unable to run normally after the initial instructions of the patched function are modified into the long jump instructions is solved.
申请公布号 US2016210142(A1) 申请公布日期 2016.07.21
申请号 US201414914344 申请日期 2014.06.16
申请人 ZTE CORPORATION 发明人 Yin Feng;Zhu Mingxing
分类号 G06F9/445;G06F9/48 主分类号 G06F9/445
代理机构 代理人
主权项 1. A method for dynamically patching a function, comprising: restoring N long jump instructions at initial instructions of a modified patched function to original instructions of the patched function according to a pre-tag of a currently running task, wherein N is an integer more than or equal to 3; and modifying, when the currently running task quits running, the N original instructions at the start of the initial instructions into long jump instructions in order to dynamically patch the function.
地址 Shenzhen CN