linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga.com>
To: <fastboot@lists.osdl.org>, Sachin Sant <sachinp@in.ibm.com>
Cc: linuxppc-dev@ozlabs.org, Vivek Goyal <vgoyal@in.ibm.com>
Subject: [PATCH HACK kexec-tools-testing] malloc corruption hack
Date: Wed, 11 Apr 2007 03:29:21 -0500 (CDT)	[thread overview]
Message-ID: <boot-4-kexec-01.miltonm@bga.com> (raw)
In-Reply-To: <boot-4-00.miltonm@bga.com>


On a system with rtas, a hash table, no pci, and one memory node I
got the following error:

*** glibc detected *** double free or corruption (out): 0x0000000010115800 ***
kexec-reboot: line 9:  2366 Aborted                 \
  ./kexec --mem-max=0x20000000 -l /root/vmlinux --devicetreeblob=dtall.dtb


The problem is count_memory_ranges doesn't count what get_devtree_details
will be adding to the exlcude list.

This is a very gross hack to get around the problem, I post it so others
might benifit until the real problem is fixed.

However, I would also like to point out that the code is deficent, as it
is only looking for the properties in specific directories.  It should
be looking in all directories for the properties, like the reserve code
building the device tree.   TCE (iommu) tables can be attached to any
pci bus.  Also, it allows other ranges to be reserved by just changing
the device tree, instead of adding new searches to kexec-tools.

--- 
Thanks to Sonny for getting a debug envrionment laoded to debug this failure.

--- kexec-tools-testing/kexec/arch/ppc64/kexec-ppc64.c.orig	2007-04-10 22:29:59.000000000 -0500
+++ kexec-tools-testing/kexec/arch/ppc64/kexec-ppc64.c	2007-04-10 22:30:21.000000000 -0500
@@ -124,6 +124,8 @@ static int count_memory_ranges()
 	}
 	closedir(dir);
 
+	max_memory_ranges += 5;	/* base exclude ranges - kernel, rtas, etc */
+
 	return 0;
 }
 

  reply	other threads:[~2007-04-11  8:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11  8:28 [PATCH 0/3+2+8] powerpc zImage kexec Milton Miller
2007-04-11  8:29 ` Milton Miller [this message]
2007-04-11  8:30 ` [PATCH kexec-tools] ppc64: correct @ha relocation Milton Miller
2007-04-12  3:24   ` Simon Horman
2007-04-12  3:57     ` [Fastboot] " Simon Horman
2007-04-12  8:17   ` Mohan Kumar M
2007-04-13  1:35     ` Simon Horman
2007-04-11  8:30 ` [PATCH kexec-tools] ppc64: use kernels slave loop for purgatory Milton Miller
2007-04-13  1:34   ` Simon Horman
2007-04-11  8:31 ` [PATCH] export retained initrd in debugfs Milton Miller
2007-04-12  6:17   ` Michael Neuling
2007-04-11  8:32 ` [PATCH] kexec: send slaves to new kernel earlier Milton Miller
2007-04-11  8:32 ` [PATCH 1/8] boot: more verbose gunzip error message Milton Miller
2007-04-12  7:46   ` David Gibson
2007-04-11  8:32 ` [PATCH 2/8] bootwrapper: smp support code Milton Miller
2007-04-11  8:32 ` [PATCH 3/8] bootwrapper: occuppied memory ranges Milton Miller
2007-04-11  8:33 ` [PATCH 4/8] bootwrapper: help for 64 bit cpus Milton Miller
2007-04-12  7:43   ` Segher Boessenkool
2007-04-12  8:49     ` Benjamin Herrenschmidt
2007-04-11  8:33 ` [PATCH 5/8] bootwrapper: Add kexec callable zImage wrapper Milton Miller
2007-04-11  8:33 ` [PATCH 6/8] bootwrapper: convert flatdevtree to version 16 Milton Miller
2007-04-11 16:30   ` Scott Wood
2007-04-12 16:56     ` Milton Miller
2007-04-11  8:34 ` [PATCH 7/8] bootwrapper: rtas support Milton Miller
2007-04-11  8:34 ` [PATCH 8/8] bootwrapper: example sreset marshalling Milton Miller

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=boot-4-kexec-01.miltonm@bga.com \
    --to=miltonm@bga.com \
    --cc=fastboot@lists.osdl.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sachinp@in.ibm.com \
    --cc=vgoyal@in.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).