Adjust runtime/linux/task_finder2.c to work with Linux 6.1 kernels
Unlike the earlier kernels the mm_struct does not have mmap field in
the Linux 6.1 kernel. This required some adjustments to the
'__stp_call_mmap_callbacks_for_task function to work with the newer
kernel. Newer kernels use VMA_ITERATOR and for_each_vma macros to
access the equivalent to the vma information accessed from the mmap
field. When reviewing the commit history of the Linux kernel found git
commit 3a4f7ef4be by Liam Howlett that provided backward compatible
VMA_ITERATOR and for_each_vma macros in cases where those macros were
not available. This approach was adapted for task_finder2.c and
allows the code to compile on both the old and new kernels.
1 file changed