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]
Date:	Wed, 6 Jun 2012 00:46:17 +0000
From:	Bhushan Bharat-R65777 <R65777@...escale.com>
To:	David Miller <davem@...emloft.net>,
	"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
	Andrea Arcangeli <aarcange@...hat.com>
CC:	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"galak@...nel.crashing.org" <galak@...nel.crashing.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: RE: [PATCH] powerpc: Fix assmption of end_of_DRAM() returns end
 address



> -----Original Message-----
> From: David Miller [mailto:davem@...emloft.net]
> Sent: Wednesday, June 06, 2012 3:51 AM
> To: benh@...nel.crashing.org
> Cc: Bhushan Bharat-R65777; linuxppc-dev@...ts.ozlabs.org; linux-
> kernel@...r.kernel.org; galak@...nel.crashing.org; Bhushan Bharat-R65777
> Subject: Re: [PATCH] powerpc: Fix assmption of end_of_DRAM() returns end address
> 
> From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> Date: Wed, 06 Jun 2012 08:17:39 +1000
> 
> > On Tue, 2012-06-05 at 19:25 +0530, Bharat Bhushan wrote:
> >> memblock_end_of_DRAM() returns end_address + 1, not end address.
> >> While some code assumes that it returns end address.
> >
> > Shouldn't we instead fix it the other way around ? IE, make
> > memblock_end_of_DRAM() does what the name implies, which is to return
> > the last byte of DRAM, and fix the -other- callers not to make bad
> > assumptions ?
> 
> That was my impression too when I saw this patch.

Initially I also intended to do so. I initiated a email on linux-mm@  subject "memblock_end_of_DRAM()  return end address + 1" and the only response I received from Andrea was:

"
It's normal that "end" means "first byte offset out of the range". End = not ok.
end = start+size.
This is true for vm_end too. So it's better to keep it that way.
My suggestion is to just fix point 1 below and audit the rest :)
"

Thanks
-Bharat

--
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