Patent ID: 8261065

Claim:
A method for restricting access to a call stack constructed by a plurality of codes of a first function from a second function, the method comprising: calling the second function by the first function, wherein data and addresses of the plurality of codes of the first function are stored in a stack page in a memory device and colored in a first color assigned to the first function; passing control of an order of execution of instructions of the first and second functions to a transition page in a memory device, the transition page configured to receive a call from the first function to the second function and to set a Parallel Page Table Entry (PPTE), the PPTE having a first and at least a second field associated with the first function and the second function, respectively, the first and second field having a first and a second number of bits, respectively, configured to represent colors; performing an access control check via a transition page for verifying whether the first function has permission to call the second function; protecting a portion of a call stack of the first function from the second function via the transition page by setting the first number of bits of the first field of the PPTE to a second color; executing the second function by pushing addresses of the second function on a stack page, the addresses of the second function colored in a third color by setting the second number of bits in the second field via the transition page to represent the third color; and unprotecting the portion of the call stack of the first function via the transition page by setting the first number of bits of the first field of the PPTE to the first color; and the addresses of the plurality of codes are colored in the first color, the second color and the third color by using bit patterns in a page table entry associated with the stack page.