-
公开(公告)号:KR1020080066459A
公开(公告)日:2008-07-16
申请号:KR1020070003937
申请日:2007-01-12
Applicant: 삼성전자주식회사
IPC: G06F9/06
CPC classification number: G06F12/0684 , G06F11/006 , G06F12/0802
Abstract: A device and a method for detecting kernel stack overflow in an OS(Operating System) are provided to detect the kernel stack overflow by adding a protected area at the last part of a stack area allocated in a fixed size, and inducing page fault when a stack pointer enters the protected area. A kernel stack manager(310) initializes a stack by adding a protected area at the end part of a stack area when a kernel stack is generated. A page fault handler(320) outputs an error message when a page fault exception is generated when overflow occurs in the kernel stack. A virtual memory manager(330) manages addressing a memory used by the kernel and addressing the kernel stack. A page frame allocator(340) manages the memory in a page unit, and maps the memory to a virtual memory when the memory is allocated. The protected area of the stack area is allocated in one page unit and is initialized in a state that a physical page is not allocated.
Abstract translation: 提供了一种用于检测OS(操作系统)中的内核堆栈溢出的设备和方法,用于通过在分配给固定大小的堆栈区域的最后部分添加保护区域来检测内核堆栈溢出,并且当 堆栈指针进入保护区域。 内核堆栈管理器(310)通过在生成内核堆栈时在堆栈区域的末端添加保护区域来初始化堆栈。 当在内核堆栈中发生溢出时,页面错误处理程序(320)输出错误消息。 虚拟存储器管理器(330)管理寻址由内核使用的存储器并寻址内核堆栈。 页面分配器(340)以页面单元管理存储器,并且当分配存储器时将存储器映射到虚拟存储器。 堆栈区域的保护区域被分配为一页单位,并且在不分配物理页面的状态下被初始化。