On Wed, Jun 18, 2008 at 11:50:52AM -0500, Charles Duffy wrote:
> CONFIG_KALLSYMS is indeed defined, but kallsyms_lookup_name doesn't
> appear to be exported in this kernel.
Ok I'm aware that kallsyms_lookup_name isn't exported in recent
kernels, and when I implemented the patch I verified that the export
was removed here:
changeset: 38128:da689f9ecdd9
user: Ananth N Mavinakayanahalli <[EMAIL PROTECTED]>
date: Mon Oct 02 21:57:16 2006 +0700
summary: [PATCH] Kprobes: Make kprobe modules more portable
diff -r 025d3a916c7d -r da689f9ecdd9 kernel/kallsyms.c
--- a/kernel/kallsyms.c Mon Oct 02 21:57:15 2006 +0700
+++ b/kernel/kallsyms.c Mon Oct 02 21:57:16 2006 +0700
@@ -154,7 +154,6 @@ unsigned long kallsyms_lookup_name(const
}
return module_kallsyms_lookup_name(name);
}
-EXPORT_SYMBOL_GPL(kallsyms_lookup_name);
v2.6.19-rc3 40489:bed003f043c8
v2.6.19-rc2 39833:93988811847a
v2.6.19-rc1 39283:faecb9cc26cd
v2.6.18 34283:dc1d277d06e0
That's where the 2.6.19 number comes from. So 2.6.18 should still have
it because it has changeset number 34283.
So I guess RHEL was patched with v2.6.19-rc1 while keeping the name to
2.6.18.
hrtimers were exported here:
changeset: 27310:a671ca535b55
user: Stephen Hemminger <[EMAIL PROTECTED]>
date: Thu Jun 01 06:27:11 2006 +0700
summary: [PATCH] hrtimer: export symbols
diff -r 85c4a996a332 -r a671ca535b55 kernel/hrtimer.c
--- a/kernel/hrtimer.c Thu Jun 01 06:27:11 2006 +0700
+++ b/kernel/hrtimer.c Thu Jun 01 06:27:11 2006 +0700
@@ -456,6 +456,7 @@ hrtimer_start(struct hrtimer *timer, kti
return ret;
}
+EXPORT_SYMBOL_GPL(hrtimer_start);
/**
* hrtimer_try_to_cancel - try to deactivate a timer
[..]
v2.6.17 27472:e3554576c29a
v2.6.17-rc6 27401:d349717b8dc8
v2.6.17-rc5 27216:016512c08f6b
v2.6.17-rc4 26901:c86d3036bd16
v2.6.17-rc3 26461:8a0c5ce16e31
v2.6.17-rc2 26210:cbfa59dad07d
v2.6.17-rc1 25555:969a12bcc0a9
v2.6.16 21346:7d239c83edea
So the hrtimer exports are available in 2.6.17 included. I was going
strict on the kallsyms_lookup removal point, but it is effectively safer
to go strict on the hrtimer export because distros will keep their
version number backwards instead of forward.
So to fix this we've only to apply this:
Signed-off-by: Andrea Arcangeli <[EMAIL PROTECTED]>
diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
index 08b8841..79b8373 100644
--- a/kernel/external-module-compat.h
+++ b/kernel/external-module-compat.h
@@ -663,7 +663,7 @@ extern int (*hrtimer_start_p)(struct hrtimer *timer,
ktime_t tim,
const enum hrtimer_mode mode);
extern int (*hrtimer_cancel_p)(struct hrtimer *timer);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) && defined(CONFIG_KALLSYMS)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) && defined(CONFIG_KALLSYMS)
static inline void hrtimer_kallsyms_resolve(void)
{
hrtimer_init_p = (void *) kallsyms_lookup_name("hrtimer_init");
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html