1. A host system comprising at least one hardware processor configured to execute a hypervisor, the hypervisor further configured to: configure the at least one hardware processor to generate an exception in response to detecting a violation of a first memory access permission, the exception causing the at least one hardware processor to switch from executing a target function to executing a computer security program, wherein both the target function and the computer security program execute within a virtual machine exposed by the hypervisor, and wherein the computer security program is configured to determine whether the violation is indicative of a computer security threat; and configure the memory access permission so that a first attempt to execute the target function violates the first memory access permission, wherein the computer security program is further configured, in response to the at least one hardware processor switching from executing the target function to executing the computer security program, to cause the at least one hardware processor to switch from enforcing the first memory access permission to enforcing a second memory access permission, the second memory access permission configured so that a second attempt to execute the target function does not violate the second memory access permission.