All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH] UML - fix utsname build breakage
Date: Sat, 15 Jul 2006 23:24:40 -0400	[thread overview]
Message-ID: <20060716032440.GA5126@ccure.user-mode-linux.org> (raw)
In-Reply-To: <44B996B2.8040202@garzik.org>

On Sat, Jul 15, 2006 at 09:30:26PM -0400, Jeff Garzik wrote:
> I can't find any 'JB_' symbols on my computer, except for the uses in 
> your source code.   :(

In libc, there used to be.

A quick and dirty patch, unsuitable for mainline is this:

Newer libcs don't define the JB_* jmp_buf access macros.  If this is
the case, we provide values ourselves.

Index: linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c
===================================================================
--- linux-2.6.15.orig/arch/um/os-Linux/sys-i386/registers.c	2006-02-13 13:00:06.000000000 -0500
+++ linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c	2006-02-13 13:04:07.000000000 -0500
@@ -130,6 +130,12 @@ void get_safe_registers(unsigned long *r
 		       HOST_FP_SIZE * sizeof(unsigned long));
 }
 
+#ifndef JB_PC
+#define JB_PC 5
+#define JB_SP 4
+#define JB_BP 3
+#endif
+
 void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
 {
 	struct __jmp_buf_tag *jmpbuf = buffer;
Index: linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c
===================================================================
--- linux-2.6.15.orig/arch/um/os-Linux/sys-x86_64/registers.c	2006-02-13 13:00:06.000000000 -0500
+++ linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c	2006-02-13 13:04:07.000000000 -0500
@@ -78,6 +78,12 @@ void get_safe_registers(unsigned long *r
 		       HOST_FP_SIZE * sizeof(unsigned long));
 }
 
+#ifndef JB_PC
+#define JB_PC 7
+#define JB_RSP 6
+#define JB_RBP 1
+#endif
+
 void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
 {
 	struct __jmp_buf_tag *jmpbuf = buffer;

I have a couple other patches, which may be better for mainline, which
take klibc's setjmp implementation.  My -mm patch grabs the
appropriate klibc header and object, and my mainline patch simply
copies the klibc sources into the UML tree.  If you want either of
those, let me know.

				Jeff


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

WARNING: multiple messages have this Message-ID (diff)
From: Jeff Dike <jdike@addtoit.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [PATCH] UML - fix utsname build breakage
Date: Sat, 15 Jul 2006 23:24:40 -0400	[thread overview]
Message-ID: <20060716032440.GA5126@ccure.user-mode-linux.org> (raw)
In-Reply-To: <44B996B2.8040202@garzik.org>

On Sat, Jul 15, 2006 at 09:30:26PM -0400, Jeff Garzik wrote:
> I can't find any 'JB_' symbols on my computer, except for the uses in 
> your source code.   :(

In libc, there used to be.

A quick and dirty patch, unsuitable for mainline is this:

Newer libcs don't define the JB_* jmp_buf access macros.  If this is
the case, we provide values ourselves.

Index: linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c
===================================================================
--- linux-2.6.15.orig/arch/um/os-Linux/sys-i386/registers.c	2006-02-13 13:00:06.000000000 -0500
+++ linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c	2006-02-13 13:04:07.000000000 -0500
@@ -130,6 +130,12 @@ void get_safe_registers(unsigned long *r
 		       HOST_FP_SIZE * sizeof(unsigned long));
 }
 
+#ifndef JB_PC
+#define JB_PC 5
+#define JB_SP 4
+#define JB_BP 3
+#endif
+
 void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
 {
 	struct __jmp_buf_tag *jmpbuf = buffer;
Index: linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c
===================================================================
--- linux-2.6.15.orig/arch/um/os-Linux/sys-x86_64/registers.c	2006-02-13 13:00:06.000000000 -0500
+++ linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c	2006-02-13 13:04:07.000000000 -0500
@@ -78,6 +78,12 @@ void get_safe_registers(unsigned long *r
 		       HOST_FP_SIZE * sizeof(unsigned long));
 }
 
+#ifndef JB_PC
+#define JB_PC 7
+#define JB_RSP 6
+#define JB_RBP 1
+#endif
+
 void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
 {
 	struct __jmp_buf_tag *jmpbuf = buffer;

I have a couple other patches, which may be better for mainline, which
take klibc's setjmp implementation.  My -mm patch grabs the
appropriate klibc header and object, and my mainline patch simply
copies the klibc sources into the UML tree.  If you want either of
those, let me know.

				Jeff

  reply	other threads:[~2006-07-16  3:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-14 19:52 [uml-devel] [PATCH] UML - fix utsname build breakage Jeff Dike
2006-07-14 19:52 ` Jeff Dike
2006-07-16  1:30 ` [uml-devel] " Jeff Garzik
2006-07-16  1:30   ` Jeff Garzik
2006-07-16  3:24   ` Jeff Dike [this message]
2006-07-16  3:24     ` Jeff Dike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060716032440.GA5126@ccure.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.