Patch function generation method and device
A function generation and patching technology, applied in the computer field, can solve the problems of replacing the objective function with the patch function and the inconvenience of the patching process.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0019] The embodiment of the present invention provides a patch function generation method, which can be applied to various occasions where the target function to be patched needs to be patched, such as kernel defect repair, when the kernel is in the running state, the kernel In the objective function to update and so on.
[0020] figure 1 It is a schematic flowchart of the method for generating a patch function in Embodiment 1 of the present invention, see figure 1 As shown, the patch function generation method includes:
[0021] S101: Obtain the first source code corresponding to the target function to be patched, and obtain the second source code corresponding to the patch function;
[0022] Among them, the patch function corresponds to the objective function.
[0023] In practical applications, when it is necessary to achieve the goal of patching the kernel without stopping, such as without suspending the kernel or switching the kernel from the running state to the dorm...
Embodiment 2
[0067] Based on the foregoing embodiments, in practical applications, in order to perform a patching operation on the target function to be patched without stopping the kernel, that is, without suspending the kernel or switching the kernel from the running state to the dormant state, thus, After obtaining the processed patch function containing at least the first lock, the target function to be patched can be replaced by the processed patch function, then, see figure 2 As shown, after S104, the patch function generation method may also include:
[0068] S201: Obtain a patching instruction;
[0069] Wherein, the patching instruction is used to instruct the target function to be patched to perform a patching operation.
[0070] Here, after obtaining the processed patch function, if one thinks of performing a patching operation on the target function to be patched, a corresponding patching instruction will be obtained.
[0071] S202: Execute the patching instruction, and load ...
Embodiment 3
[0078] Based on the same inventive concept, as an implementation of the above method, the embodiment of the present invention provides a patch function generation device, the embodiment of the device corresponds to the foregoing method embodiment, for the convenience of reading, the embodiment of the device no longer implements the foregoing method The details in the examples are described one by one, but it should be clear that the device in this embodiment can correspondingly implement all the content in the foregoing method embodiments.
[0079] image 3 It is a schematic structural diagram of the patch function generation device in Embodiment 3 of the present invention, see image 3 As shown, the patch function generation device 30 includes: a first obtaining unit 301, a first determining unit 302, a second determining unit 303, and a processing unit 304, wherein the first obtaining unit 301 is used to obtain the target function to be patched The corresponding first sourc...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


