CN106610857B - A kind of hot patch information query method and device - Google Patents

A kind of hot patch information query method and device Download PDF

Info

Publication number
CN106610857B
CN106610857B CN201611207823.7A CN201611207823A CN106610857B CN 106610857 B CN106610857 B CN 106610857B CN 201611207823 A CN201611207823 A CN 201611207823A CN 106610857 B CN106610857 B CN 106610857B
Authority
CN
China
Prior art keywords
hot patch
query interface
patch information
data structure
hot
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.)
Active
Application number
CN201611207823.7A
Other languages
Chinese (zh)
Other versions
CN106610857A (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.)
Excellent Polytron Technologies Inc
Original Assignee
Excellent Polytron Technologies Inc
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 Excellent Polytron Technologies Inc filed Critical Excellent Polytron Technologies Inc
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 present invention provides a kind of hot patch information query method and devices, hot patch information query method includes step S101: when pre-generatmg hot patch, hot patch information data structure is defined in hot patch, and the query interface for reading hot patch information data structure example is generated in hot patch;S102: judging whether hot patch is loaded, if so, S103 is thened follow the steps, if it is not, then terminating the inquiry of hot patch information;S103: the address of query interface is calculated;S104: being called query interface according to the address of query interface, and obtains hot patch information data structure example by query interface, to obtain the hot patch information.The present invention, by calling query interface to read hot patch information data structure example, to obtain the information of hot patch, therefore does not need that configuration file additionally is arranged by defining hot patch information data structure in hot patch and generating query interface.

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 methods and device.
Background technique
With the fast development of computing technique in recent years, the update speed of computer product is also speeded therewith.Currently, In software development process, inevitably there is loophole in terms of some software designs or user to the new demand of the software, in order to The use of software is not influenced, and loophole reparation or update are carried out to the software generally in a manner of hot patch, i.e., do not stopping software In the case where the software is repaired or is updated.Process hot patch technology is to run to running process in not interrupt process Under the premise of to process load hot patch technology.The processing mode of process hot patch technology substantially as unit of function, It can be by being repaired to the function for starting a leak or needing to update, to realize reparation or update 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 the hot patch that production can be identified by hot patch managing device, heat Patch management device is responsible for operating hot patch and target process, such as load hot patch, activation hot patch, deactivation heat Patch, unloading hot patch, inquiry hot patch etc..
During hot patch managing device operates 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.In the prior art, the configuration file static using setting, and Configuration file is written into hot patch information by hot patch managing device, when needing to inquire hot patch information, is then matched by reading The method for setting file to inquire hot patch information.However, such method cannot achieve dynamically looking into real time to hot patch information It askes, once and configuration file loses or damage, then hot patch information can not be inquired, user can not learn hot patch State.Due to that can not learn the state of hot patch, cause hot patch managing device that can not carry out to hot patch and target process Operation.
Summary of the invention
In view of the above problems, the purpose of the present invention is to provide a kind of hot patch information query method and device, it can Dynamic queries hot patch information, and there is no hot patch information can not be inquired due to file is lost or damages, it improves soft The stability and safety of part operation.
According to the first aspect of the invention, a kind of hot patch information query method is provided, it is characterised in that comprising steps of S101: when pre-generatmg hot patch, hot patch information data structure is defined in hot patch, hot patch includes at least one hot patch Function, the hot patch information of the corresponding hot patch function of each hot patch information data structure example, generates in hot patch Read the query interface of hot patch information data structure example;S102: judging whether hot patch is loaded, if so, executing step Rapid S103, if it is not, then terminating the inquiry of hot patch information;S103: the address of query interface is calculated;S104: according to query interface Address is called query interface, and obtains hot patch information data structure example by query interface, to obtain the heat Patch information.
Preferably, judging whether hot patch is loaded includes: to search hot patch in the maps file of target process, in mesh When finding hot patch in the maps file of mark process, judge that hot patch is loaded, is not found in the maps file of target process When hot patch, judge that hot patch is not loaded.
Preferably, the address for calculating query interface includes: the address that hot patch is obtained in the maps file of target process, Query interface offset address is obtained in symbol table, and 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: that the register of target process is modified according to the address of query interface, with simulated target process pair The calling of interface function.
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: the variate-value that interface variables are directly 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 One of column or Hash table mode connect, and when query interface is called, query interface correspondingly returns to the gauge outfit of chained list, number The head node of pointer, the root node of tree, the head pointer of queue or the Hash table organized.
Preferably, multiple hot patch information data structure examples corresponding with hot patch function are with chained list, array, tree, team One of column or Hash table mode connect, and when query interface is called, query interface returns to hot patch information data structure Example.
Preferably, the hot patch information query method of first aspect present invention is further comprised the steps of: when hot patch function is added When load, hot patch information data structure example corresponding to hot patch function is created.
Preferably, the hot patch information query method of first aspect present invention, further comprises the steps of: when hot patch function status When variation, hot patch information data structure example corresponding to the hot patch function to state change is written and read.
Preferably, the hot patch information query method of first aspect present invention is further comprised the steps of: when hot patch function is unloaded When load, hot patch information data structure example corresponding to hot patch function is deleted.
According to the second aspect of the invention, a kind of hot patch information query device is provided, comprising: hot patch generates single Member defines hot patch information data structure, hot patch includes that at least one is vulcanized when being used for pre-generatmg hot patch in hot patch Fourth function, the hot patch information of the corresponding hot patch function of each hot patch information data structure example are raw in hot patch At the query interface for reading hot patch information data structure example;Judging unit judges for judging whether hot patch is loaded 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 query interface, and obtains hot patch information data structure example by query interface.
The present invention is inquired by defining hot patch information data structure in hot patch and generating query interface by calling Interface reads hot patch information data structure example, to obtain the information of hot patch, therefore does not need that configuration text is additionally arranged Part will not effectively improve reliability, in turn there is a situation where that can not inquire hot patch information due to file is lost or damages The stability of whole hot patch load is ensured.The hot patch information data structure being stored in due to hot patch information in hot patch In example, therefore store, change hot patch information more rapid and convenient.The present invention is by calling the query interface of hot patch to read Hot patch information, therefore hot patch information is that dynamic realtime obtains, compared to the reading hot patch information in configuration file Method will not generate message delay, can not inquire hot patch information so as to avoid file from losing, it is ensured that software systems Loophole is repaired in time, guarantees the safety of software operation, software systems is avoided to collapse.For example, when the present invention is implemented The technical solution of example is applied to the reparation of the virtualization software of cloud computing industry, and virtual machine is avoided to cause user can not be just because of collapse Server is asked in frequentation.
Detailed description of the invention
Technical solution of the present invention is described in detail below in conjunction with the drawings and specific embodiments, so that of the invention Characteristics and advantages become apparent.
Fig. 1 is the flow chart of an example of hot patch information query method of the invention;
Fig. 2 is the schematic diagram of the chained list including multiple hot patch information data structure examples of the invention;
Fig. 3 is the detail flowchart of step S103 in Fig. 1;
Fig. 4 is the module diagram of an example of hot patch information query device of the invention.
Specific embodiment
Detailed description will be provided to the embodiment of the present invention below.Although the present invention will combine some specific embodiments It is illustrated and illustrates, but should be noted that the present invention is not merely confined to these embodiments.On the contrary, to the present invention The modification or equivalent replacement of progress, are intended to be within the scope of the claims of the invention.
Some exemplary embodiments are described as the processing or method described as flow chart.Although flow chart grasps items It is described into the processing of sequence, but many of these operations can be implemented concurrently, concomitantly or simultaneously.In addition, each The sequence of item operation can be rearranged.The processing can be terminated when its operations are completed, it is also possible to have not Including additional step in the accompanying drawings.The processing can correspond to method, function, regulation, subroutine, subprogram etc..
Fig. 1 is the flow chart of an example of hot patch information query method of the invention.As shown in Figure 1, in this example Hot patch information query method the following steps are included:
S101: when pre-generatmg hot patch, hot patch information data structure is defined in hot patch and generates reading hot patch The query interface of information data structure example.
S102: judge whether hot patch is loaded.
S103: the address of query interface is calculated.
S104: being called query interface according to the address of query interface, and obtains hot patch letter by query interface Cease data structure instance.
S105: terminate inquiry.
Before loading hot patch, pre-generatmg hot patch is needed.The method for generating hot patch uses method in the prior art, Such as in ksplice technology, the corresponding source code of process in a operation is obtained first and compiles out binary system, referred to as pre object, It stamps after source code patch compiles again, referred to as post object, post object and pre object is instructed one by one and compare and find out presence The function of difference later merges into these difference functions the hot patch of scheduler module form.
In the step S101 of this example, on the basis of the existing method for generating 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 includes hot patch information, hot patch information include hot patch title, hot patch state, hot patch function name, Original function initial address, original length, the starting function address of modification, modified length.In other implementations, hot patch Information is set as needed, 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 invention.As shown in Fig. 2, It include one or more hot patch functions, a hot patch information data structure hotpatch_info example in one hot patch The hot patch information of 2021,2022,2023, a 2024 corresponding hot patch functions.
When there is multiple hot patch functions, multiple hot patch information data structures corresponding with hot patch function Hotpatch_info example 2021,2022,2023,2024 is connected in a manner of chained list 200.
When hot patch function is loaded, hot patch information data structure corresponding to the hot patch function is created Hotpatch_info example 2022 is inserted into new node in chained list.
When the variation of hot patch function status, to the hot patch information data structure hotpatch_ of corresponding state change Info example 2022 is written and read.For example, then passing through the hot patch function name or mark when particular thermal patch function is activated Symbol traversal chained list 200 finds the hot patch function, hot patch information data structure corresponding to the hot patch function The field values such as the hot patch state of hotpatch_info example 2022 are written and read.
When hot patch function is unloaded, hot patch information data structure corresponding to hot patch function is deleted Hotpatch_info example 2022 deletes 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 can guarantee that hot patch information is not damaged or loses, improve reliability and stability.Believe to hot patch When breath such as is generated, modified at the operation, operating hot patch information data structure example by hot patch itself be can be completed, and be not necessarily to External file is reused, to ensure that modification reliability, improves the speed of service.
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 is in a manner of one of array, tree, queue or Hash table or other connections known in the art known The mode of data connects.
It also needs to generate in step s101 and reads hot patch information data structure hotpatch_info example 2021, 2022,2023,2024 query interface.
In the present embodiment, query interface is interface function, such as 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 connection when, as an implementation, pass through calling interface function get_hotpatch_info (), interface function get_hotpatch_info () return to the gauge outfit 201 of chained list, then traverse chained list 200 by gauge outfit 201, To obtain hot patch information.
Then as step S102 judges whether hot patch is loaded.Load, which refers to, is loaded onto target for the hot patch after compiling The virtual address space of process.In the present embodiment, by searching hot patch in the maps file of target process, to determine heat Whether patch is loaded.Specifically, each process has a Process identifier (PID) for identification process, according to mesh The Process identifier of mark process obtains the maps file of target process.Maps file is commonly used in checking that the virtual address of process is empty Between service condition comprising several column datas such as the filename being mapped and address.In the maps file of target process The file being mapped ranks middle lookup hot patch title, to determine whether hot patch is loaded.
If not finding hot patch in the maps file of target process, show that hot patch is not loaded into mesh The virtual address space of mark process, subsequently entering step S105 terminates to inquire, and hot patch state is unloading at this time.Specifically, Since hot patch is not loaded, i.e., hot patch is in the state unloaded, no longer needs to inquire the specifying information of hot patch, Therefore terminate the process of hot patch information inquiry, and show that hot patch state is unloading to user.
If finding hot patch in the maps file of target process, show hot patch be already loaded into target into The virtual address space of journey subsequently enters following 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 is first carried out step S1031 and obtains hot patch in the maps file of target process as shown in Figure 1 and Figure 3 Address.Specifically, in the maps file being related in step s 102, be mapped corresponding with hot patch title is obtained The address information of data line where filename, 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, inquiry Interface skew address refers to relative address of the query interface in hot patch.It include title and phase in the symbol table of hot patch To several column datas such as address, the relative address information of data line where obtaining title corresponding with query interface title, 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, to obtain query interface Address.
S104 is entered step after obtaining query interface address, 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 register of target process is modified according to the address of interface function get_hotpatch_info (), with Calling of the simulated target process to interface letter get_hotpatch_info ().Here the register of target process is modified, with mould Quasi- target process posts process the specific method of the calling of interface function get_hotpatch_info () using existing Storage is modified in the method for realizing function call, for example including by modification instruction pointer register (IP register), is made The IA of its next execution is directed toward 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 executes 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 an implementation, when interface function get_hotpatch_info () quilt When calling, interface function get_hotpatch_info () returns to 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, such as chained list 200 is traversed to obtain the hot patch information of all hot patch functions by gauge outfit 201.Such as pass through gauge outfit 201 and the identifier of particular thermal patch function obtain the hot patch information of particular thermal patch function.Such as by gauge outfit 201 with And the identifier of specific hot patch obtains the hot patch information for all hot patch functions that the hot patch is included.
The gauge outfit 201 of return chained list 200 is only needed by calling interface function in this present embodiment, therefore interface function itself is set It sets relatively simple, accelerates the speed of service, reduce the cost of maintenance hot patch.
In other embodiments, multiple hot patch information data structure examples corresponding with hot patch function with array, tree, One of queue or Hash table mode connect, 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 root node of pointer, tree to array, team The operation of the head node of the head pointer or Hash table of column obtains the hot patch information of hot patch function.Multiple hot patch Information Numbers When being connected according to structure example in other equivalent modes, 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 to hot patch information data structure example 2021,2022,2023,2024.Specifically, setting It sets when interface function get_hotpatch_info () is called, returns to all hot patch information data structure examples 2021,2022,2023,2024.In other embodiments, when setting interface function get_hotpatch_info () is called, The parameters such as additional particular thermal patch function identifier simultaneously, so that interface function get_hotpatch_info () traversal is by multiple The chain that hot patch information data structure hotpatch_info example 2021,2022,2023,2024 corresponding with hot patch forms 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 to the reading of hot patch information data structure example by query interface Embodiment, it is not above to give an account of being limited of continuing, as long as meeting through query interface to hot patch information data structure example It is read.
After obtaining hot patch information, entering step S105 terminates to inquire, and shows vulcanizing on target process to user Fourth information.Since when calling query interface, query interface is operated in target process, thus can dynamic realtime it is anti- Reflect the information of hot patch in target process.
In the embodiment of a deformation, query interface is interface variables, such as interface variables hotpatch_info_list. Variate-value by reading interface variables hotpatch_info_list obtains hot patch information data structure hotpatch_ Info example 2021,2022,2023,2024.
Specifically, being passed through according to the address of the interface variables hotpatch_info_list obtained in step S103 Ptrace function call address above mentioned, to obtain the variate-value of variable hotpatch_info_list.Ptrace function is Linux The system function of system provides a kind of mode for enabling parent process to monitor and control 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 a manner of chained list 200 when being connected, and as an implementation, reads interface variables hotpatch_info_list, Interface variables hotpatch_info_list returns to the gauge outfit 201 of chained list 200, chained list 200 is traversed by gauge outfit 201, to obtain Hot patch information.Specifically, according to the address of interface variables hotpatch_info_list, by ptrace function call Location, to obtain the chain that multiple hot patch information data structure hotpatch_info examples 2021,2022,2023,2024 form Then the gauge outfit 201 of table 200 traverses chained list 200 by gauge outfit 201, obtains all hot patch information data structure hotpatch_ The address of info example 2021,2022,2023,2024, then by ptrace function call, obtain each hot patch information data Structure hotpatch_info example 2021, the value of 2022,2023,2024 corresponding variable members.
Other methods in variant embodiment are similar with former embodiment, referring in particular to the above-mentioned description to former embodiment, Details are not described herein again.
It should be noted that in addition to interface function and interface variables, it can also be by the way of other query interfaces, only Hot patch information data structure example can be read by the calling to query interface by meeting.
It can be seen that from the description above to hot patch information query method, it includes hot patch that the present invention defines 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 into target process, by calling the query interface operated in target process, to obtain Obtain hot patch information.Therefore the present invention does not need additionally to be arranged configuration file for recording hot patch information, and all information is all It is stored in the hot patch of target process, therefore will not lose or damage there is a situation where information, improve hot patch information The reliability and stability of inquiry, and then ensured the stability of whole hot patch load.
Simultaneously the present invention hot patch information is stored in inside hot patch, therefore store, change hot patch information it is more fast Fast and reliability is higher.Due to being dynamic realtime for the inquiry of hot patch information, hot patch message delay will not occur The case where, inquiry reliability is guaranteed, and so as to ensure that the loophole of software systems is repaired in time, guarantees software fortune Capable safety, avoids software systems from collapsing.For example, the technical solution when the embodiment of the present invention is applied to cloud computing industry Virtualization software reparation, avoid virtual machine from causing user that can not normally access server because of collapse.It is understood that this The hot patch information query method of inventive embodiments also can be applied in the example that other repair software.
The present invention also provides a kind of hot patch information query device, Fig. 4 is hot patch information query device of the invention An example module diagram.
As shown in figure 4, the hot patch information query device 1 in the present embodiment includes hot patch generation unit 101, list is judged Member 102, computing unit 103 and call unit 104.
Wherein, hot patch generation unit 101 in hot patch for defining hot patch information data structure and generating reading The query interface of hot patch information data structure example 2021,2022,2023,2024.Judging unit 102 is for judging 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 query interface, and obtains hot patch information data structure example by query interface.
In conjunction with Fig. 1, Fig. 2, Fig. 3 and Fig. 4, hot patch information query device 1 is referring to above hot patch information issuer Method and work.
When executing step S101, i.e. pre-generatmg hot patch by hot patch generation unit 101 first, packet is defined in hot patch It includes the hot patch information data structure of hot patch information and generates and read hot patch information data structure example 2021,2022, 2023,2024 query interface.Query interface is again arranged to interface function or interface variables.
Then judging unit 102 executes step S102, that is, judges whether hot patch is loaded.When judging that hot patch is not added When load, terminate the process of inquiry hot patch information, and returning to hot patch state to user is unloading.
When judging unit 102 judges that hot patch is loaded, then step S103 is executed by computing unit 103, first in mesh The address of hot patch is obtained in the maps file of mark process, and query interface offset ground is then obtained in the symbol table of hot patch The two is added to obtain the address of query interface by location.
Then, call unit 104 is called query interface according to the address of query interface.Query interface target into It is run in journey, and hot patch information data structure example 2021,2022,2023,2024 corresponding to hot patch function is passed through Query interface feedback.The acquisition hot patch information data structure example 2021 of call unit 104,2022,2023,2024, that is, Hot patch information.
As described in specific process of the method described in above-mentioned hot patch information query method, no longer repeat one by one herein.
Hot patch information query device 1 of the invention is individually for a device in the present embodiment, in other embodiments, Hot patch information query device is divided and separately includes in hot patch producing device and hot patch managing device.For example, Hot patch generation 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 a kind of application of hot patch inquiry.During realization of the invention, it can be related to To the application of multiple software function modules.Such as reading over application documents, accurate understanding realization principle and invention of the invention After purpose, in the case where combining existing well-known technique, the software that those skilled in the art can grasp completely with it is compiled Journey skill is able to achieve the present invention, by all embodiments in the present invention, embodiment, the technical characteristic in variant embodiment carry out from By combining.Aforementioned hot patch generation method and other implementation details of hot patch loading method are implemented referring to the prior art.
The above is only specific application examples of the invention, are not limited in any way to protection scope of the present invention.Except above-mentioned Outside embodiment, the present invention can also have other embodiment.All technical solutions formed using equivalent substitution or equivalent transformation, It falls within scope of the present invention.

