From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: [ANNOUNCE] kvm-70 release Date: Wed, 18 Jun 2008 19:14:24 +0200 Message-ID: <20080618171424.GG9365@duo.random> References: <48572C32.50009@qumranet.com> <4857A917.4040406@lfarkas.org> <485918B1.6080103@lfarkas.org> <20080618164611.GF9365@duo.random> <44B5599C8B5B1347AFF903FDCEC0030706764E7C@auscorpex-1.austin.messageone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Farkas Levente , Avi Kivity To: Charles Duffy Return-path: Received: from host36-195-149-62.serverdedicati.aruba.it ([62.149.195.36]:46688 "EHLO mx.cpushare.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751380AbYFRRO3 (ORCPT ); Wed, 18 Jun 2008 13:14:29 -0400 Content-Disposition: inline In-Reply-To: <44B5599C8B5B1347AFF903FDCEC0030706764E7C@auscorpex-1.austin.messageone.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 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 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 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");