WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: 2.6.22-rc6-mm1: Xen: WARNING: Absolute relocations prese

To: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: 2.6.22-rc6-mm1: Xen: WARNING: Absolute relocations present
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Sun, 01 Jul 2007 15:13:34 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Andi Kleen <ak@xxxxxxx>, Adrian Bunk <bunk@xxxxxxxxx>, chrisw@xxxxxxxxxxxx, Vivek Goyal <vgoyal@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 01 Jul 2007 15:11:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <m1bqevsw5r.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070628034321.38c9f12b.akpm@xxxxxxxxxxxxxxxxxxxx> <20070628204001.GA6087@xxxxxxxxx> <46841EC4.7080805@xxxxxxxx> <m1hcoorv79.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx> <4687D744.6000103@xxxxxxxx> <m1bqevsw5r.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.4 (X11/20070615)
Eric W. Biederman wrote:
Jeremy Fitzhardinge <jeremy@xxxxxxxx> writes:


Adrian Bunk wrote:

<--  snip  -->

...
  RELOCS  arch/i386/boot/compressed/vmlinux.relocs
WARNING: Absolute relocations present
Offset     Info     Type     Sym.Value Sym.Name
c0101f80 020c6501   R_386_32 00000000  xen_irq_disable_direct_reloc
c0101f9a 0221ea01   R_386_32 00000000  xen_save_fl_direct_reloc
Actually I have to ask.  How in the world are these absolute symbols
ok from a relocation perspective.

If the kernel is not running at 0xc0100000 the offset value looks like
it will be completely bogus.

Notice they're absolute 0.

Maybe those are ok, but if you could please explain why those are
false positives I would appreciate it. (Especially in your patch
description).

If these are indeed false positives the patch looks ok.

Subject: xen: suppress abs symbol warnings for unused reloc pointers

arch/i386/xen/xen-asm.S defines some small pieces of code which are
used to implement a few paravirt_ops.  They're designed so they can be
used either in-place, or be inline patched into their callsites if
there's enough space.

Some of those operations need to make calls out (specifically, if you
re-enable events [interrupts], and there's a pending event at that
time).  These calls need the call instruction to be relocated if the
code is patched inline.  In this case xen_foo_reloc is a section-relative
symbol which points to xen_foo's required relocation.

Other operations have no need of a relocation, and so their
corresponding xen_bar_reloc is absolute 0.  These are the cases which
are triggering the warning.

This patch adds those symbols to the list of safe abs symbols.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
Cc: Adrian Bunk <bunk@xxxxxxxxx>

---
arch/i386/boot/compressed/relocs.c |    2 ++
1 file changed, 2 insertions(+)

===================================================================
--- a/arch/i386/boot/compressed/relocs.c
+++ b/arch/i386/boot/compressed/relocs.c
@@ -31,6 +31,8 @@ static const char* safe_abs_relocs[] = {
                "__kernel_rt_sigreturn",
                "__kernel_sigreturn",
                "SYSENTER_RETURN",
+               "xen_irq_disable_direct_reloc",
+               "xen_save_fl_direct_reloc",
};

static int is_safe_abs_reloc(const char* sym_name)



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>