Process stack data inspection method, device and equipment
By performing process stack data inspection in a multiprocessor system in parallel, the problems of high time complexity and high manual screening cost in traditional methods are solved, and efficient and reliable data inspection is achieved, which is suitable for multiprocessor environments.
Patent Information
- Application Number
- CN202110819429.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-20
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2041-07-20
AI Technical Summary
Traditional stack security checking methods have high time complexity in multiprocessor systems, resulting in long downtime, and manual screening methods are costly and poorly versatile, making it impossible to effectively process large amounts of process stacks and target data.
By obtaining data inspection requests, determining the process stack collection and target data collection, and using multiple processors to perform data inspection operations in parallel, the data inspection process is simplified, time complexity and manual intervention are reduced, and efficiency is improved.
It realizes efficient and reliable process stack data inspection in multiprocessor systems, reduces downtime, improves the quality and efficiency of data inspection, and is suitable for a large number of processes and target data processing.
Smart Images

Figure CN113608846B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device and equipment for checking data of a process stack. Background Art
[0002] In the process of operating system application, the stack safety check mechanism is of great significance for maintaining the consistency and accuracy of data processing. The traditional stack safety check mechanism is: check the code address of the function call stack frame of each thread in the shutdown state. If it appears in the code segment of any replaced function, it means that there is a thread executing the replaced function. At this time, the stack is unsafe. If data is directly replaced or updated, it is easy to cause inconsistent data semantics, and even system crashes. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus and device for checking data of a process stack, which can enable multiple processors to perform data checking operations on process stacks in multiple process stack sets in parallel, thereby improving the quality and efficiency of the data checking operation.
[0004] In a first aspect, an embodiment of the present application provides a method for checking data of a process stack, comprising:
[0005] Get data inspection request;
[0006] Based on the data inspection request, determining at least one process stack set, wherein the process stack set includes at least one process stack that needs to perform a data inspection operation;
[0007] Determining a processor corresponding to the at least one process stack set;
[0008] The processor is used to perform a data check operation on the process stacks in the process stack set to obtain a data check result.
[0009] In a second aspect, an embodiment of the present application provides a data inspection device for a process stack, comprising:
[0010] A first acquisition module, used to acquire a data inspection request;
[0011] A first determining module, configured to determine at least one process stack set based on the data inspection request, wherein the process stack set includes at least one process stack on which a data inspection operation is required;
[0012] The first determination module is further used to determine the processor corresponding to the at least one process stack set;
[0013] The first processing module is used to use the processor to perform a data check operation on the process stacks in the process stack set to obtain a data check result.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, and a processor; wherein the memory is used to store one or more computer instructions, wherein when the one or more computer instructions are executed by the processor, the data checking method of the process stack shown in the first aspect above is implemented.
[0015] In a fourth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, wherein the computer program enables a computer to implement the process stack data checking method shown in the first aspect when executed.
[0016] In a fifth aspect, an embodiment of the present invention provides a method for checking data of a process stack, comprising:
[0017] Acquiring at least one target data for implementing a data checking operation;
[0018] determining the number of processors used for data inspection operations on all process stacks;
[0019] Dividing the at least one target data based on the number of the processors to obtain a target data set;
[0020] The processor is used to perform a data check operation on the target data and all process stacks included in the target data set to obtain a data check result.
[0021] In a sixth aspect, an embodiment of the present invention provides a data inspection device for a process stack, comprising:
[0022] A second acquisition module, used to acquire at least one target data for implementing a data checking operation;
[0023] A second determination module is used to determine the number of processors used to perform data checking operations on all process stacks;
[0024] A second partitioning module, configured to partition the at least one target data based on the number of the processors to obtain a target data set;
[0025] The second processing module is used to use the processor to perform a data checking operation on the target data and all process stacks included in the target data set to obtain a data checking result.
[0026] In the seventh aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the data checking method of the process stack shown in the fifth aspect above.
[0027] In an eighth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, wherein the computer program enables a computer to implement the process stack data checking method shown in the fifth aspect when executed.
[0028] In a ninth aspect, an embodiment of the present invention provides a method for checking data of a process stack, comprising:
[0029] Get data inspection request;
[0030] Based on the data inspection request, determining at least one data inspection task, wherein the data inspection task includes at least one of the following: a process stack set and a target data set;
[0031] determining a processor corresponding to the data inspection task;
[0032] The processor is used to perform a data checking operation on the data checking task to obtain a data checking result.
[0033] In a tenth aspect, an embodiment of the present invention provides a data inspection device for a process stack, comprising:
[0034] A third acquisition module is used to obtain a data inspection request;
[0035] A third determination module is used to determine at least one data inspection task based on the data inspection request, wherein the data inspection task includes at least one of the following: a process stack set and a target data set;
[0036] The third determining module is used to determine the processor corresponding to the data checking task;
[0037] The third processing module is used to use the processor to perform a data checking operation on the data checking task to obtain a data checking result.
[0038] In the eleventh aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the data checking method of the process stack shown in the above-mentioned ninth aspect.
[0039] In a twelfth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, wherein the computer program enables a computer to implement the data checking method of the process stack shown in the ninth aspect when executed.
[0040] The technical solution provided by the embodiment of the present application determines at least one process stack set through the obtained data check request, and determines the processor corresponding to the at least one process stack set, and then uses the processor to perform data check operations on the process stacks in the process stack set, thereby effectively realizing that multiple processors in the system can perform data check operations on the process stacks in multiple process stack sets in parallel. In addition, the implementation method is simple and reliable, with low time complexity. The more processes and target data need to be processed in the process stack, the more significant the downtime advantage of the data check operation. Specifically, the downtime required by the implementation method is less than the downtime required by the existing implementation method, thereby improving the quality and efficiency of the data check operation and ensuring the practicality of the method. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 A schematic diagram of a scenario of a process stack data checking method provided in an embodiment of the present application;
[0043] Figure 2 A schematic diagram of a process stack data checking method provided in an embodiment of the present application;
[0044] Figure 3 A flowchart of using a processor to perform a data check operation on a process stack in the process stack set to obtain a data check result is provided in an embodiment of the present application;
[0045] Figure 4 A flowchart of another method for checking data of a process stack provided in an embodiment of the present application;
[0046] Figure 5 A schematic flow chart of using the processor to perform a data check operation on a process stack in the process stack set to obtain a sub-check result corresponding to the processor, provided in an embodiment of the present application;
[0047] Figure 6A schematic diagram of using a processor to perform a data check operation on the stack frame address and the at least one target data provided in an embodiment of the present application Figure 1 ;
[0048] Figure 7 A schematic diagram of using a processor to perform a data check operation on the stack frame address and the at least one target data provided in an embodiment of the present application Figure 2 ;
[0049] Figure 8 A flowchart of another method for checking data of a process stack provided in an embodiment of the present application;
[0050] Fig. 9 A schematic diagram of a process for determining the target data to be checked corresponding to the stack frame address in the at least one target data by using a binary search algorithm provided in an embodiment of the present application Figure 1 ;
[0051] Fig.10 A schematic diagram of a process for determining the target data to be checked corresponding to the stack frame address in the at least one target data by using a binary search algorithm provided in an embodiment of the present application Figure 2 ;
[0052] Fig.11 A flowchart of another method for checking data of a process stack provided in an embodiment of the present application;
[0053] Fig.12 A flowchart of another method for checking data of a process stack provided in an embodiment of the present application;
[0054] Fig.13 A flowchart of a data checking method for a process stack provided in an application embodiment of the present application;
[0055] Fig.14 A schematic diagram of addresses of multiple target functions provided for application embodiments of the present application;
[0056] Fig.15 A schematic diagram of the structure of a data checking device for a process stack provided in an embodiment of the present application;
[0057] Fig.16 for Fig.15 A schematic diagram of the structure of an electronic device corresponding to the data checking device of the process stack shown;
[0058] Fig.17 A schematic diagram of the structure of another process stack data inspection device provided in an embodiment of the present application;
[0059] Fig.18 for Fig.17A schematic diagram of the structure of an electronic device corresponding to the data checking device of the process stack shown;
[0060] Fig.19 A schematic diagram of the structure of another process stack data inspection device provided in an embodiment of the present application;
[0061] Fig. 20 for Fig.19 A schematic structural diagram of an electronic device corresponding to the data inspection device of the process stack shown. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0063] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms of "a", "said", and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.
[0064] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0065] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0066] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.
[0067] In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.
[0068] In order to facilitate those skilled in the art to understand the technical solution provided by the embodiment of the present application, the following is an explanation of the relevant technology: During the operation of the operating system, the user can perform data replacement or data upgrade operations on the operating system kernel according to application requirements. Taking the Linux operating system as an example, since the operating system kernel includes multiple processors CPU, therefore, when performing data replacement or data upgrade operations, the process stack being executed by a certain CPU may include data that needs to be replaced or upgraded. For example: the Linux system kernel includes: the first CPU and the second CPU, the process stack being executed by the first CPU includes the target function, and the process stack being executed by the second CPU does not include the target function. At this time, if the data check operation is not performed and the data replacement or data upgrade operation is performed directly, the data in the process stack being executed by the first CPU will be the target function before the data replacement operation. At this time, if the first CPU and the second CPU run the target function at the same time, the data processing results obtained by the two CPUs are different.
[0069] In addition, if the target function of the data replacement operation or the data upgrade operation has a sleep node, when the CPU executes the sleep node of the target function, it can first skip the sleep node of the target function and perform other data processing operations; if no data check operation is performed, after the data update operation or the data optimization operation, it is easy for the address segment corresponding to the target function to not be found, making the CPU unable to perform normal data processing operations, and thus easily causing the system to crash.
[0070] As can be seen from the above, the data check operation of the process stack is of great significance. In the traditional technology, the data check method of the process stack includes the following steps: using the kernel shutdown mechanism "stop_machine" to let the CPU traverse the stack frames of all threads, wherein the kernel shutdown mechanism can make all CPUs enter the shutdown running state, and then execute the corresponding data based on the data check request. Specifically, in the shutdown state, the functions being executed in the process stack are compared one by one to see whether they are the target functions to be replaced, that is, to check whether the data being executed in the process stack appears in the code segment interval of any replaced function. If the data appears in the code segment interval of the replaced function, it means that a process is executing the replaced function. At this time, the stack is unsafe and data replacement or data optimization operations cannot be performed. If the data does not appear in the code segment interval of the replaced function, it means that the process does not execute the replaced function. At this time, the stack is safe and data replacement or data optimization operations can be performed.
[0071] Although the above method implements the security check operation of the process stack, the above implementation is very cumbersome and has a high time complexity. The more threads and target functions there are, the longer the system downtime required. Since the downtime will cause the data processing tasks of all process stacks to be suspended, the above implementation has limitations.
[0072] In addition, traditional technology also provides another lightweight stack safety check method, which is a static stack safety check method. Specifically, the process stacks that need to perform stack safety check operations are initially screened through manual analysis. This effectively implements the screening of some process stacks that need to perform stack safety operations when compiling the kernel, effectively reducing the data processing volume and time complexity. However, the above implementation method requires manual screening operations, which not only increases labor costs, but also has poor versatility and is not suitable for replacement operations on all target functions.
[0073] In order to solve the above technical problems, this embodiment provides a process stack data inspection method, device and equipment. The execution subject of the method can be a process stack data processing device, and the process stack data processing device can be connected to a client for communication. Figure 1 As shown:
[0074] Among them, the client can be any computing device with a certain data transmission capability. In addition, the basic structure of the client may include: at least one processor. The number of processors depends on the configuration and type of the client. The client may also include a memory, which may be volatile, such as RAM, or non-volatile, such as read-only memory (ROM), flash memory, etc., or may include both types at the same time. The memory usually stores an operating system (OS), one or more application programs, and may also store program data, etc. In addition to the processing unit and the memory, the client also includes some basic configurations, such as a network card chip, an IO bus, a display component, and some peripheral devices, etc. Optionally, some peripheral devices may include, for example, a keyboard, a mouse, an input pen, a printer, etc. Other peripheral devices are well known in the art and will not be described in detail here. Optionally, the client may be a PC (personal computer) terminal, a handheld terminal (e.g., a smart phone, a tablet computer), etc.
[0075] The data processing device of the process stack refers to a device that can provide data processing services of the process stack in a network virtual environment, and usually refers to a device that uses the network to perform information planning and data processing operations of the process stack. In terms of physical implementation, the data processing device of the process stack can be any device that can provide computing services, respond to service requests, and perform processing, for example: it can be a cluster server, a conventional server, a cloud server, a cloud host, a virtual center, etc. The composition of the data processing device of the process stack mainly includes a processor, a hard disk, a memory, a system bus, etc., which is similar to a general computer architecture.
[0076] In the above embodiment, the client can establish a network connection with the data processing device of the process stack, and the network connection can be a wireless or wired network connection. If the client and the data processing device of the process stack are connected in communication, the network standard of the mobile network can be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), WiMax, 5G, etc.
[0077] In an embodiment of the present application, the client can obtain a data check request. Specifically, this embodiment does not limit the specific implementation method for the client to obtain the data check request. For example, an interactive interface is provided on the client, and the execution operation input by the user is obtained through the interactive interface, and the data check request is obtained by executing the operation; or, a specific interface can be provided on the client, and the data check request can be obtained through the specific interface, so that the client can stably obtain the data check request. After obtaining the data check request, the data check request can be uploaded to the data check device of the process stack, so that the data check device can perform data analysis and processing on the uploaded data check request.
[0078] The data inspection device of the process stack is used to receive the data inspection request uploaded by the client, and then the data inspection device can analyze and process the data inspection request. Specifically, at least one process stack set can be determined first, wherein the process stack set can include at least one process stack that needs to perform a data inspection operation. After determining at least one process stack set, the processor corresponding to the at least one process stack set is then determined. It can be understood that different process stack sets can correspond to different processors. The processor can then be used to perform a data inspection operation on the process stacks in the process stack set, so that the data inspection result can be obtained, and the data inspection operation of the process stack is effectively realized.
[0079] The technical solution provided in this embodiment determines at least one process stack set through the obtained data check request, and determines the processor corresponding to at least one process stack set, and then uses the processor to perform data check operations on the process stacks in the process stack set, thereby effectively realizing that multiple processors in the system can perform data check operations on the process stacks in multiple process stack sets in parallel. In addition, the implementation method is simple and reliable, with low time complexity. The more processes and target data need to be processed in the process stack, the more significant the downtime advantage of the data check operation. Specifically, the downtime required by the implementation method is less than the downtime required by the existing implementation method, thereby improving the quality and efficiency of the data check operation and ensuring the practicality of the method.
[0080] The following is a detailed description of the process stack data inspection method, device and equipment provided by each embodiment of the present application through an exemplary application scenario.
[0081] Figure 2 A flowchart of a process stack data checking method provided in an embodiment of the present application; see attached Figure 2As shown, this embodiment provides a method for checking data of a process stack. The execution subject of the method may be a data processing device of a process stack. It can be understood that the data processing device of the process stack may be implemented as software or a combination of software and hardware. Specifically, the method for checking data of a process stack may include:
[0082] Step S201: Obtain a data inspection request.
[0083] Step S202: Based on the data check request, determine at least one process stack set, wherein the process stack set includes at least one process stack that needs to perform a data check operation.
[0084] Step S203: Determine a processor corresponding to at least one process stack set.
[0085] Step S204: using the processor to perform a data check operation on the process stacks in the process stack set to obtain a data check result.
[0086] The following is a detailed description of each of the above steps:
[0087] Step S201: Obtain a data inspection request.
[0088] Among them, during the operation of the operating system (Windows system, Linux system, etc.), the operating system kernel (Windows kernel, Linux kernel, etc.) can be regularly or irregularly performed a data check operation, and the data check operation can realize data optimization, data update, etc. on at least part of the data of the operating system kernel. When the data check operation is performed regularly on the operating system kernel, a data check request can be automatically generated based on a set period; when the data check operation is performed irregularly on the operating system kernel, a data check request can be generated based on the user's design requirements or application requirements. In some instances, an interactive interface can be provided on the data processing device of the process stack, and the user can input an execution operation on the interactive interface, so that the data processing device can directly obtain the data check request based on the execution operation. In some other instances, the data processing device of the process stack can be connected to a client in communication, and the user can input an execution operation on the client. The client can generate a data check request based on the execution operation. After the client obtains the data check request, the data check request can be sent to the data processing device of the process stack, thereby ensuring that the data processing device can stably obtain the data check request.
[0089] Of course, the specific method of obtaining the data check request is not limited to the implementation method described above. Those skilled in the art may also adopt other methods to obtain the data check request, as long as the accuracy and reliability of obtaining the data check request can be guaranteed, which will not be repeated here.
[0090] Step S202: Based on the data check request, determine at least one process stack set, wherein the process stack set includes at least one process stack that needs to perform a data check operation.
[0091] After obtaining the data check request, at least one process stack set can be determined based on the data check request. It can be understood that each process stack set includes at least one process stack that needs to perform a data check operation. In some instances, in order to ensure the quality and efficiency of the data check operation, any two process stack sets in the at least one process stack set obtained may include the same number of process stacks. At this time, determining at least one process stack set based on the data check request in this embodiment may include: obtaining all process stacks in the kernel based on the data check request; determining the number of processors used to perform data check operations on the process stacks; and evenly dividing all process stacks based on the number of processors to obtain at least one process stack set, wherein the number of process stack sets is the same as the number of processors.
[0092] Specifically, after obtaining the data check request, all process stacks in the kernel that need to perform data check operations can be determined based on the data check request. At different times, the number of process stacks included in the operating system kernel can be the same or different. For example, at time T1, the number of process stacks included in the operating system kernel is Q1, and at time T2, the number of process stacks included in the operating system kernel is Q2. Q1 can be equal to Q2, or Q1 can be unequal to Q2. When the data check request is obtained, it means that the operating system kernel at this time needs to perform a data check operation. In order to implement the data check operation, the number of processors used to perform data check operations on the process stacks can be determined. It can be understood that different operating systems can correspond to different numbers of processors, and the data processing capabilities corresponding to any two processors included in the same operating system are the same.
[0093] After obtaining the number of processors, all process stacks can be evenly divided based on the number of processors, so that at least one process stack set can be obtained. At this time, the number of the obtained process stack sets is the same as the number of processors. For example, after obtaining a data check request, the number of all process stacks can be determined to be 128 based on the data check request. If the number of processors is determined to be 8, the number of all process stacks can be evenly divided based on the number of processors, so that 8 process stack sets can be obtained. At this time, each process stack set includes 128 / 8=16 processes, which effectively realizes the even division operation of all process stacks that need to perform data check operations, which is conducive to realizing that multiple processors perform data check operations on process stack sets in parallel, further improving the quality and efficiency of data check operations.
[0094] It should be noted that the execution order between the above steps of "based on the data check request, obtaining all process stacks in the kernel" and the step of "determining the number of processors used to perform data check operations on the process stacks" is not limited to the execution order described above. Those skilled in the art may also make adjustments based on specific application scenarios or design requirements. The step of "determining the number of processors used to perform data check operations on the process stacks" may be executed before the step of "based on the data check request, obtaining all process stacks in the kernel", or the step of "determining the number of processors used to perform data check operations on the process stacks" may be executed simultaneously with the step of "based on the data check request, obtaining all process stacks in the kernel", which will not be repeated here.
[0095] Step S203: Determine a processor corresponding to at least one process stack set.
[0096] After obtaining at least one process stack set, in order to improve the quality and efficiency of the data checking operation, the processor corresponding to each of the at least one process stack sets can be determined. Specifically, since any two processors configured in the same operating system have the same data processing capabilities, and the number of processors is the same as the number of process stack sets, different processors can be directly configured for different process stack sets, so that different process stack sets can correspond to different processors, which is conducive to realizing that multiple processors can perform data checking operations on their corresponding process stack sets in parallel.
[0097] Step S204: using the processor to perform a data check operation on the process stacks in the process stack set to obtain a data check result.
[0098] After configuring a processor for each process stack set, the processor can be used to perform a data check operation on the process stacks in the process stack set, so as to obtain a data check result. In some instances, in order to ensure the stability and reliability of the data check operation, the data check operation can be performed when the kernel running state is a shutdown state. At this time, the use of the processor to perform a data check operation on the process stacks in the process stack set in this embodiment may include: obtaining the kernel running state; when the kernel running state is a shutdown state, using the processor to perform a data check operation on the process stacks in the process stack set.
[0099] Specifically, when the operating system is running, the operating system kernel may have different running states, i.e., normal running state, shutdown state, etc. When a data check operation is required, in order to ensure the quality and efficiency of the data check operation, the kernel running state may be obtained. In some instances, the kernel running state may be obtained through a preset state machine. When the state machine identifier is 1, the kernel running state may be determined to be a normal running state. When the state machine identifier is 0, the kernel running state may be determined to be a shutdown state. Of course, those skilled in the art may also use other methods to obtain the kernel running state, as long as the accuracy and reliability of obtaining the kernel running state can be guaranteed.
[0100] After the kernel running state is acquired, the kernel running state can be analyzed and identified. When the kernel running state is in the shutdown state, since the kernel running environment at this time is more suitable for data checking operations, the processor can be used to perform data checking operations on the process stacks in the process stack set. When the kernel running state is in the normal running state, since the kernel running environment at this time is not suitable for data checking operations, it is forbidden to use the processor to perform data checking operations on the process stacks in the process stack set, which effectively ensures the stability and reliability of the data checking operation.
[0101] In some other instances, after obtaining the data check result, the method in this embodiment may include: when the data check result is a success state, allowing data update operations based on the data check request; when the data check result is a failure state, prohibiting data update operations based on the data check request.
[0102] The data check result may include a success state or a failure state. When the data check result is a success state, it means that the process stack being processed in all processors does not include the target data that needs to be updated or optimized, that is, it is safe to perform data update operations or data optimization operations at this time, and then the data update operation is allowed based on the data check request. When the data check result is a failure state, it means that the process stack being processed in the processor in the operating system kernel includes the target data that needs to be updated or optimized, that is, it is not safe to perform data update operations or data optimization operations at this time, and then the data update operation is prohibited based on the data check request, which effectively ensures the stability and reliability of the data update operation.
[0103] The data checking method for a process stack provided in the present embodiment determines at least one process stack set through the obtained data checking request, and determines the processor corresponding to at least one process stack set, and then uses the processor to perform data checking operations on the process stacks in the process stack set, thereby effectively realizing that multiple processors in the system can perform data checking operations on the process stacks in multiple process stack sets in parallel. Moreover, the implementation method is simple and reliable with low time complexity. The more processes and target data that need to be processed in the process stack, the more significant the downtime advantage of the data checking operation. Specifically, the downtime required by the implementation method is less than the downtime required by the existing implementation method, thereby improving the quality and efficiency of the data checking operation, ensuring the practicability of the method, and facilitating market promotion and application.
[0104] Figure 3 A flowchart of using a processor to perform a data check operation on a process stack in a process stack set to obtain a data check result is provided in an embodiment of the present application; refer to the attached Figure 3 As shown, this embodiment provides an implementation method for performing a data check operation on a process stack in a process stack set. Specifically, in this embodiment, using a processor to perform a data check operation on a process stack in a process stack set, obtaining a data check result may include:
[0105] Step S301: using a processor to perform a data check operation on a process stack in a process stack set, and obtaining a sub-check result of the processor.
[0106] Step S302: Based on all sub-inspection results, obtain a data inspection result.
[0107] After determining at least one process stack set and the processor corresponding to each process stack set, the processor can be used to perform data check operations on the process stacks in the corresponding process stack set. After each processor completes the data check operation, a sub-check result can be generated. The sub-check result can include any one of the following: check success, check failure. It can be understood that the data check operations performed by different processors are independent of each other, and therefore, the sub-check results corresponding to different processors are independent of each other.
[0108] After obtaining the sub-inspection results of all processors, analysis and processing can be performed based on all the sub-inspection results to obtain the data inspection result. In some instances, obtaining the data inspection result based on all the sub-inspection results may include: when all the sub-inspection results are inspection success, determining the data inspection result is in a successful state; when any sub-inspection result is inspection failure, determining the data inspection result is in a failed state.
[0109] Specifically, after all sub-check results are obtained, all sub-check results can be analyzed and processed. When all sub-check results are successful, it means that the process stack run by the processor at this time does not include the target data that needs to be optimized or updated, and the data check result can be determined to be a successful state. When any sub-check result among all sub-check results is a failed check, it means that there is a process stack run by the processor that includes the target data that needs to be optimized or updated, and the data check result can be determined to be a failed state.
[0110] In this embodiment, the processor is used to perform a data check operation on the process stack in the process stack set to obtain the sub-check result of the processor, and then the data check result is obtained based on all the sub-check results. Specifically, when the sub-check results of all the processors return a success status, it can be determined that the data check result is a success status, otherwise the data check result is determined to be a failure status, thereby effectively ensuring the accuracy and reliability of the determination of the data check result.
[0111] Figure 4 A flowchart of another process stack data inspection method provided in an embodiment of the present application; based on the above embodiment, refer to the attached Figure 4 As shown, before obtaining the data inspection result based on all the sub-inspection results, the method in this embodiment may further include:
[0112] Step S401: Obtain configuration requests corresponding to all processors.
[0113] Step S402: Based on the configuration request, any processor among all processors is configured as a main processor, and the main processor is used to obtain the sub-inspection results obtained by other processors.
[0114] After using the processor to perform data inspection operations on the process stacks in the process stack set and obtain the sub-inspection results of the processor, in order to facilitate the statistics of all sub-inspection results, a main processor can be specified among all processors so that the main processor can statistically obtain the sub-inspection results obtained by other processors. Specifically, a configuration request corresponding to all processors can be obtained, and the configuration request is used to implement the configuration operation of the main processor. After obtaining the configuration request, any processor among all processors can be configured as the main processor based on the configuration request. In some instances, the first processor among all processors can be used as the main processor. Of course, other processors can also be determined as the main processor. As long as the configuration operation of the main processor can be implemented, it will not be repeated here.
[0115] For example, the operating system kernel includes 6 processors, namely processor a, processor b, processor c, processor d, processor e and processor f. After obtaining the configuration request, processor a can be determined as the main processor based on the configuration request. At this time, processor a communicates with other processors respectively, so as to obtain the sub-inspection results of other processors, that is, processor a can obtain sub-inspection result B of processor b, sub-inspection result C of processor c, sub-inspection result D of processor d, sub-inspection result E of processor e and sub-inspection result F of processor f. Afterwards, the sub-inspection results of all processors can be obtained by accessing processor a, so as to obtain the data inspection result based on all the sub-inspection results.
[0116] In this embodiment, by obtaining configuration requests corresponding to all processors, and then configuring any one of all processors as the main processor based on the configuration request, the configuration operation of the main processor is effectively implemented, and it is convenient to obtain the sub-inspection results obtained by other processors based on the main processor, which is conducive to analyzing and processing all sub-inspection results to obtain data inspection results, further improving the stability and reliability of the use of this method.
[0117] Figure 5 The present invention provides a flowchart of using a processor to perform a data check operation on a process stack in a process stack set to obtain a sub-check result corresponding to the processor; based on the above embodiment, refer to the attached Figure 5 As shown, this embodiment provides an implementation method for performing a data check operation on a process stack in a process stack set. Specifically, in this embodiment, using a processor to perform a data check operation on a process stack in a process stack set, obtaining a sub-check result corresponding to the processor may include:
[0118] Step S501: Acquire at least one target data corresponding to a data inspection request.
[0119] Step S502: Determine the stack frame address corresponding to each process stack in the process stack set.
[0120] Step S503: using a processor to perform a data check operation on a stack frame address and at least one target data, and obtaining a sub-check result of the processor.
[0121] After obtaining the data check request, the data check request may be analyzed and processed to obtain at least one target data corresponding to the data check request. In some instances, there is a mapping relationship between the data check request and the target data, and the at least one target data corresponding to the data check request may be determined through the mapping relationship between the data check request and the target data, and the target data may include a target function that requires a data update operation or a data optimization operation.
[0122] In addition, in order to implement the data inspection operation, the stack frame address corresponding to each process stack in the process stack set can be determined. Specifically, the stack frame address corresponding to each process stack can be obtained through the stack climbing interface. It should be noted that the execution order between the above steps of "obtaining at least one target data corresponding to the data inspection request" and the step of "determining the stack frame address corresponding to each process stack in the process stack set" is not limited to the execution order described above. Those skilled in the art can also make adjustments according to specific application scenarios or design requirements. For example: the step of "determining the stack frame address corresponding to each process stack in the process stack set" can be executed before the step of "obtaining at least one target data corresponding to the data inspection request", or the step of "determining the stack frame address corresponding to each process stack in the process stack set" can be executed simultaneously with "obtaining at least one target data corresponding to the data inspection request", which will not be repeated here.
[0123] After acquiring at least one target data and a stack frame address, a processor may be used to perform a data check operation on the stack frame address and at least one target data, thereby obtaining a sub-check result of the processor. In some instances, performing a data check operation on the stack frame address and at least one target data using a processor to obtain a sub-check result of the processor may include: determining the address information and data range corresponding to each of the at least one target data; in at least one target data, using a binary search algorithm to determine the target data to be checked corresponding to the stack frame address, wherein the distance between the address information of the target data to be checked and the stack frame address is less than the distance between the address information of other target data and the stack frame address; using a processor to detect whether the stack frame address is within the data range corresponding to the target data to be checked; and determining a sub-check result corresponding to the processor based on the detection result.
[0124] Specifically, after obtaining at least one target data, the target data can be analyzed and processed to determine the address information and data range corresponding to at least one target data. It should be noted that there is no intersection between the address information and data range corresponding to any two target data. After obtaining the address information and data range corresponding to each target data, the stack frame address corresponding to each process stack in the process stack set can be analyzed and matched with the address information and data range corresponding to at least one target data determined above, that is, the stack frame address is analyzed and matched with the address ranges corresponding to multiple target data. In order to improve the quality and efficiency of data analysis and matching, a binary search algorithm can be used to first determine the target data to be checked corresponding to the stack frame address, wherein the distance between the address information of the target data to be checked and the stack frame address is less than the distance between the address information of other target data and the stack frame address.
[0125] After obtaining the target data to be checked, the processor can be used to detect whether the stack frame address is within the data range corresponding to the target data to be checked. After obtaining the detection result between the target data to be checked and the stack frame address, the sub-check result corresponding to the processor can be determined based on the detection result. In some instances, determining the sub-check result corresponding to the processor based on the detection result may include: when the stack frame address is within the data range corresponding to the target data to be checked, determining the sub-check result is a check failure; when the stack frame address is not within the data range corresponding to the target data to be checked, determining the sub-check result is a check success.
[0126] Specifically, when the stack frame address is within the data range corresponding to the target data to be checked, it means that the process stack being processed by the processor at this time includes the target data to be checked that requires a data update operation or a data optimization operation, and thus the sub-check result of the processor can be determined to be a check failure. When the stack frame address is not within the data range corresponding to the target data to be checked, it means that the process stack being processed by the processor at this time does not include the target data to be checked that requires a data update operation or a data optimization operation, and thus the sub-check result of the processor can be determined to be a check success.
[0127] For example, at least one target data obtained through the data check request may include: target data 1, target data 2, target data 3, and target data 4, wherein the address information and data range corresponding to target data 1 is [d1, d2], the address information and data range corresponding to target data 2 is [d3, d4], the address information and data range corresponding to target data 3 is [d5, d6], and the address information and data range corresponding to target data 4 is [d7, d8]. The address information and data ranges of the above target data do not intersect with each other.
[0128] After obtaining at least one target data, the stack frame address corresponding to each process stack in the process stack set can be determined. Figure 6 As shown, when the stack frame address corresponding to a process stack in the process stack set is D', the target data to be checked corresponding to the stack frame address can be determined based on the stack frame address D' and the binary search algorithm. The target data to be checked is the target data closest to the stack frame address. By comparing the stack frame address and the address information and data range corresponding to each target data, it can be determined that the target data to be checked corresponding to the stack frame address is target data 2. Figure 7As shown, when the stack frame address corresponding to a process stack in the process stack set is D``, the target data to be checked corresponding to the stack frame address can be determined based on the stack frame address D`` and the binary search algorithm. The target data to be checked is the target data closest to the stack frame address. By comparing the stack frame address and the address information and data range corresponding to each target data, it can be determined that the target data to be checked corresponding to the stack frame address is target data 4.
[0129] After taking the target data 2 as the target data to be checked, the processor can be used to detect whether the stack frame address is within the data range corresponding to the target data 2 determined above, and then the sub-check result corresponding to the processor can be determined based on the detection result, such as Figure 6 As shown, when it is detected that the stack frame address is within the data range corresponding to the target data 2, the sub-check result corresponding to the processor is determined to be a check failure based on the above detection result; correspondingly, after the target data 4 is used as the target data to be checked, the processor can be used to detect whether the stack frame address is within the data range corresponding to the target data 4 determined above, and then the sub-check result corresponding to the processor can be determined based on the detection result, such as Figure 7 As shown, when it is detected that the stack frame address is not within the data range corresponding to the target data 4, the sub-check result corresponding to the processor is determined to be a successful check based on the above detection result.
[0130] In this embodiment, by obtaining at least one target data corresponding to the data check request, and then determining the stack frame address corresponding to each process stack in the process stack set, and using the processor to perform a data check operation on the stack frame address and at least one target data, the accuracy and reliability of the sub-check result of the processor is effectively guaranteed.
[0131] Figure 8 A flowchart of another method for checking data of a process stack provided in an embodiment of the present application; based on the above embodiment, refer to the attached Figure 8 As shown, after obtaining at least one target data corresponding to the data inspection request, the method in this embodiment may further include:
[0132] Step S801: Determine the number of processors used to perform data checking operations on the process stack.
[0133] Step S802: Divide at least one target data based on the number of processors to obtain a target data set corresponding to the processors.
[0134] Step S803: using the processor to perform a data check operation on the target data and the stack frame address included in the target data set, and obtaining a sub-check result of the processor.
[0135] When performing a data check operation, in order to further improve the quality and efficiency of the data check operation, after obtaining at least one target data corresponding to the data check request, the number of processors used to perform the data check operation on the process stack can be determined, and then the at least one target data can be divided based on the obtained number of processors, so that a target data set corresponding to the processor can be obtained. After obtaining the target data set and the stack frame address, the processor can be used to perform a data check operation on the target data and the stack frame address included in the target data set, so that a sub-check result of the processor can be obtained.
[0136] For example, after obtaining at least one target data corresponding to a data check request, the number of processors used to perform data check operations on the process stack can be determined. Assuming that the number of target data is 200, and the number of processors determined to perform data check operations on the process stack is 64, at least one target data can be divided based on the number of processors to obtain a target data set corresponding to the processor. At this time, each target data set can include 3 to 4 target data, and the processors can then perform data check operations on the target data and stack frame addresses included in their respective target data sets. At this time, each processor CPU only needs to check 3 to 4 target data, which effectively realizes the division operation of data check tasks from the dimension of target data, thereby improving the quality and efficiency of data check operations.
[0137] In this embodiment, by determining the number of processors used to perform data checking operations on the process stack, and then dividing at least one target data based on the number of processors, a target data set corresponding to the processor is obtained, and the processor is used to perform data checking operations on the target data and stack frame addresses included in the target data set to obtain the sub-inspection results of the processor, thereby effectively realizing the division operation of the data checking task from the dimension of the target data, and improving the quality and efficiency of the analysis and processing of the sub-inspection results.
[0138] In some instances, after determining the address information corresponding to each of the at least one target data, the method in this embodiment may further include: sorting the at least one target data based on the address information.
[0139] In order to ensure the accuracy and reliability of using a binary search algorithm to determine the target data to be checked corresponding to the stack frame address, after determining the address information corresponding to at least one target data, the at least one target data can be sorted based on the address information. Specifically, the at least one target data can be sorted from large to small according to the address information, or the at least one target data can be sorted from small to large according to the address information.
[0140] Based on the above statements, please refer to the attached Fig. 9 As shown, this embodiment provides an implementation method for determining the target data to be checked corresponding to the stack frame address by using a binary search algorithm. Specifically, in this embodiment, in at least one target data, determining the target data to be checked corresponding to the stack frame address by using a binary search algorithm may include:
[0141] Step S901: Obtain a first address corresponding to at least one target data.
[0142] Step S902: In at least one target data, the target data whose first address is smaller than the stack frame address and whose distance between the first address and the stack frame address is smaller than the distance between the first address and the stack frame address of other target data is determined as the target data to be checked.
[0143] After acquiring at least one target data, the at least one target data can be analyzed and processed so as to obtain the first address corresponding to the at least one target data. After acquiring the first address corresponding to the at least one target data, the target data whose first address is smaller than the stack frame address and whose distance between the first address and the stack frame address is smaller than the distance between the first address and the stack frame address of other target data can be determined as the target data to be checked.
[0144] For example, see Attachment Figure 6 As shown, the target data includes target data 1, target data 2, target data 3 and target data 4. The first address corresponding to target data 1 is d1, the first address corresponding to target data 2 is d3, the first address corresponding to target data 3 is d5, and the first address corresponding to the target data is d7.
[0145] When the stack frame address is D', the stack frame address can be analyzed and compared with the head address corresponding to the above target data. Specifically, the head address smaller than the stack frame address can be obtained first, including d1 and d3, and then the distance information between the head address and the stack frame address determined above can be obtained, that is, the distance M1 between d1 and D', and the distance M2 between d2 and D'. The above M2 is smaller than M1, which means that the target data 2 corresponding to the distance M1 is determined as the target data to be checked, thereby ensuring the accuracy and reliability of obtaining the target data to be checked.
[0146] In this embodiment, by obtaining the first address corresponding to at least one target data, and then in at least one target data, determining the target data whose first address is smaller than the stack frame address and the distance between the first address and the stack frame address is smaller than the distance between the first address and the stack frame address of other target data as the target data to be checked, thereby effectively achieving the ability to find the target data to be checked that is closest to the stack frame address based on the first address, and then comparing whether the stack frame address falls within the code interval corresponding to the nearest target data to be checked, so as to implement the data checking operation.
[0147] Fig.10 A schematic diagram of a process for determining target data to be checked corresponding to a stack frame address in at least one target data using a binary search algorithm provided in an embodiment of the present application Figure 2 Based on the above embodiments, refer to the attached Fig.10 As shown, this embodiment provides another implementation method for determining the target data to be checked corresponding to the stack frame address. In this embodiment, in at least one target data, using a binary search algorithm to determine the target data to be checked corresponding to the stack frame address may include:
[0148] Step S1001: Obtain the last address corresponding to the target data.
[0149] Step S1002: In at least one target data, target data whose end address is greater than the stack frame address and whose distance between the end address and the stack frame address is less than the distance between the end address and the stack frame address of other target data is determined as the target data to be checked.
[0150] Among them, after obtaining the target data, the end address corresponding to the target data can be obtained. Specifically, the end address can be determined based on the first address of the target data and the data length of the target data. After the end address corresponding to the target data is obtained, the target data whose end address is greater than the stack frame address and the distance between the end address and the stack frame address is less than the distance between the end address and the stack frame address of other target data can be determined as the target data to be checked in at least one target data, thereby effectively achieving accurate and reliable acquisition of the target data to be checked.
[0151] For example, see Attachment Figure 6 As shown, the target data includes target data 1, target data 2, target data 3 and target data 4. The final address corresponding to target data 1 is d2, the final address corresponding to target data 2 is d4, the final address corresponding to target data 3 is d6, and the final address corresponding to the target data is d8.
[0152] When the stack frame address is D`, the stack frame address can be analyzed and compared with the end addresses corresponding to the above-mentioned target data respectively. Specifically, the end addresses greater than the stack frame address can be obtained first, including: d4, d6, and d8. Then, the distance information between the determined end addresses and the stack frame address is obtained respectively, that is, the distance M11 between d4 and D`, the distance M12 between d6 and D`, and the distance M13 between d8 and D`. Since M11 < M12 < M13, it indicates that the target data 2 corresponding to M11 is determined as the target data to be inspected, thus ensuring the accuracy and reliability of obtaining the target data to be inspected.
[0153] In this embodiment, by obtaining the end addresses corresponding to the target data, among at least one target data, the target data whose end address is greater than the stack frame address and the distance between the end address and the stack frame address is less than the distance between the end addresses of other target data and the stack frame address is determined as the target data to be inspected, thereby effectively realizing that the target data to be inspected closest to the stack frame address can be found based on the end address. Then, it is compared whether the stack frame address falls within the code interval corresponding to the closest target data to be inspected, so as to implement the data inspection operation.
[0154] Fig.11 It is a schematic flowchart of another method for checking data in a process stack provided by an embodiment of the present application; refer to the appendix Fig.11 As shown, this embodiment provides another method for checking data in a process stack. The execution subject of this method can be a data processing device for the process stack. It can be understood that the data processing device for the process stack can be implemented as software, or a combination of software and hardware. Specifically, the method for checking data in the process stack can include:
[0155] Step S1101: Obtain at least one target data for implementing the data inspection operation.
[0156] Among them, when a data inspection operation needs to be performed, at least one target data for implementing the data inspection operation can be obtained. For the target data, different data inspection operations can correspond to the same number of target data or different numbers of target data. Those skilled in the art can configure the number of target data according to specific application requirements or design requirements.
[0157] In addition, this embodiment does not limit the specific implementation method for obtaining at least one target data. For example, at least one target data can be stored in a preset area, and at least one target data can be obtained by accessing the preset area. Alternatively, at least one target data can be a data inspection device sent by the client to the process stack, so that the data inspection device can stably obtain at least one target data. Of course, those skilled in the art can also adopt other methods to obtain at least one target data for implementing the data inspection operation, as long as the accuracy and reliability of obtaining at least one target data can be guaranteed, which will not be repeated here.
[0158] Step S1102: Determine the number of processors used to perform data checking operations on all process stacks.
[0159] In order to implement the data check operation, the number of processors used to perform the data check operation on the process stack can be determined. It can be understood that different operating systems may correspond to different processors, and the processing capabilities of the processors included in the same operating system are the same.
[0160] In addition, for the data inspection device of the process stack, when the data inspection device runs a certain operating system, the data inspection device can be configured with multiple processors. It can be understood that different data inspection devices can correspond to different numbers of processors. For example: data inspection device 1 can correspond to 32 processors, data inspection device 2 can correspond to 64 processors, data inspection device 3 can correspond to 128 processors, and so on.
[0161] In addition, this embodiment does not limit the specific implementation method for determining the number of processors used to perform data inspection operations on all process stacks. Those skilled in the art can set it according to specific application scenarios or design requirements. For example, processor configuration information can be pre-configured in the data inspection device, and then the number of processors can be determined based on the processor configuration information. Of course, those skilled in the art can also use other methods to determine the number of processors, as long as the accuracy and reliability of determining the number of processors can be guaranteed, which will not be repeated here.
[0162] Step S1103: Divide at least one target data based on the number of processors to obtain a target data set.
[0163] In order to enable multiple processors to perform data checking operations in parallel, after obtaining the number of processors and at least one target data, the at least one target data can be divided based on the number of processors, so that a target data set can be obtained. In some instances, the number of target data sets obtained is the same as the number of processors.
[0164] For example, when the number of processors is 64 and the number of at least one target data is 200, the at least one target data can be divided into 64 target data sets based on the number of processors, and each target data set can include approximately 3 to 4 target data that require data checking operations.
[0165] Step S1104: using a processor to perform a data check operation on the target data and all process stacks included in the target data set to obtain a data check result.
[0166] After obtaining the target data set, the processor corresponding to each target data set can be determined. It can be understood that different target data sets can correspond to different processors, and then the processor can be used to perform data checking operations on the target data and all process stacks included in the corresponding target data sets, so as to obtain data checking results.
[0167] The data checking method for the process stack provided in the present embodiment obtains at least one target data for implementing the data checking operation, determines the number of processors for performing the data checking operation on all process stacks, and divides at least one target data based on the number of processors to obtain a target data set, and then uses the processor to perform the data checking operation on the target data included in the target data set and all process stacks to obtain the data checking result, thereby effectively realizing that multiple processors can perform the data checking operation on the target data included in the target data set and all process stacks in parallel. Moreover, the implementation method is simple and reliable with low time complexity. The more the number of processes and target data that need to be processed in the process stack, the more significant the downtime advantage of the data checking operation, thereby improving the quality and efficiency of the data checking operation, thereby ensuring the practicality and scope of application of the data checking operation, and facilitating market promotion and application.
[0168] Fig.12 A flowchart of another method for checking data in a process stack provided in an embodiment of the present application; see Attachment Fig.12 As shown, this embodiment provides another method for checking data of a process stack. The execution subject of the method may be a data processing device of a process stack. It can be understood that the data processing device of the process stack may be implemented as software or a combination of software and hardware. Specifically, the method for checking data of a process stack may include:
[0169] Step S1201: Obtain a data check request.
[0170] Among them, during the operation of the operating system (Windows system, Linux system, etc.), the operating system kernel (Windows kernel, Linux kernel, etc.) can be regularly or irregularly performed a data check operation, and the data check operation can realize data optimization, data update, etc. on at least part of the data of the operating system kernel. When the data check operation is performed regularly on the operating system kernel, a data check request can be automatically generated based on a set period; when the data check operation is performed irregularly on the operating system kernel, a data check request can be generated based on the user's design requirements or application requirements. In some instances, an interactive interface can be provided on the data processing device of the process stack, and the user can input an execution operation on the interactive interface, so that the data processing device can directly obtain the data check request based on the execution operation. In some other instances, the data processing device of the process stack can be connected to a client in communication, and the user can input an execution operation on the client. The client can generate a data check request based on the execution operation. After the client obtains the data check request, the data check request can be sent to the data processing device of the process stack, thereby ensuring that the data processing device can stably obtain the data check request.
[0171] Of course, the specific method of obtaining the data check request is not limited to the implementation method described above. Those skilled in the art may also adopt other methods to obtain the data check request, as long as the accuracy and reliability of obtaining the data check request can be guaranteed, which will not be repeated here.
[0172] Step S1202: Based on the data inspection request, determine at least one data inspection task, wherein the data inspection task includes at least one of the following: a process stack set, a target data set.
[0173] After obtaining the data inspection request, at least one data inspection task can be determined based on the data inspection request, wherein the data inspection task can include at least one of the following: a process stack set, a target data set. In some instances, at least one process stack set can be determined based on the data inspection request, and the above process stack set can include at least one process stack that needs to perform a data inspection operation. The implementation method and implementation effect of determining at least one process stack set based on the data inspection request in this embodiment are similar to the implementation method and implementation effect of step S202 in the above embodiment. For details, please refer to the above statement content, which will not be repeated here.
[0174] In some other examples, at least one target data set may be determined based on the data check request, and in this case, the target data set may include at least one target data that needs to be subjected to a data check operation. The implementation method and implementation effect of determining at least one target data set based on the data check request in this embodiment are similar to the implementation method and implementation effect of steps S1101 to S1103 in the above embodiment, and the above statements may be referred to for details, which will not be repeated here.
[0175] In other examples, at least one process stack set and at least one target data set may be determined based on the data check request. In this case, the process stack set may include at least one process stack that needs to be subjected to a data check operation, and the target data set may include at least one target data that needs to be subjected to a data check operation. It is understandable that the specific implementation method of determining at least one process stack set in this embodiment is similar to the specific implementation method of determining at least one process stack set in the above embodiment, and the specific implementation method of determining at least one target data set in this embodiment is similar to the specific implementation method of determining at least one target data set in the above embodiment. For details, please refer to the above statement, which will not be repeated here.
[0176] Step S1203: Determine the processor corresponding to the data inspection task.
[0177] After acquiring at least one data inspection task, in order to improve the quality and efficiency of the data inspection operation, the processor corresponding to at least one data inspection task can be determined. Specifically, since any two processors configured in the same operating system have the same data processing capabilities, and the number of processors is the same as the number of data inspection tasks, different processors can be directly configured for different data inspection tasks, so that different data inspection tasks can correspond to different processors. This is conducive to realizing that multiple processors can perform data inspection operations on their corresponding data inspection tasks in parallel.
[0178] Step S1204: using the processor to perform a data check operation on the data check task to obtain a data check result.
[0179] After configuring a processor for each data check task, the processor can be used to perform a data check operation on the process stack or target data corresponding to the data check task, so as to obtain a data check result. In some instances, in order to ensure the stability and reliability of the data check operation, the data check operation can be performed when the kernel operation state is a shutdown state. At this time, in this embodiment, performing a data check operation on the data check task using the processor and obtaining the data check result can include: obtaining the kernel operation state; when the kernel operation state is a shutdown state, performing a data check operation on the data check task using the processor.
[0180] In some other instances, after obtaining the data check result, the method in this embodiment may include: when the data check result is a success state, allowing data update operations based on the data check request; when the data check result is a failure state, prohibiting data update operations based on the data check request.
[0181] The data check result may include a success state or a failure state. When the data check result is a success state, it means that the process stack being processed in all processors does not include the target data that needs to be updated or optimized, that is, it is safe to perform data update operations or data optimization operations at this time, and then the data update operation is allowed based on the data check request. When the data check result is a failure state, it means that the process stack being processed in the processor in the operating system kernel includes the target data that needs to be updated or optimized, that is, it is not safe to perform data update operations or data optimization operations at this time, and then the data update operation is prohibited based on the data check request, which effectively ensures the stability and reliability of the data update operation.
[0182] The data checking method for the process stack provided in the present embodiment obtains a data checking request, determines at least one data checking task based on the data checking request, determines the processor corresponding to the data checking task, and then uses the processor to perform a data checking operation on the data checking task to obtain a data checking result, thereby effectively realizing that multiple processors can perform data checking operations on the data checking task in parallel. Moreover, the implementation method is simple and reliable with low time complexity. The more the number of processes and target data that need to be processed in the process stack, the more significant the downtime advantage of the data checking operation, thereby improving the quality and efficiency of the data checking operation, thereby ensuring the practicability and scope of application of the data checking operation, and facilitating market promotion and application.
[0183] For specific applications, refer to the attached Figure 13-14 As shown, this application embodiment provides a data inspection method for a process stack. The execution subject of the data inspection method for a process stack may be a data inspection device for a process stack. The data inspection device may be arranged in a data processing system. Specifically, when the data inspection method is executed by the data inspection device for a process stack, the following steps may be included.
[0184] Step 1: System / module initialization operation, obtain data check request.
[0185] Step 2: Determine at least one objective function for implementing the data inspection operation based on the data inspection request.
[0186] Step 3: Determine the address and range of at least one target function, and sort the addresses of the target functions before entering the shutdown state.
[0187] Specifically, the address and range of at least one target function are determined by an address acquisition function "get", wherein the code intervals of the target functions do not intersect, such as Fig.14 As shown, the objective functions include objective function 1, objective function 2, objective function 3 and objective function 4, that is, there is no intersection between the address information of any two of the above objective functions. After obtaining the addresses and ranges corresponding to each objective function, the objective functions can be sorted. For example, the order of the objective functions after sorting is objective function 3, objective function 2, objective function 4 and objective function 1 from high to low.
[0188] Step 4: Call the shutdown operation instruction, and control the system shutdown operation based on the shutdown operation instruction.
[0189] Specifically, in order to ensure the stability and reliability of the data checking operation, the shutdown operation instruction "stop_machine function" can be called and the shutdown operation can be performed based on the above-mentioned "stop_machine function".
[0190] Step 5: After the system enters the shutdown state, all process stacks in the system are evenly divided to obtain multiple process stack sets, each of which may include multiple process stacks.
[0191] Step 6: Obtain the processor CPU included in the system, configure a CPU for each process stack set, and use the CPU to perform data checking operations on the process stacks included in the corresponding process stack sets.
[0192] For each CPU, the CPU can view each stack frame of the process stack included in the process stack set. Specifically, the stack frame corresponding to each process stack in the process stack set can be obtained through a stack climbing interface.
[0193] After obtaining the stack frames corresponding to each process stack and the address and range of at least one target function, a binary search algorithm can be used to find the nearest target function whose first address is smaller than the stack frame address, and then compare whether the stack frame address falls within the code range of the target function. If so, the check fails; if not, the check succeeds.
[0194] In addition, in order to ensure the safety and reliability of the data check operation, for the multiple CPUs included in the system, one of the CPUs can be selected as the main CPU. At this time, the main CPU performs a data check operation on the process stack and the target function included in the corresponding process stack set to obtain a data check result. In addition, the main CPU can communicate with other CPUs and obtain the analysis and inspection results of other CPUs, so that the data check results of all CPUs can be obtained through the main CPU. When the data check results of all CPUs are successful, the data check result is determined to be successful, otherwise it can be determined that the data check result has failed.
[0195] Step 7: When the result of the data check operation is success, the data update operation is allowed based on the data check request; when the result of the data check operation is failure, the data update operation is prohibited based on the data check request.
[0196] The data checking method provided by the present application embodiment has a low time complexity. Assuming that the number of CPUs is C, the number of process stacks is T, the average stack depth is D, and the number of target functions replaced is N, the time complexity in the existing implementation is O(T*D*N), while the time complexity of the implementation in the present embodiment is O(T / C*D*logN). For example, the stack safety check time (excluding stop_machine time) in the same environment (96 CPUs, 20,500 threads and 193 target functions and the same number of tests) is 63ms on average in the prior art, while the average time of the implementation is 5.6ms, thereby effectively realizing that multiple processors can perform data checking operations on multiple data checking tasks in parallel, improving the quality and efficiency of the data checking operation, and the implementation is simple, reliable, and has a low time complexity. The more processes and target functions need to be processed in the data checking task, the shorter the downtime required for the data checking system of the process stack, thereby ensuring the practicality and scope of application of the data checking operation, which is conducive to market promotion and application.
[0197] Fig.15 A schematic diagram of a data checking device for a process stack provided in an embodiment of the present application; see attached Fig.15 As shown, this embodiment provides a data inspection device for a process stack, which can perform the above Figure 2 The data checking method of the process stack shown in the figure, specifically, the data checking device of the process stack may include:
[0198] A first acquisition module 11, used to acquire a data inspection request;
[0199] A first determining module 12 is used to determine at least one process stack set based on the data inspection request, wherein the process stack set includes at least one process stack that needs to perform a data inspection operation;
[0200] The first determination module 12 is further used to determine a processor corresponding to at least one process stack set;
[0201] The first processing module 13 is used to use a processor to perform a data check operation on the process stacks in the process stack set to obtain a data check result.
[0202] In some instances, when the first determination module 12 determines at least one process stack set based on a data check request, the first determination module 12 is used to execute: based on the data check request, obtaining all process stacks in the kernel; determining the number of processors used to perform data check operations on the process stacks; and uniformly dividing all process stacks based on the number of processors to obtain at least one process stack set, wherein the number of process stack sets is the same as the number of processors.
[0203] In some instances, when the first processing module 13 uses the processor to perform data checking operations on process stacks in a process stack set, the first processing module 13 is used to execute: obtaining the kernel running state; when the kernel running state is a shutdown state, using the processor to perform data checking operations on the process stacks in the process stack set.
[0204] In some instances, when the first processing module 13 uses the processor to perform a data check operation on the process stack in the process stack set to obtain a data check result, the first processing module 13 is used to execute: use the processor to perform a data check operation on the process stack in the process stack set to obtain a sub-check result of the processor; and obtain a data check result based on all the sub-check results.
[0205] In some examples, before obtaining the data inspection result based on all the sub-inspection results, the first acquisition module 11 and the first processing module 13 in this embodiment are used to perform the following steps:
[0206] A first acquisition module 11 is used to acquire configuration requests corresponding to all processors;
[0207] The first processing module 13 is used to configure any processor among all processors as a main processor based on the configuration request, and the main processor is used to obtain the sub-inspection results obtained by other processors.
[0208] In some instances, when the first processing module 13 obtains a data inspection result based on all sub-inspection results, the first processing module 13 is used to execute: when all sub-inspection results are inspection success, determining the data inspection result is in a success state; when any sub-inspection result is inspection failure, determining the data inspection result is in a failure state.
[0209] In some instances, when the first processing module 13 uses the processor to perform a data check operation on the process stack in the process stack set to obtain a sub-check result corresponding to the processor, the first processing module 13 is used to execute: obtaining at least one target data corresponding to the data check request; determining the stack frame address corresponding to each process stack in the process stack set; using the processor to perform a data check operation on the stack frame address and at least one target data to obtain a sub-check result of the processor.
[0210] In some examples, after obtaining at least one target data corresponding to the data inspection request, the first determination module 12 and the first processing module 13 in this embodiment are used to perform the following steps:
[0211] A first determination module 12, used to determine the number of processors used to perform data checking operations on the process stack;
[0212] The first processing module 13 is used to divide at least one target data based on the number of processors to obtain a target data set corresponding to the processor; and use the processor to perform a data check operation on the target data and stack frame address included in the target data set to obtain a sub-check result of the processor.
[0213] In some instances, when the first processing module 13 uses the processor to perform a data check operation on the stack frame address and at least one target data to obtain a sub-check result of the processor, the first processing module 13 is used to execute: determining the address information and data range corresponding to at least one target data; in at least one target data, using a binary search algorithm to determine the target data to be checked corresponding to the stack frame address, wherein the distance between the address information of the target data to be checked and the stack frame address is smaller than the distance between the address information of other target data and the stack frame address; using the processor to detect whether the stack frame address is within the data range corresponding to the target data to be checked; and determining the sub-check result corresponding to the processor based on the detection result.
[0214] In some examples, after determining the address information corresponding to the at least one target data, the first processing module 13 in this embodiment is used to execute: sorting the at least one target data based on the address information.
[0215] In some instances, when the first processing module 13 determines the target data to be checked corresponding to the stack frame address using a binary search algorithm in at least one target data, the first processing module 13 is used to execute: obtaining the first address corresponding to at least one target data; in at least one target data, determining the target data whose first address is smaller than the stack frame address and whose distance between the first address and the stack frame address is smaller than the distance between the first address and the stack frame address of other target data as the target data to be checked.
[0216] In some instances, when the first processing module 13 determines a sub-inspection result corresponding to the processor based on the detection result, the first processing module 13 is used to execute: when the stack frame address is within the data range corresponding to the target data to be checked, the sub-inspection result is determined to be an inspection failure; when the stack frame address is not within the data range corresponding to the target data to be checked, the sub-inspection result is determined to be an inspection success.
[0217] In some instances, after obtaining the data check result, the first processing module 13 in this embodiment is used to execute: when the data check result is a success state, data update operations are allowed based on the data check request; when the data check result is a failure state, data update operations are prohibited based on the data check request.
[0218] Fig.15 The device shown can perform Figure 1-Figure 10 , Figure 13-14 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Figure 1-Figure 10 , Figure 13-14 The implementation process and technical effects of this technical solution refer to Figure 1-Figure 10 , Figure 13-14 The description in the illustrated embodiment will not be repeated here.
[0219] In one possible design, Fig.15 The structure of the data inspection device of the process stack shown can be implemented as an electronic device, which can be a mobile phone, a tablet computer, a server, etc. Fig.16 As shown, the electronic device may include: a first processor 21 and a first memory 22. The first memory 22 is used to store the corresponding electronic device to execute the above Figure 1-Figure 10 , Figure 13-14 The program of the process stack data checking method provided in the illustrated embodiment, the first processor 21 is configured to execute the program stored in the first memory 22 .
[0220] The program includes one or more computer instructions, wherein the one or more computer instructions, when executed by the first processor 21, can implement the following steps: obtaining a data check request; based on the data check request, determining at least one process stack set, wherein the process stack set includes at least one process stack that requires a data check operation; determining a processor corresponding to at least one process stack set; and using the processor to perform a data check operation on the process stacks in the process stack set to obtain a data check result.
[0221] Furthermore, the first processor 21 is also used to execute the aforementioned Figure 1-Figure 10 , Figure 13-14 All or part of the steps in the illustrated embodiments.
[0222] The structure of the electronic device may further include a first communication interface 23 for the electronic device to communicate with other devices or a communication network.
[0223] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by electronic devices, which includes instructions for executing the above Figure 1-Figure 10 , Figure 13-14 The program involved in the data checking method of the process stack in the method embodiment shown.
[0224] Fig.17 A structural diagram of another process stack data inspection device provided in an embodiment of the present application; see attached Fig.17 As shown, this embodiment provides another data inspection device for process stack, which can execute the above Fig.11 The data checking method of the process stack shown in the figure, specifically, the data checking device of the process stack may include:
[0225] A second acquisition module 31, used to acquire at least one target data for implementing a data checking operation;
[0226] A second determination module 32, used to determine the number of processors used to perform data checking operations on all process stacks;
[0227] A second partitioning module 33, configured to partition at least one target data based on the number of processors to obtain a target data set;
[0228] The second processing module 34 is used to use a processor to perform a data check operation on the target data and all process stacks included in the target data set to obtain a data check result.
[0229] Fig.17 The device shown can perform Fig.11 , Figure 13-14 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Fig.11 , Figure 13-14 The implementation process and technical effects of this technical solution refer to Fig.11 , Figure 13-14 The description in the illustrated embodiment will not be repeated here.
[0230] In one possible design, Fig.17 The structure of the data inspection device of the process stack shown can be implemented as an electronic device, which can be a mobile phone, a tablet computer, a server, etc. Fig.18 As shown, the electronic device may include: a second processor 41 and a second memory 42. The second memory 42 is used to store the corresponding electronic device executing the above Fig.11 , Figure 13-14 The program of the process stack data checking method provided in the illustrated embodiment, the second processor 41 is configured to execute the program stored in the second memory 42 .
[0231] The program includes one or more computer instructions, wherein the one or more computer instructions, when executed by the second processor 41, can implement the following steps: obtaining at least one target data for implementing a data checking operation; determining the number of processors for performing a data checking operation on all process stacks; dividing at least one target data based on the number of processors to obtain a target data set; and using the processor to perform a data checking operation on the target data and all process stacks included in the target data set to obtain a data checking result.
[0232] Furthermore, the second processor 41 is also used to execute the aforementioned Fig.11 , Figure 13-14 All or part of the steps in the illustrated embodiments.
[0233] The structure of the electronic device may further include a second communication interface 43 for the electronic device to communicate with other devices or a communication network.
[0234] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by electronic devices, which includes instructions for executing the above Fig.11 , Figure 13-14 The program involved in the data checking method of the process stack in the method embodiment shown.
[0235] Fig.19 A schematic diagram of a structure of a data inspection device for a process stack provided in an embodiment of the present application; Fig.19 As shown, this embodiment provides another data inspection device for a process stack, which can execute the above Fig.12 The data checking method of the process stack shown in the figure, specifically, the data checking device of the process stack may include:
[0236] A third acquisition module 51 is used to acquire a data inspection request;
[0237] A third determination module 52 is used to determine at least one data inspection task based on the data inspection request, wherein the data inspection task includes at least one of the following: a process stack set and a target data set;
[0238] A third determination module 52, used to determine a processor corresponding to a data inspection task;
[0239] The third processing module 53 is used to use the processor to perform a data checking operation on the data checking task to obtain a data checking result.
[0240] Fig.19 The device shown can perform Figure 12-14 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Figure 12-14 The implementation process and technical effects of this technical solution refer to Figure 12-14 The description in the illustrated embodiment will not be repeated here.
[0241] In one possible design, Fig.19 The structure of the data inspection device of the process stack shown can be implemented as an electronic device, which can be a mobile phone, a tablet computer, a server, etc. Fig. 20 As shown, the electronic device may include: a third processor 61 and a third memory 62. The third memory 62 is used to store the corresponding electronic device executing the above Figure 12-14 The program of the process stack data checking method provided in the illustrated embodiment, the third processor 61 is configured to execute the program stored in the third memory 62 .
[0242] The program includes one or more computer instructions, wherein the one or more computer instructions, when executed by the third processor 61, can implement the following steps: obtaining a data check request; based on the data check request, determining at least one data check task, wherein the data check task includes at least one of the following: a process stack set, a target data set; determining a processor corresponding to the data check task; and using the processor to perform a data check operation on the data check task to obtain a data check result.
[0243] Furthermore, the third processor 61 is also used to execute the aforementioned Figure 12-14 All or part of the steps in the illustrated embodiments.
[0244] The structure of the electronic device may further include a third communication interface 63 for the electronic device to communicate with other devices or a communication network.
[0245] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by electronic devices, which includes instructions for executing the above Figure 12-14 The program involved in the data checking method of the process stack in the method embodiment shown.
[0246] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0247] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0248] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processor of the computer or other programmable device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0249] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0250] These computer program instructions may also be loaded onto a computer or other programmable device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0251] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0252] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0253] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0254] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for checking data of a process stack, comprising: Get data inspection request; Based on the data check request, determining a plurality of process stack sets, wherein the process stack sets include at least one process stack that needs to perform a data check operation; Determine the processors corresponding to each of the plurality of process stack sets; Acquire at least one target data corresponding to the data inspection request; Determine the stack frame address corresponding to each process stack in the process stack set; Using a processor to perform a data check operation on the stack frame address and the at least one target data respectively corresponding to each other, to obtain a sub-check result of the processor, wherein the sub-check result is determined by using a binary search algorithm to determine the target data to be checked corresponding to the stack frame address in the at least one target data, and detecting whether the stack frame address is within a data range corresponding to the target data to be checked, wherein the distance between the address information of the target data to be checked and the stack frame address is smaller than the distance between the address information of other target data and the stack frame address; Based on all the sub-inspection results, the data inspection result is obtained.
2. The method according to claim 1, determining at least one process stack set based on the data inspection request, comprising: Based on the data inspection request, obtaining all process stacks in the kernel; determining a number of processors to use for data inspection operations on a process stack; All process stacks are evenly divided based on the number of processors to obtain at least one process stack set, wherein the number of the process stack sets is the same as the number of processors.
3. The method according to claim 1, using a processor to perform a data check operation on the stack frame address and the at least one target data, comprising: Get the kernel running status; When the kernel operation state is a shutdown state, a processor is used to perform a data check operation on the stack frame address and the at least one target data.
4. The method according to claim 1, before obtaining the data inspection result based on all the sub-inspection results, the method further comprises: Get configuration requests corresponding to all processors; Based on the configuration request, any one of all the processors is configured as a main processor, and the main processor is used to obtain the sub-inspection results obtained by other processors.
5. The method according to claim 1, obtaining the data inspection result based on all sub-inspection results, comprises: When all sub-check results are successful, the data check result is determined to be in a successful state; When any sub-check result is a check failure, it is determined that the data check result is in a failed state.
6. The method according to claim 1, after acquiring at least one target data corresponding to the data inspection request, the method further comprises: determining a number of processors to use for data inspection operations on a process stack; Dividing the at least one target data based on the number of the processors to obtain a target data set corresponding to the processors; The processor is used to perform a data check operation on the target data included in the target data set and the stack frame address to obtain a sub-check result of the processor.
7. The method according to claim 1, using a processor to perform a data check operation on the stack frame address and the at least one target data to obtain a sub-check result of the processor, comprising: Determine the address information and data range corresponding to each of the at least one target data; Using the processor to detect whether the stack frame address is within a data range corresponding to the target data to be checked; A sub-inspection result corresponding to the processor is determined based on the detection result.
8. The method according to claim 1, wherein in the at least one target data, determining the target data to be checked corresponding to the stack frame address by using a binary search algorithm comprises: Obtaining a first address corresponding to the at least one target data; Among the at least one target data, the target data whose first address is smaller than the stack frame address and whose distance between the first address and the stack frame address is smaller than the distance between the first address and the stack frame address of other target data is determined as the target data to be checked.
9. The method according to claim 7, determining the sub-inspection result corresponding to the processor based on the detection result, comprising: When the stack frame address is within the data range corresponding to the target data to be checked, determining that the sub-check result is a check failure; When the stack frame address is not located within the data range corresponding to the target data to be checked, it is determined that the sub-check result is a successful check.
10. The method according to claim 1, after obtaining the data inspection result, the method further comprises: When the data check result is in a successful state, a data update operation is allowed based on the data check request; When the data check result is a failure state, a data update operation based on the data check request is prohibited.
11. A method for checking data of a process stack, comprising: Acquiring at least one target data for implementing a data checking operation; determining the number of processors used for data inspection operations on all process stacks; Dividing the at least one target data based on the number of the processors to obtain a target data set; Determining a processor corresponding to each target data set; Determine the stack frame address corresponding to each process stack in the process stack set; Using a processor to perform a data check operation on target data in the respective corresponding target data sets and the stack frame address, obtaining a sub-check result of the processor, wherein the sub-check result is determined by using a binary search algorithm to determine the target data to be checked corresponding to the stack frame address in the at least one target data, and detecting whether the stack frame address is within a data range corresponding to the target data to be checked, wherein the distance between the address information of the target data to be checked and the stack frame address is less than the distance between the address information of other target data and the stack frame address; Based on all the sub-inspection results, the data inspection result is obtained.
12. An electronic device comprising: A memory, a processor; wherein the memory is used to store one or more computer instructions, wherein when the one or more computer instructions are executed by the processor, the data checking method of the process stack as described in any one of claims 1-10 is implemented.
Citation Information
Patent Citations
Method, device and system for patching kernel on line
CN101799763A
Method and system for a fast full style system check using multithreaded read ahead
US20130024428A1