memflow-kvm
memflow-kvm copied to clipboard
Add checks for RHEL8.8
It would be worth testing on a machine that isn't redhat to make sure this doesn't cause issues
I don't quite trust this mechanism working really well, because it is not clear which older versions it was backported to. I think ideal thing to check would be existence of mmap_lock.h file:
$ grep -r "mmap_write_lock" /lib/modules/$(uname -r)/source
/lib/modules/6.2.9-200.fc37.x86_64/source/include/linux/mmu_notifier.h: mmap_write_lock(mm);
/lib/modules/6.2.9-200.fc37.x86_64/source/include/linux/mmap_lock.h:static inline void mmap_write_lock(struct mm_struct *mm)
/lib/modules/6.2.9-200.fc37.x86_64/source/include/linux/mmap_lock.h:static inline void mmap_write_lock_nested(struct mm_struct *mm, int subclass)
/lib/modules/6.2.9-200.fc37.x86_64/source/include/linux/mmap_lock.h:static inline int mmap_write_lock_killable(struct mm_struct *mm)
Could you check for existence of the file in the Makefile and define a variable, something like HAS_MMAP_LOCK?