Claims (13)

1. a kind of hot patch information query method, it is characterised in that comprising steps of
S101: when pre-generatmg hot patch, hot patch information data structure is defined in the hot patch, the hot patch includes extremely A few hot patch function, the hot patch letter of the corresponding hot patch function of each hot patch information data structure example Breath generates the query interface for reading the hot patch information data structure example in the hot patch;
S102: judging whether the hot patch is loaded, if so, thening follow the steps S103, looks into if it is not, then terminating hot patch information It askes;
S103: the address of the query interface is calculated;
S104: being called query interface according to the address of the query interface, and by described in query interface acquisition Hot patch information data structure example, to obtain the hot patch information.
2. hot patch information query method as described in claim 1, which is characterized in that
It is described to judge whether the hot patch is loaded and include:
The hot patch is searched in the maps file of target process, finds the hot patch in the maps file of target process When, judge that the hot patch is loaded, when not finding the hot patch in the maps file of target process, is vulcanized described in judgement Fourth is not loaded.
3. hot patch information query method as described in claim 1, which is characterized in that
The address for calculating query interface includes:
The address that hot patch is obtained in the maps file of target process, obtains query interface offset address in symbol table, will The address of the hot patch is added with the interface skew address to obtain the address of the query interface.
4. hot patch information query method as described in claim 1, which is characterized in that
The query interface is interface function.
5. hot patch information query method as claimed in claim 4, which is characterized in that
The address according to the query interface is called query interface, and obtains the heat by the query interface Patch information data structure instance includes:
The register of target process is modified, according to the address of the query interface to simulate the target process to the interface letter Several calling.
6. hot patch information query method as described in claim 1, which is characterized in that
The query interface is interface variables.
7. hot patch information query method as claimed in claim 6, which is characterized in that
The address according to the query interface is called query interface, and obtains the heat by the query interface The step of patch information data structure instance includes:
The variate-value of the interface variables is directly read by the address of the query interface.
8. hot patch information query method as described in claim 1, which is characterized in that
Multiple hot patch information data structure examples corresponding with the hot patch function are with chained list, array, tree, queue or Hash One of table mode connects,
When the query interface is called, the query interface correspondingly returns to the gauge outfit of the chained list, the pointer of array, tree Root node, the head pointer of queue or the head node of Hash table.
9. hot patch information query method as described in claim 1, which is characterized in that
Multiple hot patch information data structure examples corresponding with the hot patch function are with chained list, array, tree, queue or Hash One of table mode connects,
When the query interface is called, the query interface returns to 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 further comprise the steps of:
When the hot patch function is loaded, the reality of hot patch information data structure corresponding to the hot patch function is created Example.
11. hot patch information query method as claimed in claim 10, it is characterised in that further comprise the steps of:
When hot patch function status variation, hot patch Information Number corresponding to the hot patch function to state change It is written and read according to structure example.
12. hot patch information query method as claimed in claim 11, it is characterised in that further comprise the steps of:
When the hot patch function is unloaded, the reality of hot patch information data structure corresponding to the hot patch function is deleted Example.
13. a kind of hot patch information query device characterized by comprising
Hot patch generation unit defines hot patch information data structure, institute when being used for pre-generatmg hot patch in the hot patch Stating hot patch includes at least one hot patch function, the corresponding hot patch function of each hot patch information data structure example Hot patch information generates the query interface for reading the hot patch information data structure example in the hot patch;
Judging unit when judging that the hot patch is not loaded, terminates inquiry for judging whether the hot patch is loaded;
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 The address of query interface is called 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 CN106610857A (en) 2017-05-03
CN106610857B true 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)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943513B (en) * 2017-12-11 2021-03-26 北京奇虎科技有限公司 Patch package identification method and device and terminal
CN110196730B (en) * 2018-08-30 2023-04-18 腾讯科技(深圳)有限公司 Hot patch management method, device and storage medium of application program
CN112015491B (en) * 2019-05-30 2022-08-09 华为技术有限公司 Method, device and computer storage medium for realizing function jump
CN112612530B (en) * 2019-09-18 2022-05-17 华为技术有限公司 Class query method and device
US12056483B2 (en) * 2019-10-31 2024-08-06 Google Llc Memory efficient software patching for updating applications on computing devices
CN111158735B (en) * 2019-12-05 2023-03-31 青岛海信移动通信技术股份有限公司 Hot patch file processing method and communication terminal
CN113760340B (en) * 2020-06-05 2024-02-20 大唐移动通信设备有限公司 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

