IP Library Granted Patent US 10,229,266
Granted Patent B2
US 10,229,266 · App. 15/435,474 · Granted Mar 12, 2019

Architected store and verify guard word instructions

Inventor: Michael K. Gschwind (Chappaqua, NY)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F21/54G06F9/30021G06F9/30043G06F9/30098G06F11/141G06F11/167G06F11/3024G06F11/3037G06F21/52G06F9/30072G06F2212/451G06F2221/034
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 10,229,266
App. No.
15/435,474
Granted
Mar 12, 2019
Kind
B2
Abstract

Corruption of call stacks is detected by using guard words placed in the call stacks. A store guard word instruction is used to store a guard word on a stack frame of a caller routine, and a verify guard word instruction issued by one or more callee routines is used to verify the guard word is an expected value. If the guard word is an unexpected value, corruption is indicated.

Claims (44)

1. A computer system for facilitating detection of corruption of stacks of a computing environment, said computer system comprising:

a memory; and

a processor in communication with the memory, wherein the computer system is configured to perform the following comprising:

obtaining, by the processor, an instruction, the instruction having an operation code specifying a store guard word operation; and

executing the instruction, the executing comprising:

obtaining a guard word from a defined location; and

storing the guard word obtained from the defined location in a selected location determined from the instruction, the selected location being within a stack frame created by a caller routine and located in the memory, the caller routine to call a plurality of called routines, and wherein the guard word stored in the stack frame created by the caller routine is to be used by the plurality of called routines called by the caller routine to determine whether the stack frame has been corrupted.

2. The computer system of claim 1 , wherein the executing is performed by the caller routine.

3. The computer system of claim 1 , wherein the method further comprises verifying whether the guard word is an expected value to determine whether the stack frame has been corrupted, wherein based on the guard word being an unexpected value, the stack frame is corrupted.

4. The computer system of claim 3 , wherein the verifying comprises using a verify guard word instruction to verify the guard word, the verify guard word instruction performing the following:

obtaining the guard word from the selected location within the stack frame;

comparing the guard word obtained from the selected location within the stack frame to the guard word in the defined location; and

providing an indication of corruption based on the compare indicating a mismatch.

5. The computer system of claim 4 , wherein the defined location comprises a guard word register.

6. The computer system of claim 4 , wherein the corruption is an indication that a return address to be used by one or more called routines of the caller routine has been changed to an unexpected value.

7. The computer system of claim 4 , wherein the verify guard word instruction is issued by a called routine of the caller routine prior to returning to a return address specified in the stack frame.

8. The computer system of claim 1 , wherein the instruction further includes at least one field to be used to determine the selected location to store the guard word.

9. A computer program product for facilitating detection of corruption of stacks of a computing environment, said computer program product comprising:

a non-transitory computer readable storage medium readable by a processing circuit and storing instructions for performing the following comprising:

obtaining an instruction, the instruction having an operation code specifying a store guard word operation; and

executing the instruction, the executing comprising:

obtaining a guard word from a defined location; and

storing the guard word obtained from the defined location in a selected location determined from the instruction, the selected location being within a stack frame created by a caller routine and located in memory, the caller routine to call a plurality of called routines, and wherein the guard word stored in the stack frame created by the caller routine is to be used by the plurality of called routines to determine whether the stack frame has been corrupted.

10. The computer program product of claim 9 , wherein the method further comprises verifying whether the guard word is an expected value to determine whether the stack frame has been corrupted, wherein based on the guard word being an unexpected value, the stack frame is corrupted.

11. The computer program product of claim 10 , wherein the verifying comprises using a verify guard word instruction to verify the guard word, the verify guard word instruction performing the following:

obtaining the guard word from the selected location within the stack frame;

comparing the guard word obtained from the selected location within the stack frame to the guard word in the defined location; and

providing an indication of corruption based on the compare indicating a mismatch.

12. The computer program product of claim 11 , wherein the corruption is an indication that a return address to be used by one or more called routines of the caller routine has been changed to an unexpected value.

13. The computer program product of claim 11 , wherein the verify guard word instruction is issued by a called routine of the caller routine prior to returning to a return address specified in the stack frame.

14. The computer program product of claim 9 , wherein the instruction further includes at least one field to be used to determine the selected location to store the guard word.

15. A computer-implemented method of facilitating detection of corruption of stacks of a computing environment, said computer-implemented method comprising:

obtaining, by a processor, an instruction, the instruction having an operation code specifying a store guard word operation; and

executing the instruction, the executing comprising:

obtaining a guard word from a defined location; and

storing the guard word obtained from the defined location in a selected location determined from the instruction, the selected location being within a stack frame created by a caller routine and located in memory, the caller routine to call a plurality of called routines, and wherein the guard word stored in the stack frame created by the caller routine is to be used by the plurality of called routines to determine whether the stack frame has been corrupted.

16. The computer-implemented method of claim 15 , further comprising verifying whether the guard word is an expected value to determine whether the stack frame has been corrupted, wherein based on the guard word being an unexpected value, the stack frame is corrupted.

17. The computer-implemented method of claim 16 , wherein the verifying comprises using a verify guard word instruction to verify the guard word, the verify guard word instruction performing the following:

obtaining the guard word from the selected location within the stack frame;

comparing the guard word obtained from the selected location within the stack frame to the guard word in the defined location; and

providing an indication of corruption based on the compare indicating a mismatch.

18. The computer-implemented method of claim 17 , wherein the corruption is an indication that a return address to be used by one or more called routines of the caller routine has been changed to an unexpected value.

19. The computer-implemented method of claim 17 , wherein the verify guard word instruction is issued by a called routine of the caller routine prior to returning to a return address specified in the stack frame.

20. The computer-implemented method of claim 15 , wherein the instruction further includes at least one field to be used to determine the selected location to store the guard word.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 17, 2017
From: GSCHWIND, MICHAEL K.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 041284/0641 →
Continuity (2)
Continuation 14989240 · Jan 6, 2016
Related Publication 20170193224A1 · Jul 6, 2017
Cited By (1)
US 12,639,476