Skip to content

Conversation

@tristan-hornetz
Copy link

During initialization, the PTEditor kernel module for Linux uses kprobes to get the address for the kallsyms_lookup_name function. However, the address obtained this way does not point to an endbr64 or endbr32 instruction. On CPUs with Intel CET, where the kernel uses Indirect Branch Tracking, calling this address causes a crash.

This commit adds a trampoline for kallsyms_lookup_name , which allows for calling it safely without having to disable Indirect Branch Tracking. Since setting up this trampoline involves hot-patching code, it the commit also adds helper functions to access CR0 and CR4, which we need to modify to disable access restrictions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant