lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120227194341.GA1448@merkur.ravnborg.org>
Date:	Mon, 27 Feb 2012 20:43:41 +0100
From:	Sam Ravnborg <sam@...nborg.org>
To:	Meelis Roos <mroos@...ux.ee>
Cc:	Tejun Heo <tj@...nel.org>,
	Grant Likely <grant.likely@...retlab.ca>,
	Rob Herring <rob.herring@...xeda.com>,
	sparclinux@...r.kernel.org,
	Linux Kernel list <linux-kernel@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: OF-related boot crash in 3.3.0-rc3-00188-g3ec1e88

On Mon, Feb 27, 2012 at 07:17:42PM +0200, Meelis Roos wrote:
> > > > > Can you please try the following patch?  If it still fails to boot,
> > > > > please attach the failing log.  Thank you.
> > > > 
> > > > It works on E3500! Will try other machines tomorrow.
> > > 
> > > Once confirmed, I'll push the patch through tip.  It just hides the
> > > underlying problem but we should be in no worse shape than before,
> > > it's two line change so reproduing the problem again for proper
> > > diagnosing isn't difficult, and we're getting a bit late in release
> > > cycle already.
> > 
> > It cured the V210 too but I could not test V100 since it's offline until 
> > monday.
> 
> Tested V100 too, success!

Hi Meelis.

I have tried to cook up a small patch that verify the length of what
we read - compared to the original length.

Could you try to give this a quick spin and see if something
turns up. I you have time it would be good to try on a box
that worked before and one that was fixed by the patch from Tejun.

I have not looked much at the of stuff - but this looked like the right place to start.

I have no possibility to try it out myself...

	Sam

diff --git a/drivers/of/pdt.c b/drivers/of/pdt.c
index 07cc1d6..826204a 100644
--- a/drivers/of/pdt.c
+++ b/drivers/of/pdt.c
@@ -128,6 +128,10 @@ static struct property * __init of_pdt_build_one_prop(phandle node, char *prev,
 			p->value = prom_early_alloc(p->length + 1);
 			len = of_pdt_prom_ops->getproperty(node, p->name,
 					p->value, p->length);
+
+			if (len != p->length)
+				pr_err("prop: %s %d => %d", p->name, p->length, len);
+
 			if (len <= 0)
 				p->length = 0;
 			((unsigned char *)p->value)[p->length] = '\0';
@@ -161,8 +165,13 @@ static char * __init of_pdt_get_one_property(phandle node, const char *name)
 
 	len = of_pdt_prom_ops->getproplen(node, name);
 	if (len > 0) {
+		int proplen;
 		buf = prom_early_alloc(len);
-		len = of_pdt_prom_ops->getproperty(node, name, buf, len);
+		proplen = of_pdt_prom_ops->getproperty(node, name, buf, len);
+
+		if (proplen != len)
+			pr_err("prop: %s %d => %d\n", name, len, proplen);
+
 	}
 
 	return buf;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