Efficient storage of memory version data
First Claim
1. A computing system comprising:
- a processor;
a physical memory coupled to the processor; and
an operating system (OS);
wherein the processor is configured to;
detect a first data structure is to be allocated in the physical memory;
send an indication to the OS to allocate the first data structure in the physical memory;
receive from the OS a pointer indicating a first location in the physical memory where the first data structure is stored;
associate a first version number with the first data structure; and
store the first version number in a second location in the physical memory, wherein the second location is associated with the first location;
wherein the physical memory comprises a plurality of banks, and wherein the first data structure is stored in a first bank of the plurality of banks, and the first version number is stored in a spare bank corresponding to the first bank;
wherein in response to a failure of the first bank and lack of an additional spare bank corresponding to the first bank, data corresponding to the first bank is copied to the spare bank and no version number is stored for the data copied to the spare bank.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems and methods for efficient memory corruption detection in a processor. A processor detects a first data structure is to be allocated in a physical memory. The physical memory may be a DRAM with a spare bank of memory reserved for a hardware failover mechanism. Either the processor or an operating system (OS) determines a first version number corresponding to the first data structure. During initialization of the first data structure, the first version number may be stored in a first location in the spare bank. The processor receives from the OS a pointer holding the first version number. When the processor executes memory access operations targeting the first data structure, the processor compares the first version number with a third version number stored in a location in the physical memory indicated by the memory access address. The processor may set a trap in response to determining a mismatch.
19 Citations
17 Claims
-
1. A computing system comprising:
-
a processor; a physical memory coupled to the processor; and an operating system (OS); wherein the processor is configured to; detect a first data structure is to be allocated in the physical memory; send an indication to the OS to allocate the first data structure in the physical memory; receive from the OS a pointer indicating a first location in the physical memory where the first data structure is stored; associate a first version number with the first data structure; and store the first version number in a second location in the physical memory, wherein the second location is associated with the first location; wherein the physical memory comprises a plurality of banks, and wherein the first data structure is stored in a first bank of the plurality of banks, and the first version number is stored in a spare bank corresponding to the first bank; wherein in response to a failure of the first bank and lack of an additional spare bank corresponding to the first bank, data corresponding to the first bank is copied to the spare bank and no version number is stored for the data copied to the spare bank. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method for a processor, the method comprising:
-
detecting a first data structure is to be allocated in the physical memory; determining a first version number corresponding to the first data structure; sending an indication to the OS to allocate the first data structure in the physical memory; receiving from the OS a pointer indicating a first location in the physical memory where the first data structure is stored; associating a first version number with the first data structure; and storing the first version number in a second location in the physical memory, wherein the second location is associated with the first location; wherein the physical memory comprises a plurality of banks, and wherein the first data structure is stored in a first bank of the plurality of banks, and the first version number is stored in a spare bank corresponding to the first bank; wherein in response to a failure of the first bank and lack of an additional spare bank corresponding to the first bank, data corresponding to the first bank is copied to the spare bank and no version number is stored for the data copied to the spare bank. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A processor comprising:
-
a first interface to a memory subsystem comprising at least a physical memory; a second interface to an operating system (OS); a multi-stage pipeline for executing instructions received via the first interface; and circuitry; wherein the circuitry is configured to; detect a first data structure is to be allocated in the physical memory; send an indication to the OS to allocate the first data structure in the physical memory; receive from the OS a pointer indicating a first location in the physical memory where the first data structure is stored; associate a first version number with the first data structure; and store the first version number in a second location in the physical memory, wherein the second location is associated with the first location; wherein the physical memory comprises a plurality of banks, and wherein the first data structure is stored in a first bank of the plurality of banks, and the first version number is stored in a spare bank corresponding to the first bank; wherein in response to a failure of the first bank and lack of an additional spare bank corresponding to the first bank, data corresponding to the first bank is copied to the spare bank and no version number is stored for the data copied to the spare bank. - View Dependent Claims (16, 17)
-
Specification