We have a kernel module which is used on both real time (RT) and non-real time Linux kernel. Module uses the function get_user_pages_remote. However, there is a version check since the module needs to work for older kernels:

   res = get_user_pages_remote(...);
   res = get_user_pages(...);

I'm trying to build this module for kernel 4.4.88-18-rt, but it does not have get_user_pages_remote(...) API. Any suggestion on how to handle this?

  1. Should I check for rt version and use get_user_pages ?
  2. Is there a wrapper API common to all kernels which will internally call correct API?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.