Description of problem: systemtap creates kernel modules that are not compatible with the latest kernel headers distributed Version-Release number of selected component (if applicable): 4.3-2.fc32 How reproducible: 100% Steps to Reproduce: 1. Set up a machine with current Fedora 32 code: - "vagrant init fedora/32-cloud-base" - tweak config to set 4 cpus, 2 GB memory - "vagrant up" -> I got libvirt box version 32.20200422.0 - log in, sudo, "dnf upgrade -y" - kernel got upgraded to 5.8.18-200.fc32, so reboot 2. Install systemtap - log in, sudo, "dnf install -y systemtap" 3. Run a simple stap test: "stap -e 'probe begin { print("hi\n"); exit(); }'" Actual results: In file included from /usr/share/systemtap/runtime/linux/runtime.h:31, from /usr/share/systemtap/runtime/runtime.h:26, from /tmp/stapIyyxFh/stap_ec249c1d27c61ffd7b78dbeb5bf71ae2_988_src.c:21: ./include/linux/vermagic.h:6:2: error: #error "This header can be included from kernel/module.c or *.mod.c only" 6 | #error "This header can be included from kernel/module.c or *.mod.c only" | ^~~~~ In file included from /usr/share/systemtap/runtime/linux/runtime.h:230, from /usr/share/systemtap/runtime/runtime.h:26, from /tmp/stapIyyxFh/stap_ec249c1d27c61ffd7b78dbeb5bf71ae2_988_src.c:21: /usr/share/systemtap/runtime/linux/access_process_vm.h: In function ‘__access_process_vm_’: /usr/share/systemtap/runtime/linux/access_process_vm.h:32:19: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’? 32 | down_read (&mm->mmap_sem); | ^~~~~~~~ | mmap_base /usr/share/systemtap/runtime/linux/access_process_vm.h:87:17: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’? 87 | up_read (&mm->mmap_sem); | ^~~~~~~~ | mmap_base In file included from /usr/share/systemtap/runtime/linux/task_finder.c:17, from /usr/share/systemtap/runtime/linux/runtime.h:243, from /usr/share/systemtap/runtime/runtime.h:26, from /tmp/stapIyyxFh/stap_ec249c1d27c61ffd7b78dbeb5bf71ae2_988_src.c:21: /usr/share/systemtap/runtime/linux/task_finder2.c: In function ‘__stp_call_mmap_callbacks_with_addr’: /usr/share/systemtap/runtime/linux/task_finder2.c:740:31: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’? 740 | if (! down_read_trylock(&mm->mmap_sem)) | ^~~~~~~~ | mmap_base /usr/share/systemtap/runtime/linux/task_finder2.c:758:17: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’? 758 | up_read(&mm->mmap_sem); | ^~~~~~~~ | mmap_base /usr/share/systemtap/runtime/linux/task_finder2.c:785:15: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’? 785 | up_read(&mm->mmap_sem); | ^~~~~~~~ | mmap_base /usr/share/systemtap/runtime/linux/task_finder2.c: In function ‘__stp_call_mmap_callbacks_for_task’: /usr/share/systemtap/runtime/linux/task_finder2.c:1223:31: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’? 1223 | if (! down_read_trylock(&mm->mmap_sem)) { | ^~~~~~~~ | mmap_base /usr/share/systemtap/runtime/linux/task_finder2.c:1277:15: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’? 1277 | up_read(&mm->mmap_sem); | ^~~~~~~~ | mmap_base make[1]: *** [scripts/Makefile.build:280: /tmp/stapIyyxFh/stap_ec249c1d27c61ffd7b78dbeb5bf71ae2_988_src.o] Error 1 make: *** [Makefile:1752: /tmp/stapIyyxFh] Error 2 WARNING: kbuild exited with status: 2 Pass 4: compilation failed. [man error::pass4] Expected results: Prints message "hi" Additional info: # stap --version Systemtap translator/driver (version 4.3/0.181/0.179, rpm 4.3-2.fc32) Copyright (C) 2005-2020 Red Hat, Inc. and others This is free software; see the source for copying conditions. tested kernel versions: 2.6.32 ... 5.7.0 enabled features: AVAHI BOOST_STRING_REF DYNINST BPF JAVA PYTHON3 LIBRPM LIBSQLITE3 LIBVIRT LIBXML2 NLS NSS READLINE MONITOR_LIBS
Please test out the stap 4.4 build in the -testing repo and supply some sweet karma if it works for you. https://bodhi.fedoraproject.org/updates/FEDORA-2020-0cddb6e0ff
thanks a lot for testing!