0

I'm trying to build ClearCase MVFS kernel module under CentOS 8, kernel 4.18. The build failed because the code references struct task_struct.state (from linux/sched.h). This member exists in vanilla kernels up to 5.13. In the CentOS kernel, is has been renamed using the macro RH_KABI_REPLACE_SPLIT from state to __state.

So, whats the purpose of RH_KABI_REPLACE_SPLIT here?

  • I don't know anything about RH_KABI_REPLACE_SPLIT, but I do know that the `state` member was renamed to `__state` in the mainline (vanilla) kernel sources for 5.14 by [commit 2f064a59a11f](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2f064a59a11ff9bc22e52e9678bc601404c7cb34). Note that there is a macro `get_current_state()` that returns the state of the `current` task, if it helps. – Ian Abbott Apr 25 '22 at 14:25
  • RedHat keeps the same kernel but backports important fixes and new features. – stark Apr 25 '22 at 16:12
  • Thank you so far... In effect, this means a RedHat 4.18 has an different API compared to a vanilla 4.18 and building that kernel module for a RH 4.18 will not work despite that 4.18 is supported? – Jörg Weichelt May 03 '22 at 06:26

0 Answers0