Uneingeschränkter Zugang

Research on Modularization-based Code Reuse Technology in Software System Development

  
25. Sept. 2025

Zitieren
COVER HERUNTERLADEN

Introduction

In the process of software development, efficiency and quality are always the two core indicators of software success. With the continuous progress of software development technology and the increasing market demand, software project requirements are becoming more and more complex and involve more and more functions and modules [1-2]. In this context, the concept of code reuse has emerged as an important issue in the field of software development [3]. Code reuse refers to the practice of using existing code in different programs or projects rather than writing new code from scratch, which significantly reduces duplication of effort and speeds up development progress while maintaining code consistency and reliability [4-5].

Code reuse is a fundamental principle of software development and is essential for improving software development efficiency, reducing costs, improving quality, facilitating collaboration and accelerating innovation [6-7]. Various forms of code reuse have been widely used by software developers as an efficient aid to development, and the objects of reuse include similar functional modules, code fragments, and application programming interfaces and other code units with different granularities [8-9]. In the traditional code reuse approach, developers need to use Internet search engines or enterprise code base search to obtain domain-specific or domain-independent reusable code units, and at the same time look for sample code and textual explanations and other help information, based on which they can select the code units and complete the modification and integration. This code reuse approach, although effective, relies on the experience of the developers, and also requires a lot of information searching and confirmation, so the reuse efficiency is not high, and it is easy to introduce defects in the code [10-13]. The large accumulation of open source and enterprise code repositories and software development resources such as software technical documents and software development Q&A forms code big data. For example, more than 270 million code repositories have been gathered on the code hosting platform GitHub, and more than 17 million software development questions have been accumulated on the software development Q&A website Stack Overflow [14-16]. Many times the software development process encounters repetitive development problems, such as common functional implementations, common APIs and their usage patterns, so intelligent code reuse recommendations can be realized through code big data analysis, mining and learning [17-19].

For software developers, the most effective way is intelligent code reuse recommendation based on code context, i.e., based on contextual information such as the code that has been completed for the current development task in the integrated development environment, the available code units are targeted to be recommended, and at the same time, developers are assisted to make customized code modifications and integration [20-21]. In general, code reuse objects for software developers include domain-specific common code units and domain-independent generic code units. The former reuse scope is limited to a specific domain but is more closely related to the core business, e.g., code implementation variants of similar business functions in the form of code snippets or functional modules [22-23]. The latter reuse has a wider scope but a weaker relationship with the core business, such as generic APIs and their usage patterns, generic algorithms and functional implementations. Different types of code reuse objects need to be analyzed and recommended using different intelligent methods [24-25].

In this paper, we propose a multi-dimensional hybrid execution flow filtering method ROPMFilter and a graph neural network-based detection method ROPGMN, which filters the program execution flow through ROPMFilter first and then uses ROPGMN for accurate detection. The normal execution flow of the detected process is first collected and stored in memory as a control, and when the detected process is running, the output execution flow is received, and the graph matching model is utilized to obtain the difference between the pre-blocking execution flow and the normal execution flow, and if the similarity evaluation is lower, then it means that the current execution flow deviates from the normal execution by a long way, and it is very likely to be suffering from the ROP attack. In the design of the template file, full consideration of the later reuse of the code, the parameters common to the relevant components are placed in the same package, easy to manage. After the design is completed, its performance is verified in benchmark test sets such as SPECjvm98.

ROP attack detection technique based on dynamic feature monitoring
Dynamic characterization of ROP and its variants attacks

ROP and its variants attacks are developing rapidly and their characteristics are becoming more and more hidden This paper summarizes the dynamic characteristics of the attack as it happens:

Instruction utilization is richer. Instruction utilization is no longer a single use of the ret instruction to build a gadget, and began to use jmp, call and other instructions with the ability to execute flow jump, and even conditional jump (JE, JNE) can be used to form an attack chain.

The location of attack construction is more extensive: ROP not only uses the program stack space to link gadgets, but also begins to use the register space to link gadgets, and the location of hijacked program streams is also shifted from the program stack to the function table, memory pointers, etc. [26].

