Unlock instant, AI-driven research and patent intelligence for your innovation.

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.

Active Publication Date: 2018-05-08
BEIJING QIHOO TECH CO LTD
View PDF14 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

It can be seen that there are at least the following problems in the prior art: when patching the target function, it must be ensured that the target function is not executing, and it is impossible to replace the target function with a patch function without stopping the machine, and the process of patching is not convenient enough

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Patch function generation method and device
  • Patch function generation method and device
  • Patch function generation method and device

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides a patch function generation method and a patch function generation device. The method comprises the steps of acquiring a first source code corresponding to a to-be-patched objective function, and a second source code corresponding to the patch function; determining a competitive resource existing between the objective function and the patch function based on the first source code and the second source code; determining a corresponding first lock of the competitive resource in the objective function from the first source code according to a kernel lock mechanism; and processing the second source code based on the first lock according to a preset strategy to obtain a processed patch function containing the first lock, wherein the processed patch function and the objective function can be run simultaneously in a kernel. Therefore, because including the first lock, the processed patch function can be run in the kernel with the to-be-patched objective function, the objective function can be replaced with the to-be-patched function in case of no downtime.

Description

technical field [0001] The invention relates to the field of computers, in particular to a method and device for generating a patch function. Background technique [0002] The kernel is the core of the operating system, responsible for managing the system's processes, memory, device drivers, files and network systems, etc., and determines the performance and stability of the system. When there is a defect in the kernel, such as a security hole, if the kernel defect is exploited by illegal elements, data loss or tampering, user privacy leakage and other problems may occur, which may easily cause economic and spiritual losses to users. In practical applications, the kernel hot patch technology is usually used to repair kernel defects, so as to avoid service interruption caused by system restart and ensure the security and availability of the kernel. [0003] At present, the existing kernel hot patch technology mainly contains the following two types: the first one uses a kern...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F21/57
CPCG06F21/57
Inventor 刘天张建新
Owner BEIJING QIHOO TECH CO LTD