Method and apparatus for detecting an overflow condition in a kernel stack during operating system development

a kernel stack and overflow technology, applied in the field of computer processing, can solve the problems of large amount of stack space that can potentially be used, stack overflow conditions that are not always detected and handled successfully, and the kernel stack overflow occurs frequently. to achieve the effect of facilitating determination

Active Publication Date: 2007-02-20
ORACLE INT CORP
View PDF13 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Benefits of technology

[0009]One embodiment of the present invention provides a system with a mechanism that facilitates determining whether a kernel stack will overflow during development of an operating system. During execution of the operating system, the operating system executes a procedure. Upon entering the procedure, after the current stack pointer has been automatically adjusted to provide stack space for the procedure, the system retrieves the current stack pointer for the process, and determines the stack limit for the process. The system then compares the current stack pointer to the stack limit to determine if the process will cause, or is likely to cause a stack overflow. If a stack overflow will occur, or is likely to occur, the system indicates the existence of a stack overflow condition.

Problems solved by technology

The problem of kernel stack overflow arises frequently during operating system development.
When procedure calls become deeply nested, a large amount of stack space can potentially be used.
In some instances, so much stack space is used that the stack grows beyond its allocated space and stack overflow results.
Operating systems are typically designed to handle stack overflow conditions, but stack overflow conditions are not always detected and handled successfully, especially during the operating system development process, when the kernel code is not stable.
Stack overflows of this nature can be extremely difficult to diagnose, especially because they can randomly corrupt memory being used for unrelated purposes.
However, this technique can greatly complicate hardware development and can potentially degrade system performance.
While sometimes useful, this technique does not immediately provide notification when the stack pointer exceeds its boundaries.
Hence, the overflow can potentially corrupt critical data before the stack overflow is detected, making it hard to diagnose the problem.

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
  • Method and apparatus for detecting an overflow condition in a kernel stack during operating system development
  • Method and apparatus for detecting an overflow condition in a kernel stack during operating system development
  • Method and apparatus for detecting an overflow condition in a kernel stack during operating system development

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019]The following description is presented to enable any person skilled in the art to make and use the invention, and is provided in the context of a particular application and its requirements. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.

[0020]The data structures and code described in this detailed description are typically stored on a computer readable storage medium, which may be any device or medium that can store code and / or data for use by a computer system. This includes, but is not limited to, magnetic and optical storage devices such as disk drives, magnetic tape, CDs (...

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

One embodiment of the present invention provides a system with a mechanism that facilitates determining whether a kernel stack will overflow during development of an operating system. During execution of the operating system, the operating system executes a procedure. Upon entering the procedure, after the current stack pointer has been automatically adjusted to provide stack space for the procedure, the system retrieves the current stack pointer for the process, and determines the stack limit for the process. The system then compares the current stack pointer to the stack limit to determine if the process will cause, or is likely to cause a stack overflow. If a stack overflow will occur, or is likely to occur, the system indicates the existence of a stack overflow condition.

Description

BACKGROUND[0001]1. Field of the Invention[0002]The present invention relates to the process of developing operating systems for computers. More specifically, the present invention relates to a method and an apparatus for detecting a kernel stack overflow condition during development of an operating system.[0003]2. Related Art[0004]The problem of kernel stack overflow arises frequently during operating system development. As kernel code makes procedure calls, each successive procedure call allocates a stack frame on the kernel stack. Upon completion of a procedure call, the stack frame for the procedure call is removed from the top of the kernel stack. When procedure calls become deeply nested, a large amount of stack space can potentially be used. In some instances, so much stack space is used that the stack grows beyond its allocated space and stack overflow results. During a stack overflow, the system starts overwriting information in memory located past the end of the stack. Oper...

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 Patents(United States)
IPC IPC(8): G06F9/45G06F9/44G06F9/40
CPCG06F9/4425G06F11/366G06F11/3644G06F9/4484
Inventor SARCAR, KANOJ
Owner ORACLE INT CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products