CN106610857A - Hot patch information inquiring method and device - Google Patents

Hot patch information inquiring method and device Download PDF

Info

Publication number
CN106610857A
CN106610857A CN201611207823.7A CN201611207823A CN106610857A CN 106610857 A CN106610857 A CN 106610857A CN 201611207823 A CN201611207823 A CN 201611207823A CN 106610857 A CN106610857 A CN 106610857A
Authority
CN
China
Prior art keywords
hot patch
patch information
query interface
hot
data structure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611207823.7A
Other languages
Chinese (zh)
Other versions
CN106610857B (en
Inventor
王超
邱模炯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHANGHAI UCLOUD INFORMATION TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI UCLOUD INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI UCLOUD INFORMATION TECHNOLOGY Co Ltd filed Critical SHANGHAI UCLOUD INFORMATION TECHNOLOGY Co Ltd
Priority to CN201611207823.7A priority Critical patent/CN106610857B/en
Publication of CN106610857A publication Critical patent/CN106610857A/en
Application granted granted Critical
Publication of CN106610857B publication Critical patent/CN106610857B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/577Assessing vulnerabilities and evaluating computer system security

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a hot patch information inquiring method and device. The hot patch information inquiring method comprises the steps that step S101: when a hot patch is pre-generated, the hot patch information data structure is defined in the hot patch, and an inquiring interface for reading the hot patch information data structure instance is generated in the hot patch; step S102: whether the hot patch is loaded is judged, the step S103 is performed if the judgment result is yes, or hot patch information inquiring is ended; step S103: the address of the inquiring interface is computed; and step S104: the inquiring interface is called according to the address of the inquiring interface, and the hot patch information data structure instance is acquired through the inquiring interface so as to acquire the hot patch information. The hot patch information data structure is defined in the hot patch and the inquiring interface is generated, and the inquiring interface is called to read the hot patch information data structure instance so as to acquire the hot patch information without additional arrangement of configuration files.

Description

A kind of hot patch information query method and device
Technical field
The present invention relates to software upgrading field, more particularly to a kind of hot patch information query method and device.
Background technology
With the fast development of computing technique in recent years, the update speed of computer product also speeds therewith.At present, In software development process, there is new demand of the leak or user in terms of some software designs to the software unavoidably, in order to The use of software is not affected, leak reparation or renewal are carried out to the software typically in the way of hot patch, i.e., do not stopping software In the case of the software is repaired or updated.Process hot patch technology is that operating process is run in not interrupt process On the premise of to process load hot patch technology.The processing mode of process hot patch technology be substantially in units of function, Can be repaired by the function to starting a leak or needing to update, to realize reparation or renewal to process.
Process hot patch technology by hot patch producing device (also referred to as hot patch production process) and hot patch managing device ( Claim hot patch management program) composition.Hot patch producing device is responsible for making the hot patch that can be recognized by hot patch managing device, heat Patch management device is responsible for operating hot patch and target process, for example, load hot patch, activation hot patch, deexcitation heat Patch, unloading hot patch, inquiry hot patch etc..
During hot patch managing device is operated to target process and hot patch, it usually needs acquisition is vulcanized The information of fourth, it is therefore desirable to which hot patch function is inquired about.In the prior art, using the configuration file for arranging static state, and Hot patch information is write into configuration file by hot patch managing device, when needing to inquire about hot patch information, is then matched somebody with somebody by reading The method that file is put to inquire about hot patch information.However, such method cannot be realized looking into the Real-time and Dynamic of hot patch information Ask, once and configuration file loss or damage, then hot patch information cannot be inquired about, user cannot learn hot patch State.State due to learning hot patch, causes hot patch managing device to carry out to hot patch and target process Operation.
The content of the invention
For problem above, it is an object of the invention to provide a kind of hot patch information query method and device, can Dynamic queries hot patch information, and there is no the situation that hot patch information cannot be inquired about because of file loss or damaging, improve soft The stability of part operation and safety.
According to the first aspect of the invention, there is provided a kind of hot patch information query method, it is characterised in that including step: S101:During pre-generatmg hot patch, the hot patch information data structure defined in hot patch, hot patch includes at least one hot patch Function, the hot patch information of each hot patch information data structure example one hot patch function of correspondence, generates in hot patch Read the query interface of hot patch information data structure example;S102:Judge whether hot patch is loaded, if so, then perform step Rapid S103, if it is not, then terminating hot patch information inquiry;S103:Calculate the address of query interface;S104:According to query interface Address is called to query interface, and obtains hot patch information data structure example by query interface, to obtain the heat Patch information.
Preferably, judge hot patch whether be loaded including:Hot patch is searched in the maps files of target process, in mesh When finding hot patch in the maps files of mark process, judge that hot patch is loaded, do not find in the maps files of target process During hot patch, judge that hot patch is not loaded.
Preferably, calculating the address of query interface includes:The address of hot patch is obtained in the maps files of target process, Query interface offset address is obtained in symbol table, the address of hot patch is added with interface skew address to obtain query interface Address.
Preferably, query interface is interface function.
Preferably, query interface is called according to the address of query interface, and hot patch is obtained by query interface Information data structure example includes:The depositor of target process is changed according to the address of query interface, with simulated target process pair Interface function is called.
Preferably, query interface is interface variables.
Preferably, query interface is called according to the address of query interface, and hot patch is obtained by query interface The step of information data structure example, includes:Directly the variate-value of interface variables is read by the address of query interface.
Preferably, multiple hot patch information data structure examples corresponding with hot patch function are with chained list, array, tree, team A kind of mode in row or Hash table connects, and when query interface is called, query interface correspondingly returns the gauge outfit of chained list, number The pointer of group, the head node of the root node, the head pointer of queue or Hash table of tree.
Preferably, multiple hot patch information data structure examples corresponding with hot patch function are with chained list, array, tree, team A kind of mode in row or Hash table connects, and when query interface is called, query interface returns hot patch information data structure Example.
Preferably, the hot patch information query method of first aspect present invention, also including step:When hot patch function is added Hot patch information data structure example during load, corresponding to newly-built hot patch function.
Preferably, the hot patch information query method of first aspect present invention, also including step:When hot patch function status During change, the hot patch information data structure example corresponding to the hot patch function of state change is written and read.
Preferably, the hot patch information query method of first aspect present invention, also including step:When hot patch function is unloaded During load, the hot patch information data structure example corresponding to hot patch function is deleted.
According to the second aspect of the invention, there is provided a kind of hot patch information query device, including:Hot patch generates single Unit, during for pre-generatmg hot patch, the hot patch information data structure defined in hot patch, hot patch is vulcanized including at least one Fourth function, the hot patch information of each hot patch information data structure example one hot patch function of correspondence is raw in hot patch Into the query interface for reading hot patch information data structure example;Judging unit, for judging whether hot patch is loaded, judges When hot patch is not loaded, terminate inquiry;Computing unit, when judging that hot patch is loaded for judging unit, computing unit meter Calculate the address of query interface;Call unit, for computing unit behind the address for calculating query interface, call unit is according to inquiry The address of interface is called to query interface, and obtains hot patch information data structure example by query interface.
The present invention is by the hot patch information data structure defined in hot patch and generates query interface, by calling inquiry Interface reads hot patch information data structure example, so as to obtain the information of hot patch, therefore need not additionally arrange configuration text Part, will not occur that because file is lost or damages the situation of hot patch information cannot be inquired about, and be effectively improved reliability, and then The stability of overall hot patch loading is ensured.Due to hot patch information data structure of the hot patch information Store in hot patch In example, therefore store, change hot patch information more rapid and convenient.The present invention is read by calling the query interface of hot patch Hot patch information, therefore hot patch information is that dynamic realtime is obtained, compared to the reading hot patch information in configuration file Method, will not produce message delay, cannot inquire about hot patch information such that it is able to avoid file from losing, it is ensured that software system Leak is repaired in time, it is ensured that the safety of running software, it is to avoid software system collapses.For example, when present invention enforcement Example technical scheme be applied to cloud computing industry virtualization software reparation, it is to avoid virtual machine because collapse causes user cannot be just Normal access server.
Description of the drawings
Technical scheme is described in detail below in conjunction with the drawings and specific embodiments, so that the present invention Characteristic and advantage become apparent from.
Fig. 1 is the flow chart of an example of the hot patch information query method of the present invention;
Fig. 2 is the schematic diagram of the chained list including multiple hot patch information data structure examples of the present invention;
Fig. 3 is the detail flowchart of step S103 in Fig. 1;
Fig. 4 is the module diagram of an example of the hot patch information query device of the present invention.
Specific embodiment
Hereinafter will embodiments of the invention be given with detailed description.Although the present invention will be with reference to some specific embodiments It is illustrated and illustrates, but should be noted that the present invention is not merely confined to these embodiments.Conversely, to the present invention The modification for carrying out or equivalent, all should cover in the middle of scope of the presently claimed invention.
Some exemplary embodiments are described as process or the method described as flow chart.Although flow chart is grasped every It is described into the process of order, but many of which operation can be by concurrently, concomitantly or while implement.Additionally, each The order of item operation can be rearranged.The process when its operations are completed can be terminated, it is also possible to have not Including additional step in the accompanying drawings.The process can correspond to method, function, code, subroutine, subprogram etc..
Fig. 1 is the flow chart of an example of the hot patch information query method of the present invention.As shown in figure 1, in this example Hot patch information query method comprise the following steps:
S101:During pre-generatmg hot patch, the hot patch information data structure defined in hot patch simultaneously generates reading hot patch The query interface of information data structure example.
S102:Judge whether hot patch is loaded.
S103:Calculate the address of query interface.
S104:Query interface is called according to the address of query interface, and hot patch letter is obtained by query interface Breath data structure instance.
S105:Terminate inquiry.
Before loading hot patch, pre-generatmg hot patch is needed.The method for generating hot patch uses method of the prior art, For example in ksplice technologies, the corresponding source code of process is obtained in a operation first and binary system is compiled out, referred to as pre object, Stamp after source code patch compiles again, referred to as post objects, post objects and pre objects are instructed one by one and compares and finds out presence The function of difference, afterwards merges into these difference functions the hot patch of scheduler module form.
The step of this example in S101, on the basis of the method for existing generation hot patch, defined in hot patch Hot patch information data structure, such as hot patch information data structure hotpatch_info, the hot patch information data structure Hotpatch_info include hot patch information, hot patch information include hot patch title, hot patch state, hot patch function name, Original function initial address, original length, starting function address, the amended length of modification.In other enforcements, hot patch Information is arranged as required to, however it is not limited to above-mentioned listed hot patch information.
Fig. 2 is the schematic diagram of the chained list including multiple hot patch information data structure examples of the present invention.As shown in Fig. 2 One hot patch includes one or more hot patch functions, a hot patch information data structure hotpatch_info example The hot patch information of 2021,2022,2023,2,024 one hot patch function of correspondence.
When there is multiple hot patch functions, multiple hot patch information data structures corresponding with hot patch function Hotpatch_info examples 2021,2022,2023,2024 are connected in the mode of chained list 200.
Hot patch information data structure when hot patch function is loaded, corresponding to the newly-built hot patch function Hotpatch_info examples 2022, i.e., insert new node in chained list.
When hot patch function status change, hot patch information data structure hotpatch_ to corresponding state change Info examples 2022 are written and read.For example, when particular thermal patch function is activated, then by the hot patch function name or mark Symbol traversal chained list 200 finds the hot patch function, to the corresponding hot patch information data structure of the hot patch function The field values such as the hot patch state of hotpatch_info examples 2022 are written and read.
When hot patch function is unloaded, the hot patch information data structure corresponding to hot patch function is deleted Hotpatch_info examples 2022, i.e., delete corresponding node from chained list 200.
It will thus be seen that hot patch information is stored in inside hot patch by hot patch information data structure example , therefore, it is possible to ensure that hot patch information is not damaged by or loses, improve reliability and stability.Hot patch is being believed When breath such as is generated, changed at the operation, complete by operating hot patch information data structure example by hot patch itself, without the need for External file is reused, so as to ensure that modification reliability, the speed of service is improve.
When there is multiple hot patch functions, in other embodiments, the multiple and one-to-one hot patch of hot patch function Information data structure example with array, tree, queue or Hash table in a kind of mode or other connections known known in the art The mode of data connects.
Also need to generate in step S101 and read hot patch information data structure hotpatch_info example 2021, 2022,2023,2024 query interface.
In the present embodiment, query interface is interface function, for example interface function get_hotpatch_info ().Pass through Calling interface function get_hotpatch_info () obtains hot patch information data structure hotpatch_info example 2021, 2022,2023,2024.
When multiple hot patch information data structure hotpatch_info examples 2021,2022 corresponding with hot patch function, 2023,2024 with chained list 200 when being connected, as a kind of embodiment, by calling interface function get_hotpatch_info (), interface function get_hotpatch_info () returns the gauge outfit 201 of chained list, then travels through chained list 200 by gauge outfit 201, To obtain hot patch information.
Then as step S102 judges whether hot patch is loaded.Loading is referred to and for the hot patch after compiling to be loaded onto target The virtual address space of process.In the present embodiment, by searching hot patch in the maps files of target process, to determine heat Whether patch is loaded.Specifically, there is each process a Process identifier (PID) to be used for identification process, according to mesh The Process identifier of mark process obtains the maps files of target process.The virtual address that maps files are generally used for the process of checking is empty Between service condition, it includes some column data such as mapped filename and address.In the maps files of target process Mapped file ranks middle lookup hot patch title, to determine whether hot patch is loaded.
If not finding hot patch in the maps files of target process, show that hot patch is not loaded into mesh The virtual address space of mark process, subsequently enters step S105 and terminates inquiry, and now hot patch state is unloading.Specifically, Because hot patch is not loaded, i.e. state of the hot patch in unloading, without the need for inquiring about the specifying information of hot patch again, Therefore terminate the flow process of hot patch information inquiry, and display to the user that hot patch state is unloading.
If finding hot patch in the maps files of target process, show that hot patch enters already loaded into target The virtual address space of journey, subsequently enters below step S103.
Such as step S103, when judging that hot patch is loaded, the address of query interface is calculated.Fig. 3 is step S103 in Fig. 1 Detail flowchart, as shown in Figure 1 and Figure 3, is first carried out step S1031 and obtains hot patch in the maps files of target process Address.Specifically, in the maps files being related in step s 102, obtain corresponding with hot patch title mapped The address information of filename place data row, so as to obtain the initial address of hot patch.
Then such as step S1032, query interface offset address is obtained in the symbol table of hot patch.Specifically, inquire about Interface skew address refers to relative address of the query interface in hot patch.The symbol table of hot patch includes title and phase To some column data such as address, the relative address information of the title place data row corresponding with query interface title is obtained, from And obtain relative address of the query interface in hot patch.
Then such as step S1033, the address of hot patch is added with query interface offset address, so as to obtain query interface Address.
Obtain and enter behind query interface address step S104, query interface is called according to the address of query interface, And hot patch information data structure example 2021,2022,2023,2024 is obtained by query interface.
Specifically, the depositor of target process is changed according to the address of interface function get_hotpatch_info (), with Simulated target process docking port letter get_hotpatch_info () is called.Here the depositor of target process is changed, with mould The concrete grammar for calling for intending target process docking port function get_hotpatch_info () is posted process using existing The method that storage is modified to realize function call, for example, include, by changing instruction pointer register (IP depositors), making The instruction address of its next execution points to the address of interface function get_hotpatch_info (), i.e., in above-mentioned steps The address of the query interface obtained in S1033, so that target process performs interface function get_hotpatch_info (), To obtain the corresponding hot patch information data structure hotpatch_info example 2021,2022,2023,2024 of hot patch function.
When there is multiple hot patch functions, as a kind of embodiment, when interface function get_hotpatch_info () quilt When calling, interface function get_hotpatch_info () returns the gauge outfit 201 of chained list 200.Therefore by chained list gauge outfit 201 Operation obtain the corresponding hot patch information data structure hotpatch_info example 2021 of hot patch function, 2022,2023, 2024, for example travel through chained list 200 to obtain the hot patch information of all hot patch functions by gauge outfit 201.For example pass through gauge outfit 201 and the identifier of particular thermal patch function obtain the hot patch information of particular thermal patch function.For example by gauge outfit 201 with And the identifier of specific hot patch obtains the hot patch information of all hot patch functions that the hot patch is included.
Because calling interface function only needs the gauge outfit 201 for returning chained list 200, therefore interface function to set in itself in the present embodiment Put relatively simple, accelerate the speed of service, reduce the cost for safeguarding hot patch.
In other embodiments, multiple hot patch information data structure examples corresponding with hot patch function with array, tree, A kind of mode in queue or Hash table connects, when query interface is called, query interface correspondingly return array pointer, The head node of the root node of tree, the head pointer of queue or Hash table.Then pass through the pointer to array, root node, the team of tree The operation of the head pointer of row or the head node of Hash table obtains the hot patch information of hot patch function.Multiple hot patch Information Numbers When connecting in the way of other are equal to according to structure example, also correspondingly return the similar head node that can be operated or pointer etc. Jljl.
In another embodiment, when interface function get_hotpatch_info () is called, interface function get_ Hotpatch_info () directly returns hot patch information data structure example 2021,2022,2023,2024.Specifically, if Put when interface function get_hotpatch_info () is called, return all of hot patch information data structure example 2021,2022,2023,2024.In other embodiments, when setting interface function get_hotpatch_info () is called, While the parameter such as additional particular thermal patch function identifier, so as to interface function get_hotpatch_info () is traveled through by multiple The chain of the composition of hot patch information data structure hotpatch_info example 2021,2022,2023,2024 corresponding with hot patch Table 200, and corresponding hot patch information data structure example 2022 is returned by parameters such as hot patch identifiers.
It should be noted that other can also be used by reading of the query interface to hot patch information data structure example Embodiment, more than do not give an account of being limited of continuing, as long as meeting by query interface to hot patch information data structure example It is read.
After hot patch information is obtained, into step S105 inquiry is terminated, and show vulcanizing on target process to user Fourth information.Because when query interface is called, query interface is operated in target process, it is possible to dynamic realtime ground is anti- Reflect the information of hot patch in target process.
In the embodiment of a deformation, query interface is interface variables, for example interface variables hotpatch_info_list. Hot patch information data structure hotpatch_ is obtained by reading the variate-value of interface variables hotpatch_info_list Info examples 2021,2022,2023,2024.
Specifically, according to the address of interface variables hotpatch_info_list obtained in step S103, pass through Ptrace function call address above mentioned, to obtain the variate-value of variable hotpatch_info_list.Ptrace functions are Linux The system function of system, there is provided a kind of to enable parent process to monitor and control the mode of other processes, to realize debugging breakpoints The tracking called with system.
When multiple hot patch information data structure hotpatch_info examples 2021,2022 corresponding with hot patch, 2023,2024 in the mode of chained list 200 when being connected, and as a kind of embodiment, reads interface variables hotpatch_info_list, Interface variables hotpatch_info_list return the gauge outfit 201 of chained list 200, chained list 200 are traveled through by gauge outfit 201, to obtain Hot patch information.Specifically, according to the address of interface variables hotpatch_info_list, by ptrace function calls ground Location, so as to obtain the chain of multiple compositions of hot patch information data structure hotpatch_info example 2021,2022,2023,2024 The gauge outfit 201 of table 200, then travels through chained list 200 by gauge outfit 201, obtains all hot patch information data structures hotpatch_ The address of info examples 2021,2022,2023,2024, then by ptrace function calls, obtain each hot patch information data Structure hotpatch_info example 2021, the value of 2022,2023,2024 corresponding variable members.
Additive method in variant embodiment is similar with former embodiment, referring in particular to the above-mentioned description to former embodiment, Here is omitted.
It should be noted that except interface function and interface variables, it would however also be possible to employ the mode of other query interfaces, only Meet by the way that hot patch information data structure example can be read to calling for query interface.
Description more than to hot patch information query method can be seen that the present invention includes hot patch defined in hot patch The hot patch information data structure of information simultaneously generates reading hot patch information data structure example 2021,2022,2023,2024 Query interface, when hot patch is loaded in target process, by calling the query interface operated in target process, so as to obtain Obtain hot patch information.Therefore the present invention need not additionally arrange configuration file for recording hot patch information, and all of information is all In being stored in the hot patch of target process, therefore the situation that information is lost or damaged will not occur, improve hot patch information The reliability and stability of inquiry, and then ensured the stability of overall hot patch loading.
Simultaneously the present invention to hot patch information Store inside hot patch, therefore store, change hot patch information it is more fast Speed and reliability is higher.Due to being dynamic realtime for hot patch information inquiry, therefore hot patch message delay will not occur Situation, inquiry reliability be guaranteed, such that it is able to guarantee that the leak of software system is repaired in time, it is ensured that software transport Capable safety, it is to avoid software system collapses.For example, when the technical scheme of the embodiment of the present invention is applied to cloud computing industry Virtualization software reparation, it is to avoid virtual machine because collapse causes user cannot normal access server.It is understood that this The hot patch information query method of inventive embodiments can also be applied in the example that other repair software.
Present invention also offers a kind of hot patch information query device, Fig. 4 is the hot patch information query device of the present invention An example module diagram.
As shown in figure 4, the hot patch information query device 1 in the present embodiment includes hot patch signal generating unit 101, judge single Unit 102, computing unit 103 and call unit 104.
Wherein, hot patch signal generating unit 101 is used for the hot patch information data structure defined in hot patch and generates reading The query interface of hot patch information data structure example 2021,2022,2023,2024.Judging unit 102 is used to judge hot patch Whether it is loaded.Computing unit 103 is used to calculate the address of query interface.Call unit 104 is used for the ground according to query interface Location is called to query interface, and obtains hot patch information data structure example by query interface.
With reference to Fig. 1, Fig. 2, Fig. 3 and Fig. 4, hot patch information query device 1 is with reference to above hot patch information inquiry side Method and be operated.
When first by execution step S101 of hot patch signal generating unit 101, i.e. pre-generatmg hot patch, wrap defined in hot patch Include the hot patch information data structure of hot patch information and generate reading hot patch information data structure example 2021,2022, 2023,2024 query interface.Query interface is again arranged to interface function or interface variables.
Then execution step S102 of judging unit 102, that is, judge whether hot patch is loaded.When judging that hot patch is not added During load, terminate the flow process of inquiry hot patch information, and hot patch state is returned for unloading to user.
When judging unit 102 judges that hot patch is loaded, then by execution step S103 of computing unit 103, first in mesh The address of hot patch is obtained in the maps files of mark process, query interface skew ground is then obtained in the symbol table of hot patch Location, both are added so as to obtain the address of query interface.
Then, call unit 104 is called according to the address of query interface to query interface.Query interface enters in target Run in journey, and the hot patch information data structure example 2021,2022,2023,2024 corresponding to hot patch function is passed through Query interface feeds back.The acquisition hot patch information data structure of call unit 104 example 2021,2022,2023,2024, that is, Hot patch information.
As described in specific flow process of the method described in above-mentioned hot patch information query method, no longer repeat one by one herein.
The hot patch information query device 1 of the present invention is individually in the present embodiment a device, in other embodiments, Hot patch information query device is divided and is contained in respectively in hot patch producing device and hot patch managing device.For example, Hot patch signal generating unit 101 is contained in hot patch producing device, judging unit 102, computing unit 103 and call unit 104 are contained in hot patch managing device.
It should be noted that the present invention is one kind application of hot patch inquiry.During the realization of the present invention, can be related to To the application of multiple software function modules.Such as read over application documents, accurate understanding the present invention realize principle and invention After purpose, in the case of with reference to existing known technology, those skilled in the art can use completely the software of its grasp to compile Journey technical ability realizes the present invention, and by all embodiments in the present invention, embodiment, the technical characteristic in variant embodiment is carried out certainly By combining.Other implementation details of aforementioned hot patch generation method and hot patch loading method are implemented with reference to prior art.
The above is only the concrete application example of the present invention, protection scope of the present invention is not limited in any way.Except above-mentioned Implement exception, the present invention there can also be other embodiment.The technical scheme that all employing equivalents or equivalent transformation are formed, Fall within scope of the present invention.

Claims (13)

1. a kind of hot patch information query method, it is characterised in that including step:
S101:During pre-generatmg hot patch, the hot patch information data structure defined in the hot patch, the hot patch include to A few hot patch function, the hot patch letter of each hot patch information data structure example one hot patch function of correspondence Breath, generates the query interface for reading the hot patch information data structure example in the hot patch;
S102:Judge whether the hot patch is loaded, if so, then execution step S103, if it is not, then terminate hot patch information looking into Ask;
S103:Calculate the address of the query interface;
S104:Query interface is called according to the address of the query interface, and obtains described by the query interface Hot patch information data structure example, to obtain the hot patch information.
2. hot patch information query method as claimed in claim 1, it is characterised in that
It is described judge the hot patch whether be loaded including:
The hot patch is searched in the maps files of target process, in the maps files of target process the hot patch is found When, judge that the hot patch is loaded, when not finding the hot patch in the maps files of target process, vulcanize described in judgement Fourth is not loaded.
3. hot patch information query method as claimed in claim 1, it is characterised in that
The address for calculating query interface includes:
The address of hot patch is obtained in the maps files of target process, query interface offset address is obtained in symbol table, will The address of the hot patch is added to obtain the address of the query interface with the interface skew address.
4. hot patch information query method as claimed in claim 1, it is characterised in that
The query interface is interface function.
5. hot patch information query method as claimed in claim 4, it is characterised in that
The address according to the query interface is called to query interface, and obtains the heat by the query interface Patch information data structure instance includes:
The depositor of the target process is changed according to the address of the query interface, is connect to described with simulating the target process Mouthful function is called.
6. hot patch information query method as claimed in claim 1, it is characterised in that
The query interface is interface variables.
7. hot patch information query method as claimed in claim 6, it is characterised in that
The address according to the query interface is called to query interface, and obtains the heat by the query interface The step of patch information data structure instance, includes:
Directly the variate-value of the interface variables is read by the address of the query interface.
8. hot patch information query method as claimed in claim 1, it is characterised in that
Multiple hot patch information data structure examples corresponding with the hot patch function are with chained list, array, tree, queue or Hash A kind of mode in table connects,
When the query interface is called, the query interface correspondingly returns the gauge outfit of the chained list, the pointer of array, tree Root node, the head pointer of queue or Hash table head node.
9. hot patch information query method as claimed in claim 1, it is characterised in that
Multiple hot patch information data structure examples corresponding with the hot patch function are with chained list, array, tree, queue or Hash A kind of mode in table connects,
When the query interface is called, the query interface returns the hot patch information data structure example.
10. hot patch information query method as in one of claimed in any of claims 1 to 9, it is characterised in that also including step:
Hot patch information data structure reality when the hot patch function is loaded, corresponding to the newly-built hot patch function Example.
11. hot patch information query methods as claimed in claim 10, it is characterised in that also including step:
When the hot patch function status change, to the hot patch Information Number corresponding to the hot patch function of state change It is written and read according to structure example.
12. hot patch information query methods as claimed in claim 11, it is characterised in that also including step:
When the hot patch function is unloaded, the hot patch information data structure reality corresponding to the hot patch function is deleted Example.
13. a kind of hot patch information query devices, it is characterised in that include:
Hot patch signal generating unit, during for pre-generatmg hot patch, the hot patch information data structure defined in the hot patch, institute Hot patch is stated including at least one hot patch function, each hot patch information data structure example one hot patch function of correspondence Hot patch information, generates the query interface for reading the hot patch information data structure example in the hot patch;
Judging unit, for judging whether the hot patch is loaded, when judging that the hot patch is not loaded, terminates inquiry;
Computing unit, when judging that the hot patch is loaded for the judging unit, the computing unit calculates query interface Address;
Call unit, for the computing unit behind the address for calculating the query interface, the call unit is according to described The address of query interface is called to query interface, and obtains the hot patch information data structure by the query interface Example.
CN201611207823.7A 2016-12-23 2016-12-23 A kind of hot patch information query method and device Active CN106610857B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611207823.7A CN106610857B (en) 2016-12-23 2016-12-23 A kind of hot patch information query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611207823.7A CN106610857B (en) 2016-12-23 2016-12-23 A kind of hot patch information query method and device

Publications (2)

Publication Number Publication Date
CN106610857A true CN106610857A (en) 2017-05-03
CN106610857B CN106610857B (en) 2019-01-22

Family

ID=58636666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611207823.7A Active CN106610857B (en) 2016-12-23 2016-12-23 A kind of hot patch information query method and device

Country Status (1)

Country Link
CN (1) CN106610857B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943513A (en) * 2017-12-11 2018-04-20 北京奇虎科技有限公司 Service packs recognition methods, device and terminal
CN110196730A (en) * 2018-08-30 2019-09-03 腾讯科技(深圳)有限公司 Hot patch management method, device and the storage medium of application program
CN111158735A (en) * 2019-12-05 2020-05-15 青岛海信移动通信技术股份有限公司 Hot patch file processing method and communication terminal
CN112015491A (en) * 2019-05-30 2020-12-01 华为技术有限公司 Method, device and computer storage medium for realizing function jump
CN112612530A (en) * 2019-09-18 2021-04-06 华为技术有限公司 Class query method and device
CN113760340A (en) * 2020-06-05 2021-12-07 大唐移动通信设备有限公司 Hot patching method and device applied to Linux system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753351A (en) * 2008-12-11 2010-06-23 大唐移动通信设备有限公司 Method for extending and de-extending management information base, method and equipment for searching management object
CN102156661A (en) * 2010-02-11 2011-08-17 华为技术有限公司 Method, device and system for online activating patches
CN102622550A (en) * 2012-04-06 2012-08-01 北京空间飞行器总体设计部 Safe online patch check system facing terminal computers
CN103019787A (en) * 2012-12-14 2013-04-03 华为技术有限公司 Function call relation determining method, hotfix updating method and hotfix updating device
US8468516B1 (en) * 2008-12-19 2013-06-18 Juniper Networks, Inc. Creating hot patches for embedded systems
CN103559449A (en) * 2013-11-15 2014-02-05 华为技术有限公司 Detection method and device for code change
CN103942073A (en) * 2014-04-08 2014-07-23 北京奇虎科技有限公司 Method and device for realizing system hot patching
CN104125101A (en) * 2014-08-12 2014-10-29 烽火通信科技股份有限公司 Method for upgrading subordinate business single disks in batches by hot patches for communication system network element
CN104239082A (en) * 2013-06-20 2014-12-24 上海博达数据通信有限公司 Hot patching implementation method of embedded system
CN104461625A (en) * 2014-12-04 2015-03-25 上海斐讯数据通信技术有限公司 Hot patch realization method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753351A (en) * 2008-12-11 2010-06-23 大唐移动通信设备有限公司 Method for extending and de-extending management information base, method and equipment for searching management object
US8468516B1 (en) * 2008-12-19 2013-06-18 Juniper Networks, Inc. Creating hot patches for embedded systems
CN102156661A (en) * 2010-02-11 2011-08-17 华为技术有限公司 Method, device and system for online activating patches
CN102622550A (en) * 2012-04-06 2012-08-01 北京空间飞行器总体设计部 Safe online patch check system facing terminal computers
CN103019787A (en) * 2012-12-14 2013-04-03 华为技术有限公司 Function call relation determining method, hotfix updating method and hotfix updating device
CN104239082A (en) * 2013-06-20 2014-12-24 上海博达数据通信有限公司 Hot patching implementation method of embedded system
CN103559449A (en) * 2013-11-15 2014-02-05 华为技术有限公司 Detection method and device for code change
CN103942073A (en) * 2014-04-08 2014-07-23 北京奇虎科技有限公司 Method and device for realizing system hot patching
CN104125101A (en) * 2014-08-12 2014-10-29 烽火通信科技股份有限公司 Method for upgrading subordinate business single disks in batches by hot patches for communication system network element
CN104461625A (en) * 2014-12-04 2015-03-25 上海斐讯数据通信技术有限公司 Hot patch realization method and system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943513A (en) * 2017-12-11 2018-04-20 北京奇虎科技有限公司 Service packs recognition methods, device and terminal
CN107943513B (en) * 2017-12-11 2021-03-26 北京奇虎科技有限公司 Patch package identification method and device and terminal
CN110196730A (en) * 2018-08-30 2019-09-03 腾讯科技(深圳)有限公司 Hot patch management method, device and the storage medium of application program
CN112015491A (en) * 2019-05-30 2020-12-01 华为技术有限公司 Method, device and computer storage medium for realizing function jump
US11645068B2 (en) 2019-05-30 2023-05-09 Huawei Technologies Co., Ltd. Method for implementing function jump, apparatus, and computer storage medium
CN112612530A (en) * 2019-09-18 2021-04-06 华为技术有限公司 Class query method and device
CN112612530B (en) * 2019-09-18 2022-05-17 华为技术有限公司 Class query method and device
CN111158735A (en) * 2019-12-05 2020-05-15 青岛海信移动通信技术股份有限公司 Hot patch file processing method and communication terminal
CN111158735B (en) * 2019-12-05 2023-03-31 青岛海信移动通信技术股份有限公司 Hot patch file processing method and communication terminal
CN113760340A (en) * 2020-06-05 2021-12-07 大唐移动通信设备有限公司 Hot patching method and device applied to Linux system
CN113760340B (en) * 2020-06-05 2024-02-20 大唐移动通信设备有限公司 Hot patching method and device applied to Linux system

Also Published As

Publication number Publication date
CN106610857B (en) 2019-01-22

Similar Documents

Publication Publication Date Title
CN106610857A (en) Hot patch information inquiring method and device
CN103559449B (en) The detection method of a kind of code change and device
US20120079447A1 (en) Software build analysis
KR20160002685A (en) Method and embedded device for loading driver
CN103077043B (en) A kind of method of quick Start-up and operating performance Linux
CN102592084B (en) A kind of leak repairs method of testing and the system of client logic
CN102880482A (en) System and technical method of automatically updating software in host batch control virtual machine
CN102981882B (en) Analytic method and device
US10452389B2 (en) Computer-implemented method for editing data object variants
CN113826070A (en) Workflow engine tool
CN101308471A (en) Method and device for data restoration
CN104794155A (en) Data loading method, device and system
CN104133733A (en) Memory error detection method
CN111950147A (en) Method and device for defining digital twin body by unified prototype model
CN114090013A (en) Method and device for determining change set of executable code file
US20120159515A1 (en) Sharing object representations
CN104461384A (en) Data write-in method and storage device
CN103645888A (en) System and method for automatically building operation system
CN104572876A (en) Method and device for reading configuration file corresponding to software
CN104317723A (en) Method and system for tracking running information of drive program
US20210016442A1 (en) Simulation signature keys for robotic simulations
CN112307589B (en) Unit working condition creation method and device, electronic equipment and storage medium
CN101819608B (en) Device and method for accelerating instruction fetch in microprocessor instruction-level random verification
JP6649731B2 (en) Identify signals to read back from FPGA
CN114564207A (en) Software product processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 200433 Room 201, 10 B, 619 Longchang Road, Yangpu District, Shanghai.

Applicant after: Excellent Polytron Technologies Inc

Address before: 200433 room 1207-10, 6 Wade Road, Yangpu District, Shanghai.

Applicant before: SHANGHAI UCLOUD INFORMATION TECHNOLOGY CO., LTD.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant