* Section mismatch in parainstructions
@ 2006-12-10 23:58 Randy Dunlap
2006-12-11 0:40 ` Jeremy Fitzhardinge
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Randy Dunlap @ 2006-12-10 23:58 UTC (permalink / raw)
To: virtualization; +Cc: akpm, sam
Is it OK for section .parainstructions to reference
exit.text?
I'm seeing:
WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0)
WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x8)
If that's OK, we need a small patch to modpost, as below.
---
~Randy
From: Randy Dunlap <randy.dunlap@oracle.com>
Section .parainstructions should not warn about section mismatches.
WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0)
WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x8)
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
scripts/mod/modpost.c | 1 +
1 file changed, 1 insertion(+)
--- linux-2.6.19-git17.orig/scripts/mod/modpost.c
+++ linux-2.6.19-git17/scripts/mod/modpost.c
@@ -997,6 +997,7 @@ static int exit_section_ref_ok(const cha
"__bug_table", /* used by powerpc for BUG() */
".exitcall.exit",
".eh_frame",
+ ".parainstructions",
".stab",
"__ex_table",
".fixup",
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Section mismatch in parainstructions
2006-12-10 23:58 Section mismatch in parainstructions Randy Dunlap
@ 2006-12-11 0:40 ` Jeremy Fitzhardinge
2006-12-11 2:34 ` Randy Dunlap
2006-12-12 0:14 ` Rusty Russell
2006-12-12 3:21 ` Andi Kleen
2 siblings, 1 reply; 6+ messages in thread
From: Jeremy Fitzhardinge @ 2006-12-11 0:40 UTC (permalink / raw)
To: Randy Dunlap; +Cc: akpm, virtualization, sam
Randy Dunlap wrote:
> Is it OK for section .parainstructions to reference
> exit.text?
>
> I'm seeing:
>
> WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0)
> WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x8)
>
> If that's OK, we need a small patch to modpost, as below.
>
What are the semantics of .exit.text? In principle a paravirtualized
instruction can appear anywhere, so I think these warnings are bogus.
The only concern is if one of these sections disappears before the
paravirt_ops instruction substitution happens.
J
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Section mismatch in parainstructions
2006-12-11 0:40 ` Jeremy Fitzhardinge
@ 2006-12-11 2:34 ` Randy Dunlap
2006-12-11 9:34 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2006-12-11 2:34 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: akpm, virtualization, sam
On Sun, 10 Dec 2006 16:40:53 -0800 Jeremy Fitzhardinge wrote:
> Randy Dunlap wrote:
> > Is it OK for section .parainstructions to reference
> > exit.text?
> >
> > I'm seeing:
> >
> > WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0)
> > WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x8)
> >
> > If that's OK, we need a small patch to modpost, as below.
> >
>
> What are the semantics of .exit.text? In principle a paravirtualized
> instruction can appear anywhere, so I think these warnings are bogus.
> The only concern is if one of these sections disappears before the
> paravirt_ops instruction substitution happens.
Good question. I don't see much doc on that subject.
Rusty could probably answer that better than me.
Something like this:
.exit.text section(s) can be discarded from built-in (non-modular)
code (or not even loaded at all).
.exit.text section(s) in modules is only loaded when
CONFIG_MODULE_UNLOAD=y.
so what are the .parainstructions text sections for?
Are they for replacing code instructions based on some
condition(s)? (like <gag> self-modifying code? </gag>)
---
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Section mismatch in parainstructions
2006-12-11 2:34 ` Randy Dunlap
@ 2006-12-11 9:34 ` Jeremy Fitzhardinge
0 siblings, 0 replies; 6+ messages in thread
From: Jeremy Fitzhardinge @ 2006-12-11 9:34 UTC (permalink / raw)
To: Randy Dunlap; +Cc: akpm, virtualization, sam
Randy Dunlap wrote:
> Good question. I don't see much doc on that subject.
> Rusty could probably answer that better than me.
>
Yep, it is definitely his problem, since he wrote both halves of the
equation...
> Something like this:
>
> .exit.text section(s) can be discarded from built-in (non-modular)
> code (or not even loaded at all).
>
> .exit.text section(s) in modules is only loaded when
> CONFIG_MODULE_UNLOAD=y.
>
>
> so what are the .parainstructions text sections for?
> Are they for replacing code instructions based on some
> condition(s)? (like <gag> self-modifying code? </gag>)
You can compile in support for multiple paravirtualizing hypervisors
(ie, Xen, VMI and/or lhype), and it will work out which backend is
appropriate to use at runtime. Once it has done that, the backends have
the option to patch inline code to implement simple operations (sti, for
example).
So the .parainstructions section marks where there are instructions
which the backend may want to replace, and the substitution happens
relatively early in the kernel boot process (and on module load, I
assume, but I haven't checked).
J
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Section mismatch in parainstructions
2006-12-10 23:58 Section mismatch in parainstructions Randy Dunlap
2006-12-11 0:40 ` Jeremy Fitzhardinge
@ 2006-12-12 0:14 ` Rusty Russell
2006-12-12 3:21 ` Andi Kleen
2 siblings, 0 replies; 6+ messages in thread
From: Rusty Russell @ 2006-12-12 0:14 UTC (permalink / raw)
To: Randy Dunlap; +Cc: akpm, virtualization, sam
On Sun, 2006-12-10 at 15:58 -0800, Randy Dunlap wrote:
> Is it OK for section .parainstructions to reference
> exit.text?
Yep, it can (and will) reference any section.
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Section .parainstructions should not warn about section mismatches.
>
> WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0)
> WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x8)
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Section mismatch in parainstructions
2006-12-10 23:58 Section mismatch in parainstructions Randy Dunlap
2006-12-11 0:40 ` Jeremy Fitzhardinge
2006-12-12 0:14 ` Rusty Russell
@ 2006-12-12 3:21 ` Andi Kleen
2 siblings, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2006-12-12 3:21 UTC (permalink / raw)
To: virtualization; +Cc: Randy Dunlap, akpm, sam
On Monday 11 December 2006 00:58, Randy Dunlap wrote:
>
> Is it OK for section .parainstructions to reference
> exit.text?
Yes it's ok because
/* .exit.text is discard at runtime, not link time, to deal with references
from .altinstructions and .eh_frame */
Same applies to paravirtops patching.
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-12-12 3:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-10 23:58 Section mismatch in parainstructions Randy Dunlap
2006-12-11 0:40 ` Jeremy Fitzhardinge
2006-12-11 2:34 ` Randy Dunlap
2006-12-11 9:34 ` Jeremy Fitzhardinge
2006-12-12 0:14 ` Rusty Russell
2006-12-12 3:21 ` Andi Kleen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.