get_mm_exe_file got unexported. Deal with it the usual way.
output_exportconf(s, o2, "synchronize_sched", "STAPCONF_SYNCHRONIZE_SCHED");
output_autoconf(s, o, cs, "autoconf-task-uid.c", "STAPCONF_TASK_UID", NULL);
output_autoconf(s, o, cs, "autoconf-from_kuid_munged.c", "STAPCONF_FROM_KUID_MUNGED", NULL);
- output_exportconf(s, o2, "get_mm_exe_file", "STAPCONF_GET_MM_EXE_FILE");
+ output_exportconf(s, o2, "get_mm_exe_file", "STAPCONF_GET_MM_EXE_FILE_EXPORTED");
output_dual_exportconf(s, o2, "alloc_vm_area", "free_vm_area", "STAPCONF_VM_AREA");
output_autoconf(s, o, cs, "autoconf-procfs-owner.c", "STAPCONF_PROCFS_OWNER", NULL);
output_autoconf(s, o, cs, "autoconf-alloc-percpu-align.c", "STAPCONF_ALLOC_PERCPU_ALIGN", NULL);
#if !defined(STAPCONF___LOCK_TASK_SIGHAND_EXPORTED)
static void *kallsyms___lock_task_sighand;
#endif
+#if !defined(STAPCONF_GET_MM_EXE_FILE_EXPORTED)
+static void *kallsyms_get_mm_exe_file;
+#endif
#include "access_process_vm.h"
#include "loc2c-runtime.h"
// still use our own code. The original get_mm_exe_file() can
// sleep (since it calls down_read()), so we'll have to roll
// our own.
-#if defined(STAPCONF_DPATH_PATH) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
+#if defined(STAPCONF_GET_MM_EXE_FILE_EXPORTED) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
return get_mm_exe_file(mm);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
+ typedef typeof(&get_mm_exe_file) get_mm_exe_file_fn;
+ if (kallsyms_get_mm_exe_file == NULL)
+ return NULL; /* can't happen; _stp_handle_start would abort before this point */
+ else
+ return (* (get_mm_exe_file_fn) kallsyms_get_mm_exe_file)(mm);
#else
struct file *exe_file = NULL;
goto err0;
}
#endif
+#if !defined(STAPCONF_GET_MM_EXE_FILE_EXPORTED) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
+ kallsyms_get_mm_exe_file = (void*) kallsyms_lookup_name ("get_mm_exe_file");
+ if (kallsyms_get_mm_exe_file == NULL) {
+ _stp_error("Can't resolve get_mm_exe_file!");
+ goto err0;
+ }
+#endif
#endif
#if defined(CONFIG_KALLSYMS) && !defined(STAPCONF_KALLSYMS_LOOKUP_NAME_EXPORTED)
{