IP Library › Granted Patent US 11,921,631
Granted Patent B2
US 11,921,631 · App. 17/137,666 · Granted Mar 5, 2024

Dedicated bound information register file for protecting against out-of-bounds memory references

Inventors: Tong Chen (Yorktown Heights, NY); Alper Buyuktosunoglu (White Plains, NY); Richard H. Boivie (Monroe, CT)
Assignee: International Business Machines Corporation
G06F12/0802G06F9/3001G06F2212/1021
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 11,921,631
App. No.
17/137,666
Granted
Mar 5, 2024
Kind
B2
Abstract

A method, system and apparatus for protecting against out-of-bounds references, including storing an address of a buffer in a general register and storing bounds information (BI) for the buffer in a bounds information register, and when a content of the general register is used as an address in a load or store operation, using a content of the bounds information register to determine if the load or store is out of bounds.

Claims (65)

1. A method of protecting against out-of-bounds references, comprising:

storing an address of a buffer in a general register and storing bounds information (BI) for the buffer in a bounds information register; and

when a content of the general register is referenced to as an address in a load or store operation, using a content of the bounds information register comprising the bounds information (BI) for the buffer to determine when the load or store operation is out of bounds.

2. The method according to claim 1 , further comprising:

storing the bounds information in the bounds information register in a bounds information register file;

generating an index table in a memory from the bounds information;

generating a value and a key table in the memory from the bounds information; and

protecting against the out-of-bounds references using the index table and the value and key table.

3. The method according to claim 1 , comprising when a first address in the general register is used to compute a second address in an array indexing or pointer arithmetic, the bounds information for the first address is used as the bounds information for the second address.

4. The method according to claim 2 , wherein which one of the index table or the value and key table is accessed is based on heuristics,

wherein the index table is accessed by an index,

wherein each entry of the index table includes a starting address and a length of the buffer, and

wherein the bounds information is mapped with the general register.

5. The method according to claim 2 , wherein the value and key table is accessed with a pointer value as a key, and

wherein each entry of the value and key table includes a key of a pointer value, a starting address and a length of the buffer.

6. The method of claim 1 , wherein the bounds information includes a starting address and a length for each buffer,

wherein the bounds information for a pointer can be located from original instructions, and

wherein a processor includes a bound processing unit that executes operations for the protecting against out-of-bounds references.

7. The method according to claim 1 , comprising:

when the address in the general register is assigned to a second general register, the bounds information for a first register is used as the bounds information for a second register; and

storing the bounds information in the bounds information register in a bounds information register file.

8. A system for protecting against out-of-bounds references, comprising:

a memory storing computer instructions; and

a processor configured to execute the computer instructions to:

store an address of a buffer in a general register and storing bounds information (BI) for the buffer in a bounds information register; and

when a content of the general register is used as an address in a load or store operation, use a content of the bounds information register to determine when the load or store operation is out of bounds.

9. The system according to claim 8 , further comprising the processor configured to execute the computer instructions to:

store the bounds information in the bounds information register in a bounds information register file;

generate an index table in the memory from the bounds information;

generate a value and a key table in the memory from the bounds information; and

protect against out-of-bounds references using the index table and the value and the key table.

10. The system according to claim 8 , comprising when a first address in the general register is used to compute a second address in an array indexing or pointer arithmetic, the bounds information for the first address is used as the bounds information for the second address.

11. The system according to claim 9 , wherein which one of the index table or the value and key table is accessed is based on heuristics,

wherein the index table is accessed by an index,

wherein each entry of the index table includes a starting address and a length of a buffer, and

wherein the bounds information is mapped with the general register.

12. The system according to claim 9 , wherein the value and key table is accessed with a pointer value as a key, and

wherein each entry of the value and key table includes a key of a pointer value, starting address and a length of a buffer.

13. The system according to claim 8 , wherein the processor includes a bound processing unit that executes operations for the protecting against out-of-bounds references,

wherein the bound information includes a start address and a length for each buffer, and

wherein the bound information for a pointer can be located from original instructions.

14. The system according to claim 8 , comprising when the address in the general register is assigned to a second general register, the bounds information for a first register is used as the bounds information for a second register,

wherein the bounds information is mapped with the general register,

wherein a value and a key table generated from the bounds information is accessed with a pointer value as a key,

wherein the bounds information includes a starting address and a length for each buffer, and

wherein the general register is separate from the bounds information register dedicated to storing the bounds information.

15. A computer program product for protecting against out-of-bounds references, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions readable and executable by a computer to cause the computer to perform a method, comprising:

storing an address of a buffer in a general register and storing bounds information (BI) for the buffer in a bounds information register; and

when a content of the general register is used as an address in a load or store operation, using a content of the bounds information register to determine if the load or store operation is out of bounds.

16. The computer program product according to claim 15 , further comprising:

storing the bounds information in the bounds information register in a bounds information register file;

generating an index table in a memory from the bounds information;

generating a value and a key table in the memory from the bounds information; and

protecting against out-of-bounds references using the index table and the value and key table.

17. The computer program product according to claim 15 , comprising when a first address in the general register is assigned to a second general register or used to compute a second address in array indexing or pointer arithmetic, the bounds information for the first address is used as the bounds information for the second general register.

18. The computer program product according to claim 16 , wherein which one of the index table or the value and key table is accessed is based on heuristics,

wherein the index table is accessed by an index,

wherein each entry of the index table includes a starting address and a length of the buffer, and

wherein the bounds information is mapped with the general register.

19. The computer program product according to claim 16 ,

wherein a processor includes a bound processing unit that executes operations for the protecting against out-of-bounds references,

wherein the value and key table is accessed with a pointer value as a key, and

wherein each entry of the value and key table includes a key of a pointer value, a starting address and a length of the buffer.

20. The computer program product according to claim 15 , wherein the bounds information includes a start in address and length for each buffer, and

wherein the bound information for a pointer can be located from original instructions.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 30, 2020
From: CHEN, TONG; BUYUKTOSUNOGLU, ALPER; BOIVIE, RICHARD H.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 054871/0437 →
Continuity (1)
Related Publication 20220206943A1 · Jun 30, 2022