Shorter gadget widths and shorter lengths of consecutive gadget chains. In order to minimize the impact of gadgets on the execution flow and make the attack more stealthy, the number of instructions in a gadget is generally smaller and the chain of consecutively executed gadgets is usually shorter.

Gadgets are executed in small numbers at localized times. This is all ROP and its variants of attacks have attack characteristics, usually only the execution of a single gadget is meaningless, can not cause a complete threat behavior, gadget chain at least 3 consecutive execution to constitute a complete attack.

Attack duration is long. Attackers need to spend a lot of time to obtain information about the target program because they do not know the memory layout of the target program.

Architecture for ROP Attack Detection Based on Dynamic Feature Monitoring

The structure of the ROP attack detection technique based on dynamic feature monitoring is shown in Figure 1, and the whole is divided into two main parts, ROPMFilter and ROPGMN.

Figure 1.

Overall architecture of ROP attack based on dynamic feature monitoring

ROPMFilter monitors the program execution flow in real time, releases the execution flow that is detected as normal, marks the execution flow as normal without doing further detection on it, intercepts the execution flow that is detected as abnormal, and further accurately determines whether there is an attack on it through ROPGMN [27]. The efficiency of ROPMFilter is high, and the use of the four detection strategies ensures that its filtering results do not have any misses, but there are certain false positives, which rely on the further judgment of the ROPGMN.

Detection method based on graph neural network-ROPGMN
Feasibility of the ROPGMN

By monitoring an executing process, all instruction sequences executed by the process can be obtained, and these instruction sequences can be transformed into a program execution flow graph by graph extraction [28].

EFG is a subgraph of CFG, but it is more representative of the real execution flow of the program. Figure 2 shows the comparison of EFG during the ROP variant attack, and it can be clearly seen that EFG can well represent the characteristics of the attack.

Figure 2.

EFG execution flow comparison

Overall ROPGMN Processes

The overall flow of ROPGMN is shown in Fig. 3 and is divided into two phases:

Preparation phase, where benign inputs are constructed before the detection starts, and the acquisition program executes the flow to extract the benign AEFG by feature extraction on the EFG. The benign AEFG was stored in memory as a control.

In the detection phase, the detected binary process first collects the program execution stream of the suspected attack through the filtering of ROPMFilter, and then performs graph extraction and feature extraction to obtain the AEFG.

Figure 3.

Overall ROPGMN process

Execution stream acquisition

The preparation and detection phases are two separate detection executions, and the biggest difference between the two executions is in the acquisition of the execution stream. The execution stream is the complete sequence of instructions for program execution, and the binary interpolation tool PIN can be used to efficiently acquire every instruction of program execution in real time.

Execution flow graph extraction

The execution flow will be efficiently transformed into an easy-to-handle EFG graph structure, which, if the graph structure is too large, will result in low training efficiency and accuracy of the graph neural network [29]. Therefore, in this paper, only code segments containing dangerous function calls are transformed into graph structures, which greatly reduces the number of EFG nodes and edges and improves the efficiency of graph neural networks. Dangerous function calls refer to function calls with buffer overflow vulnerabilities.

Feature extraction

Each node of the EFG is a kind of base block with a sequence of instructions within the base block, and these sequences of instructions cannot be used as inputs to the neural network, so feature extraction is needed to transform the sequence of instructions in a node into a vector v representation of the execution flowchart obtained in the previous section.

Graph Similarity Calculations

Through graph similarity computation, the similarity score between two graphs can be obtained, based on the similarity score to determine whether the current AEFG is a normal execution flow. Nowadays, the rapid progress of GPU promotes the development of artificial intelligence, and graph neural network comes into being by borrowing the ideas of recurrent network and convolutional network. Therefore, in the calculation of graph similarity, in addition to using the traditional graph theory algorithm, a variety of graph neural networks can be used in order to obtain the similarity score.

Model Selection

