A processor comprising: a decode unit to decode an instruction; a shadow stack, wherein the shadow stack is to store copies of return addresses that are stored on a call stack but is not to store user-level data passed as parameters to called procedures; and an execution unit coupled with the decode unit, the execution unit, in response to the instruction, to: determine that an attempted change due to the instruction, to a shadow stack pointer, SSP, of the shadow stack, would cause the SSP to exceed an allowed range; and take an exception in response to determining that the attempted change to the SSP would cause the SSP to exceed the allowed range, characterized in that: the instruction is a restore shadow stack pointer instruction, the restore shadow stack pointer instruction to indicate a given SSP value, wherein the execution unit is to: determine that the given SSP value does not exceed the allowed range for the shadow stack; determine that the given SSP value indicated by the instruction is compatible with an SSP value received from the shadow stack; and change the SSP of the shadow stack to the given SSP value, wherein the allowed range is an allowed linear address range and is to be specified by privileged system software. a decode unit to decode an instruction; a shadow stack, wherein the shadow stack is to store copies of return addresses that are stored on a call stack but is not to store user-level data passed as parameters to called procedures; and an execution unit coupled with the decode unit, the execution unit, in response to the instruction, to: determine that an attempted change due to the instruction, to a shadow stack pointer, SSP, of the shadow stack, would cause the SSP to exceed an allowed range; and take an exception in response to determining that the attempted change to the SSP would cause the SSP to exceed the allowed range, characterized in that: the instruction is a restore shadow stack pointer instruction, the restore shadow stack pointer instruction to indicate a given SSP value, wherein the execution unit is to: determine that the given SSP value does not exceed the allowed range for the shadow stack; determine that the given SSP value indicated by the instruction is compatible with an SSP value received from the shadow stack; and change the SSP of the shadow stack to the given SSP value, wherein the allowed range is an allowed linear address range and is to be specified by privileged system software. determine that an attempted change due to the instruction, to a shadow stack pointer, SSP, of the shadow stack, would cause the SSP to exceed an allowed range; and take an exception in response to determining that the attempted change to the SSP would cause the SSP to exceed the allowed range, characterized in that: the instruction is a restore shadow stack pointer instruction, the restore shadow stack pointer instruction to indicate a given SSP value, wherein the execution unit is to: determine that the given SSP value does not exceed the allowed range for the shadow stack; determine that the given SSP value indicated by the instruction is compatible with an SSP value received from the shadow stack; and change the SSP of the shadow stack to the given SSP value, wherein the allowed range is an allowed linear address range and is to be specified by privileged system software. the instruction is a restore shadow stack pointer instruction, the restore shadow stack pointer instruction to indicate a given SSP value, wherein the execution unit is to: determine that the given SSP value does not exceed the allowed range for the shadow stack; determine that the given SSP value indicated by the instruction is compatible with an SSP value received from the shadow stack; and change the SSP of the shadow stack to the given SSP value, determine that the given SSP value does not exceed the allowed range for the shadow stack; determine that the given SSP value indicated by the instruction is compatible with an SSP value received from the shadow stack; and change the SSP of the shadow stack to the given SSP value, wherein the allowed range is an allowed linear address range and is to be specified by privileged system software.