public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: linux-ia64@vger.kernel.org
Subject: Re: current bk goes BUG on ia64 when dumping core
Date: Mon, 06 Oct 2003 06:41:05 +0000	[thread overview]
Message-ID: <marc-linux-ia64-106542248311073@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106533868423168@msgid-missing>

> When running the latest LTP code, it dies in the new coredump code.

This is what I predicted when I sent the second ia64 version of the patch.
Please refer to that message for complete testing instructions to verify
the core format is correct (assuming it doesn't crash any more with the new
patch).  I've made another cosmetic change to avoid using "vsyscall" in
variable names, and here is that version of the patch relative to the
current 2.6 tree.


Thanks,
Roland


Index: linux-2.5/include/asm-ia64/elf.h
=================================RCS file: /home/cvs/linux-2.5/include/asm-ia64/elf.h,v
retrieving revision 1.11
diff -u -b -p -r1.11 elf.h
--- linux-2.5/include/asm-ia64/elf.h 3 Oct 2003 22:45:47 -0000 1.11
+++ linux-2.5/include/asm-ia64/elf.h 6 Oct 2003 04:53:23 -0000
@@ -218,20 +218,23 @@ do {										\
 #define ELF_CORE_EXTRA_PHDRS		(GATE_EHDR->e_phnum)
 #define ELF_CORE_WRITE_EXTRA_PHDRS						\
 do {										\
-	const struct elf_phdr *const vsyscall_phdrs =			      \
+	const struct elf_phdr *const gate_phdrs =			      \
 		(const struct elf_phdr *) (GATE_ADDR + GATE_EHDR->e_phoff);   \
 	int i;									\
-	Elf32_Off ofs = 0;						      \
+	Elf64_Off ofs = 0;						      \
 	for (i = 0; i < GATE_EHDR->e_phnum; ++i) {				\
-		struct elf_phdr phdr = vsyscall_phdrs[i];		      \
+		struct elf_phdr phdr = gate_phdrs[i];			      \
 		if (phdr.p_type = PT_LOAD) {					\
-			BUG_ON(ofs != 0);				      \
-			ofs = phdr.p_offset = offset;				\
 			phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz);	      \
 			phdr.p_filesz = phdr.p_memsz;			      \
+			if (ofs = 0) {					      \
+				ofs = phdr.p_offset = offset;		      \
 			offset += phdr.p_filesz;				\
 		}							      \
 		else							      \
+				phdr.p_offset = ofs;			      \
+		}							      \
+		else							      \
 			phdr.p_offset += ofs;					\
 		phdr.p_paddr = 0; /* match other core phdrs */			\
 		DUMP_WRITE(&phdr, sizeof(phdr));				\
@@ -239,13 +242,15 @@ do {										\
 } while (0)
 #define ELF_CORE_WRITE_EXTRA_DATA					\
 do {									\
-	const struct elf_phdr *const vsyscall_phdrs =			      \
+	const struct elf_phdr *const gate_phdrs =			      \
 		(const struct elf_phdr *) (GATE_ADDR + GATE_EHDR->e_phoff);   \
 	int i;								\
 	for (i = 0; i < GATE_EHDR->e_phnum; ++i) {			\
-		if (vsyscall_phdrs[i].p_type = PT_LOAD)		      \
-			DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr,	      \
-				   PAGE_ALIGN(vsyscall_phdrs[i].p_memsz));    \
+		if (gate_phdrs[i].p_type = PT_LOAD) {			      \
+			DUMP_WRITE((void *) gate_phdrs[i].p_vaddr,	      \
+				   PAGE_ALIGN(gate_phdrs[i].p_memsz));	      \
+			break;						      \
+		}							      \
 	}								\
 } while (0)
 

  parent reply	other threads:[~2003-10-06  6:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-05  7:24 current bk goes BUG on ia64 when dumping core Andrew Morton
2003-10-05  7:38 ` Andrew Morton
2003-10-06  6:41 ` Roland McGrath [this message]
2003-10-06 12:34 ` Andrew Morton
2003-10-07  5:06 ` current bk goes BUG on ia64 when dumping core; FIXED, PATCH Peter Chubb
2003-10-07  5:19 ` Roland McGrath
2003-10-07  8:17 ` Peter Chubb

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-106542248311073@msgid-missing \
    --to=roland@redhat.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