Also Published As

Publication number Publication date
CN106610857A (en) 2017-05-03

Similar Documents

Publication Publication Date Title
CN106610857B (en) A kind of hot patch information query method and device
CN102650966B (en) A kind of embedded software test method of Reuse-Oriented and test macro thereof
US9507697B2 (en) Completing functional testing
CN103559449B (en) The detection method of a kind of code change and device
JP2018055645A (en) Computer system, software update method by computer system, and program therefor
US9824000B1 (en) Testing calling code dynamically with random error injection based on user-specified configuration
US10452389B2 (en) Computer-implemented method for editing data object variants
CN105022739A (en) Data storage method and device
CN102841837A (en) Software and hardware co-verification method based on simulator and system thereof
US20210064644A1 (en) Yaml configuration modeling
US8874966B1 (en) Storage device error simulator tool
US9262301B2 (en) Observability control with observability information file
CN113918452A (en) Industrial software compatibility testing method under multi-country productization platform
US12109704B2 (en) Simulation signature keys for robotic simulations
CN110647349B (en) Method for realizing continuous delivery of iOS APP
CN110209565A (en) A kind of metadata schema adjustment method and its device
CN116010015B (en) Method, device, equipment and storage medium for generating right key menu of monitoring picture
US11593078B2 (en) Reload ordering for executable code modules
US20170364340A1 (en) Systems and Methods for Using Error Correction and Pipelining Techniques for an Access Triggered Computer Architecture
WO2017088547A1 (en) Data upgrading method and apparatus
KR100772881B1 (en) Apparatus and method for checking self modifying code
CN112307589B (en) Unit working condition creation method and device, electronic equipment and storage medium
CN114218666A (en) Simulation preprocessing method and device
CN112231165A (en) Memory fault simulation method based on link library injection and memory mapping mode
CN101819608A (en) Device and method for accelerating instruction fetch in microprocessor instruction-level random verification

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