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

Mailing List Archive: Linux: Kernel

[PATCH 1/3] uml: use -mcmodel=kernel for x86_64

 

 

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


blaisorblade at yahoo

Aug 6, 2006, 8:47 AM

Post #1 of 6 (367 views)
Permalink
[PATCH 1/3] uml: use -mcmodel=kernel for x86_64

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade [at] yahoo>

We have never used this flag and recently one user experienced a complaining
warning about this (there was a symbol in the positive half of the address space
IIRC). So fix it.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade [at] yahoo>
---

arch/um/Makefile-x86_64 | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64
index 9558a7c..11154b6 100644
--- a/arch/um/Makefile-x86_64
+++ b/arch/um/Makefile-x86_64
@@ -4,10 +4,13 @@ # Released under the GPL
core-y += arch/um/sys-x86_64/
START := 0x60000000

+_extra_flags_ = -fno-builtin -m64 -mcmodel=kernel
+
#We #undef __x86_64__ for kernelspace, not for userspace where
#it's needed for headers to work!
-CFLAGS += -U__$(SUBARCH)__ -fno-builtin -m64
-USER_CFLAGS += -fno-builtin -m64
+CFLAGS += -U__$(SUBARCH)__ $(_extra_flags_)
+USER_CFLAGS += $(_extra_flags_)
+
CHECKFLAGS += -m64
AFLAGS += -m64
LDFLAGS += -m elf_x86_64
-
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/


jdike at addtoit

Aug 7, 2006, 2:18 PM

Post #2 of 6 (361 views)
Permalink
Re: [PATCH 1/3] uml: use -mcmodel=kernel for x86_64 [In reply to]

On Sun, Aug 06, 2006 at 05:47:00PM +0200, Paolo 'Blaisorblade' Giarrusso wrote:
> +_extra_flags_ = -fno-builtin -m64 -mcmodel=kernel

What exactly does this do, and can you remember why you think it's needed?

Jeff
-
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/


blaisorblade at yahoo

Aug 8, 2006, 3:46 AM

Post #3 of 6 (362 views)
Permalink
Re: [PATCH 1/3] uml: use -mcmodel=kernel for x86_64 [In reply to]

Jeff Dike <jdike [at] addtoit> ha scritto:

> On Sun, Aug 06, 2006 at 05:47:00PM +0200, Paolo 'Blaisorblade'
> Giarrusso wrote:
> > +_extra_flags_ = -fno-builtin -m64 -mcmodel=kernel

> What exactly does this do
go to "man gcc" and search mcmodel for the answer to this one.
And x86_64 uses it too, so this patch should go for 2.6.18.

>, and can you remember why you think it's
> needed?

Ok, here's my answer to the original bugreport, which is a complete
explaination - sorry for not providing the link, I have very little
time for UML this summer.

http://marc.theaimsgroup.com/?l=user-mode-linux-devel&m=115125101012707&w=2

Bye

Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
-
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/


ak at suse

Aug 8, 2006, 4:22 AM

Post #4 of 6 (355 views)
Permalink
Re: [PATCH 1/3] uml: use -mcmodel=kernel for x86_64 [In reply to]

Paolo 'Blaisorblade' Giarrusso <blaisorblade [at] yahoo> writes:

> From: Paolo 'Blaisorblade' Giarrusso <blaisorblade [at] yahoo>
>
> We have never used this flag and recently one user experienced a complaining
> warning about this (there was a symbol in the positive half of the address space
> IIRC). So fix it.

You can't use kernel cmodel in user space. It requires running on negative
virtual addresses. I would be surprised if it worked for you.

-Andi
>
-
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/


blaisorblade at yahoo

Aug 8, 2006, 7:03 AM

Post #5 of 6 (358 views)
Permalink
Re: [PATCH 1/3] uml: use -mcmodel=kernel for x86_64 [In reply to]

Andi Kleen <ak [at] suse> ha scritto:

> Paolo 'Blaisorblade' Giarrusso <blaisorblade [at] yahoo> writes:
>
> > From: Paolo 'Blaisorblade' Giarrusso <blaisorblade [at] yahoo>
> >
> > We have never used this flag and recently one user experienced a
> complaining
> > warning about this (there was a symbol in the positive half of
> the address space
> > IIRC). So fix it.
>
> You can't use kernel cmodel in user space. It requires running on
> negative
> virtual addresses. I would be surprised if it worked for you.

Argh, yes, I didn't test the patch and I didn't think to it a lot. So
what about the following bug? Should we hack our own module loader
based on x86-64's one?

Moreover, who has recently tested module loading in x86-64 uml
kernels? I don't remember doing such testing recently...

http://marc.theaimsgroup.com/?l=user-mode-linux-devel&m=115125101012707&w=2


Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
-
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/


ak at suse

Aug 8, 2006, 7:14 AM

Post #6 of 6 (351 views)
Permalink
Re: [PATCH 1/3] uml: use -mcmodel=kernel for x86_64 [In reply to]

On Tuesday 08 August 2006 16:03, Paolo Giarrusso wrote:
> Andi Kleen <ak [at] suse> ha scritto:
>
> > Paolo 'Blaisorblade' Giarrusso <blaisorblade [at] yahoo> writes:
> >
> > > From: Paolo 'Blaisorblade' Giarrusso <blaisorblade [at] yahoo>
> > >
> > > We have never used this flag and recently one user experienced a
> > complaining
> > > warning about this (there was a symbol in the positive half of
> > the address space
> > > IIRC). So fix it.
> >
> > You can't use kernel cmodel in user space. It requires running on
> > negative
> > virtual addresses. I would be surprised if it worked for you.
>
> Argh, yes, I didn't test the patch and I didn't think to it a lot. So
> what about the following bug? Should we hack our own module loader
> based on x86-64's one?

Add the positive relocations to the standard x86-64 loader
and send me a patch. Then you can reuse it.

That should be cleaner than forking it

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