For the case of this paper, two AEFG graphs G1 = (V1, E1) and G2 = (V2, E2) containing node feature Xi and edge feature Xij, a pair of AEFGs are used as inputs using the graph matching model, and the attention mechanism is utilized for joint inference, and finally the similarity score of the graph pairs is generated S(G1, G2), which determines whether or not the current execution flow is being attacked by a ROP.

Structure of graph matching model

The graph matching model consists of three parts: coding layer, propagation layer, and aggregation layer. The encoding layer maps points and edges to the initial vector space through MLP, the propagation layer performs intra-graph propagation (Message Passing Layers) and cross-graph propagation (Cross-Graph Interaction Layers) for each node, and the aggregation layer aggregates all nodes into nodes of the whole graph.

Encoding Layer: the encoder maps Xi and Xij into the initial vector space corresponding to v and e using Multilayer Perceptron MLP: hi(0)=MLPnode(xi),iV eij=MLPedge(xij),(i,j)E

Propagation Layer: through neural networks, the node features are propagated through multiple rounds of information to update the nodes. For each round, any edge will unite its connected two nodes to generate a new messageji through a neural network, and any node will unite its connected edges carrying messageji mapped as a new node through a neural network, and the formula for updating from node ht to ht+1 is as follows: mji=fmessage(hi(t),hj(t),eij),(i,j)E1E2 μji=fmatch(hi(t),hj(t)),iV1,jV2,oriV2,jV1 hi(t+1)=fnode(hi(t),jmji,jμji)

The fmatch for obtaining graph cross-information uses an attention-based propagation module with the following formula: aji=exp(sh(hi(t),hj(t)))jexp(sh(hi(t),hj(t))) μji=aji(hi(t)hj(t)) jμji=jaji(hi(t)hj(t))=hi(t)jajihj(t)

Aggregation layer: after a certain number of T rounds of propagation, a tight fit layer is needed to aggregate all nodes to form a vector representation of the entire graph. The aggregation layer performs a vector-weighted sum with gate for each node using the approach provided by Li et al. It can help filter out irrelevant signals: hG=MLPG(iVσ(MLPgate(hi(t)))MLP(hi(t)))

After obtaining hG1 and hG2 of a pair of graphs, similarity distance similarity algorithms can be utilized to compute the similarity, such as Euclidean similarity, cosine similarity, or Hamming similarity: s=fs(hG1,hG2)

Modularization-based generator design for code reuse
Protocol-related code design

In UVMtestbench, the protocol-related code mainly includes the design of interface, driver, monitor, transaction, and sequence. When designing the interface, it is necessary to fully refer to the interface signals defined in the protocol, and when designing the driver, monitor, and transaction and sequence, it is necessary to fully refer to their timing and function.

APB interface template design

The advent of the PREADY signal allows the APB3 bus to support slower slave devices, while the advent of the PSLVERR signal allows for more reliable transmission on the APB3 bus.

There are several versions of APB bus, APB2, APB3, APB4 and so on. In order for the code generator designed in this paper to support more APB interfaces, this paper needs to make a comparison between them. The differences between these three versions are listed below.

Catalog structure design

Although APB2, APB3, APB4 are all APB buses, however, they are still different after all. In order not to confuse cross use. In this paper, we designed a directory structure with a strict hierarchical relationship, and then put the corresponding template files at the bottom of the directory structure.

Interface design

It can be seen that APB3 and APB4 add some functions on the basis of APB2, and the corresponding signals to support these functions are also added. When designing the interfaces, considering the later expansion, for example, adding some tasks or functions in the interface file, here in this paper, we design independent complete interface template files for each version of the APB bus, which are stored in different directories.

Transaction design

The transaction class is implemented through transaction-level modeling encapsulation. Different from the traditional test incentive design, the transaction in UVM encapsulates a class of transactions that need to be processed by the interface involved in the protocol, but does not specify signals or timings.

Design of sequencer

In general, in the absence of specific requirements for the sequencer, this paper can directly use the UVM internal sequencer has been defined, just need to specify the type of transaction used in the sequencer pair.

