lkrg-org / lkrg

Linux Kernel Runtime Guard
https://lkrg.org
Other
404 stars 72 forks source link

Fix jump label support for 5.10.133+ #221

Closed solardiz closed 1 year ago

solardiz commented 1 year ago

As seen in https://github.com/lkrg-org/lkrg/issues/208#issuecomment-1198324555 and confirmed by https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.10.133 that very recent longterm kernel includes the "problematic" back-port. We need to adapt our kernel version checks accordingly.

solardiz commented 1 year ago

Maybe instead of checking specific longterm kernel revisions, we can check for the presence of ASM_RET macro, which is introduced as part of the same change set:

https://github.com/torvalds/linux/commit/b17c2baa305cccbd16bafa289fd743cc2db77966

Both 5.15.40 and 5.10.133 included this commit as well, so hopefully further backports (to even older branches) will include it as well.