public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Don Dugger <n0ano@valinux.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] Fix two IA32 bugs.
Date: Tue, 08 May 2001 22:12:30 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590693005550@msgid-missing> (raw)

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

David-

Here's a patch, against the 2.4.3 kernel + the 0405 IA64 patch + the
LDT patch, that fixes two IA32 buglets:

1)  A typo in `siginfo64to32' caught by Dave Engebretsen.  I can only
assume that this code is never called because otherwise the bug should
have caused the kernel to dereference location 0.

2)  Initialize the IA32 registers on process startup.  This should fix
the problem you were seeing where the JAVA JRE was not terminating
properly.  Since EDX was not being initialized the IA32 exit code could
have been jumping into never-never land.

-- 
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@valinux.com
Ph: 303/938-9838

[-- Attachment #2: patch_0507.l --]
[-- Type: text/plain, Size: 1096 bytes --]

--- linux-2.4.3-ia64/arch/ia64/ia32/binfmt_elf32.c	Mon May  7 08:40:48 2001
+++ kernel-bigsur/arch/ia64/ia32/binfmt_elf32.c	Fri May  4 15:46:04 2001
@@ -157,6 +157,19 @@
 	current->thread.tssd = IA32_SEG_UNSCRAMBLE(ia32_gdt_table[_TSS(nr)]);
 
 	ia32_load_state(current);
+	/*
+	 *  According to the ABI %edx points to an `atexit' handler.
+	 *  Since we don't have one we'll set it to 0 and initialize
+	 *  all the other registers just to make things more deterministic,
+	 *  ala the i386 implementation.
+	 */
+	regs->r8 = 0;	/* %eax */
+	regs->r11 = 0;	/* %ebx */
+	regs->r9 = 0;	/* %ecx */
+	regs->r10 = 0;	/* %edx */
+	regs->r13 = 0;	/* %ebp */
+	regs->r14 = 0;	/* %esi */
+	regs->r15 = 0;	/* %edi */
 }
 
 int
--- linux-2.4.3-ia64/arch/ia64/ia32/sys_ia32.c	2001/04/19 20:43:31
+++ kernel-bigsur/arch/ia64/ia32/sys_ia32.c	2001/05/08 21:58:08
@@ -3230,7 +3230,7 @@
 siginfo_t32 *
 siginfo64to32(siginfo_t32 *d, siginfo_t *s)
 {
-	memset (&d, 0, sizeof(siginfo_t32));
+	memset (d, 0, sizeof(siginfo_t32));
 	d->si_signo = s->si_signo;
 	d->si_errno = s->si_errno;
 	d->si_code = s->si_code;

                 reply	other threads:[~2001-05-08 22:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=marc-linux-ia64-105590693005550@msgid-missing \
    --to=n0ano@valinux.com \
    --cc=linux-ia64@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox