主权项 |
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:
creating, by a caller routine executing on the processor, a stack frame;writing, by the caller routine, a guard word to a guard word memory location within the stack frame created by the caller routine, the writing comprising using a store guard word instruction, the store guard word instruction having an operation code specifying a store guard word operation and one or more fields to provide an address of the guard word memory location within the stack frame created by the caller routine, and the store guard word instruction obtaining the guard word from a guard word register and storing the guard word obtained from the guard word register in the guard word memory location within the stack frame created by the caller routine and indicated by the address;calling by the caller routine a callee routine;storing, by the callee routine, a return address of the callee routine in a memory location within the stack frame created by the caller routine;reading, by the callee routine, the return address from the stack frame created by the caller routine; andverifying, by the callee routine, the guard word stored in the stack frame created by the caller routine, the verifying using a verify guard word instruction, the verify guard word instruction having an operation code to indicate a verify guard word operation and at least one field to be used to provide the address of the guard word memory location within the stack frame created by the caller routine, the verify guard word instruction obtaining the guard word from the guard word memory location within the stack frame created by the caller routine, comparing the guard word obtained from the guard word memory location within the stack frame created by the caller routine to the guard word in the guard word register, and providing an indication of corruption based on the compare indicating a mismatch. |