panda_in_kernel_code_linux_external

Function panda_in_kernel_code_linux_external 

Source
pub unsafe extern "C" fn panda_in_kernel_code_linux_external(
    cpu: *mut CPUState,
) -> bool
Expand description

panda_in_kernel_code_linux_external() - Determine if current pc is kernel code. @cpu: Cpu state.

Determines if guest is currently executing kernelspace code, regardless of privilege level. Necessary because there’s a small bit of kernelspace code that runs AFTER a switch to usermode privileges. Therefore, certain analysis logic can’t rely on panda_in_kernel_mode() alone.

Return: true if pc is in kernel, false otherwise.