Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

2.6.22-rc6-mm1: Xen: WARNING: Absolute relocations present

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


bunk at stusta

Jun 28, 2007, 1:40 PM

Post #1 of 7 (220 views)
Permalink
2.6.22-rc6-mm1: Xen: WARNING: Absolute relocations present

<-- 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
...

<-- snip -->

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


jeremy at goop

Jun 28, 2007, 1:49 PM

Post #2 of 7 (197 views)
Permalink
Re: 2.6.22-rc6-mm1: Xen: WARNING: Absolute relocations present [In reply to]

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
> ...
>
> <-- snip -->
>

Hm. Those are false alarms. I guess I could do something to hide them,
but there's nothing inherently wrong with correctly used abs symbols.
Is there someway to whitelist them?

J

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


ebiederm at xmission

Jul 1, 2007, 8:37 AM

Post #3 of 7 (185 views)
Permalink
Re: 2.6.22-rc6-mm1: Xen: WARNING: Absolute relocations present [In reply to]

Jeremy Fitzhardinge <jeremy [at] goop> 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
>> ...
>>
>> <-- snip -->
>>
>
> Hm. Those are false alarms. I guess I could do something to hide them, but
> there's nothing inherently wrong with correctly used abs symbols. Is there
> someway to whitelist them?

Yes. Just add them to arch/i386/boot/compressed/relocs.c safe_abs_syms.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


jeremy at goop

Jul 1, 2007, 9:33 AM

Post #4 of 7 (185 views)
Permalink
Re: 2.6.22-rc6-mm1: Xen: WARNING: Absolute relocations present [In reply to]

Eric W. Biederman wrote:
> Jeremy Fitzhardinge <jeremy [at] goop> 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
>>> ...
>>>
>>> <-- snip -->
>>>
>>>
>> Hm. Those are false alarms. I guess I could do something to hide them, but
>> there's nothing inherently wrong with correctly used abs symbols. Is there
>> someway to whitelist them?
>>
>
> Yes. Just add them to arch/i386/boot/compressed/relocs.c safe_abs_syms.
>

OK, how's this?

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

The Xen code generates some abs symbols which are OK from a relocation
perspective.

Signed-off-by: Jeremy Fitzhardinge <jeremy [at] xensource>
Cc: Adrian Bunk <bunk [at] stusta>

---
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)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


bunk at stusta

Jul 1, 2007, 1:23 PM

Post #5 of 7 (185 views)
Permalink
Re: 2.6.22-rc6-mm1: Xen: WARNING: Absolute relocations present [In reply to]

On Sun, Jul 01, 2007 at 09:33:08AM -0700, Jeremy Fitzhardinge wrote:
> Eric W. Biederman wrote:
>> Jeremy Fitzhardinge <jeremy [at] goop> 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
>>>> ...
>>>>
>>>> <-- snip -->
>>>>
>>>>
>>> Hm. Those are false alarms. I guess I could do something to hide them,
>>> but
>>> there's nothing inherently wrong with correctly used abs symbols. Is
>>> there
>>> someway to whitelist them?
>>>
>>
>> Yes. Just add them to arch/i386/boot/compressed/relocs.c safe_abs_syms.
>>
>
> OK, how's this?
>
> Subject: xen: suppress abs symbol warnings for unused reloc pointers
>...

Thanks, works for me.

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


ebiederm at xmission

Jul 1, 2007, 1:31 PM

Post #6 of 7 (186 views)
Permalink
Re: 2.6.22-rc6-mm1: Xen: WARNING: Absolute relocations present [In reply to]

Jeremy Fitzhardinge <jeremy [at] goop> writes:

> Eric W. Biederman wrote:
>> Jeremy Fitzhardinge <jeremy [at] goop> 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
>>>> ...
>>>>
>>>> <-- snip -->
>>>>
>>>>
>>> Hm. Those are false alarms. I guess I could do something to hide them, but
>>> there's nothing inherently wrong with correctly used abs symbols. Is there
>>> someway to whitelist them?
>>>
>>
>> Yes. Just add them to arch/i386/boot/compressed/relocs.c safe_abs_syms.
>>
>
> OK, how's this?
>
> Subject: xen: suppress abs symbol warnings for unused reloc pointers
>
> The Xen code generates some abs symbols which are OK from a relocation
> perspective.

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.

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.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


jeremy at goop

Jul 1, 2007, 3:13 PM

Post #7 of 7 (191 views)
Permalink
Re: 2.6.22-rc6-mm1: Xen: WARNING: Absolute relocations present [In reply to]

Eric W. Biederman wrote:
> Jeremy Fitzhardinge <jeremy [at] goop> 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 [at] xensource>
Cc: Adrian Bunk <bunk [at] stusta>

---
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)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.