Design of dirver

In UVMtestbench, driver is a UVC responsible for interacting with DUT, which is very important in UVMtestbench. The typical operation of driver is to continuously apply for transactions and convert the information in the transactions into signals to be driven to DUT. The conversion process depends on the structure of the transaction, and the driving process involves specific protocols, such as the APB protocol defined in the read and write operations.

Design of monitor

In UVMtestbench, monitor and driver are the same components that interact with DUT, but their roles are the opposite of driver: driver is to convert the transaction into signal, and monitor is to extract the signal and convert it into transaction.

Design of agent

In order to make the agent more reusable, the general agent is configurable. At this time, you need to define another config class in the agent class.

The use of package

A package is a SystemVerilog language construct that enables related declarations and definitions to be combined in a package namespace. Packages may contain type definitions, constant declarations, functions, and class templates. To use a package in scope, it must be imported before its contents can be referenced.

Summary of the use of code reuse techniques

The template files were designed with full consideration of later reuse of the code. The widely promoted coding techniques or UVM built-in mechanisms are utilized in an all-round and comprehensive way. It is mainly reflected in the following points:

Use of parameters, such as address bitwidth, data bitwidth, etc., to adapt to different systems. And put the parameters common to many related components in the same package for easy management.

The use of factory mechanism, easy to verify the platform in the testcase, easy to replace the underlying class (driver, monitor, etc.), in order to apply to specific test scenarios. Specific approach is to first register the factory, and then use the create function to create the object.

In the driver and monitor underlying class use callback mechanism to facilitate the user in the case of not having to modify the underlying class, add some specific features.

Testcase and incentives (sequence/transaction) separation, to facilitate the reuse of incentives .

The use of templates is itself a kind of code reuse.

User interface redefinition
Improvement objectives

The user interface of the code generator determines how the code generator is used. Through the previous analysis, it can be known that the original easer_uvm_code_generator is complicated to operate and requires more things to be configured when generating an authentication platform for the IP of the AHMA interface. This is more difficult for novices to get started. For this reason, this paper needs to improve it. Before improvement, this paper needs to clarify the goal of improvement.

Programmatic options

Wrapping the original perl code generator. For example, comment.tpl can be processed in a scripting language to automatically generate some of the files that the original code generator needs to use.

Specific design

This section begins the process of how this paper redefines the user interface. Figure 4 shows the generation process of the new code generator validation platform. As can be seen from the figure, there are two main processes: first, the processing of common.tpl. Second, the template file for the AMBA interface is read and processed.

Figure 4.

Flowchart of the verification generated by the generated code generator

Processing of the common.tpl file

First of all, in order to ensure compatibility with the original code generator, some of the original configuration options can still be used in the new common.tpl.

In order to generate the verification environment for the AMBA interface IP, this paper defines some configuration information that the bash language needs to handle. These configurations start with AMBA_begin and are on a separate line. This is immediately followed by the if=<interface> field to indicate the interface type, type=<M_or_S> to indicate whether to use a master or slave device, and id=<number>, which is an optional field to indicate the device ID number. Finally, name=<name> is used to indicate the name of the object when the agent is being instantiated, and is terminated by AMBA_end.

Code Generator Installation

The original code generator is essentially a perl script program. In order to ensure that this perl script program can be called from any location, in this paper it was placed in the user directory and set as a hidden file to ensure its security. Subsequently, and through a system command in Linux, the alias command, a short alias is taken. As follows: alaisgenuvm=“perl_/easier_uvm_code_generator”.

Experimentation and evaluation
Evaluation in real applications
Security assessment

Effectiveness of testing in real applications

In this section, four commonly used applications are utilized to evaluate the effectiveness of this mechanism to test real applications. First, CFG construction and data collection are performed on four different programs, namely, Adobe Flash Player, nginx, proftpd and firefox, respectively. The gadget chains are constructed, the data is encoded to generate a training dataset, and labels are added to the benign and malicious samples. The number of gadget chains generated by each application is shown in Table 1.

