IP Library Granted Patent US 8,713,294
Granted Patent B2
US 8,713,294 · App. 12/696,817 · Granted Apr 29, 2014

Heap/stack guard pages using a wakeup unit

Inventors: Thomas M. Gooding (Yorktown Heights, NY); David L. Satterfield (Yorktown Heights, NY); Burkhard Steinmacher-Burow (Yorktown Heights, NY)
Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,713,294
App. No.
12/696,817
Granted
Apr 29, 2014
Kind
B2
Abstract

A method and system for providing a memory access check on a processor including the steps of detecting accesses to a memory device including level-1 cache using a wakeup unit. The method includes invalidating level-1 cache ranges corresponding to a guard page, and configuring a plurality of wakeup address compare (WAC) registers to allow access to selected WAC registers. The method selects one of the plurality of WAC registers, and sets up a WAC register related to the guard page. The method configures the wakeup unit to interrupt on access of the selected WAC register. The method detects access of the memory device using the wakeup unit when a guard page is violated. The method generates an interrupt to the core using the wakeup unit, and determines the source of the interrupt. The method detects the activated WAC registers assigned to the violated guard page, and initiates a response.

Claims (53)

1. A method for memory access checking on a processor

in a computer system including a data storage device having a memory device, the memory device including a first level cache memory (level-1 cache), the computer system including a program stored in the data storage device and steps of the program being executed by a processor, said method comprising:

invalidating memory ranges within a first level cache memory in the memory device, the invalidated first level cache memory ranges in the memory device corresponding to a guard page, and said guard page being moved subject to a top of heap size change, the invalidating of memory ranges being executed by an operating system;

configuring a plurality of wakeup address compare (WAC) registers to allow access to selected WAC registers;

selecting one of the plurality of WAC registers using the operating system;

setting up the selected WAC register related to the invalidated memory ranges corresponding to said guard page using the operating system;

configuring a wakeup unit to interrupt on access of the selected WAC register using the operating system;

detecting access of the memory device between said level-1 cache and a second level cache memory using the wakeup unit when a guard page is violated;

generating an interrupt to the core using the wakeup unit;

querying the wakeup unit using the operating system when the interrupt is generated to determine the source of the interrupt;

detecting the activated WAC registers assigned to the violated guard page; and

initiating a response using the operating system after detecting the activated WAC registers.

2. The method of claim 1 , further comprising:

moving the invalidated memory ranges using the operating system when a top of a heap changes size.

3. The method of claim 1 , further comprising: invalidating levels of the cache memory between the wakeup unit and the processor.

4. The method of claim 1 , wherein the response includes delivering a signal using the operating system after detecting the activated WAC registers.

5. The method of claim 1 , wherein the response includes terminating an application.

6. The method of claim 2 , wherein the memory device includes cache memory, the cache memory being positioned adjacent the wakeup unit and between the processor and the wakeup unit, when the cache memory fetches data from a guard page or stores data into the guard page, the wakeup unit sends an interrupt to a core of the wakeup unit.

7. The method of claim 1 , further comprising: modifying the guard page by creating, repositioning or resizing the guard page.

8. The method of claim 1 , further comprising: triggering a fault when detecting a data read hit in the guard page.

9. The method of claim 1 , wherein the wakeup unit is external to the processor.

10. The method of claim 1 wherein the plurality of WAC registers are configured as a base address and a bit mask.

11. The method of claim 1 , wherein the plurality of WAC registers are configured as a base address and a length.

12. The method of claim 1 , wherein the WAC registers are configured as a base starting address and a base ending address.

13. The method of claim 1 , further comprising:

sending an interrupt command to a main hardware thread residing on a different core for changing a guard page of the main hardware thread.

14. The method of claim 2 , further comprising:

initiating a size change of the heap using a thread; and

updating the plurality of WAC registers of the wakeup unit using the thread.

15. The method of claim 3 , wherein the wakeup unit detects memory accesses between a cache-level above the wakeup unit and a cache-level below the wakeup unit.

16. A computer program product for memory access checking on a computer system, said computer program product comprising a computer readable medium, the computer readable medium not only a propagating signal, said computer readable medium having recorded therein computer readable instructions for:

invalidating memory ranges within a first level cache memory in the memory device, the invalidated first level cache memory ranges in the memory device corresponding to a guard page, and said guard page being moved subject to a top of heap size change, the invalidating of memory ranges being executed by an operating system;

configuring a plurality of wakeup address compare (WAC) registers to allow access to selected WAC registers;

selecting one of the plurality of WAC registers using the operating system;

setting up the selected WAC register related to the invalidated memory ranges corresponding to said guard page using the operating system;

configuring a wakeup unit to interrupt on access of the selected WAC register using the operating system;

detecting access of the memory device between said level-1 cache and a second level cache memory using the wakeup unit when a guard page is violated;

generating an interrupt to the core using the wakeup unit;

querying the wakeup unit using the operating system when the interrupt is generated to determine the source of the interrupt;

detecting the activated WAC registers assigned to the violated guard page; and

initiating a response using the operating system after detecting the activated WAC registers.

17. The computer program product of claim 16 , further comprising:

moving the invalidated memory ranges using the operating system when a top of a heap changes size.

18. The computer program product of claim 16 , further comprising invalidating levels of the cache memory between the wakeup unit and the processor.

19. A system for providing memory access checking on a processor, comprising:

a computer system including a data storage device, the computer system including a program stored in the data storage device and steps of the program being executed by a processor;

a memory device including level-1 cache;

an operating system for invalidating level-1 cache ranges corresponding to a guard page, and said guard page being moved subject to a top of heap size change;

a plurality of wakeup address compare (WAC) registers being configured to allow access to selected WAC registers, one of the plurality of WAC registers being selected using the operating system;

a WAC register being related to invalidated memory ranges corresponding to the guard page;

a wakeup unit interrupting on access of the selected WAC register using the operating system, the wakeup unit detecting access of the memory device between said level-1 cache and a second level cache memory when a guard page is violated;

an interrupt being generated to the core using the wakeup unit; the source of the interrupt being determined by querying the wakeup unit using the operating system when the interrupt is generated; and

a response initiated by the operating system after detecting activated WAC registers when access of the memory device is detected using the wakeup unit when the guard age page is violated.

Assignments (2)
CONFIRMATORY LICENSE Recorded Nov 1, 2012
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: U.S. DEPARTMENT OF ENERGY
Reel/Frame 029228/0696 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 7, 2010
From: GOODING, THOMAS M.; SATTERFIELD, DAVID L.; STEINMACHER-BUROW, BURKHARD
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 024354/0062 →
Continuity (4)
Provisional Application 61261269 · Nov 13, 2009
Provisional Application 61293611 · Jan 8, 2010
Provisional Application 61295669 · Jan 15, 2010
Related Publication 20110119445A1 · May 19, 2011