Supercharge Your Innovation With Domain-Expert AI Agents!

SIL4 stack detection method suitable for general operating system

A general-purpose operating system and detection method technology, which is applied in the field of computer data structure, can solve the problems of being larger than the buffer size, not being able to perceive whether the stack is out of bounds, and not being able to perceive whether the processing conforms to SIL4, etc., to achieve the effect of strong versatility

Pending Publication Date: 2021-11-23
浙江众合科技股份有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The stack has a memory function, and there is no need to change the bottom pointer of the stack during the insertion and deletion operations of the stack; some embedded operating systems provide the function of fixed stack space size and stack detection, and stack overflow is an important detection item of stack detection. Stack overflow is because the C language series does not have a built-in check mechanism to ensure that the data copied to the buffer is not larger than the size of the buffer, so when the data is large enough, it will overflow the range of the buffer; when the system is abnormal, there is no The interface notifies the SIL4 safety program; for closed-source operating systems, it is impossible to perceive whether its processing meets the SIL4 requirements; other operating systems have no stack detection function, and can allocate as many stacks as they want with sufficient resources, but SIL4 security The program cannot perceive whether the stack is out of bounds and other exceptions

Method used

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

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • SIL4 stack detection method suitable for general operating system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0020] Example: such as figure 1 As shown, a flow chart of a general-purpose operating system SIL4 stack detection method includes the following steps;

[0021] Step S1, when the security program is running, the entry function main declares the stack protection section StackGuard1 array; uses the global variable P3 to record the start position of the StackGuard1 array and uses the global variable P4 to record the end position of the StackGuard1 array.

[0022] Step S2, main calls the function Finit; Finit internally declares the stack space Stack array used by the entire security program and the stack protection section StackGuard2 array; wherein, use the global variable P1 to record the starting position of the Stack array and use the global variable P2 to record the Stack The end position of the array, and then return; use the global variable P5 to record the start position of the StackGuard2 array and use the global variable P6 to record the end position of the StackGuard2 ...

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

PUM

No PUM Login to View More

Abstract

The invention discloses an SIL4 stack detection method suitable for a general operating system, which comprises the following steps: S1, when a security program runs, enabling an entry function main to declarate a stack protection section StackGuard 1 array; step S2, calling a function Finit by the main; the Finit being used for internally declaring a stack space Stack array and a stack protection section StackGuard 2 array which are maximally used by the whole security program; s3, according to the starting position and the ending position of the same stack array, judging whether the operation environment grows upwards or downwards on the stack by using an address; s4, sorting according to the size of the stack array, writing a stack space used by the security program into a specific value by a main function, and performing memory detection on the whole stack array; step S5, after the detection is finished, periodically calling a security service program Fsafety and a stack detection algorithm Fcheck; and step S6, enabling a stack detection algorithm Fcheck to detect a stack space used by the security program. The stack detection method is high in universality and dynamically adapts to various CPUs, operating systems and compilers, and therefore SIL4-level stack memory detection is achieved.

Description

technical field [0001] The invention relates to the technical field of computer data structures, and in particular relates to a method for detecting a SIL4 stack applicable to a general operating system. Background technique [0002] As a data structure, a stack is a special linear table that can only perform insertion and deletion operations at one end. It stores data according to the principle of last-in-first-out. The data that enters first is pushed to the bottom of the stack, and the last data is on the top of the stack. When data needs to be read, data is popped from the top of the stack, and the last data is read out first. The stack has a memory function, and there is no need to change the bottom pointer of the stack during the insertion and deletion operations of the stack; some embedded operating systems provide the function of fixed stack space size and stack detection, and stack overflow is an important detection item of stack detection. Stack overflow is becaus...

Claims

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

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/07
CPCG06F11/073
Inventor 严光明胡明明陈小杰
Owner 浙江众合科技股份有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More