Applications and data sets

Applications Loophole The number of benign gadget chains The number of malicious gadget chains
Adobe flash 11.2.202.336 CVE-2014-0502 201166 164523
Nginx 1.4.0 CVE-2013-2028 125364 103745
Proftpd 1.3.0a CVE-2006-6563 91365 60132
Firefox 3.5.10 CVE-2010-1214 212635 186635

First, the mechanism is evaluated using Adobe Flash Player. For the collected dataset, 80% is randomly selected as the training set, 10% is used for validation, and 10% is used for testing. The 80% dataset contains 80% of the benign gadget chains and 80% of the malicious gadget chains in the entire dataset. Therefore, the training and validation sets contain a total of 180,987 benign gadget chains and 150,822 malicious gadget chains, and the test set contains 20,109 benign gadget chains and 16,758 malicious gadget chains. The test results are shown in Table 2.

Different procedures test results

Applications Data set Training data FP FN Accuracy
Adobe flash 368777 295039 0.42% 0.54% 97.1%
Nginx 228855 183105 0.04% 0.65% 98.0%
Proftpd 152176 121760 0.32% 0.96% 98.3%
Firefox 407529 326042 0.06% 0.38% 99.5%
Average - - 0.14% 0.54% 98.0%

The accuracy rate is 97.1%, false positive rate is 0.42% and false negative rate is 0.54%. It can be seen that the neural network trained with real applications as samples can get high detection rate, low false positive rate and false negative rate. The experimental results show that the deep neural network can learn the attack features better. This is because deep neural networks are able to discover complex features in larger datasets rather than overfitting small training data and losing key features. The detection effect of the present mechanism on three other real applications is further evaluated to demonstrate the broad applicability of the mechanism.

For the other three programs, again 80% of the dataset is selected as training data, 10% for validation and 10% for testing to achieve the best performance. From the results, it can be seen that the defense mechanism proposed in this paper can show high accuracy rate and low false positive rate on all the different programs, which indicates its wide applicability. The average accuracy rate obtained from the evaluation is 98.0%, the average false positive rate is 0.14% and the average false negative rate is 0.54%.

Detection Effectiveness of Real CRA Attacks

In this subsection, the defense mechanism is tested by real exploits. Four samples of real exploits are identified in Exploit-DB. To further create test samples, ROPGadget and Ropper are used to generate the exploits that execute mprotec or execve. At the same time, exploits were manually modified to swap the order of multiple gadgets without changing the attack behavior, or to replace some of the gadgets with new gadgets that have the same effect, resulting in 64 real payloads. Their detection using a classifier revealed that the neural network model correctly classified them as genuine CRA payloads, suggesting that the defense mechanism is capable of detecting real-world CRA exploits. It also demonstrates the feasibility of the CFG splitting based scheme in detecting code reuse attacks.

Comparison with traditional machine learning methods

In this subsection, traditional machine learning methods are compared with the deep neural network used in this defense mechanism. Traditional machine learning methods, such as SVM, have been used for ROP detection. Here, the neural network model is compared with SVM and LR for detection. Specifically, SVM and LR with radial basis function kernel are used as classifiers and trained with 80% of Firefox’s dataset. The results are shown in Table 3. LR detects 82.1% accuracy, 8.3% false positives and 20.3% false negatives. SVM detects 74.6% accuracy, 7.7% false positives and 25.1% false negatives.

Comparison of neural networks with SVM and LR

Method FP FN Accuracy
DNN 0.05% 0.6% 99%
LR 8.3% 20.3% 82.1%
SVM 7.7% 25.1% 74.6%

Comparative results show that the defense mechanism proposed in this paper significantly outperforms SVM and LR in terms of accuracy, false-positive and false-negative rates. The results confirm that the designed algorithms have significant advantages in learning complex datasets. It also verifies that the neural network architecture is able to capture these spatial features better. On the contrary, as mentioned earlier, SVM and LR are not able to acquire this information, thus producing a rather high false positive rate.

