DEVEL15-linux-no-syscall-probe-with-no-init-mm-20080406
authorMarc Dionne <marc.dionne@technoconseil.com>
Mon, 7 Apr 2008 04:49:00 +0000 (04:49 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 7 Apr 2008 04:49:00 +0000 (04:49 +0000)
LICENSE IPL10
FIXES 88000

no better idea for this, got to do something... push this for now

(cherry picked from commit c7ee4828e0d7c631fcd827d1a4c9af8bebb2fc2d)

acinclude.m4
src/afs/LINUX/osi_probe.c
src/cf/linux-test4.m4

index 4776c3d..adc2b5e 100644 (file)
@@ -692,6 +692,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 LINUX_SYSCTL_TABLE_CHECKING
                 LINUX_HAVE_IGET
                 LINUX_FS_STRUCT_NAMEIDATA_HAS_PATH
+                LINUX_EXPORTS_INIT_MM
                  LINUX_EXPORTS_SYS_CHDIR
                  LINUX_EXPORTS_SYS_CLOSE
                  LINUX_EXPORTS_SYS_OPEN
@@ -704,7 +705,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                     ac_cv_linux_exports_ia32_sys_call_table=yes
                   fi
                  else
-                   LINUX_EXPORTS_INIT_MM
                    LINUX_EXPORTS_KALLSYMS_ADDRESS
                    LINUX_EXPORTS_KALLSYMS_SYMBOL
                    LINUX_EXPORTS_SYS_CALL_TABLE
@@ -927,6 +927,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 if test "x$ac_cv_linux_struct_nameidata_has_path" = "xyes" ; then
                  AC_DEFINE(STRUCT_NAMEIDATA_HAS_PATH, 1, [define if your struct nameidata has path])
                 fi
+                if test "x$ac_cv_linux_exports_init_mm" = "xyes" ; then
+                 AC_DEFINE(EXPORTED_INIT_MM, 1, [define if your kernel exports init_mm])
+                fi
                 if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
                  AC_DEFINE(EXPORTED_TASKLIST_LOCK, 1, [define if tasklist_lock exported])
                 fi
index 7c5400e..e1a0aaa 100644 (file)
@@ -45,6 +45,7 @@
 
 /* Code to find the Linux syscall table */
 
+#if defined(EXPORTED_INIT_MM)
 #ifdef OSI_PROBE_STANDALONE
 #define OSI_PROBE_DEBUG
 #endif
@@ -1481,3 +1482,9 @@ module_init(osi_probe_init);
 module_exit(osi_probe_exit);
 #endif
 #endif
+#else
+void *osi_find_syscall_table(int which)
+{
+    return 0;
+}
+#endif /* EXPORTED_INIT_MM */
index 995c5da..09e713d 100644 (file)
@@ -81,10 +81,9 @@ AC_DEFUN([LINUX_EXPORTS_INIT_MM], [
   AC_MSG_CHECKING([for exported init_mm])
   AC_CACHE_VAL([ac_cv_linux_exports_init_mm], [
     AC_TRY_KBUILD(
-[#include <linux/modversions.h>],
-[#ifndef __ver_init_mm
-#error init_mm not exported
-#endif],
+[extern struct mm_struct init_mm;],
+[void *address = &init_mm;
+printk("%p\n", address);],
       ac_cv_linux_exports_init_mm=yes,
       ac_cv_linux_exports_init_mm=no)])
   AC_MSG_RESULT($ac_cv_linux_exports_init_mm)])