CPC G06F 21/52 (2013.01) [G06F 12/10 (2013.01); G06F 2212/657 (2013.01); G06F 2221/033 (2013.01)] | 20 Claims |
1. A method, implemented at a computer system that includes a processor, for memory fault handling based on detecting whether a memory pointer was invalidated by a pointer authentication (PA) failure, the method comprising:
identifying a memory pointer, an access to which caused a memory fault at the processor during execution of an application program;
detecting that the memory pointer was invalidated by a PA failure, including:
creating a new memory pointer by replacing a plurality of reserved bits of the memory pointer with a default value of the plurality of reserved bits; and
determining that the new memory pointer corresponds to a memory address that falls within an executable memory location, based on at least one of:
determining that a call instruction is stored at a prior memory address that immediately precedes the memory address; or
determining that the memory address corresponds to a memory region mapped to a code section of an executable file; and
based at least on detecting that the memory pointer was invalidated by a PA failure, handling the PA failure, including performing at least one of:
logging the PA failure;
terminating the application program; or
resuming execution at a machine code instruction stored at the memory address.
|