Performance evaluation

All 12 SEPC CPU2006 benchmark programs written in C were run on GCC 4.7 using the -O2 optimization level to measure the runtime performance of this defense mechanism. The experimental results are shown in Table 4. All benchmark programs have 0% overhead. The reason for this is that the mechanism is a non-interruptive detection mechanism that does not require interrupting the application at runtime. Therefore, there is no impact on the protected application.

Time overhead of SPEC CPU2006 Benchmark

Benchmark Original running time(*s) New running time(*s) Overhead
perlbench 246 246 0
bzip2 394 394 0
gcc 225 225 0
mcf 296 296 0
gobmk 413 413 0
hmmer 317 317 0
sjeng 451 451 0
libquantum 280 280 0
h264ref 443 443 0
omnetpp 335 335 0
astar 393 393 0
xalancbmk 212 212 0

The mechanism is compared with several other CFI mechanisms. The evaluation metrics are categorized into five classes and they are security level, compiler modifications, instruction set extensions, runtime overhead, and non-intrusive detection. The reference HCIC categorizes the security level into four classes:

Level I: Defense against ROP only.

Level II: Defense against ROP and JOP.

Level III: Defense against ROP, JOP and some advanced CRAs.

Level IV: Defense against all possible CRAs.

Table 5 shows the comparison between different CFI mechanisms taught. From Table 5, it can be seen that the present for proposed does not need to modify the compiler, does not need to extend the instruction set architecture, and has no runtime overhead. It is worth noting that the present mechanism is able to achieve level III security, which is attributed to the fact that the intention of CRAs is all about changing the control flow of the program. In addition, traditional CFIs usually require the insertion of detection instructions or the addition of runtime detection modules, both of which add extra overhead to the original program. This mechanism is a non-intrusive defense mechanism that does not require staking out files or any other kind of modification. The mechanism is divided into two phases. In the training phase, branching information is collected to construct CFGs, and then the CFGs are encoded into DNN training data and DNN models are trained. In the detection phase, branching information is dynamically collected at runtime using IPT and stored in a specific memory in the form of packets. Each time a branch instruction is executed, a packet is generated in real time and the packet contains information such as the destination address of the branch instruction. By retrieving the packet stored in memory in real time to determine whether a CRA has occurred. The entire process does not interfere with the protected application program. As a result, the performance overhead of the program is 0%.

Comparison of different CFI mechanisms

Safety level ISA extension Compiler change Runtime overhead Non-invasive detection
CFI I N N 24% N
(CCS’05)
CCFI I Y Y 3%~6% N
(CCS’15)
CodeArmor III N N 6.7% N
(S&P’17)
HAFIX I Y Y 3.1% N
(DAC’15)
HCIC II N N 0.94% N
(JIOT’18)
μCFI III N Y 13% N
(CCS’18)
Ours III N N 0% Y
Simulation Experiments

Simulation experiments are set up to verify the model performance from 3 aspects:

Program execution performance. Evaluate the impact of the algorithmic framework of this paper on the overall running time of the test program.

Executable code size growth. The PIC generation algorithm designed in this paper increases the length of the generated code compared to non-PIC due to the addition of the slow path function call logic, so it is necessary to evaluate the growth of the code.

The size of the storage space occupied by the cache file. Evaluate whether the cache file storage space requirement of the algorithm in this paper is reasonable.

Evaluating program execution performance

Figure 5 shows the comparison of the running time of each test case of SPECjvm98 in this paper’s algorithm, Swift benchmark case and JIT-C execution mode. The results show that compared with the Swift benchmark data, this paper’s algorithm improves the program performance by about 11.7% on average, of which compress improves as much as 34.5%, db by about 20%, and jack and javac effects reach 2.5% and 3.6%, respectively.

Figure 5.

Performance comparison of SPECjvm98

JIT-C is inefficient mainly because:

Generating THUMB-2 instructions on ARMv6 can only be executed with THUMB instruction compatibility and requires switching back and forth with the ARM instructions used by the interpreter. Compatible execution is inefficient and the instruction set switching overhead is high.

Compiling at Trace granularity requires time-consuming construction and maintenance of Trace information. Swift generates ARM code, avoiding frequent instruction set switches. Compiling at method granularity, there is no overhead of building and maintaining Trace. The algorithm in this paper further reduces the detection and compilation latency faced by Swift. As a result, in Fig. 5, Swift improves program performance by about 11.2% on average over JIT-C, and the algorithm in this paper improves it by about 22% over JIT-C.

Evaluating the growth of executable code

Table 6 shows the cumulative total length and average growth of executable code for each use case of SPECjvm98. From the table, it can be seen that the storage space allocated by the code manager for the PIC code (PIC Code column) is about 3.72M, which is an increase of about 214K compared to the baseline data (Swift Code column), where the growth values of jess, ja-vac, and jack are between 40K and 55K, and the growth of the rest of the use cases is about 25K. the average increase in the length of the instructions per method for each use case ( Average Inc) of each method is only about 35~75 bytes, and the overall average increase of all the use cases is less than 50 bytes, which shows that the length of PICs generated by this paper’s algorithm is not over-inflated compared to Swift. It is worth noting that the total code length data of the algorithm in this paper is the cumulative growth value, which does not require such a large space in actual operation. Thus, compared with the fixed code space allocation of JIT-C (512K for ARMv6), the algorithm code in this paper actually uses less space.

Code length variation

Code Size/SPEC Sw ift Code(KB PIC Code(KB) #Compiled M ethods Average Inc.(B)
compress 353.87 376.71 459 54
jess 610.78 652.41 863 50
db 381.67 404.97 478 53
javac 1050.04 1099.67 1266 43
mtrt 510.06 534.33 616 41
jack 684.34 734 712 75
Sum/Avg 3591.08 3802.79 4383 52
Evaluating the storage space size of cached files

The cache file contains two parts, corresponding to Dalvik Java class library methods and SPECjvm98 Java methods. The statistics show that SPECjvm98 accounts for 82.2% of the total size of the cache space, and the class library methods account for 14.6%, and the sum of the two is only about 1.8 M. In addition to the statistics of the actual size of the cache file, the test also records the cumulative size of the cache for the class library methods of all the use cases at runtime. The results show that the cumulative cache file size of class library methods is about 1.38M, while the actual class library cache file size is only about 260K, which indicates that most of the class library methods used by each test case are the same, and thus, their caches can be shared. The high sharing rate of cache files indicates that if sharing of location-independent code in memory can be realized, then it will save the memory resources of the system.

Conclusion

In this paper, we design a modular code attack detection and reuse technique based on graph neural network, which implements a multi-dimensional hybrid execution flow filtering coupled with graph neural network detection. The protocol-related code is integrated into the code generator and the user interface of the code generator is modified appropriately. The algorithm designed in this paper is compared with the baseline model on the dataset, and its security, detection accuracy, runtime overhead, and program execution performance are evaluated in real applications.

The accuracy of this paper’s algorithm in security evaluation is 97.1%, the false positive rate is 0.42%, and the false negative rate is 0.54%, which is able to learn the attack features better, and complex features can be found in larger datasets.

Compared with traditional machine learning, the detection accuracy of 99% in this paper is much higher than the 74.6% and 82.1% of SVM and LR, which confirms that the designed algorithm has a significant advantage in learning complex datasets, and that the neural network architecture is able to better capture spatial features.

Compared with the Swift benchmark data, the algorithm in this paper improves the program performance by about 11.7% on average, of which compress improves as much as 34.5%.

In summary, the algorithm in this paper has excellent performance, can realize dynamic feature monitoring and detection, and meets the design expectations.

Sprache:
Englisch
Zeitrahmen der Veröffentlichung:
1 Hefte pro Jahr
Fachgebiete der Zeitschrift:
Biologie, Biologie, andere, Mathematik, Angewandte Mathematik, Mathematik, Allgemeines, Physik, Physik, andere